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

CCD -> FHIR conversion not populating 'entry' in composition resource sections #446

Open
jasorello opened this issue Dec 9, 2022 · 2 comments
Assignees

Comments

@jasorello
Copy link

It appears that the conversion for CCD records is not populating the required 'entry' the various sections. I've observed this when running the converter locally but it also appears to be present in the 'expected' output in the unit tests.

Expected but missing entry: https://www.hl7.org/fhir/composition-definitions.html#Composition.section.entry
Example of allergy section with missing entry: https://github.com/microsoft/FHIR-Converter/blob/main/src/Microsoft.Health.Fhir.Liquid.Converter.FunctionalTests/TestData/Expected/Ccda/CCD/170.314B2_Amb_CCD-expected.json#L114-L129

 {
{
	"title": "Allergies and Adverse Reactions",
	"text": {
		"status": "generated",
		"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Allergies and Adverse Reactions</div>"
	},
	"code": {
		"coding": [
			{
				"code": "48765-2",
				"display": "Allergies, adverse reactions, alerts",
				"system": "http://loinc.org"
			}
		]
	},
	"mode": "snapshot"
}

Example of allergy resource that I would expect linked via an "entry" uhhh entry in the allergy section of the composition: https://github.com/microsoft/FHIR-Converter/blob/main/src/Microsoft.Health.Fhir.Liquid.Converter.FunctionalTests/TestData/Expected/Ccda/CCD/170.314B2_Amb_CCD-expected.json#L586-L653

{
	"fullUrl": "urn:uuid:ba4e86d0-f601-b3bc-fc62-3e0b72318e0e",
	"resource": {
		"resourceType": "AllergyIntolerance",
		"id": "ba4e86d0-f601-b3bc-fc62-3e0b72318e0e",
		"identifier": [
			{
				"system": "urn:oid:1.3.6.1.4.1.22812.3.99930.3.4.10.2",
				"value": "624373800001"
			},
			{
				"system": "urn:oid:1.3.6.1.4.1.22812.3.99930.3.4.10.2",
				"value": "637073500005"
			}
		],
		"clinicalStatus": {...},
		"reaction": [...],
		"onsetDateTime": "2001-01-10T00:00:00-05:00",
		"patient": {
			"reference": "Patient/a656b459-dec5-7b46-77eb-41c20c9a5901"
		}
	},
	...
}

As an example, I would expect the initial "Allergies and Adverse Reactions" section to have something like this to indicate the relationship to the Allergy Intolerance that appears later in the bundle.

	"entry": [
		{
			"reference": "AllergyIntolerance/ba4e86d0-f601-b3bc-fc62-3e0b72318e0e"
		}
	]

I'm still learning how to interpret the liquid mapping language but it would appear that this template file is supposed to generate the entry list?
https://github.com/microsoft/FHIR-Converter/blob/main/data/Templates/Ccda/Reference/Composition/_Section_Entry.liquid

I will continue to research and attempt to fix, if i can :)

@Kedar782
Copy link

@jasorello
How are you executing the program locally? Are you using the master branch?

@jasorello
Copy link
Author

Using master branch, ya.
I'm building using what i think are regular dotnet build commands (i don't know c# very well, yet), something like:
dotnet publish src/Microsoft.Health.Fhir.Liquid.Converter.Tool/Microsoft.Health.Fhir.Liquid.Converter.Tool.csproj -c Release -o out
and then using the command line tool as described in the repo's readme.

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