Closed dvribeira closed 3 months ago
(tested with matchbox 3.5.3 with CH EMED 4.0.1, but I believe the problem still applies)
Yes, I have also encountered this problem in a similar project
@dvribeira @pjolo please review the changes:
The changes are good for me.
Thanks a lot!
The changes are also good for me.
The slicing rules of https://github.com/hl7ch/ch-emed/blob/master/input/fsh/profiles/CHEMEDDocumentMedicationList.fsh make it so that actual validation of PML documents containing changed entries will never be successful (tested with matchbox 3.5.3 with CH EMED 4.0.1, but I believe the problem still applies):
partOf
element/slice set as mandatory, while it is optional for original resourcespartOf
element (in our case, any original resource), validation it is not ambiguous as it cannot be a changed resource (which requires this element) -> validation passespartOf
, the validator will not know against with resource profile it should be matched, since both do, and validation will fail.The proposal would be to remove the distinction between original and changed resources at the document entry level, since they are anyway discriminated at the composition/references level and to use the CH EMED parent profiles. It should be enough to use
CHEMEDMedicationStatement
andCHEMEDMedicationRequest
at this level instead:Optionally, but not required to solve the issue, would be to also downgrade the dispense and observation slices to the parent resources out of consistency. No strong opinion there on my side.