Stream: implementers
Topic: Implementation Guides in Google FHIR
Merlyn Albery-Speyer (Jun 29 2021 at 17:16):
Hey folks,
I'm using Google FHIR and following these two sources of information to go about uploading implementation guides in order to enable validation on creation of FHIR resources:
My question is: does anyone have examples as to what to add in the "global" field? E.g. which resources are listed for us-core for example.
Thanks!
Lloyd McKenzie (Jun 29 2021 at 17:20):
Global says "if you see a reference to this resource or data type with no declared profile, then behave as though the reference specified this global profile".
Lloyd McKenzie (Jun 29 2021 at 17:20):
It's not something that's widely used.
Paul Church (Jun 29 2021 at 17:41):
We use global because the store configuration defines a set of profiles such that no resource of the specified types will be accepted unless it conforms to at least one of them.
Generally you would look at the profiles in the IG and list the resource types that they depend on (StructureDefinition.type). For US Core there are quite a few.
Merlyn Albery-Speyer (Jun 29 2021 at 18:14):
Thanks @Paul Church ,
That matches my assumptions. For the us drug formulary IG, I added these lines:
{
"resourceType": "ImplementationGuide",
"id": "hl7.fhir.us.davinci-drug-formulary",
"global": [
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-DrugAlternatives-extension" },
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-DrugTierDefinition-extension" },
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-DrugTierID-extension" },
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-EmailPlanContact-extension" },
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyURL-extension" },
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-MarketingURL-extension" },
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-Network-extension" },
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PlanID-extension" },
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PlanIDType-extension" },
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PriorAuthorization-extension" },
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-QuantityLimit-extension" },
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-StepTherapyLimit-extension" },
{ "type": "Extension", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-SummaryURL-extension" },
{ "type": "List", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-CoveragePlan" },
{ "type": "MedicationKnowledge", "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyDrug" }
],
and I've enabled my FHIR store to use the IG successfully as far as I can tell:
{
"name": "projects/REDACTED/locations/REDACTED/datasets/REDACTED/fhirStores/REDACTED",
"enableUpdateCreate": true,
"version": "R4",
"validationConfig": {
"enabledImplementationGuides": [
"http://hl7.org/fhir/us/davinci-drug-formulary/ImplementationGuide/hl7.fhir.us.davinci-drug-formulary"
]
}
}
however I can still successfully insert invalid data, e.g;
{
"code": {
"coding": [
{
"code": "1000091",
"display": "doxepin hydrochloride 5 % Topical Cream",
"system": "http://www.nlm.nih.gov/research/umls/rxnorm"
}
]
},
"id": "28b95b55-b9c5-4b4d-9b98-a67f5b611902",
"meta": {
"lastUpdated": "2021-06-29T18:13:03.294000+00:00",
"profile": [
"http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyDrug"
],
"versionId": "MTYyNDk5MDM4MzI5NDAwMDAwMA"
},
"resourceType": "MedicationKnowledge"
}
^^ note that the required drug tier or plan id extensions are absent.
Any suggestions for how to go about debugging this?
Thanks!
Paul Church (Jun 29 2021 at 18:15):
I'll take a look - you shouldn't need to put the extensions in that list, only the two profiles for formulary.
Paul Church (Jun 29 2021 at 18:17):
I have an example from one of our solutions people who set up the formulary IG, his IG looks like this:
"global": [
{
"type": "List",
"profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-CoveragePlan"
},
{
"type": "MedicationKnowledge",
"profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyDrug"
}
],
Paul Church (Jun 29 2021 at 18:18):
Check the Cloud Logging for your project, if there were configuration errors that got in the way of validation they may show up there.
Paul Church (Jun 29 2021 at 18:24):
Feel free to PM me to debug in more detail.
Merlyn Albery-Speyer (Jun 29 2021 at 21:13):
Thanks to @Paul Church, it looks like my mistake was not using the "v1beta1" API endpoints when updating the FHIR resources. (the "v1" endpoints do not perform profile validation)
Last updated: Apr 12 2022 at 19:14 UTC