how to customize fhir resource?
# support
t
Hi there, I want to add a custom key1 and custom value1 to an FHIR resource. After searching on Google, I found out that I can either use an extension or create a new resource. So, my question is: For example, if I want to add customKey1 to the ResearchStudy resource, should I: 1. Add it as an extension to ResearchStudy? 2. Inherit from ResearchStudy and create a customResearchStudy? 3. Use another method? What should I do? and how to in medplum? ----------------------------------------- And also... I want to change the definition of the snapshot in the FHIR resource to Korean. I found a few JSON files on Medplum where the definitions are specified. - packages\definitions\dist\fhir\r4\dataelements.json - packages\definitions\dist\fhir\r4\fhir.schema.json - packages\definitions\dist\fhir\r4\profiles-resources.json
Copy code
"title": {
          "description": "A short, descriptive user-friendly label for the study.", // to Korean
          "$ref": "#/definitions/string"
        },
In this case, do I also need to create a new resource by inheriting from the original one? Thanks~
r
To add an extension to a FHIR resource in Medplum, you need to include an extension array in your resource object. Each object in the extension array should have a url and a value* field. The url is a link to the definition of the extension, and the value* field is the value of the extension. The value* field's name depends on the type of the value (e.g., valueInteger for an integer value). Here is an example of how to add an extension to a Subscription resource: { "resourceType": "Subscription", "reason": "test", "status": "active", "criteria": "Patient", "channel": { "type": "rest-hook", "endpoint": "https://example.com/webhook" }, "extension": [ { "url": "https://medplum.com/fhir/StructureDefinition/subscription-max-attempts", "valueInteger": 3 } ] } In this example, an extension is added to the Subscription resource. On Medplum you cannot extend the resources in the way you describe
187 Views