-
Notifications
You must be signed in to change notification settings - Fork 159
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
Update to PDex Drug Formulary 1.1.0 #3652
Comments
Following the same pattern from PDEX PlanNet Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
* extension type profiles and value set bindings on StructureDefinitions * meta.profile entries on examples Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Unfortunately, PDEX Drug Formulary 1.1.0 is not backwards compatible with version 1.0.1. Currently, when the IBM FHIR Server sees an extension, it looks up the corresponding extension definition in the registry and checks for conformance. This happens outside of any profile validation. However, because extension urls are never versioned, this means that we'll always look up the latest definition. This makes us quite sensitive to extension definitions that change over time. In PDEX US Drug Formulary 1.1.0, the following extension values have changed from type
To further complicate matters, the code display names in many of the CodeSystems have changed as well:
These CodeSystem are referenced from http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-DrugTierDefinition-extension and some are required. These breaking changes mean that a valid 1.0.1 instance will be invalid in version 1.1.0 and, because we check extensions separate from profile validation, such instances will fail our validation just by having the 1.1.0 versions in the registry. For this reason, I'm thinking that maybe we should split version 1.1.0 into a separate jar from 1.0.1 (or avoid packaging it altogether). |
* extension type profiles and value set bindings on StructureDefinitions * meta.profile entries on examples Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Following the same pattern from PDEX PlanNet Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
* extension type profiles and value set bindings on StructureDefinitions * meta.profile entries on examples Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Following the same pattern from PDEX PlanNet Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
* extension type profiles and value set bindings on StructureDefinitions * meta.profile entries on examples Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Following the same pattern from PDEX PlanNet Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
* extension type profiles and value set bindings on StructureDefinitions * meta.profile entries on examples Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Following the same pattern from PDEX PlanNet Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
* extension type profiles and value set bindings on StructureDefinitions * meta.profile entries on examples Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
issue #3652 - add PDEX Drug Formulary 1.1.0
I ended up implementing this:
|
Tried with a sample resource with a profile version id of 1.0.1, changed the MarketingURL-extension, SummaryURL-extension, FormularyURL-extension, EmailPlanContact-extension from type string to type uri and the validation returned errors. {
"resourceType": "OperationOutcome",
"id": "Error",
"text": {
"status": "additional",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>ERROR</p></div>"
},
"issue": [
{
"severity": "error",
"code": "invariant",
"details": {
"text": "generated-usdf-CoveragePlan~List.extension<http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyURL-extension>: Constraint violation: extension('http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyURL-extension').exists() implies (extension('http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyURL-extension').count() = 1 and extension('http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyURL-extension').all(conformsTo('http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyURL-extension|1.0.1')))"
},
"diagnostics": "Caused by: [[expression: value.as(string).exists(), result: false, location: List.extension[2]]]",
"expression": [
"List"
]
},
{
"severity": "information",
"code": "invariant",
"details": {
"text": "generated-usdf-FormularyURL-extension-2: Constraint violation: value.as(string).exists()"
},
"expression": [
"List.extension[2]"
]
}
]
} Tried with a sample resource with a profile version id of 1.0.1 with valid MarketingURL-extension, SummaryURL-extension, FormularyURL-extension, EmailPlanContact-extension types(type string) and the validation was successful. {
"resourceType": "OperationOutcome",
"id": "NoError",
"text": {
"status": "additional",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>No error</p></div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"details": {
"text": "All OK"
}
}
]
} Tried with a sample resource with a profile version id of 1.0.1 with invalid code display names for DrugTierCS, CoinsuranceOptionCS, CopayOptionCS, PharmacyTypeCS for version 1.0.1 and the validation returned "code-invalid". {
"resourceType": "OperationOutcome",
"id": "NoError",
"text": {
"status": "additional",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>No error</p></div>"
},
"issue": [
{
"severity": "information",
"code": "code-invalid",
"details": {
"text": "generated-usdf-DrugTierDefinition-extension-1: A code in this element must be from the specified value set 'http://hl7.org/fhir/us/davinci-drug-formulary/ValueSet/DrugTierVS|1.0.1' if possible"
},
"expression": [
"List.extension[0].extension[0].value"
]
}
]
} Tried with a sample resource with a profile version id of 1.0.1 with valid code display names for DrugTierCS, CoinsuranceOptionCS, CopayOptionCS, PharmacyTypeCS for version 1.0.1 and the validation was successful. {
"resourceType": "OperationOutcome",
"id": "NoError",
"text": {
"status": "additional",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>No error</p></div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"details": {
"text": "All OK"
}
}
]
} This is working as expected. |
Is your feature request related to a problem? Please describe.
PDex Drug Formulary 1.1.0 was published last fall... its time we add that to our fhir-ig-pdex-formulary module.
Describe the solution you'd like
Add 1.1.0 alongside 1.0.1 ...similar to #3651 .
We should also move the corresponding examples from fhir-examples down to src/test/resources/examples/100 and add the new examples alongside those in a 110 directory.
Describe alternatives you've considered
Replace 1.0.1 with 1.1.0
Acceptance Criteria
GIVEN the fhir-ig-davinci-pdex-formulary jar is in userlib
WHEN a resource is validated against an applicable profile with no version suffix (or specifies a version of 1.1.0)
THEN validation uses the artifacts from PDex Drug Formulary 1.1.0
GIVEN the fhir-ig-davinci-pdex-formulary jar is in userlib
WHEN a resource is validated against an applicable profile with a version id of 1.0.1
THEN validation uses the artifacts from PDex Drug Formulary 1.0.1
Additional context
The text was updated successfully, but these errors were encountered: