OnyeOne Documentation
  1. Encounters
OnyeOne Documentation
  • Overview
  • OnyeOne Use Cases
  • Authentication
  • Guides
    • OnyeOne Request Flow
  • Core EHR/EMR FHIR R4 APIs
    • Administration
      • Patients
        • Create Patient Resource
        • Update Patient Resource
      • Practitioners
        • Create Practitioner Resource
        • Update Practitioner Resource
        • Create Practitioner Role
        • Update PractitionerRole Resource
      • Locations
        • Create a Location Resource
        • Update Location Resource
      • Health Service
        • Create Health Service Resource
        • Update Health Service Resource
      • Encounters
        • Create Encounter Resource
          POST
        • Update Encounter Resource
          PUT
      • Appointments
        • Create Appointment Resource
        • Update Appointment Resource
      • Group
    • Clinical
      • AllergyIntolerance
      • Condition (Problem)
      • Procedure
      • FamilyMemberHistory
      • CarePlan
      • Goal
      • CareTeam
      • ClinicalImpression
      • AdverseEvent
      • DetectedIssue
      • RiskAssessment
    • Diagnostics
      • Observation
        • Create Observation Resource
      • DiagnosticReport
      • ServiceRequest
      • Media
      • ImagingStudy
      • MolecularSequence
      • Specimen
      • BodyStructure
    • Medications
      • MedicationRequest
      • MedicationDispense
      • MedicationAdministration
      • MedicationStatement
      • Medication
      • MedicationKnowledge
      • Immunization
      • ImmunizationEvaluation
      • ImmunizationRecommendation
    • Financial
      • Account
      • Contract
      • Coverage
      • CoverageEligibilityRequest
      • CoverageEligibilityResponse
      • EnrollmentRequest
      • EnrollmentResponse
      • Claim
      • ClaimResponse
      • PaymentNotice
      • PaymentReconciliation
      • ExplanationOfBenefit
      • VisionPrescription
  • Health Data Transformation
    • Transfrom HL7v2 to FHIR R4
      POST
    • Transform CCDA to FHIR R4
      POST
    • Transform HL7v2 to FHIR R4 and Store in Backend Database
      POST
    • Track API Request
      GET
  • Health Interoperabilty System
    • Create a Subscription
      POST
  • Webhook
  • Get Resource.
    GET
  1. Encounters

Update Encounter Resource

Developing
Testing Env
https://staging.onyeone.com/api
Testing Env
https://staging.onyeone.com/api
PUT
/emr/encounter/{encounter_id}
emr
An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Path Params
encounter_id
string 
required
Body Params application/json
status
enum<string> 
optional
Allowed values:
plannedarrivedtriagedin-progressonleavefinishedcancelledentered-in-errorunknown
class
enum<string> 
optional
See http://terminology.hl7.org/ValueSet/v3-ActEncounterCode for code descriptions.
Allowed values:
AMBEMERFLDHHIMPACUTENONACOBSENCPRENCSSVR
service_type
object 
optional
Broad categorization of the service that is to be provided (e.g. cardiology).
code
string 
required
name
string 
required
priority
enum<string> 
optional
Indicates the urgency of the encounter. See http://terminology.hl7.org/ValueSet/v3-ActPriority for context.
Allowed values:
ACRCSCSPCSRELEMPPRNRRRSTUDUR
subject
object 
optional
The patient or group present at the encounter.
type
enum<string> 
required
Allowed values:
patientgroup
id
string 
required
ID of patient or group.
based_on
array[string]
optional
The request this encounter satisfies (e.g. incoming referral or procedure request). IDs of ServiceRequest
appointment
array[string]
optional
The appointment that scheduled this encounter. Appointment IDs.
period
object 
optional
The start and end time of the encounter.
start
string 
required
YYYY-MM-DD format
end
string 
required
YYYY-MM-DD format
reason_code
array [object {2}] 
optional
code
string 
required
See http://hl7.org/fhir/ValueSet/encounter-reason for codes and name.
name
string 
required
reason_reference
array [object {2}] 
optional
type
enum<string> 
required
Allowed values:
conditionprocedureobservationimmunization_recommendation
id
string 
required
participant
array [object {3}] 
optional
Role of participant in encounter.
type
enum<string> 
required
See http://hl7.org/fhir/ValueSet/encounter-participant-type.
Allowed values:
admitterattendercallback contactconsultantdischargerescortreferrersecondary performerprimary performerParticipationTranslatorEmergency
period
object 
optional
individual
object 
required
diagnosis
array [object {3}] 
optional
condition
object 
required
use
enum<string> 
optional
See http://terminology.hl7.org/CodeSystem/diagnosis-role
Allowed values:
ADDDCCCMpre-oppost-opbilling
rank
number 
optional
>= 1
account
array[string]
optional
The set of accounts that may be used for billing for this Encounter.
hospitalization
object 
optional
origin
object 
optional
ID of location/organization from which the patient came before admission.
diet_preference
array[string]
optional
Allowed values:
vegetariandairy-freenut-freegluten-freeveganhalalkosher
admit_source
enum<string> 
optional
Allowed values:
hosp-transemdoutpborngpmpnursingpsychrehabother
location
array [object {2}] 
optional
List of locations where the patient has been during this encounter.
location
string 
required
Location Resource ID
period
object 
optional
part_of
string 
optional
Another Encounter of which this encounter is a part of (administratively or in time).
Example
{
    "status": "cancelled",
    "class": "AMB"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://staging.onyeone.com/api/emr/encounter/' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
    "status": "cancelled",
    "class": "AMB"
}'

Responses

🟢200Success
application/json
Body
message
string 
required
resource_id
string 
required
updated_fields
object 
required
status
string 
optional
class
object 
optional
Example
{
    "message": "Encounter resource updated successfully.",
    "resource_id": "e59f43ba-e124-588e-b70d-da3c5025273c",
    "updated_fields": {
        "status": "cancelled",
        "class": {
            "code": "AMB",
            "display": "Ambulatory",
            "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode"
        }
    }
}
Previous
Create Encounter Resource
Next
Create Appointment Resource
Built with