POST api/v1/{EMRSystem}/Documents
Adds a new Document for a given patient. FHIR connectors use the following resources for R4: DocumentReference.Create.
Status: Released
EncounterId or EncounterAlias are required
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| EMRSystem |
The emr system. |
EMRSystem |
None. |
Body Parameters
UdmDocumentCreateRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| UserId |
Gets or sets the user identifier. |
string |
Required |
| PatientId |
Gets or sets the patient identifier. |
string |
Required |
| PatientIdType |
Sets patient Id Type such as MRN, FIN, etc. This is a reference Id. |
string |
None. |
| EncounterId |
Gets or sets the encounter identifier. |
string |
Required if EMRSystem = Epic, or CernerFHIR |
| EncounterAlias |
Gets or sets the encounter alias. |
string |
None. |
| DocumentType |
Gets or sets the document type. |
string |
Required |
| DocumentDateTime |
Gets or sets the document date/time. |
datetime |
Required if EMRSystem = Allscripts, or Cerner, or CernerFHIR, or Athena, or Meditech, or TouchWorksUnity |
| Status |
Gets or sets the document staus. |
string |
Required |
| Description |
Gets or sets the document description. |
string |
None. |
| Format |
Gets or sets the document format. |
string |
Required |
| Body |
Gets or sets the document body. |
string |
Required |
| AuthorUserId |
User identifier of the author of the document if different than the UserId |
string |
None. |
| CosignerUserId |
User identifier of the requested cosigner of the document |
string |
None. |
| ServiceDepartmentId |
Identifier of the service (Epic) or department (Meditech) of the document. |
string |
Required if EMRSystem = Meditech |
| DictationDateTime |
Date/time the document was dictated |
datetime |
None. |
| TranscriptionDateTime |
Date/time the document was transcribed |
datetime |
None. |
| ExternalDocumentId |
Sets the external document id |
string |
None. |
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",
"EncounterId": "sample string 4",
"EncounterAlias": "sample string 5",
"DocumentType": "sample string 6",
"DocumentDateTime": "2025-12-12T20:56:30.9595487+00:00",
"Status": "sample string 7",
"Description": "sample string 8",
"Format": "sample string 9",
"Body": "sample string 10",
"AuthorUserId": "sample string 11",
"CosignerUserId": "sample string 12",
"ServiceDepartmentId": "sample string 13",
"DictationDateTime": "2025-12-12T20:56:30.959914+00:00",
"TranscriptionDateTime": "2025-12-12T20:56:30.9599558+00:00",
"ExternalDocumentId": "sample string 14",
"LoginId": "sample string 16",
"Password": "sample string 17",
"EmrInstance": "sample string 18",
"ApplicationName": "sample string 19",
"ApplicationKey": null,
"AuthorizationToken": "sample string 21",
"RequestVerboseLogging": true,
"EMRSystem": 0
}
Response Information
UdmDocumentCreateResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| DocumentId |
Gets or sets the document identifier. |
string |
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
{
"DocumentId": "sample string 1"
}