Create an Encounter for Patient
POST {{url}}/{{tenantName}}/{{instanceName}}/patients/{{patientId}}/encounters
This endpoint allows you to create a new encounter record for a specific patient.
{{url}}/{{tenantName}}/{{instanceName}}/patients/{{patientId}}/encounters
Some information about the variable location:
For creating encounters via API this variable is a string.
After creating an encounter via API, on the UI this string is displayed depending on the eventMode:
- IN-PERSON: the location value is displayed as text that can be copied.
- CALL: the location value is displayed as a link, when clicked on, it opens the call drover in the patient's commcenter. The link will be displayed as an encounter location if the patient has a primary phone number specified
- VIDEO: the location value is displayed as an external link. The link must be fully specified
To fill in the billing information, the responsibleParty parameters and information about services should be passed into the body of the request.
responsibleParty ('Billing Type' on UI) can take values:
SELF_PAY
INSURANCE
In the visitServices block you should pass all the services that should be attached to this encounter.
name - the name of the service, which is specified in the designer
preVisitCost ('Co-pay' on UI) and serviceCost ('Fee' on UI) - payment amount, it is specified in cents.
modifiers - list of modifiers for this service, the names are specified in the designer. Service can be without modifiers
HTTP Response Codes:
201: Successfully created the encounter for the patient
400: Bad request - the request could not be understood or was missing required parameters
500: Internal server error - something went wrong on the server
Request Body
{"title"=>"New API 1", "description"=>"New API 1", "templateName"=>"etmp-review-1", "location"=>"Some address", "currentScheduledAppointment"=>{"eventType"=>"ENCOUNTER", "eventTitle"=>"NEW API 1", "eventDescription"=>"NEW API 1", "startDateTime"=>"2021-10-26T14:00:00.000Z", "endDateTime"=>"2021-10-26T16:00:00.000Z", "hostId"=>"42f1cd39-50a7-4aeb-baf3-e493efcb5c2d", "eventStatus"=>"SCHEDULED", "eventMode"=>"IN-PERSON", "participants"=>[{"participantId"=>"42f1cd39-50a7-4aeb-baf3-e493efcb5c2d", "participantRole"=>"psm", "attended"=>false}, {"participantId"=>"{{patientId}}", "participantRole"=>"patient", "attended"=>false}]}, "notes"=>"Some notes", "responsibleParty"=>"INSURANCE", "visitServices"=>[{"name"=>"vs-consultation", "preVisitCost"=>1000, "serviceCost"=>20000, "modifiers"=>["vm-hj", "vm-93"]}]}