jddamore / IPSviewer

A viewer for IPS based on IPS-Argentina (https://github.com/SALUD-AR/IPS-Argentina)
Apache License 2.0
16 stars 15 forks source link

Viewer cant handle some IPS's #15

Closed jkiddo closed 1 year ago

jkiddo commented 1 year ago
image

ips.json -error is reproduceable with the attached IPS.

jddamore commented 1 year ago

Jens,

So I didn't see the error from your screenshot, but in the sample you posted, there are a few issues:

1) https://build.fhir.org/ig/HL7/fhir-ips/StructureDefinition-Bundle-uv-ips.html The fullUrls were missing but are required by standard. The IPS viewer uses those to crosslink entries

2) The sample had some sections with no data

3) The sample had what appeared to be "Immunization" resource in the Allergies section.

4) You reference the Medications in the section for Medications (but better to just reference the MedicationStatements as guided here: https://build.fhir.org/ig/HL7/fhir-ips/StructureDefinition-Composition-uv-ips-definitions.html#diff_Composition.section:sectionMedications

I went ahead and attempted to "fix" the four above issues. For the sections with no data, I just removed them. The new sample is posted here: https://github.com/jddamore/IPSviewer/blob/main/samples/connectathon_samples/DK_Jens_Villadsen_02.json

That sample will render with no edits to viewer. There might be some improvements to make, which we can discuss here. It will tell you some requried sections are missing and that you have missing references (your sample didn't contian the referenced Immunization resource). Let me know if you have another sample with the "includes" error as you screenshot above.

jkiddo commented 1 year ago

Thx for the response. I fixed 1) and it did the job. 2) I can live with. 3) is now fixed - thx. 4) I dont entirely follow you. I've added both MedicationStatements and Medications. From https://build.fhir.org/ig/HL7/fhir-ips/ipsStructure.html#list-of-profiles it looks like both should be there. Do you suggest that I remove the Medications from the section and just have them referenced from the MedicationStatement.medication?.

jddamore commented 1 year ago

Just reference the Medication resources from the MedicationStatement. Don't include "Medication" resources in the Composition.section.entry for the medications section since it's not in the definition of expected resource profiles (i.e. Reference(MedicationStatement, MedicationRequest, MedicationAdministration, MedicationDispense, DocumentReference from that link)

jkiddo commented 1 year ago

Alrighty

jkiddo commented 1 year ago
image
jkiddo commented 1 year ago

One could get the idea that if its mentioned there, then it should be part of the section

jkiddo commented 1 year ago

The text could be understood so:

Following are the profiles that have been defined for each section. (R) denotes a required section (i.e. must be present in an IPS), (S) denotes a recommended section, the others are optional

jddamore commented 1 year ago

I agree that's confusing. I opened a JIRA to change that wording: https://jira.hl7.org/browse/FHIR-42937 Comment there for change to standard. That said, add more here if the viewer isn't working (or needs improvement) as you dig further.

jkiddo commented 1 year ago

👍