Closed adunsulag closed 2 years ago
@sjpadgett Does our carecoordination module require there to be an encounter for the patient to generate a ccd? I saw that with the CCD document for CCDA 2.1 the encounters section is optional.
I'm just trying to figure out if I should do check in the API call to make sure a patient has encounters before I do the API CCD generation. When I filter by a date range that exclude any encounters the CCD fails to generate (serveccda.js returns an empty string).
Here is the 2.1 spec on the CCD that shows encounters section is optional: http://www.hl7.org/ccdasearch/templates/2.16.840.1.113883.10.20.22.1.2.html
@adunsulag Sorry, having a rough couple days. Yep breaks w/o encounter so I'll see if I can fix. I think it is the only section I don't test for empty. Also need to fix clinical notes being sent always. I've never really tested that part of CCM. I'm beginning to wish I left care team alone.:)
@sjpadgett Don't worry about the encounter thing, I've got a fix in place as I'm working on the g9 date filtering.
@sjpadgett I may need to take a different approach to how we are filtering on the start and end dates. Running into problems that depend on encounters. For example serveccda.js::getPlanOfCare() requires an encounter for nearly all of its properties.
For example for Scenario 1 of G9/B1 I have a care plan test pending date of June 29th, but the encounter is on June 22nd. Specify a search date that is between the 23rd to 29th which excludes the encounter and the CCDA doesn't generate.
I'm toying with changing up the search filtering so that it filters the dates on the encounters and then all the other filtered elements dependent on the encounter (procedure, careplan, goals, etc) are based on filtering on the encounters. IE they will do an WHERE encounter IN ($encounter_list);
@adunsulag Whatever you think best.
Currently g9 only is generating the most current ccd document for a patient.
We need to make sure we can generate a document on a specific date (start and end date are the same day) and that we can generate a CCD document with a date range. For ONC we only have to meet those two requirements.
If we want to be IG spec compliant with HL7 FHIR g9 we need to be able to handle the datetime modifiers (eq, lt,gt,eb,ap, etc) with portions of dates (only year, year & month, year & day) all the way down to second granularity. This would require passing down our Date search field objects into the CCDA generator and using their more powerful search expressiveness to generate our date filtering. If I end up doing this, we would need to support a string date like we have now and the option of the date search field object which should accomodate what we need from both the UX and the API endpoints.
For background reading if anyone cares here is the the $docref specification for HL7 and here is the search modifier documentation: http://hl7.org/fhir/us/core/OperationDefinition-docref.html
https://build.fhir.org/search.html#date