FHIR Chat · CIMPL 6.8.0 · cimpl

Stream: cimpl

Topic: CIMPL 6.8.0


view this post on Zulip Chris Moesel (Sep 20 2019 at 21:04):

CIMPL 6.8.0 has just been released. See the release notes for a full list of changes:
https://github.com/standardhealth/shr-cli/releases/tag/v6.8.0

view this post on Zulip Kurt Allen (Sep 25 2019 at 13:28):

Hey @Chris Moesel
I have been doing a lot of refactoring of the breast radiology to reflect comments from the ballot, and I am seeing some issues
I am using 6.8.0.
So I am not using Objective Fhir, but have created my own Fhir base classes.
Thinking of calling 'em Direct Fhir :-)
Anyways my first issue is that I am getting items in the StructureDef.Differential that I didnt change.

So, I created a (r4) DiagnosticReport entry (see attached), and I derived a class "BreastRadiologyReport.txt" from it.
When I run shr-cli, there is an entry in the differential for DiagnosticReport.basedOn (amoung others) that I didnt change.
In the spirit of outputting a clean ig, it would be best if entries only showed up in the differential if they arr actual changes.
Is this something I did wrong?

This is still in the same repository https://github.com/applicadia/Fhir-BreastRadiologyReport, development branch. Execute R4.BuildProfiles.bat to run shr-cli. DiagnosticReport.txt DiagnosticReport_map_r4.txt BreastRadiologyReport.txt

view this post on Zulip Chris Moesel (Sep 25 2019 at 13:37):

Hi @Kurt Allen -- I'll try to take a look at this later... But you are correct; things should only show up in differential if something changed (or if one of its children changed, since IG publisher doesn't deal well with "sparse" differentials).

Occasionally something has changed but it's not rendered in the differential view of the profile page in the IG. Have you looked at the actual JSON profile definition to see what it includes in the differential for that element?

view this post on Zulip Kurt Allen (Sep 25 2019 at 13:38):

@Chris Moesel (sorry to dump on you today, getting back to work on this stuff and finding stuff...)
in BreastRadiologyObservation
I added the following lines
HasMember
includes BreastRadiologyObservationPatientHistory 0..1

and I get the error:
ERROR 12018: 'Cannot constrain element BreastRadiologyObservationPatientHistory to fhir.observation.HasMember since it is an invalid sub-type'
During: Model Expansion
Class: BreastRadiologyObservation
Suggested Fix: Element has to be based on or otherwise a child of sub-type.

Observation.HasMember is defined as:
// Entry definition of Observation.hasMember
Element: HasMember
Value: fhir.observation.Observation
or fhir.questionnaireresponse.QuestionnaireResponse
or fhir.molecularsequence.MolecularSequence

BreastRadiologyObservationPatientHistory is derived from fhir.observation.Observation.

Is this an issue with my code?

view this post on Zulip Kurt Allen (Sep 25 2019 at 13:43):

Yo @Chris Moesel
I looked both in the output structure def profile resource and the ig. It was included in both places.
This is from the BreastRadiologyReport differential:
{
"id": "DiagnosticReport.basedOn",
"path": "DiagnosticReport.basedOn",
"type": [
{
"code": "Reference",
"targetProfile": [
"http://hl7.org/fhir/StructureDefinition/CarePlan",
"http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation",
"http://hl7.org/fhir/StructureDefinition/MedicationRequest",
"http://hl7.org/fhir/StructureDefinition/NutritionOrder",
"http://hl7.org/fhir/StructureDefinition/ServiceRequest"
]
}
]
},

I attached the DiagnosticReport and BreastRadiologyReport structure definitions
structuredefinition-fhir-diagnosticreport-DiagnosticReport.json structuredefinition-brr-BreastRadiologyReport.json

view this post on Zulip Kurt Allen (Sep 25 2019 at 13:43):

Thanks! (and welcome back :-))

view this post on Zulip Chris Moesel (Sep 25 2019 at 13:45):

When you use includes, the thing on the left (HasMember) needs to be a supertype of the thing on the right (BreastRadiologyObservationPatientHistory). That's not the case in your example above -- so that's why it's not working.

Since it is HasMember that repeats (0..*) and not it's Value, you can't simply do HasMember.Value includes... though. There might need to be some refactoring of the model to support this. Have you looked at how Mark models it in obf?

view this post on Zulip Chris Moesel (Sep 25 2019 at 13:49):

Regarding the DiagnosticReport and basedOn, we'll have to take a look at that more closely... I agree that the differential seems entirely unnecessary.

view this post on Zulip Kurt Allen (Sep 25 2019 at 13:54):

My bad.. Thanks!


Last updated: Apr 12 2022 at 19:14 UTC