Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STU3 -> R4 Conversion Medication Request Date Issue #457

Open
dadams300 opened this issue Mar 1, 2023 · 5 comments
Open

STU3 -> R4 Conversion Medication Request Date Issue #457

dadams300 opened this issue Mar 1, 2023 · 5 comments
Assignees

Comments

@dadams300
Copy link

dadams300 commented Mar 1, 2023

When using the STU3 -> R4 template for conversion. I received an error trying to load the transformed data into the MSFT FHIR server. The issue is specific to the date being converted occurrence date time. This is data created with Synthea.

STU3 - Data for immunication
"fullUrl": "urn:uuid:9f5a4cc9-2d28-c259-3f74-9d4f76b7b0ba", "resource": { "resourceType": "Immunization", "id": "9f5a4cc9-2d28-c259-3f74-9d4f76b7b0ba", "status": "completed", "notGiven": false, "vaccineCode": { "coding": [ { "system": "http://hl7.org/fhir/sid/cvx", "code": "140", "display": "Influenza, seasonal, injectable, preservative free" } ], "text": "Influenza, seasonal, injectable, preservative free" }, "patient": { "reference": "urn:uuid:3d869c88-c6bb-443d-0c35-924c131af87c" }, "encounter": { "reference": "urn:uuid:c9894b58-a8c7-45ee-4168-71860a5d29ad" }, "date": "2022-04-05T03:06:43-04:00", "primarySource": true }, "request": { "method": "POST", "url": "Immunization" } } ] }

R4 - Converted Data
{ "fullUrl": "urn:uuid:9f5a4cc9-2d28-c259-3f74-9d4f76b7b0ba", "resource": { "resourceType": "Immunization", "id": "9f5a4cc9-2d28-c259-3f74-9d4f76b7b0ba", "status": "completed", "vaccineCode": { "coding": [ { "system": "http://hl7.org/fhir/sid/cvx", "code": "140", "display": "Influenza, seasonal, injectable, preservative free" } ], "text": "Influenza, seasonal, injectable, preservative free" }, "patient": { "reference": "urn:uuid:3d869c88-c6bb-443d-0c35-924c131af87c" }, "encounter": { "reference": "urn:uuid:c9894b58-a8c7-45ee-4168-71860a5d29ad" }, "primarySource": true, "occurrenceDateTime": "4/5/2022 7:06:43 AM" }, "request": { "method": "POST", "url": "Immunization" } } ]

The Error when loading

{ "resourceType": "OperationOutcome", "id": "8dc1e8bab75040651048e4442e8cad73", "meta": { "lastUpdated": "2023-02-15T20:03:39.1047298+00:00" }, "issue": [ { "severity": "error", "code": "invalid", "diagnostics": "Error occurred when parsing model: 'Type checking the data: Literal '2/18/2014 7:06:43 AM' cannot be parsed as a dateTime. (at Resource.entry[81].resource[0].occurrenceDateTime[0])'." } ] }

Perhaps the STU3 -> R4 Template could be modified to:

"occurrenceDateTime" : "{{ msg.date | date: "yyyy-MM-ddTHH:mm:ss.fff%K" }}",

@dadams300 dadams300 changed the title STU3 -> R4 Conversion Meddication Request Date Issue STU3 -> R4 Conversion Medication Request Date Issue Mar 1, 2023
@ms-teli
Copy link
Collaborator

ms-teli commented Mar 6, 2023

Investigated the issue, the root cause is:

Now I'm exploring the fixing options.

@ms-teli
Copy link
Collaborator

ms-teli commented Mar 6, 2023

@dadams300 Please feel free to use the code you pointed out when you run this template outside of the Azure FHIR service. I have tested it and it should work. But if your work depends on the Azure FHIR service, it will take some time for us to roll out the change.

In the meantime, I'm exploring other long-term solutions.

@ms-teli ms-teli closed this as completed Mar 8, 2023
@ms-teli ms-teli reopened this Mar 8, 2023
@ms-teli
Copy link
Collaborator

ms-teli commented Mar 9, 2023

We have a few longer-term options but those would require more fundamental refactoring. The template update seems the best temporary solution at this point. It's consistent with the design and the usage of it in other templates as well.

@dadams300 Please feel free to submit a PR if you wanted. Thank you!

@ms-teli
Copy link
Collaborator

ms-teli commented Mar 22, 2023

There is no response from the user who originally reported this issue and proposed the code to fix, I'm going to create a PR.

@ms-teli
Copy link
Collaborator

ms-teli commented Mar 24, 2023

#461

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants