OnyeOne Documentation
  1. Appointments
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
        • Update Encounter Resource
      • Appointments
        • Create Appointment Resource
          POST
        • Update Appointment Resource
          PUT
      • 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. Appointments

Create Appointment Resource

Testing
Testing Env
https://staging.onyeone.com/api
Testing Env
https://staging.onyeone.com/api
POST
/emr/appointment
A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Body Params application/json

Example
{
    "status": "waitlist",
    "participant": [
        {
            "type": "Emergency",
            "actor": {
                "type": "patient",
                "id": "364bf61f-d0ac-3b9a-d91c-dbc2d9d9f46f"
            },
            "required": false,
            "status": "declined",
            "period": {
                "start": "2025-01-03",
                "end": "2025-01-08"
            }
        }
    ],
    "reason_reference": [],
    "reason_code": [
        {
            "code": "122003",
            "name": "Choroidal hemorrhage"
        },
        {
            "code": "409002",
            "name": "Food allergy diet"
        }
    ],
    "description": "Lorem ipsum...",
    "start": "2025-02-07T13:28:17.239+02:00",
    "end": "2025-02-07T17:30:17.239+02:00",
    "minutes_duration": 30,
    "slot": [],
    "comment": "id ex",
    "patient_instruction": "esse ad elit qui",
    "based_on": [],
    "requested_period": [
        {
            "start": "2025-01-02",
            "end": "2025-01-10"
        },
        {
            "start": "2025-01-20",
            "end": "2025-01-30"
        }
    ]
}

Request Code 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 POST 'https://staging.onyeone.com/api/emr/appointment' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "status": "waitlist",
    "participant": [
        {
            "type": "Emergency",
            "actor": {
                "type": "patient",
                "id": "364bf61f-d0ac-3b9a-d91c-dbc2d9d9f46f"
            },
            "required": false,
            "status": "declined",
            "period": {
                "start": "2025-01-03",
                "end": "2025-01-08"
            }
        }
    ],
    "reason_reference": [],
    "reason_code": [
        {
            "code": "122003",
            "name": "Choroidal hemorrhage"
        },
        {
            "code": "409002",
            "name": "Food allergy diet"
        }
    ],
    "description": "Lorem ipsum...",
    "start": "2025-02-07T13:28:17.239+02:00",
    "end": "2025-02-07T17:30:17.239+02:00",
    "minutes_duration": 30,
    "slot": [],
    "comment": "id ex",
    "patient_instruction": "esse ad elit qui",
    "based_on": [],
    "requested_period": [
        {
            "start": "2025-01-02",
            "end": "2025-01-10"
        },
        {
            "start": "2025-01-20",
            "end": "2025-01-30"
        }
    ]
}'

Responses

🟢200Success
application/json
Body

Example
{
    "message": "Resource created successfully",
    "resource_name": "Appointment",
    "resource_id": "339d4678-8482-5d81-b000-346edfd86484",
    "full_resource": {
        "resourceType": "Appointment",
        "id": "339d4678-8482-5d81-b000-346edfd86484",
        "meta": {
            "versionId": "1",
            "lastUpdated": "2024-12-30T10:18:02.887+00:00",
            "source": "#iQanb40TgsOn9K5M",
            "tag": [
                {
                    "system": "http://onyeone.com/facility-tags/origination",
                    "code": "1",
                    "display": "Green Group Hospital"
                }
            ]
        },
        "status": "waitlist",
        "reasonCode": [
            {
                "coding": [
                    {
                        "system": "http://hl7.org/fhir/ValueSet/encounter-reason",
                        "code": "122003",
                        "display": "Choroidal hemorrhage"
                    }
                ],
                "text": "Choroidal hemorrhage"
            },
            {
                "coding": [
                    {
                        "system": "http://hl7.org/fhir/ValueSet/encounter-reason",
                        "code": "409002",
                        "display": "Food allergy diet"
                    }
                ],
                "text": "Food allergy diet"
            }
        ],
        "description": "Lorem ipsum...",
        "start": "2025-02-07T13:28:17.239+02:00",
        "end": "2025-02-07T17:30:17.239+02:00",
        "minutesDuration": 30,
        "comment": "id ex",
        "patientInstruction": "esse ad elit qui",
        "participant": [
            {
                "type": [
                    {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/participant-type",
                                "code": "emergency",
                                "display": "Emergency"
                            }
                        ],
                        "text": "Emergency"
                    }
                ],
                "actor": {
                    "reference": "Patient/364bf61f-d0ac-3b9a-d91c-dbc2d9d9f46f"
                },
                "status": "declined",
                "period": {
                    "start": "2025-01-03",
                    "end": "2025-01-08"
                }
            }
        ],
        "requestedPeriod": [
            {
                "start": "2025-01-02",
                "end": "2025-01-10"
            },
            {
                "start": "2025-01-20",
                "end": "2025-01-30"
            }
        ]
    }
}
Modified at 2024-12-30 10:19:44
Previous
Update Encounter Resource
Next
Update Appointment Resource
Built with