Support specifying :zen.fhir/type "Resource"
Closed this issue · 2 comments
Profile definition
ResourceProfile
{:zen/tags #{zen.fhir/profile-schema zen/schema}
:confirms #{hl7-fhir-r4-core.Resource/schema}
:zen.fhir/type "Resource"
:zen.fhir/profileUri "urn:profile:heal:Resource"
:type zen/map
:zen.fhir/version "0.5.20"
:keys {:meta {:type zen/map
:keys {:tenantId {:fhir/extensionUri "urn:extension:heal:tenantId"
:confirms #{hl7-fhir-r4-core.string/schema}}}}}}
Resource definition
code:
coding:
- code: '1187310'
system: http://www.nlm.nih.gov/research/umls/rxnorm
display: Tylenol Oral Liquid Product
- code: '476856'
system: https://www.fdbhealth.com
display: Child's Tylenol plus Cough,Runny Nose 1 mg-5 mg-160 mg/5 mL oral susp
meta:
profile:
- urn:profile:heal:Resource
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication
tenantId: '1'
lastUpdated: '2022-11-18T09:31:46.392251Z'
createdAt: '2022-11-18T09:31:46.392251Z'
versionId: '367'
status: active
id: med-1
resourceType: Medication
Hello. Currently we don't support specifying :zen.fhir/type "Resource". You need to specify value that will be contained in your resource "resourceType" attribute, in your case it's "Patient"
Here's an example of such extension:
https://github.com/Aidbox/aidbox-project-samples/blob/main/aidbox-project-samples/multitenancy/multi-box/extensions.edn
However, we have such feature planned in our road map, ETA 2 months.
Our current approach for such cases is to generate zen.fhir/base-schema or zen.fhir/profile-schema profiles explicitly for each resource type you need, excluding system resources that you don't want to have tenant id on, e.g. AidboxJob.
Using zen.fhir/profile-schema will require incoming resources to have the profile uri specified in meta.profile
Using zen.fhir/base-schema will not
(You can generate extensions with the same profile uris for different resource types)
@ir4y I'm changing the label from 'bug' to 'enhancement' and issue name to Support specifying :zen.fhir/type "Resource", do you agree?