Code Monkey home page Code Monkey logo

ch-emed-epr's People

Contributors

dvribeira avatar hendrickxt avatar oliveregger avatar qligier avatar ronaldo-loureiro avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

ch-emed-epr's Issues

Observation: cannot redefine the "medicationXChanged" extensions

The medicationStatementChanged and medicationRequestChanged extensions are references to CHEMEDMedicationStatement and CHEMEDMedicationRequest.

We need to change them to references to CHEMEDEPRMedicationStatement and CHEMEDEPRMedicationRequest here. How can it be done?
We can't update the extension directly. If we extend the extensions, we have to remove the old ones from the Observation and add the new ones. The issue with that is the constraint that specifically checks for the extension URL. Also, it would not be compatible with CH-EMED.

@ziegm Any idea on how to do it?

Review markdown content

There is content in the markdown files (e.g. document_pre.md) with content that might be also present in the service guide (e.g. aggregation rules). We should double check the content in these files belongs to the fhir IG and that they are up to date.

Required texts on CodeableConcepts

Should the CodeableConcept texts be mandatory or not?
In the base specification, the text and code.display are optional, so a document could contain only the code. For required value sets, this may not be an issue because we also provide the value sets with translated displays. For other cases (no value set, or example/extendable), this may be a bigger issue.

For ahdis, this is over-constrained and not the way to go.

UnitCode valueset mapping problems

After the feedback from Laure-Zoé K. during the PMP Days preparatory tests concerning the problems of the displayed units and trying to find a suitable mapping with the Presco team, it was decided that a solution should be found to have a differentiation between units of presentation like applicator and their administration use (for dosage) counterparts, e.g. application.

The first suggestion during a PMP specs bi-weekly meeting was to simply discriminate by usage (a mechanism supported by FHIR), which would mean that we would have different displays for different uses and not only for different languages as it is the case now. This would mean that we would still use the same value set for both units of presentation (packaging) and for the dosages, but that for cases like applicator we would display application instead of applicator. This had the advantage of presenting minimal changes and no actual codes to be changed or added. Disadvantages included the fact that semantically application and applicator are not the same thing and that it would not be a very elegant solution.

During the last PMP specs bi-weekly meeting this solution was rejected by Oliver E. and Michaela Z. who proposed instead that we should open a CH-EMED issue to add whichever codes are missing and keep using the same value set for both packaging and dosage.

Now, after having again a look at this, the current problematic concerning the solution proposed by Oliver and Michaela is the following:

  1. The UnitCode values come from both UCUM and SNOMED, but the SNOMED codes are international and not Swiss. I don't think it is feasible to think that any codes can be added to any of those. Any further codes will have to be either added to a new system, maybe a complementary SNOMED for the missing ones or maybe just creating a new Swiss SNOMED for all the codes used in this value set.
  2. SNOMED has a value set for units of presentation which is the one used for the UnitCode value set, but it also has Unit of drug administration (https://browser.ihtsdotools.org/?perspective=full&conceptId1=408103002&edition=MAIN&release=&languages=en) which would align more with our needs for the dosage. This is not however a magical solution, work would have to be done with the primary systems to ensure proper mappings are done. This will be needed for cases like the prescription of a pessary, the planning/prescription software should take well into account that indeed the packaging unit is the pessary and that is the prescribed article, but there can be no associated dosage (at least not as an structured periodic intake).

The first solution seems highly unlikely to be accepted to me, since it seems a much better idea to keep to the SNOMED codes as they are for this problematic. There is nothing particularly Swiss about this problem and the international codes will not be touched. Creating a SNOMED complementary system or even worse, forking the whole international one seems overkill to say the least.
The second solution seems more reasonable, but it implies more work now to ensure that this works for all the integrators involved.

Align authorship (and authorship timestamp) fields with CH EMED

The medical authorship fields have been moved from the relevant section to the entries themselves:

We will make sure we are aligned with these changes once they are merged. The changes upstream are:

  • Updated example files.
  • Removed lines on section author from emed composition resources.
  • Added/updated lines for [medical] author on relevant fields of resources, e.g. informationSource for a medication statement with 1..1 cardinality.

Verify that we do not have anything affecting/masking those changes and make sure we are supporting those fields.

First release

We can do a release once CH-EMED, CH-CORE and CH-EPR-Term have made theirs (~ end of June).

Patient vital signs/physical findings

For the body weight, use the IPS way (vital signs and physical findings).

It's an Observation, added to the Bundle that links to the Patient. In the Composition, a new section is added and may contain multiple entries to that kind of Observations.

See the IPS profile. It won't be implemented in CH-EMED for now.
https://build.fhir.org/ig/HL7/fhir-ips/StructureDefinition-Composition-uv-ips.html
http://build.fhir.org/ig/ahdis/chmed/branches/master/index.html

CARA-ch/emed-reporting#8

Decide where the IG should be hosted

  • fhir.ch?
    • hl7 host, no particular rules at the moment but this could change in the future
  • fhir.cara.ch or other own domain?
    • A static web server should be made available to host the published IG(s).

To be discussed with CARA, I presume.

CHEMEDEPRMedicationDispense.prescription must be supported

Currently we flag this as not supported, but in fact this is mandatory if the treatment has already been prescribed. Description should reflect that it should be present when treatment has been prescribed at least once [and absent otherwise].

image

CH terminology moved to CH TERM

CH EPR TERM is now CH TERM, do whatever is necessary on our side to address this.

Verify also if some terminology is moved out from CH EMED EPR.

Related to this: some profiles from CH EMED EPR might be moved from CH EMED EPR to CH Core, this will have to be followed on a different issue if it happens.

Prepare for compatibility with CH IPS

With the preparation of the swiss IG of the International Patient Summary, there are some issues that should be identified in order for getting the PMP ready for this.

In principle, I see no use in providing other resources than the PMLC medication statements for the summary, hence it should be enough to be sure that at least these resources are compatible. Obviously other infrastructure resources like Patient an so on will also have to be checked.

For now, the CH IPS profile medication statement's structure imposes only cardinality constraints on making the medication and the subject mandatory. That's all right.

CH IPS medication statement profile also imposes conformance with FHIR's MedicationStatementIPS. After a fast look this might pose issues with several elements:

  • effective[x] (dateTime/period) is must support with 1..1 cardinality. We do not support it.
    • data-absent-reason is must support. <- added extension
  • dosage.text is must support <- we should probably also make it must support
  • dosage.time is must support <- idem

Invalid GLN passes validation

The MTP https://github.com/ahdis/ch-emed-pmp/files/11441643/mtp.zip (provided in ahdis/ch-emed-pmp#58) contains an invalid GLN identifier for the practitioner, but the validation does pass:

[INFORMATION] [INFORMATIONAL] This element does not match any known slice defined in the profile https://fhir.cara.ch/StructureDefinition/ch-emed-epr-document-medicationtreatmentplan|0.1.0  in Bundle.entry[5] [248:4] from source InstanceValidator

CH EMED

java -jar validator_cli.jar "c:\Users\Quentin\Desktop\mtp.json" -version 4.0.1 -ig output/package.tgz -profile http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-document-medicationtreatmentplan

*FAILURE*: 1 errors, 0 warnings, 4 notes
  Error @ Bundle (line 1, col2): Bundle.entry:Composition: minimum required = 1, but only found 0 (from http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-document-medicationtreatmentplan|3.1.0)
  Information @ Bundle.entry[0] (line 11, col4): This element does not match any known slice defined in the profile http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-document-medicationtreatmentplan|3.1.0
    slice info: Bundle.entry[0]: Does not match slice 'Composition' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-composition-medicationtreatmentplan'))
    slice info: Bundle.entry[0]: Bundle.entry[0].resource.author[1]: Unable to find a match for profile urn:uuid:218c8835-bead-452c-bcc0-8ae2ee960bf1 among choices: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization-epr, http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient-epr, http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitioner-epr, http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitionerrole-epr, http://hl7.org/fhir/StructureDefinition/Device, http://hl7.org/fhir/StructureDefinition/RelatedPerson
    slice info: Bundle.entry[0]: Bundle.entry[0].resource.author[1]: Bundle.entry[0].resource.entry[4].resource/*PractitionerRole/null*/.practitioner: Unable to find a match for profile urn:uuid:706f22eb-a10c-4b06-9f71-2250680c2f00 among choices: 
http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitioner-epr
    slice info: Bundle.entry[0]: Bundle.entry[0].resource.author[1]: Bundle.entry[0].resource.entry[4].resource/*PractitionerRole/null*/.practitioner: Bundle.entry[4].resource.entry[5].resource/*Practitioner/null*/.identifier[0].value: Rule gln-length: 'GLN must be exactly 13 characters long' Failed
    slice info: Bundle.entry[0]: Bundle.entry[0].resource.author[1]: Bundle.entry[0].resource.entry[4].resource/*PractitionerRole/null*/.practitioner: Bundle.entry[4].resource.entry[5].resource/*Practitioner/null*/.identifier[0].value: Rule gln-modulus-10: 'GLN must pass the modulus 10 check - https://www.gs1.org/services/how-calculate-check-digit-manually' Failed
    slice info: Bundle.entry[0]: Bundle.entry[0].resource.author[1]: Bundle.entry[0].resource.entry[4].resource/*PractitionerRole/null*/.practitioner: Bundle.entry[4].resource.entry[5].resource/*Practitioner/null*/.identifier[0].value: Rule gln-startswith7601: 'GLN must start with 7601 for swiss hcp' Failed
    slice info: Bundle.entry[0]: Does not match slice 'Patient' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient'))
    slice info: Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Patient' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient|3.1.0', but found type 'Composition'
    slice info: Bundle.entry[0]: Does not match slice 'Practitioner' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitioner'))
    slice info: Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Practitioner' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitioner|3.1.0', but found type 'Composition'
    slice info: Bundle.entry[0]: Does not match slice 'PractitionerRole' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitionerrole'))
    slice info: Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'PractitionerRole' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitionerrole|3.1.0', but found type 'Composition'
    slice info: Bundle.entry[0]: Does not match slice 'Organization' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization'))
    slice info: Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Organization' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization|3.1.0', but found type 'Composition'
    slice info: Bundle.entry[0]: Does not match slice 'RelatedPerson' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/RelatedPerson'))
    slice info: Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'RelatedPerson' in profile 'http://hl7.org/fhir/StructureDefinition/RelatedPerson|4.0.1', but found type 'Composition'
    slice info: Bundle.entry[0]: Does not match slice 'Device' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/Device'))
    slice info: Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Device' in profile 'http://hl7.org/fhir/StructureDefinition/Device|4.0.1', but found type 'Composition'
    slice info: Bundle.entry[0]: Does not match slice 'Encounter' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter'))
    slice info: Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Encounter' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter|3.1.0', but found type 'Composition'
    slice info: Bundle.entry[0]: Does not match slice 'Location' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location'))
    slice info: Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Location' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location|3.1.0', but found type 'Composition'
    slice info: Bundle.entry[0]: Does not match slice 'Binary' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/Binary'))
    slice info: Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Binary' in profile 'http://hl7.org/fhir/StructureDefinition/Binary|4.0.1', but found type 'Composition'
    slice info: Bundle.entry[0]: Does not match slice 'MedicationStatement' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medicationstatement'))
    slice info: Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'MedicationStatement' in profile 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medicationstatement|3.1.0', but found type 'Composition'
  Information @ Bundle.entry[4] (line 236, col4): This element does not match any known slice defined in the profile http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-document-medicationtreatmentplan|3.1.0
    slice info: Bundle.entry[4]: Does not match slice 'Composition' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-composition-medicationtreatmentplan'))
    slice info: Bundle.entry[4]: Bundle.entry[4].resource: Specified profile type was 'Composition' in profile 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-composition-medicationtreatmentplan|3.1.0', but found type 'PractitionerRole'    
    slice info: Bundle.entry[4]: Does not match slice 'Patient' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient'))
    slice info: Bundle.entry[4]: Bundle.entry[4].resource: Specified profile type was 'Patient' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient|3.1.0', but found type 'PractitionerRole'
    slice info: Bundle.entry[4]: Does not match slice 'Practitioner' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitioner'))
    slice info: Bundle.entry[4]: Bundle.entry[4].resource: Specified profile type was 'Practitioner' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitioner|3.1.0', but found type 'PractitionerRole'
    slice info: Bundle.entry[4]: Does not match slice 'PractitionerRole' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitionerrole'))
    slice info: Bundle.entry[4]: Bundle.entry[4].resource.practitioner: Unable to find a match for profile urn:uuid:706f22eb-a10c-4b06-9f71-2250680c2f00 among choices: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitioner
    slice info: Bundle.entry[4]: Bundle.entry[4].resource.practitioner: Bundle.entry[4].resource.entry[5].resource/*Practitioner/null*/.identifier[0].value: Rule gln-length: 'GLN must be exactly 13 characters long' Failed
    slice info: Bundle.entry[4]: Bundle.entry[4].resource.practitioner: Bundle.entry[4].resource.entry[5].resource/*Practitioner/null*/.identifier[0].value: Rule gln-modulus-10: 'GLN must pass the modulus 10 check - https://www.gs1.org/services/how-calculate-check-digit-manually' Failed
    slice info: Bundle.entry[4]: Bundle.entry[4].resource.practitioner: Bundle.entry[4].resource.entry[5].resource/*Practitioner/null*/.identifier[0].value: Rule gln-startswith7601: 'GLN must start with 7601 for swiss hcp' Failed
    slice info: Bundle.entry[4]: Does not match slice 'Organization' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization'))
    slice info: Bundle.entry[4]: Bundle.entry[4].resource: Specified profile type was 'Organization' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization|3.1.0', but found type 'PractitionerRole'
    slice info: Bundle.entry[4]: Does not match slice 'RelatedPerson' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/RelatedPerson'))
    slice info: Bundle.entry[4]: Bundle.entry[4].resource: Specified profile type was 'RelatedPerson' in profile 'http://hl7.org/fhir/StructureDefinition/RelatedPerson|4.0.1', but found type 'PractitionerRole'
    slice info: Bundle.entry[4]: Does not match slice 'Device' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/Device'))
    slice info: Bundle.entry[4]: Bundle.entry[4].resource: Specified profile type was 'Device' in profile 'http://hl7.org/fhir/StructureDefinition/Device|4.0.1', but found type 'PractitionerRole'
    slice info: Bundle.entry[4]: Does not match slice 'Encounter' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter'))
    slice info: Bundle.entry[4]: Bundle.entry[4].resource: Specified profile type was 'Encounter' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter|3.1.0', but found type 'PractitionerRole'
    slice info: Bundle.entry[4]: Does not match slice 'Location' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location'))
    slice info: Bundle.entry[4]: Bundle.entry[4].resource: Specified profile type was 'Location' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location|3.1.0', but found type 'PractitionerRole'
    slice info: Bundle.entry[4]: Does not match slice 'Binary' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/Binary'))
    slice info: Bundle.entry[4]: Bundle.entry[4].resource: Specified profile type was 'Binary' in profile 'http://hl7.org/fhir/StructureDefinition/Binary|4.0.1', but found type 'PractitionerRole'
    slice info: Bundle.entry[4]: Does not match slice 'MedicationStatement' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medicationstatement'))
    slice info: Bundle.entry[4]: Bundle.entry[4].resource: Specified profile type was 'MedicationStatement' in profile 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medicationstatement|3.1.0', but found type 'PractitionerRole'
  Information @ Bundle.entry[5] (line 248, col4): This element does not match any known slice defined in the profile http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-document-medicationtreatmentplan|3.1.0
    slice info: Bundle.entry[5]: Does not match slice 'Composition' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-composition-medicationtreatmentplan'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Composition' in profile 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-composition-medicationtreatmentplan|3.1.0', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Patient' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Patient' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient|3.1.0', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Practitioner' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitioner'))
    slice info: Bundle.entry[5]: Bundle.entry[4].resource.entry[5].resource/*Practitioner/null*/.identifier[0].value: Rule gln-length: 'GLN must be exactly 13 characters long' Failed
    slice info: Bundle.entry[5]: Bundle.entry[4].resource.entry[5].resource/*Practitioner/null*/.identifier[0].value: Rule gln-modulus-10: 'GLN must pass the modulus 10 check - https://www.gs1.org/services/how-calculate-check-digit-manually' Failed
    slice info: Bundle.entry[5]: Bundle.entry[4].resource.entry[5].resource/*Practitioner/null*/.identifier[0].value: Rule gln-startswith7601: 'GLN must start with 7601 for swiss hcp' Failed
    slice info: Bundle.entry[5]: Does not match slice 'PractitionerRole' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitionerrole'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'PractitionerRole' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitionerrole|3.1.0', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Organization' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Organization' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization|3.1.0', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'RelatedPerson' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/RelatedPerson'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'RelatedPerson' in profile 'http://hl7.org/fhir/StructureDefinition/RelatedPerson|4.0.1', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Device' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/Device'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Device' in profile 'http://hl7.org/fhir/StructureDefinition/Device|4.0.1', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Encounter' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Encounter' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter|3.1.0', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Location' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Location' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location|3.1.0', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Binary' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/Binary'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Binary' in profile 'http://hl7.org/fhir/StructureDefinition/Binary|4.0.1', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'MedicationStatement' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medicationstatement'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'MedicationStatement' in profile 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medicationstatement|3.1.0', but found type 'Practitioner'
  Information @ Bundle.entry[0].resource.entry[3].resource/*MedicationStatement/null*/.contained[0]/*Medication/med*/.code.coding[0] (line 174, col10): Code System URI 'urn:oid:2.51.1.1' is unknown so the code cannot be validated

CH EMED EPR

java -jar validator_cli.jar "c:\Users\Quentin\Desktop\mtp.json" -version 4.0.1 -ig output/package.tgz -profile https://fhir.cara.ch/StructureDefinition/ch-emed-epr-document-medicationtreatmentplan

Success: 0 errors, 0 warnings, 2 notes
  Information @ Bundle.entry[5] (line 248, col4): This element does not match any known slice defined in the profile https://fhir.cara.ch/StructureDefinition/ch-emed-epr-document-medicationtreatmentplan|0.1.0
    slice info: Bundle.entry[5]: Does not match slice 'Composition' (discriminator: resource.conformsTo('https://fhir.cara.ch/StructureDefinition/ch-emed-epr-composition-medicationtreatmentplan'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Composition' in profile 'https://fhir.cara.ch/StructureDefinition/ch-emed-epr-composition-medicationtreatmentplan|0.1.0', but found type 'Practitioner'        
    slice info: Bundle.entry[5]: Does not match slice 'Patient' (discriminator: resource.conformsTo('https://fhir.cara.ch/StructureDefinition/ch-emed-epr-patient'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Patient' in profile 'https://fhir.cara.ch/StructureDefinition/ch-emed-epr-patient|0.1.0', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Practitioner' (discriminator: resource.conformsTo('https://fhir.cara.ch/StructureDefinition/ch-emed-epr-practitioner'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource.identifier[0].value: Rule gln-length: 'GLN must be exactly 13 characters long' Failed
    slice info: Bundle.entry[5]: Bundle.entry[5].resource.identifier[0].value: Rule gln-modulus-10: 'GLN must pass the modulus 10 check - https://www.gs1.org/services/how-calculate-check-digit-manually' Failed
    slice info: Bundle.entry[5]: Bundle.entry[5].resource.identifier[0].value: Rule gln-startswith7601: 'GLN must start with 7601 for swiss hcp' Failed
    slice info: Bundle.entry[5]: Does not match slice 'PractitionerRole' (discriminator: resource.conformsTo('https://fhir.cara.ch/StructureDefinition/ch-emed-epr-practitionerrole'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'PractitionerRole' in profile 'https://fhir.cara.ch/StructureDefinition/ch-emed-epr-practitionerrole|0.1.0', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Organization' (discriminator: resource.conformsTo('https://fhir.cara.ch/StructureDefinition/ch-emed-epr-organization'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Organization' in profile 'https://fhir.cara.ch/StructureDefinition/ch-emed-epr-organization|0.1.0', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'RelatedPerson' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/RelatedPerson'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'RelatedPerson' in profile 'http://hl7.org/fhir/StructureDefinition/RelatedPerson|4.0.1', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Device' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/Device'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Device' in profile 'http://hl7.org/fhir/StructureDefinition/Device|4.0.1', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Encounter' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Encounter' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter|3.1.0', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Location' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Location' in profile 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location|3.1.0', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'Binary' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/Binary'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Binary' in profile 'http://hl7.org/fhir/StructureDefinition/Binary|4.0.1', but found type 'Practitioner'
    slice info: Bundle.entry[5]: Does not match slice 'MedicationStatement' (discriminator: resource.conformsTo('https://fhir.cara.ch/StructureDefinition/ch-emed-epr-medicationstatement-treatmentplan'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'MedicationStatement' in profile 'https://fhir.cara.ch/StructureDefinition/ch-emed-epr-medicationstatement-treatmentplan|0.1.0', but found type 'Practitioner'  
    slice info: Bundle.entry[5]: Does not match slice 'ObsBodyWeight' (discriminator: resource.conformsTo('https://fhir.cara.ch/StructureDefinition/ch-emed-epr-observation-body-weight'))
    slice info: Bundle.entry[5]: Bundle.entry[5].resource: Specified profile type was 'Observation' in profile 'https://fhir.cara.ch/StructureDefinition/ch-emed-epr-observation-body-weight|0.1.0', but found type 'Practitioner'
  Information @ Bundle.entry[0].resource.entry[3].resource/*MedicationStatement/null*/.contained[0]/*Medication/med*/.code.coding[0] (line 174, col10): Code System URI 'urn:oid:2.51.1.1' is unknown so the code cannot be validated

NPM links on history page are broken

The links for the current version (and 1.0.0) point to r4.tgz instead of package.r4.tgz

The NPM can still be properly downloaded from the home page of the IG.

Failed constraint in Dosage

For the following (valid) dosage,

{
	"resourceType": "Dosage",
	"text": "75 mg = 1 cpr, PO, * Le matin - Tous les jours *",
	"timing": {
		"repeat": {
			"boundsPeriod": {
				"start": "2023-04-24"
			},
			"when": [
				"MORN"
			]
		}
	},
	"route": {
		"coding": [
			{
				"system": "urn:oid:0.4.0.127.0.16.1.1.2.1",
				"code": "20053000",
				"display": "Oral use"
			}
		],
		"text": "Oral use"
	},
	"doseAndRate": [
		{
			"doseQuantity": {
				"value": 75,
				"unit": "milligram",
				"system": "http://unitsofmeasure.org",
				"code": "mg"
			}
		}
	]
}

the validator fails a constraint:

Problem processing expression 'not($this.contains('.')) or $this.endsWith('.25') or $this.endsWith('.5') or $this.endsWith('.75')' in profile 'https://fhir.cara.ch/StructureDefinition/ch-emed-epr-amount-quantity|0.1.0' at path 'Dosage.doseAndRate[0].dose.ofType(Quantity).value': Error @1, 2: The function "not" requires 0 parameters

Edit: $this.contains('.').not() or $this.endsWith('.25') or $this.endsWith('.5') or $this.endsWith('.75') does not work either.

Support for medication administration in CH EMED

Following a discussion with S. Spahni over the addition of a medication administration resource to CH-EMED as (optional) part of DIS documents - see hl7ch/ch-emed#242 -, it was decided this matter should be followed closer and proper feedback be provided since we believe this might not be a suitable approach.

A meeting with S. Spahni, LZ. Kaestli et F. Mesia has been scheduled to address this subject (among others) in order to have a better understanding of the adopted technical solution and its implications as well as to provide useful feedback to CH EMED.

CH EMED will go forward with this solution for 4.0.0 and will consider our feedback for 5.0.0.

Remove dashes from display name

To uniformize with other Swiss IGs, we should remove dashes from the display name: CH EMED EPR instead of CH-EMED-EPR.

CH Core, CH EMED, CH VACD, etc.

FHIRPath & regex: How to escape special characters

How to escape regex special characters in FHIRPath?

With the following source (sushi):

Invariant: datetime-only-instant-invariant1
Description: "The dateTime shall only be an instant ('YYYY-MM-DDThh:mm:ss+zz:zz')"
// Variant 1: no escape
Expression: "$this.matches('([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?(Z|(+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))')"
Severity: #error
Invariant: datetime-only-instant-invariant2
Description: "The dateTime shall only be an instant ('YYYY-MM-DDThh:mm:ss+zz:zz')"
// Variant 2: single backslash
Expression: "$this.matches('([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))')"
Severity: #error
Invariant: datetime-only-instant-invariant3
Description: "The dateTime shall only be an instant ('YYYY-MM-DDThh:mm:ss+zz:zz')"
// Variant 3: two backslashes
Expression: "$this.matches('([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))')"
Severity: #error
Invariant: datetime-only-instant-invariant4
Description: "The dateTime shall only be an instant ('YYYY-MM-DDThh:mm:ss+zz:zz')"
// Variant 4: four backslashes
Expression: "$this.matches('([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\\\.[0-9]+)?(Z|(\\\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))')"
Severity: #error

(see how the '.' and '+' are escaped towards the end of the expression)

Variant 2 won't compile:

Sushi: error mismatched input '"$this.matches('([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))')"' expecting STRING (00:02.032)
Sushi:   File: D:\Programmation\FHIR\ch-emed-epr\input\fsh\invariant\various.fsh (00:02.034)
Sushi:   Line: 12                                                                (00:02.034)

The validator gives the following errors for the same document:

col=1057,row=1,locationString=Bundle.entry[0].resource.date,message=Rule datetime-only-instant-invariant1: 'The dateTime shall only be an instant ('YYYY-MM-DDThh:mm:ss+zz:zz')' Failed,Rule datetime-only-instant-invariant1: 'The dateTime shall only be an instant ('YYYY-MM-DDThh:mm:ss+zz:zz')' Failed,severity=error
col=1057,row=1,locationString=Bundle.entry[0].resource.date,message=Problem processing expression '$this.matches('([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))')' in profile 'https://fhir.cara.ch/StructureDefinition/ch-emed-epr-composition-medicationcard' at path 'Bundle.entry[0].resource.date': Error @1, 1: Unknown character escape \.,Problem_processing_expression__in_profile__path__,severity=error
col=1057,row=1,locationString=Bundle.entry[0].resource.date,message=Rule datetime-only-instant-invariant4: 'The dateTime shall only be an instant ('YYYY-MM-DDThh:mm:ss+zz:zz')' Failed,Rule datetime-only-instant-invariant4: 'The dateTime shall only be an instant ('YYYY-MM-DDThh:mm:ss+zz:zz')' Failed,severity=error

The value (2023-02-15T11:18:38+01:00) should be valid against the regex expression (taken from http://hl7.org/fhir/R4/datatypes.html#instant and tested with https://regex101.com/r/kx416U/1).

How does it work?

FHIR tips

FHIR Bundle
La première entrée est une composition
Ne pas lister les resources du bundle, lire la composition et suivre les liens
Gestion des ids

Certaines resources doivent être ajoutées au bundle, d'autres peuvent/doivent êtres contenues (contained). https://www.hl7.org/fhir/references.html#contained et https://www.hl7.org/fhir/documents.html#content

Diff id/identifier : id est un identifiant primaire pour FHIR (e.g. contained reference), identifiant peut être multiple.

meta.profile only for testing => better validation messages (but same result), not for prod.

Address EPRTime extension usage

The following changes would align the specs with the code regarding authorship timestamps:

  • Add EPRTime extension with cardinality 1..1 to:
    • CHEMEDEPRMedicationStatementCard.informationSource
    • CHEMEDEPRMedicationStatementList.informationSource
    • CHEMEDEPRMedicationRequestList.requester
    • CHEMEDEPRMedicationDispenseList.performer.actor
    • CHEMEDEPRObservationList.performer
  • Add EPRTime extension with cardinality 0..1 to:
    • CHEMEDEPRCompositionMedicationTreatmentPlan.section[treatmentPlan].author
    • CHEMEDEPRCompositionMedicationPrescription.section[prescription].author
    • CHEMEDEPRCompositionMedicationDispense.section[dispense].author
    • CHEMEDEPRCompositionPharmaceuticalAdvice.section[pharmaceuticalAdvice].author

check coherency of note.time

For PADV observations, we do not support note.time and, in fact, the aggregator uses the entry time.

Shouldn't we do the same for all note elements in other resources?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.