FHIR R4 Resource - Location

openIMIS tables - tblLocations

Mapping Overview Table

FHIR R4 field

openIMIS field

Notes

mapping status

identifier

tblLocations.LocationId / tblLocations.LocationCode / tblLocations.LocationUUID

Reference to FHIR Location from other resources is done through UUID field

mapped

name

tblLocatons.LocationName

mapped

physicalType

tblLocations.LocationType

type.coding contains one of ['R', ‘D', ‘W’, ‘V’]

type.text is one of ['region', ‘district’, ‘ward’, ‘village’]

mapped

partOf

tblLocations.ParentLocationId → tblLocations.LocationUUID

Reference to the parent location. Regions don’t have a parent.
Composite structure: Region → District → Ward → Village

mapped

Search capabilities

Search by Location/HF Code

You can search a Location on code by using the identifier query parameter:

http://localhost:8000/api_fhir_r4/Location?identifier=[LocationCode]

Search by Location Level

You can search all the Locations on level by using the physicaltype query parameter:

http://localhost:8000/api_fhir_r4/Location?physicaltype=[R|D|W|V]

Search all the children of a Location

You can search all the Locations based on the parent location by using the partof query parameter:

http://localhost:8000/api_fhir_r4/Location?partof=[LocationUUID]

Endpoint specification:

Example of endpoint URL:

http://localhost:8000/api_fhir_r4/Location/

Supported HTTP operation:

Module configuration used by the endpoint:

Configuration key

Description

Default value

default_audit_user_id

default value which will be used for 'audit_user_id' field

"default_audit_user_id": 1,

R4_fhir_identifier_type_config

configuration of system and codes used to represent the specific types of identifiers

"R4_fhir_identifier_type_config":{
"system":"https://hl7.org/fhir/valueset-identifier-type.html",
"fhir_code_for_imis_db_uuid_type":"UUID",
"fhir_code_for_imis_db_id_type":"ACSN",
"fhir_code_for_imis_chfid_type":"SB",
"fhir_code_for_imis_passport_type":"PPN",
"fhir_code_for_imis_facility_id_type":"FI",
"fhir_code_for_imis_claim_admin_code_type":"FILL",
"fhir_code_for_imis_claim_code_type":"MR",
"fhir_code_for_imis_location_code_type":"LC",
"fhir_code_for_imis_diagnosis_code_type":"DC",
"fhir_code_for_imis_item_code_type":"IC",
"fhir_code_for_imis_service_code_type":"SC",
},

R4_fhir_location_role_type

configuration of system and codes used to represent the specific types of location role

"R4_fhir_location_role_type":{
"system":"https://hl7.org/fhir/v3/ServiceDeliveryLocationRoleType/vs.html",
"fhir_code_for_hospital":"HOSP",
"fhir_code_for_dispensary":"CSC",
"fhir_code_for_health_center":"PC",
},

R4_fhir_location_physical_type

configurations of system and codes used to represent the specific types of location physical types

"R4_fhir_location_physical_type":{
"system":"https://terminology.hl7.org/CodeSystem/location-physical-type.html",
"fhir_code_for_region":"R",
"fhir_code_for_district":”D",
"fhir_code_for_ward":"W”,
"fhir_code_for_village":"V"
},

default_value_of_location_offline_attribute

default value for 'offline' attribute used for creating new HF object

"default_value_of_location_offline_attribute": False,

default_value_of_location_care_type

default value for 'care_type' attribute used for creating new HF object

"default_value_of_location_care_type": "B"

Example JSON representation of content:

{
    "resourceType": "Location",
    "id": "356E8BB4-46C5-4431-8A4B-2DEA60A88282",
    "identifier": [
        {
            "type": {
                "coding": [
                    {
                        "code": "UUID",
                        "system": "https://hl7.org/fhir/valueset-identifier-type.html"
                    }
                ]
            },
            "use": "usual",
            "value": "356E8BB4-46C5-4431-8A4B-2DEA60A88282"
        },
        {
            "type": {
                "coding": [
                    {
                        "code": "LC",
                        "system": "https://hl7.org/fhir/valueset-identifier-type.html"
                    }
                ]
            },
            "use": "usual",
            "value": "R1D1"
        }
    ],
    "name": "Rapta",
    "partOf": {
        "reference": "Location/8ACF51CF-EB6D-44DB-AED5-75412408E791"
    },
    "physicalType": {
        "coding": [
            {
                "code": "D",
                "system": "http://terminology.hl7.org/CodeSystem/location-physical-type.html"
            }
        ],
        "text": "district"
    }
}