POST api/v1/{EMRSystem}/PatientEncounters
Creates a new Patient Encounter and returns the Encounter Id.
Status: Released
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| EMRSystem |
The emr system. |
EMRSystem |
None. |
Body Parameters
UdmPatientEncounterCreateRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| UserId |
Gets or sets the user identifier. |
string |
Required |
| PatientId |
Gets or sets the patient identifier. |
string |
Required |
| PatientIdType |
Gets or sets the patient identifier type. |
string |
None. |
| Encounter |
Gets or sets the patient encounter. |
EncounterCreate |
Required |
Header Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| LoginId |
Gets or sets the login identifier. This Login Id will be encrypted and passed in Sansoro specific Http Request Headers. |
string |
Required if EMRSystem = Allscripts, or Athena, or Cerner, or Meditech, or Sandbox |
| Password |
Gets or sets the password. This Password will be encrypted and passed in Sansoro specific Http Request Headers. |
string |
Data type: Password Required if EMRSystem = Allscripts, or Athena, or Cerner, or Meditech, or Sandbox |
| EmrInstance |
Gets or sets the emr instance. This emr instance info will be encrypted and passed in Sansoro specific Http Request Headers. |
string |
None. |
| ApplicationName |
Gets or sets the requesting application name. This requesting application name will be encrypted and passed in Sansoro specific Http Request Headers. |
string |
Required if using application keys |
| ApplicationKey |
Gets or sets the requesting application key. This requesting application key will be encrypted and passed in Sansoro specific Http Request Headers. |
string |
Data type: Password Required if using application keys |
| AuthorizationToken |
Gets or sets the custom authorization token. This requesting authorization token will be encrypted and passed in Sansoro specific Http Request Headers. |
string |
None. |
| RequestVerboseLogging |
Enables verbose logging for a single request. When "true", verbose logging will occur. When "false", the configuration setting will be respected. This value will be passed in Sansoro specific Http Request Headers. |
boolean |
None. |
Request Formats
application/json
{
"UserId": "sample string 1",
"PatientId": "sample string 2",
"PatientIdType": "sample string 3",
"Encounter": {
"EncounterDateTime": "2025-12-12T20:56:11.0053317+00:00",
"AttendingProviderId": "sample string 1",
"DischargeDateTime": "2025-12-12T20:56:11.0054541+00:00",
"EncounterStatusId": "sample string 2",
"EncounterTypeId": "sample string 3",
"Location": {
"BedId": "sample string 1",
"UnitId": "sample string 2",
"HospitalId": "sample string 3",
"RoomId": "sample string 4"
},
"MedicalServiceId": "sample string 4",
"ReasonForVisit": "sample string 5",
"PatientClassId": "sample string 6",
"AdmitPriorityId": "sample string 7",
"AdmitSourceId": "sample string 8",
"EncounterAlias": "sample string 9",
"GuarantorId": "sample string 10",
"GuarantorTypeId": "sample string 11",
"GuarantorRelationshipToPatientId": "sample string 12",
"Insurances": [
{
"CompanyId": "sample string 1",
"CompanyName": "sample string 2",
"HealthPlanId": "sample string 3",
"GroupName": "sample string 4",
"GroupNumber": "sample string 5",
"EligibilityStatusId": "sample string 6",
"EligibilityStatusDate": "2025-12-12T20:56:11.0065379+00:00",
"SubscriberId": "sample string 7",
"Subscriber": "sample string 8",
"PolicyNumber": "sample string 9",
"PatientRelationshipToSubscriber": "sample string 10",
"SubscriberRelationshipToPatientId": "sample string 11",
"Address": {
"Address1": "sample string 1",
"Address2": "sample string 2",
"Address3": "sample string 3",
"City": "sample string 4",
"State": "sample string 5",
"ZIP": "sample string 6",
"TypeId": "sample string 7",
"County": "sample string 8",
"Country": "sample string 9"
},
"Phones": [
{
"Number": "sample string 1",
"TypeId": "sample string 2",
"Extension": "sample string 3",
"FormatId": "sample string 4",
"Contact": "sample string 5"
},
{
"Number": "sample string 1",
"TypeId": "sample string 2",
"Extension": "sample string 3",
"FormatId": "sample string 4",
"Contact": "sample string 5"
}
],
"CustomFields": [
{
"FieldId": "sample string 1",
"ResponseValue": "sample string 2"
},
{
"FieldId": "sample string 1",
"ResponseValue": "sample string 2"
}
]
},
{
"CompanyId": "sample string 1",
"CompanyName": "sample string 2",
"HealthPlanId": "sample string 3",
"GroupName": "sample string 4",
"GroupNumber": "sample string 5",
"EligibilityStatusId": "sample string 6",
"EligibilityStatusDate": "2025-12-12T20:56:11.0065379+00:00",
"SubscriberId": "sample string 7",
"Subscriber": "sample string 8",
"PolicyNumber": "sample string 9",
"PatientRelationshipToSubscriber": "sample string 10",
"SubscriberRelationshipToPatientId": "sample string 11",
"Address": {
"Address1": "sample string 1",
"Address2": "sample string 2",
"Address3": "sample string 3",
"City": "sample string 4",
"State": "sample string 5",
"ZIP": "sample string 6",
"TypeId": "sample string 7",
"County": "sample string 8",
"Country": "sample string 9"
},
"Phones": [
{
"Number": "sample string 1",
"TypeId": "sample string 2",
"Extension": "sample string 3",
"FormatId": "sample string 4",
"Contact": "sample string 5"
},
{
"Number": "sample string 1",
"TypeId": "sample string 2",
"Extension": "sample string 3",
"FormatId": "sample string 4",
"Contact": "sample string 5"
}
],
"CustomFields": [
{
"FieldId": "sample string 1",
"ResponseValue": "sample string 2"
},
{
"FieldId": "sample string 1",
"ResponseValue": "sample string 2"
}
]
}
],
"FinancialNumber": "sample string 13",
"ProvidersType": [
{
"ProviderId": "sample string 1",
"ProviderType": "sample string 2",
"Address": {
"Address1": "sample string 1",
"Address2": "sample string 2",
"Address3": "sample string 3",
"City": "sample string 4",
"State": "sample string 5",
"ZIP": "sample string 6",
"TypeId": "sample string 7",
"County": "sample string 8",
"Country": "sample string 9"
},
"Email": "sample string 3",
"NPI": "sample string 4",
"LicenseNumber": "sample string 5",
"Phones": [
{
"Number": "sample string 1",
"TypeId": "sample string 2",
"Extension": "sample string 3",
"FormatId": "sample string 4",
"Contact": "sample string 5"
},
{
"Number": "sample string 1",
"TypeId": "sample string 2",
"Extension": "sample string 3",
"FormatId": "sample string 4",
"Contact": "sample string 5"
}
],
"InternalSequence": "sample string 6"
},
{
"ProviderId": "sample string 1",
"ProviderType": "sample string 2",
"Address": {
"Address1": "sample string 1",
"Address2": "sample string 2",
"Address3": "sample string 3",
"City": "sample string 4",
"State": "sample string 5",
"ZIP": "sample string 6",
"TypeId": "sample string 7",
"County": "sample string 8",
"Country": "sample string 9"
},
"Email": "sample string 3",
"NPI": "sample string 4",
"LicenseNumber": "sample string 5",
"Phones": [
{
"Number": "sample string 1",
"TypeId": "sample string 2",
"Extension": "sample string 3",
"FormatId": "sample string 4",
"Contact": "sample string 5"
},
{
"Number": "sample string 1",
"TypeId": "sample string 2",
"Extension": "sample string 3",
"FormatId": "sample string 4",
"Contact": "sample string 5"
}
],
"InternalSequence": "sample string 6"
}
],
"ICD10DXCodeIds": [
"sample string 1",
"sample string 2"
],
"CustomFields": [
{
"FieldId": "sample string 1",
"ResponseValue": "sample string 2"
},
{
"FieldId": "sample string 1",
"ResponseValue": "sample string 2"
}
],
"FormType": "sample string 14",
"ReferClientId": "sample string 15",
"EstimatedArrivalDateTime": "2025-12-12T20:56:11.0085835+00:00",
"EstimatedLengthOfStay": "sample string 16",
"EstimatedDischargeDateTime": "2025-12-12T20:56:11.0086833+00:00",
"VisitorStatusId": "sample string 17",
"TreatmentPhaseId": "sample string 18",
"PatientValuablesIds": "sample string 19",
"ContributorSystemId": "sample string 20"
},
"LoginId": "sample string 5",
"Password": "sample string 6",
"EmrInstance": "sample string 7",
"ApplicationName": "sample string 8",
"ApplicationKey": null,
"AuthorizationToken": "sample string 10",
"RequestVerboseLogging": true,
"EMRSystem": 0
}
Response Information
UdmPatientEncounterCreateResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| EncounterId |
The identifier of the created patient encounter. |
string |
None. |
| AlternativeIdentifiers |
The alternative identifiers of the patient encounter. |
Collection of Identity |
None. |
Response Codes
Http Status Code 201 - Indicates that the requested record was successfully created.
Http Status Code 400 - Indicates that the request did not contain all the required fields or had an invalid value.
Http Status Code 401 - Indicates that authentication to the underlying EMR server using the provided LoginId and Password failed.
Http Status Code 403 - Indicates that there is an issue with the request UserId.
Http Status Code 408 - Indicates that the request to the underlying EMR server timed out.
Http Status Code 500 - Indicates that an internal server error occurred during processing of the request.
Http Status Code 502 - Indicates that a request made to the underlying EMR server could not be completed.
Response Formats
application/json
{
"EncounterId": "sample string 1",
"AlternativeIdentifiers": [
{
"Code": "sample string 1",
"Description": "sample string 2",
"Value": "sample string 3"
},
{
"Code": "sample string 1",
"Description": "sample string 2",
"Value": "sample string 3"
}
]
}