- Send
integrationChannelId
(eg. Backend channel, Frontend Channel) in Appointment Check-In datatable response. - Create client-integration-connector module. (Middleware) 2.1-> because, if some changes needs to be reflected in bheri integrated apis .. only reflect change in bheri-integraiton-connector and not the entire application.
- For,
integrationChannelId
of Backend Channel for a provided 'client_id & feature_code', call it's corresponding integration module's service. 3.1 -> Perhaps a switch case. - i.e., Call check-in service of bheri hospital
- Create a
QueryCreator
class inquery
package of client-integratoin-connector. - Create a query to construct a requestBody as expected by Client's API and set the values in
ClientCheckInRequestDTO
. 6.1 -> Also, addhospitalNumber
in the REQUEST DTO. 6.2 -> Get the value forhospitalNumber
from the STEP 6 query in12131313
ornull
. - Fetch all the necessary API parameters for the logged-in client with. 7.1-> we need to see if this can be cached, since we're developing a seperate middleware
- Call the client's API using
ClientCheckInRequestDTO
and API parameters from STEP 7. - if
hospitalNumber
hasnull
value from STEP 6.2, INSERT STEP 8's 'responseData' i.e., patient ID value inpatient_hospital_info
- Send the
success
orerror
response back to the client module. - For
success
change Appointment Status toapproved
. - For
error
throw exception ThirdPartyIntegrationException.
integration_request_body_parameters id, name, status, remarks example: ['name', 'age', 'ageDay', 'ageMonth']
api_integration_format_request_body id, api_integration_format_id, api_request_body_parameters_id, status
convert object
appointmentCheckInObj.patientName -> name, appointmentCheckInObj.age -> age, appointmentChekInObj.ageMonth -> ageMonth