Autorun
Autorun

Reputation: 319

How do I use a HL7 FHIR custom tag?

Idea: I would like to store the change action on each version of my FHIR Patient resource. For example, when it is created, the action is 'Created'. By similar token, if the subsequent actions on the same resource are 'updated', 'deleted' and 'restored from deleted', the action of each version of the same resource will be 'Updated', 'Deleted' and 'Restored'.

Implementation: We are thinking to put the 'Action' into a customer defined resource.meta.tag. An example is shown below.

"tag" : [ 
        {
            "system" : "hxxp://mydomain/fhir/custom_tag/SystemActionStatus",
            "code" : "Updated"
        }
    ]

Questions:

  1. Is this the right usage and approach to use meta.tag for the system action idea? If not, what should I use?
  2. Does FHIR allow custom meta.tag?
  3. I tried to implement the above, but we got error when testing with a testing tool. Do I need to provide the code definition under hxxp://mydomain/fhir/custom_tag/SystemActionStatus such that a system can access the custom tag to find the definition of each code (created, updated, deleted and restored)?

Any suggestions or links are high appreciated.

Upvotes: 1

Views: 1321

Answers (1)

Mirjam Baltus
Mirjam Baltus

Reputation: 2299

  1. No, I think there are better approaches.

    • If you need to communicate this data to other systems the FHIR way, you can use the AuditEvent resource to capture this data.
    • If it's just for internal storage, you could use an extra database table, and store it outside of the resources.
  2. Yes

  3. No, you don't have to do that. Check the error from server you sent this to, to see why you couldn't put the tag on the resource.

Upvotes: 2

Related Questions