Testing IG
0.0.1 - CI Build

Testing IG, published by DBojicic. This guide is not an authorized publication; it is the continuous build for version 0.0.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/dbojicic/test-repo/ and changes regularly. See the Directory of published versions

MedicationDispense.whenPrepared - Date Precision

MedicationDispense.whenPrepared precision

This test series tests the AU Core invariant requiring DocumentReference.content.attachment.url or DocumentReference.content.attachment.data to be present: url.exists() or data.exists()

The table below lists the test scenarios, expected validation results, and corresponding example instances.

Profile Additional constraint Test scenario Expected result Example id
au-core-medicationdispense-wp-a Derives from AU Core MedicationDispense with no additional constraints whenPrepared not present Pass medicationdispense-wp-a-01
whenPrepared present, full datetime Pass medicationdispense-wp-a-02
whenPrepared present, date only (10 chars) Pass medicationdispense-wp-a-03
whenPrepared present, month only (7 chars) Fail medicationdispense-wp-a-04
whenPrepared present, year only (4 chars) Fail medicationdispense-wp-a-05
whenPrepared value not present, DAR used instead Pass medicationdispense-wp-a-06
whenPrepared value + DAR together Pass medicationdispense-wp-a-07
whenPrepared value + unrelated extension Pass medicationdispense-wp-a-08
whenPrepared value not present, unrelated extension only Pass medicationdispense-wp-a-09
whenPrepared value + DAR + unrelated extension Pass medicationdispense-wp-a-10
au-core-medicationdispense-wp-b whenPrepared is mandatory and is required to have a value whenPrepared not present Fail - cardinality (1..1) medicationdispense-wp-b-01
whenPrepared present, full datetime Pass medicationdispense-wp-b-02
whenPrepared present, date only (10 chars) Pass medicationdispense-wp-b-03
whenPrepared present, month only (7 chars) Fail - whenPrepared precision invariant medicationdispense-wp-b-04
whenPrepared present, year only (4 chars) Fail - whenPrepared precision invariant medicationdispense-wp-b-05
whenPrepared value not present, DAR used instead Fail - DAR not accepted as the value sub medicationdispense-wp-b-06
whenPrepared value + DAR together Pass - DAR extension not permitted medicationdispense-wp-b-07
whenPrepared value + unrelated extension Pass - unrelated extension not restricted medicationdispense-wp-b-08
whenPrepared value not present, unrelated extension only Fail - no value present medicationdispense-wp-b-09
whenPrepared value + DAR + unrelated extension Fail - DAR extension still not permitted, independent of the other extension medicationdispense-wp-b-10
au-core-medicationdispense-wp-c whenPrepared is mandatory; DAR is permitted whenPrepared value not present, no DAR Fail - mandatory requirement (neither value nor DAR present) medicationdispense-wp-c-01
whenPrepared present, full datetime Pass medicationdispense-wp-c-02
whenPrepared present, date only (10 chars) Pass medicationdispense-wp-c-03
whenPrepared present, month only (7 chars) Fail - whenPrepared precision invariant medicationdispense-wp-c-04
whenPrepared present, year only (4 chars) Fail - whenPrepared precision invariant medicationdispense-wp-c-05
whenPrepared value not present, DAR used instead Pass - DAR satisfies mandatory requirement medicationdispense-wp-c-06
whenPrepared value + DAR together Pass - DAR permitted; co-existing with a value not prohibited medicationdispense-wp-c-07
whenPrepared value + unrelated extension Pass - unrelated extension unaffected medicationdispense-wp-c-08
whenPrepared value not present, unrelated extension only Pass - 1..1 cardinality from wp-c is satisfied by any extension present, not just DAR medicationdispense-wp-c-09
whenPrepared value + DAR + unrelated extension Pass - all three coexist without conflict medicationdispense-wp-c-10
au-core-medicationdispense-wp-d whenPrepared is mandatory via a separate invariant requiring either a value or DAR whenPrepared value not present, no DAR Fail - value or DAR invariant medicationdispense-wp-d-01
whenPrepared present, full datetime Pass medicationdispense-wp-d-02
whenPrepared present, date only (10 chars) Pass medicationdispense-wp-d-03
whenPrepared present, month only (7 chars) Fail - whenPrepared precision invariant medicationdispense-wp-d-04
whenPrepared present, year only (4 chars) Fail - whenPrepared precision invariant medicationdispense-wp-d-05
whenPrepared value not present, DAR used instead Pass - DAR satisfies value-or-DAR invariant medicationdispense-wp-d-06
whenPrepared value + DAR together Pass - DAR permitted; co-existing with a value not prohibited medicationdispense-wp-c-07
whenPrepared value + unrelated extension Pass - unrelated extension unaffected medicationdispense-wp-c-08
whenPrepared value not present, unrelated extension only Fail - neither value nor DAR present medicationdispense-wp-c-09
whenPrepared value + DAR + unrelated extension Pass - all three coexist without conflict medicationdispense-wp-c-10
au-core-medicationdispense-wp-e whenPrepared remains optional; a separate invariant prohibits DAR whenPrepared value not present, no DAR Pass medicationdispense-wp-e-01
whenPrepared present, full datetime Pass medicationdispense-wp-e-02
whenPrepared present, date only (10 chars) Pass medicationdispense-wp-e-03
whenPrepared present, month only (7 chars) Fail - whenPrepared precision invariant medicationdispense-wp-e-04
whenPrepared present, year only (4 chars) Fail - whenPrepared precision invariant medicationdispense-wp-e-05
whenPrepared value not present, DAR used instead Fail - DAR prohibition invariant fires medicationdispense-wp-e-06
whenPrepared value + DAR together Fail - DAR prohibition invariant fires medicationdispense-wp-e-07
whenPrepared value + unrelated extension Pass - unrelated extension unaffected medicationdispense-wp-e-08
whenPrepared value not present, unrelated extension only Pass - element optional; extension present is not DAR so prohibition invariant doesn't fire medicationdispense-wp-e-09
whenPrepared value + DAR + unrelated extension Fail - DAR prohibition invariant fires; unrelated extension irrelevant medicationdispense-wp-c-10
au-core-medicationdispense-wp-f Derives from profile C with no additional constraints on whenPrepared, to test inheritance through a second level of derivation whenPrepared not present, no DAR Fail - mandatory requirement (neither value nor DAR present) medicationdispense-wp-f-01
whenPrepared present, full datetime Pass medicationdispense-wp-f-02
whenPrepared present, date only (10 chars) Pass medicationdispense-wp-f-03
whenPrepared present, month only (7 chars) Fail - whenPrepared precision invariant medicationdispense-wp-f-04
whenPrepared present, year only (4 chars) Fail - whenPrepared precision invariant medicationdispense-wp-f-05
whenPrepared not present, DAR used instead Pass - DAR satisfies inherited mandatory requirement medicationdispense-wp-f-06
whenPrepared value + DAR together Pass - DAR permitted; co-existing with a value not prohibited medicationdispense-wp-f-07
whenPrepared value + unrelated extension Pass - unrelated extension unaffected medicationdispense-wp-f-08
whenPrepared value not present, unrelated extension only Pass - 1..1 cardinality from wp-c is satisfied by any extension present, not just DAR medicationdispense-wp-f-09
whenPrepared value + DAR + unrelated extension Pass medicationdispense-wp-f-10