Avni Integration Service:
Code Changes made on top of Avni Integration service can be seen from this link: https://github.com/avniproject/integration-service/compare/main...Bahmni-HWC:integration-service:main
Feature / Domain | Current Behaviour in Bahmni HWC | Code Change / Config Change | How should this be on product | Comments |
---|---|---|---|---|
Address Hierarchy | State --> District --> SubDistrict --> City/Village hierarchy is used in Avni and catchements are defined with villages. StateProvince --> CountryDistrict --> Address4 --> CityVillage hierachy is setup List of states, districts, subdistricts, villages to be synced from avni to bahmni should be defined in environment variables | Needs code change to make it generic | Use Bahmni as base Maintain a metadata mapping for individual address fields Multiple address (current/permanent) is possible for a patient/subject both on Bahmni and Avni side | Code reference on where the address hierarchy is harcoded: |
Location and Catchments | Locations and catchments are created in Bahmni and Avni with config Mapping to be added with Catchemnt name and location uuid Note: Catchemnts should be defined in a way that the subjects will be assigned to a single catchement | Config change | Documentation on creating catchments and mapping to locations | Q to Avni: How to allow address outside of catchment for registration ? |
Identifiers | Preferred Identifier between Bahmni and Avni Bahmni identifier is advanced to start from 500000 | Bahmni identifier UUID to be added in mapping and as well as constants table for key IntegrationBahmniIdentifierType | Can we use a different identifier prefix for identifiers in Avni ? Documentation on assigning identifiers to avni users | Needs some more investigation |
Additional Identifiers (RCH ID, NIKSHAY ID, ABHA Number, ABHA Address) In Avni added as Concepts and added to Registration Second page UUID and concept names are hardcoded in code | Needs code change | Allow implementers to define mappings for additional identifiers to be synced Note: Update of identifiers from both ways should be developed | ||
Person Attributes | father/mother name, phoneNumber In Bahmni added via config, in avni added as concept and in second registration page details UUID comes from mapping, whereas Avni concept name is hardcoded in code | Needs code change | Person attributes should be dynamically synced based on the list of mapping defined in mappings Note: Update of identifiers from both ways should be developed | |
Gender mapping | - | Should be okay. | ||
Avni User --> Bahmni Provider | Currently different user base for Avni and Bahmni For any user created in avni, provider to be added in Bahmni and mapping for avni username and Bahmni provider uuid to be defined in mappings | Config change Default provider with name offline sync will be used if mapping for a user is not defined | Documentation on creating users in Avni , providers in Bahmni and defining mappings | |
Visits | Visit type: Community Visit created via config in Bahmni with a fixed UUID and needs to added to Constants table | Config change, update value in Constant table of IntegrationBahmniVisitType | Should be okay to have a single visit type | |
Visits creation: Integration check for visit in a given day, if yes adds encounter to the same or creates a new visit, adds encounter and closes visit | ||||
Sync of Consultation information from Avni to Bahmni | Whenever a form is filled in Avni, it syncs as new encounter to Bahmni. Currently Vitals , History and Examination, Referral are synced | Config Change Currently works for text, numeric, coded based concepts and concept group members with a single hierarchy | Documentation on how to configure new forms in Avni and define mappings in integration service | Need to implement forms-2 based approach. |
Sync of Prescriptions from Bahmni to Avni | Drug orders from Bahmni are added as bulleted list to Avni. A form to be added with a text concept | Configuration | Documentation | |
Sync of Diagnosis from Bahmni to Avni | Encounters with dignoses answers filled from Bahmni are added as bulleted list to Avni. A form to be added with a text concept | Configuration | Documentation | |
Sync of Bahmni Forms to Avni | A mapping to be defined for the form name in Bahmni to the form in Avni . The concepts to be mapped in mapping service. The form in Avni to be made readonly by access privileges | Configuration. Supports only simple concepts sync. Would need code change for complex concepts | ||
ABHA Offline | ABHA Module captures Aadhaar and demographics information, and when aadhar number is found in patient registration details call hip demographic api and creates abha and patches subject's identifier | Not needed for product, needed for Bahmni indiadistro and applicable only to government integrators | Enable this with a configuration (based on environment variable) | |
Sync of Medication Dispense from Avni | Medication items are created as concepts in Avni with the same UUID. When Dispense Medication form is filled, the concept UUID is used as item UUID and Stock Distribution Inventory operation API is called from integration service | Code Change | May not be required for product. Uses openhmis inventory module APIs. |