Package: openimis-be-api-fhir
openIMIS Backend FHIR API reference moduleNoteThis repository currently supports basic functionality of FHIR API and might miss some openIMIS specific validations. Please use it with caution if you want to connect it to a production database.DescriptionThis repository holds the files of the openIMIS Backend FHIR API reference module.
It is dedicated to be deployed as a module ofopenimis-be_py.The module is mapping objects between openIMIS and FHIR representation,
and allows external applications to use HL7 FHIR standardised communication protocol
when interacting with openIMIS.DocumentationThe documentation for this module can be found atopenIMIS Wiki page.Implementation setupThis module is published on Python Package Index asopenimis-be-api-fhir.The FHIR API will be available after the module is deployed onopenimis-be_py.
Check theopenimis-be_py's readme file on how to activate the module
(add the 'api_fhir' module toopenimis.json)
and start the openIMIS backend.Configurations OptionsConfiguration keyDescriptionDefault valuedefault_audit_user_iddefault value which will be used for 'audit_user_id' field"default_audit_user_id": 1gender_codesconfiguration of codes used by the openIMIS to represent gender (male, female, other)"gender_codes": {     "male": "M",     "female": "F",     "other": "O" }stu3_fhir_identifier_type_configconfiguration of system and codes used to represent the specific types of identifiers"stu3_fhir_identifier_type_config":{    "system":"https://hl7.org/fhir/valueset-identifier-type.html",    "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"}stu3_fhir_marital_status_configconfiguration of system and codes used to represent the specific types of marital status"stu3_fhir_marital_status_config":{    "system":"https://www.hl7.org/fhir/STU3/valueset-marital-status.html",    "fhir_code_for_married":"M",    "fhir_code_for_never_married":"S","fhir_code_for_divorced":"D","fhir_code_for_widowed":"W","fhir_code_for_unknown":"U"},default_value_of_patient_head_attributedefault value for 'head' attribute used for creating new Insuree object"default_value_of_patient_head_attribute": False,default_value_of_patient_card_issued_attributedefault value for 'card_issued' attribute used for creating new Insuree object"default_value_of_patient_card_issued_attribute": False,Example of usageTo fetch information about all openIMIS Insurees (as FHIR Patients), send aGETrequest on:http://127.0.0.1:8000/api_fhir/Patient/127.0.0.1:8000is the server address (if run on your local host).Example of response (mapping description):{"resourceType":"Bundle","entry":[{"fullUrl":"http://127.0.0.1:8000/api_fhir/Patient/1D464C09-5334-407F-9882-14C097B89BBD","resource":{"resourceType":"Patient","address":[{"text":"address","type":"physical","use":"home"},{"text":"geolocation","type":"both","use":"home"}],"birthDate":"2000-01-02","gender":"female","id":"1D464C09-5334-407F-9882-14C097B89BBD","identifier":[{"type":{"coding":[{"code":"ACSN","system":"https://hl7.org/fhir/valueset-identifier-type.html"}]},"use":"usual","value":"1D464C09-5334-407F-9882-14C097B89BBD"},{"type":{"coding":[{"code":"SB","system":"https://hl7.org/fhir/valueset-identifier-type.html"}]},"use":"usual","value":"Insuree ID (e.g. 123456789)"},{"type":{"coding":[{"code":"PPN","system":"https://hl7.org/fhir/valueset-identifier-type.html"}]},"use":"usual","value":"passport number"}],"maritalStatus":{"coding":[{"code":"U","system":"https://www.hl7.org/fhir/STU3/valueset-marital-status.html"}]},"name":[{"family":"test patient","given":["test patient"],"use":"usual"}],"telecom":[{"system":"phone","use":"home","value":"phone number"},{"system":"email","use":"home","value":"email@email.com"}]}}],"link":[{"relation":"self","url":"http://127.0.0.1:8000/api_fhir/Patient/?_count=2"},{"relation":"next","url":"http://127.0.0.1:8000/api_fhir/Patient/?_count=2&amp;page-offset=2"}],"total":9,"type":"searchset"}DependenciesAll required dependencies can be found in thesetup.pyfile.