Create or update an encounter
POST/encounters
Create or update an encounter with the provided details and returns an url to access Nabla. Navigating to this URL will log in the provider into Nabla automatically, and open the app on this encounter.
Request
Responses
- 200
The encounter URL.
Operation spec
{
"method": "post",
"path": "/encounters",
"operationId": "create-or-update-encounters",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Input data required to create a new encounter, IDs should be the ones from your EHR system.",
"properties": {
"provider_email": {
"type": "string"
},
"external_patient_id": {
"type": "string"
},
"external_encounter_id": {
"type": "string"
},
"external_provider_id": {
"type": "string"
},
"target_origin": {
"type": "string"
},
"unstructured_context": {
"type": "string",
"description": "Some unstructured contextual information that will be used to generate the note (for example name, gender, age, pronouns, medical history). Generating the encounter note will take longer if you pass a long `unstructured_context`.",
"maxLength": 10000
},
"structured_context": {
"type": "object",
"description": "Structured context about the patient and the encounter, which will be taken into account when generating the note.",
"properties": {
"patient_demographics": {
"type": "object",
"description": "Demographic details about the patient.",
"properties": {
"name": {
"type": "string",
"description": "The patient's name."
},
"birth_date": {
"type": "string",
"format": "date",
"description": "The patient's birthdate (YYYY-MM-DD format).",
"example": "1996-03-21"
},
"gender": {
"type": "string",
"enum": [
"MALE",
"FEMALE",
"OTHER",
"UNKNOWN"
],
"description": "The patient's gender.",
"title": "gender"
},
"pronouns": {
"type": "string",
"enum": [
"HE_HIM",
"SHE_HER",
"THEY_THEM"
],
"description": "The patient's pronouns.",
"title": "pronouns"
}
},
"required": [
"name",
"birth_date",
"gender"
],
"title": "patient_demographics"
},
"visit_diagnoses": {
"type": "array",
"description": "Optional encounter visit diagnoses as ICD-10-CM codings (system, code, display) from the integrating EHR. If some of these diagnoses apply to the current note, they are prioritized when producing visit diagnosis coding in note generation outputs. When this property is sent on create or update, its contents replace persisted encounter visit diagnoses; send an empty array to clear them. When omitted, existing persisted diagnoses are left unchanged.\n",
"items": {
"type": "object",
"description": "An ICD-10-CM coding entry supplied in Connect structured context.",
"properties": {
"system": {
"type": "string",
"description": "The coding system URI. Only ICD-10-CM is accepted when persisting visit diagnoses.",
"enum": [
"http://hl7.org/fhir/sid/icd-10-cm"
]
},
"code": {
"type": "string",
"example": "G44.8",
"description": "Code of the [ICD-10](https://www.icd10data.com/ICD10CM/Codes) entry."
},
"display": {
"type": "string",
"example": "Other specified headache syndromes.",
"description": "Description of the [ICD-10](https://www.icd10data.com/ICD10CM/Codes) entry."
}
},
"required": [
"system",
"code",
"display"
],
"title": "icd10_entry_request"
}
}
},
"required": [
"patient_demographics"
],
"title": "structured_context_request"
}
},
"required": [
"provider_email",
"external_patient_id",
"external_encounter_id",
"external_provider_id",
"structured_context"
],
"title": "create_or_update_encounter_request"
}
}
}
},
"responses": {
"200": {
"description": "The encounter URL.",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "The encounter URL response.",
"properties": {
"encounter_url": {
"type": "string",
"description": "URL to open the created encounter."
}
},
"title": "encounter_url_response"
}
}
}
}
}
}