How to customize a resource type in the Google Cloud Healthcare API

288 Views Asked by At

I saw that Google Cloud Healthcare does not support custom FHIR resource types and the workaround is to use the Basic feature - an empty feature defined by the FHIR specification.

So, I need to associate a patient with several organizations, so I am thinking of creating a basic object with the regionalized information of the patients and one of the fields for that patient would be an array, a list or a json containing all the organizations that the patient can attend.

Please, has anyone ever needed to create a data structure similar to this in Google Cloud Healthcare or do you have any idea how to do it?

2

There are 2 best solutions below

1
On BEST ANSWER

This answer isn't specific to the Google implementation, as this is all standard FHIR.

From your problem description it might be better to add this field as an extension on the Patient resource. Basic is only necessary when the entire object does not fit the pattern of any existing resource type.

To create an array/list in extensions, the same extension is repeated multiple times; for example:

{
        "resourceType": "Patient",
        "birthDate": "1970-02-02",
        "extension": [{
                "url": "http://my-organization/StructureDefinition/my-reference-array",
                "valueReference": {
                        "reference": "Organization/1"
                }
        },
        {
                "url": "http://my-organization/StructureDefinition/my-reference-array",
                "valueReference": {
                        "reference": "Organization/2"
                }
        }]
}

If you do want to use Basic, an example is here: https://www.hl7.org/fhir/basic-example.json.html (tested and works in Google Cloud Healthcare)

Documentation and best practices: https://www.hl7.org/fhir/basic.html

0
On

In most case the managingOrganization and/or generalPractitiioner elements hold references to the organizations related to the patient

https://www.hl7.org/fhir/patient.html