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

AU Base Medication: Medication.code invariants always get triggered #280

Closed
dbojicic-agency opened this issue May 31, 2019 · 7 comments
Closed

Comments

@dbojicic-agency
Copy link
Collaborator

Medication.code invariants always get triggered despite the fact they are always true.

Please see the sample medication instance and reported IG Publisher qa errors below:

<Medication xmlns="http://hl7.org/fhir">
    <id value="2f70f312-8323-11e9-bc42-526af7764f64"/>
    <meta>
        <profile
            value="http://hl7.org.au/fhir/StructureDefinition/au-medication"
        />
    </meta>
    <extension url="http://hl7.org.au/fhir/StructureDefinition/medication-brand-name">
        <valueString value="Ferro-Grad C"/>
    </extension>
     <!--  Ferro-Grad C-->
    <code>
        <coding>
            <extension
                url="http://hl7.org.au/fhir/StructureDefinition/medication-type">
                <valueCoding>
                    <system value="http://hl7.org.au/fhir/CodeSystem/medication-type"/>
                    <code value="BPD"/>
                    <display value="Branded product with no strengths or form"/>
                </valueCoding>
            </extension>
            <system value="http://snomed.info/sct"/>
            <code value="53373011000036103"/>
        </coding>
        <text value="Ferro-Grad C"/>
    </code>
</Medication>

Errors:

AMT TPUU valueset membership required [coding.where((system = 'http://snomed.info/sct') and (extention.where(url = 'http://hl7.org.au/fhir/CodeSystem/medication-type').valueCoding = 'BPDSF')).exists() implies coding.where((system = 'http://snomed.info/sct') and (extension.where(url = 'http://hl7.org.au/fhir/CodeSystem/medication-type').valueCoding = 'BPDSF')).first().code in 'http://hl7.org.au/fhir/ValueSet/amt-tpuu-codes']

AMT TPU valueset membership required [coding.where((system = 'http://snomed.info/sct') and (extention.where(url = 'http://hl7.org.au/fhir/CodeSystem/medication-type').valueCoding = 'BPG')).exists() implies coding.where((system = 'http://snomed.info/sct') and (extension.where(url = 'http://hl7.org.au/fhir/CodeSystem/medication-type').valueCoding = 'BPG')).first().code in 'http://hl7.org.au/fhir/ValueSet/amt-tpp-codes']
....
Could not match any discriminators ([system, code]) for slice Medication.code.coding:pbs in profile http://hl7.org.au/fhir/StructureDefinition/au-medication - does not have fixed value, binding or existence assertions for any of the discriminators
...
Could not match any discriminators ([system, code]) for slice Medication.code.coding:gtin in profile http://hl7.org.au/fhir/StructureDefinition/au-medication - does not have fixed value, binding or existence assertions for any of the discriminators
...
@brettesler-ext
Copy link
Collaborator

I am not sure AU sct (AMT) is being resolved by the IG builder - the pbs and gitn looks like an issue with proflles will check

@dbojicic-agency
Copy link
Collaborator Author

@brettesler-ext
Copy link
Collaborator

will check all FHIRPath on ballot resolution

@brettesler-ext
Copy link
Collaborator

Discriminator: to system only
Add fixed system value in each slice to discriminate on
binding AMT (preferred); to allow other SNOMED-CT codes with warnings
across all meds profiles

@RichardTON
Copy link
Collaborator

RichardTON commented Jan 6, 2020

The invariants that caused this have been deleted.
The extension, medication-type (http://hl7.org.au/fhir/StructureDefinition/medication-type), that the invariants constrained is no longer mentioned in the profile.
Can this issue be closed?

@brettesler-ext
Copy link
Collaborator

if in valueset (MP, TPP etc) implies medication-type is absent or correct

  • improve words
  • state this intent
  • conceptmap for medication-type to AMT refsets; at least some words

@dbojicic-agency
Copy link
Collaborator Author

Closing this issue as the original problem has gone away.
@oridashi, please raise another issue for any other work related to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants