Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

FHIR field

OpenIMIS field

notes

mapping status

Identifier

tblHF.HfId / tblHF.HFCode / tblLocations.LocationId / tblLocations.LocationCode

FHIR location.mode field is used to switch between mapping from tblHF and tblLocations fields
HfId / LocationId is used as DB Primary Key, while mapping is being done to HFCode / LocationCode by

HfId and HFCode mapped

name

tblHF.HFName / tblLocatons.LocationName

FHIR location.mode field is used to switch between mapping from tblHF and tblLocations fields

HFName mapped

type

tblHF.HFLevel / tblLocations.LocationType

FHIR location.mode field is used to switch between mapping from tblHF and tblLocations fields

HFLevel mapped

Address

tblHF.HFAddress

mapped

partOfReference

tblHF.LocationId / tblLocations.ParentLocationId

FHIR location.mode field is used to switch between mapping from tblHF and tblLocations fields

not mapped

telecom

tblHF.Phone / tblHF.Fax / tblHF.eMail

telecom field contains values that are being mapped for Phone, Fax and Email fields

mapped

Endpoint specification:

Example of endpoint URL:

http://127.0.0.1:8000/api_fhir/Location/

Supported HTTP operation:

  • CREATE - used to create new FHIR Location (HF). List of supported fields can be found in the table which shows the mapping between OpenIMIS and FHIR. Should be used the POST HTTP method and the body as JSON representation (example can be found below).

    Note:

    • the `offline` model attribute isn't currently covered by the current API. By the default value is False (can be modified by the module configuration).

    • the `care_type` model attribute isn't currently covered by the current API. By the default value is "B" - both (can be modified by the module configuration).

    • the `validity_from` attribute is set as the current value of date when the object is created

    • the `audit_user_id` - the user which interact with the FHIR API is the `TechnicalUser` (Backend security - Models and Concepts) which hasn't representation in tblUsers. That's why the value of the `audit_user_id` attribute is set based on the following algorithm:
      1) Try to get that value from the 'auditUserId' query parameter

      2) If missing get that value then use the value from the module configuration (by default 1)

  • READ - by default return list of all available resources. To fetch information about a specific object you should add the primary key to URL for instance:
    http://127.0.0.1:8000/api_fhir/Location/1
    , where "1" is the value of the primary key. Should be used the GET HTTP method.

  • UPDATE - update the value of the specific object. List of supported fields can be found in the table which shows the mapping between OpenIMIS and FHIR. Should be used the PUT HTTP method and the body as JSON representation (example can be found below). The requested URL needs to point to a specific object to do that you should add the primary key to URL for instance:
    http://127.0.0.1:8000/api_fhir/Location/1
    , where "1" is the value of the primary key.
    Note:

    • the `offline` model attribute isn't updated

    • the `care_type` model attribute isn't updated

    • the UPDATE operation will update the specific row of the database and doesn't create the history of changes (like in the legacy OpenIMIS)

  • DELETE - the operation can be used to remove the specific object from the database. Should be used the DELETE HTTP method. The requested URL needs to point to a specific object to do that you should add the primary key to URL for instance:
    http://127.0.0.1:8000/api_fhir/Location/1
    , where "1" is the value of the primary key.
    Note:
    - the DELETE operation will permanently remove the row from the database

  • No labels