The OpenIMIS HF object (from the openimis-be-location_py module) was mapped to the FHIR Location resource.
Color | Description |
---|---|
Mapped - the final choice, the most suitable choice | |
Need to be found the best place for the field (not mapped currently) | |
Currently not important - not mapped |
OpenIMIS field | DB type | FHIR field | Description | Note | STPH | Mapping status |
HfID | int | Identifier | This is the Database ID and should be used only internally | |||
HfUUID | uniqueidentifier | Identifier | The unique identifier used as PK for FHIR | mapped | ||
HFCode | nvarchar(8) | Identifier | mapped | |||
HFName | nvarchar(100) | name | mapped | |||
LegalForm | FK(tblLegalForms) | G: Government C: Charity D: District organization P: Private organization | The FHIR Location object don't contains that kind of information. If this information is valuable for external systems then we can add FHIR extension (if needed). | Will be added after when the final approach will be established. That field isn't supported by the current version of openimis-be-location (0.0.1). | ||
HFLevel | char(1) | type | C - health center H - hospital D - dispensary | mapped | ||
HFSublevel | FK(tblHFSublevel) | I: Integrated R: Reference N: No Sublevel | The FHIR Location object don't contains that kind of information. If this information is valuable for external systems then we can add FHIR extension (if needed). | Will be added after when the final approach will be established. That field isn't supported by the current version of openimis-be-location (0.0.1). | ||
HFAddress | nvarchar(100) | Address | mapped | |||
LocationId | FK(tblLocations) | partOf - Reference(Location) | The FHIR Location will be used to represent the tblHF and tblLocations. The FHIR location.mode field can be used to distinguish between those object. | Will be added after when the final approach will be established. That field isn't supported by the current version of openimis-be-location (0.0.1). | ||
Phone | nvarchar(50) | telecom | mapped | |||
Fax | nvarchar(50) | telecom | mapped | |||
nvarchar(50) | telecom | mapped | ||||
HFCareType | char(1) | I - In-Patient O - Out-Patient B - both | The FHIR Location object don't contains that kind of information. If this information is valuable for external systems then we can add FHIR extension (if needed). | Will be added after when the final approach will be established. Currently for creating a new object is used the default value based on the module configuration. | ||
PLServiceID | FK(tblPLServices) | If needed we can add the FHIR extension, try to use the "Location.endpoint" to represent this field or try to use the FHIR HealthcareService. | Will be added after when the final approach will be established. That field isn't supported by the current version of openimis-be-location (0.0.1). | |||
PLItemID | FK(tblPLItems) | As above. | Will be added after when the final approach will be established. That field isn't supported by the current version of openimis-be-location (0.0.1). | |||
AccCode | nvarchar(25) | Account Code | I'm not sure if this information should be available for external systems. If needed we can add this information to the "location.description" or we can add the FHIR extension. | Will be added after when the final approach will be established. | ||
OffLine | bit | I'm not sure but this is probably used to determine the source of row (offline/online app). Probably information isn't valuable for external systems. | ||||
ValidityFrom | datetime | Audit information. More information can be found here (on page 113): https://github.com/openimis/openimis_docs/blob/master/specs/Web%20application%20-%20Functional%20Design%20Specification.pdf | This information are valuable for OpenIMIS but I probably not required by external systems. | |||
ValidityTo | datetime | |||||
LegacyID | int | |||||
AuditUserID | int | |||||
RowID | timestamp | I'm not sure but this is probably some unique value used to distinguish database rows. Probably not useful for external systems. |
http://127.0.0.1:8000/api_fhir/Location/
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)
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, |
stu3_fhir_identifier_type_config | configuration of system and codes used to represent the specific types of identifiers | "stu3_fhir_identifier_type_config":{ }, |
stu3_fhir_location_role_type | configuration of system and codes used to represent the specific types of location role | "stu3_fhir_location_role_type":{ }, |
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" |
{ "resourceType": "Location", "address": { "text": "HfAddress", "type": "physical", "use": "home" }, "id": "72CE44C0-5D33-4452-BAD2-ECD6CA6A0DFF", "identifier": [ { "type": { "coding": [ { "code": "ACSN", "system": "https://hl7.org/fhir/valueset-identifier-type.html" } ] }, "use": "usual", "value": "72CE44C0-5D33-4452-BAD2-ECD6CA6A0DFF" }, { "type": { "coding": [ { "code": "FI", "system": "https://hl7.org/fhir/valueset-identifier-type.html" } ] }, "use": "usual", "value": "hfcode" } ], "name": "hfName", "telecom": [ { "system": "phone", "use": "home", "value": "hfPhone" }, { "system": "fax", "use": "home", "value": "hfFax" }, { "system": "email", "use": "home", "value": "hfMail" } ], "type": { "coding": [ { "code": "PC", "system": "https://www.hl7.org/fhir/STU3/v3/ServiceDeliveryLocationRoleType/vs.html" } ] } } |