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 10 Current »

List of content:

Description:

The OpenIMIS ClaimAdmin object (from the openimis-be-claim_py module was mapped into two separated FHIR resources. Most of the fields are covered by FHIR Partitioner but the relation between openIMIS ClaimAdmin and HealthFacility (FHIR Location) is covered by separate PartitionerRole resource


In order to create the ClaimAdmin object with relation to HealthFacility you need to do the following:

  1. Create base ClaimAdmin using FHIR Practitioner resource
  2. Use FHIR PractitionerRole resource to create a relation

Notes / Assumptions:

  • The endpoint uses the UUID as a primary key
  • The current version of mapping will be focused on aspects of claiming.
  • In the current version of the openimis-be-claim_py (0.0.7) missing services layer which can be used to perform operations (CRUD - Create, Read, Update, Delete) on ClaimAdmin entities. That's why the current version of API use directly database layer manager for managing the ClaimAdmin objects. This leads to differences between operation between legacy and new OpenIMIS, for instance, the update operation doesn't create the database row with a history of the object and the delete operation permanently remove the object from the database.
  • Practitioner resource needs to be created before PractitionerRole can be created because of the PractitionerRole resource has reference to the Practitioner resource
  • The DELETE operation on PractitionerRole removing only the relation between ClaimAdmin and HealthFacility

FHIR resource:

  • Practitioner- used to represent base fields of Claim Administrator (without relation with health facility- FHIR Location)
  • PractitionerRole- used to represent a relation between base ClaimAdmin (FHIR Practitioner) and Health facility (FHIR Location)

Fields mapping:

Table legend:

ColorDescription

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

Practitioner mapping:

The OpenIMIS ClaimAdmin is mapped to FHIR Practitioner without information about the health facility. If you want to create the relation between ClaimAdmin and HealthFacility then you need to first create ClaimAdmin using FHIR Practitioner and next use FHIR PractitionerRole to create the relation.

OpenIMIS fieldDB typeFHIR fieldDescriptionNoteSTPHMapping status
ClaimAdminIdPKpractitioner.identifier


This is the Database ID and should be used only internally
ClaimAdminUUIDuniqueidentifierpractitioner.identifierThe unique identifier used as PK for FHIR

mapped
ClaimAdminCodenvarchar(8)practitioner.identifier


mapped
LastNamenvarchar(100)practitioner.name


mapped
OtherNamesnvarchar(100)practitioner.name


mapped
DOBdatepractitioner.birthDate


mapped
Phonevarchar(50)practitioner.telecom


mapped
HFIdFK(tblHF)



see PractitionerRole mapping below
ValidityFromdatetime
This information is valuable for OpenIMIS but I probably not required by external systems.


ValidityTodatetime


LegacyIdint


AuditUserIdint


RowIdtimestamp

I'm not sure but this is probably some unique value used to distinguish database rows. Probably not useful for external systems.

EmailIdnvarchar(200)practitioner.telecom


mapped

PractitionerRole mapping:

OpenIMIS dataFHIR fieldDescriptionNoteSTPHMapping status
Rest field of Claim Adminpractitioner - Reference(Practitioner)

example of reference (where "{ClaimAdminCode}" is the Claim Admin code):

"Practitioner/{ClaimAdminCode}"


see Practitioner mapping above
HFIdlocation - Reference(Location)

example of reference (where "{HFCode}" is the health facility code):

"Location/{HFCode}"


mapped

Note:

  • The FHIR PractitionerRole is strictly related to OpenIMIS ClaimAdmin object that's why PractitionerRole representation (see below) contains ClaimAdmin DB id in the "identifier" section

Endpoint specification:

Practitioner:

Example of endpoint URL:

http://127.0.0.1:8000/api_fhir/Practitioner/

Supported HTTP operation:

  • CREATE - used to create new ClaimAdmin. A 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:

    • OpenIMIS ClaimAdmin created by using the Practitioner hasn't relation with OpenIMIS Health Facility
    • 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/Practitioner/433019A5-CE35-4B74-872E-5D7C7990BEF7
    , where "433019A5-CE35-4B74-872E-5D7C7990BEF7" 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/Practitioner/433019A5-CE35-4B74-872E-5D7C7990BEF7
    , where "433019A5-CE35-4B74-872E-5D7C7990BEF7" is the value of the primary key.
    Note:
    • the `health_facility` model attribute isn't updated - see note in CREATE section
    • 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/Practitioner/433019A5-CE35-4B74-872E-5D7C7990BEF7/
    , where "433019A5-CE35-4B74-872E-5D7C7990BEF7" is the value of the primary key.
    Note:
    - the DELETE operation will permanently remove the row from the database

PractitionerRole:

Example of endpoint URL:

http://127.0.0.1:8000/api_fhir/PractitionerRole/

  • CREATE - used to create a relation between OpenIMIS ClaimAdmin and HealthFacility. The request should contain a reference to FHIR Location (HealthFacility) and FHIR Practitioner (ClaimAdmin). Should be used the POST HTTP method and the body as JSON representation (example can be found below).

    Note:

    • The ClaimAdmin (FHIR Practitioner) need to exist before we will able to create relationships with HealtFacility (FHIR Location)
  • READ - by default return list of all available resources (based on ClaimAdmin resource so return representation for each ClaimAdmin). 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/PractitionerRole/433019A5-CE35-4B74-872E-5D7C7990BEF7
    , where "433019A5-CE35-4B74-872E-5D7C7990BEF7" 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/PractitionerRole/433019A5-CE35-4B74-872E-5D7C7990BEF7
    , where "433019A5-CE35-4B74-872E-5D7C7990BEF7" is the value of the primary key.
    Note:
    • 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 relation between OpenIMIS ClaimAdmin and HealthFacility (ClaimAdmin will have null as value of health_facility model attribute). 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/Practitioner/433019A5-CE35-4B74-872E-5D7C7990BEF7/
    , where "433019A5-CE35-4B74-872E-5D7C7990BEF7" is the value of the primary key.
    Note:
    - the DELETE operation will the relation between OpenIMIS ClaimAdmin and HealthFacility from the database. ClaimAdmin will have null as value of health_facility model attribute

Module configuration used by the endpoint:

Configuration keyDescriptionDefault value
default_audit_user_iddefault value which will be used for 'audit_user_id' field"default_audit_user_id": 1,
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",

},

Example JSON representation of content:

Practitioner:

{
    "resourceType": "Practitioner",
    "birthDate": "1992-02-20",
    "id": "433019A5-CE35-4B74-872E-5D7C7990BEF7",
    "identifier": [
        {
            "type": {
                "coding": [
                    {
                        "code": "ACSN",
                        "system": "https://hl7.org/fhir/valueset-identifier-type.html"
                    }
                ]
            },
            "use": "usual",
            "value": "433019A5-CE35-4B74-872E-5D7C7990BEF7"
        },
        {
            "type": {
                "coding": [
                    {
                        "code": "FILL",
                        "system": "https://hl7.org/fhir/valueset-identifier-type.html"
                    }
                ]
            },
            "use": "usual",
            "value": "code4"
        }
    ],
    "name": [
        {
            "family": "lastName",
            "given": [
                "OtherNames"
            ],
            "use": "usual"
        }
    ],
    "telecom": [
        {
            "system": "phone",
            "use": "home",
            "value": "PhoneNumber"
        },
        {
            "system": "email",
            "use": "home",
            "value": "email@email.com"
        }
    ]
}

PractitionerRole:

{
    "resourceType": "PractitionerRole",
    "id": "433019A5-CE35-4B74-872E-5D7C7990BEF7",
    "identifier": [
        {
            "type": {
                "coding": [
                    {
                        "code": "ACSN",
                        "system": "https://hl7.org/fhir/valueset-identifier-type.html"
                    }
                ]
            },
            "use": "usual",
            "value": "433019A5-CE35-4B74-872E-5D7C7990BEF7"
        }
    ],
    "location": [
        {
            "reference": "Location/hfcode"
        }
    ],
    "practitioner": {
        "reference": "Practitioner/code4"
    }
}
  • No labels