OnyeOne Documentation
  1. Locations
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
          POST
        • Update Location Resource
          PUT
      • Health Service
        • Create Health Service Resource
        • Update Health Service Resource
      • Encounters
        • Create Encounter Resource
        • Update Encounter Resource
      • 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. Locations

Create a Location Resource

Testing Env
https://staging.onyeone.com/api
Testing Env
https://staging.onyeone.com/api
POST
/emr/location
emr
This API creates a Location resource, which represents a physical place where healthcare services are provided. It can include details such as the name, address, type of location, managing organization, and its operational status.

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Body Params application/json
name
string 
required
status
enum<string> 
required
Allowed values:
activesuspendedinactive
mode
enum<string> 
required
Allowed values:
instancekindvirtual
description
string 
optional
service_type
array [object {2}] 
optional
code
string 
required
See http://hl7.org/fhir/ValueSet/service-type for codes
name
string 
required
Values for code. see http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType
telecom
array [object {2}] 
optional
See http://hl7.org/fhir/ValueSet/service-type for names of code.
phone
string 
optional
email
string 
optional
address
object 
optional
line
string 
optional
city
string 
optional
state
string 
optional
postal_code
string 
optional
country
string 
optional
position
object 
optional
longitude
number 
required
latitude
number 
required
altitude
number 
optional
hours_of_operation
array [object {4}] 
required
days_of_week
array[string]
required
Allowed values:
montuewedthufrisatsun
all_day
boolean 
required
The Location is open all day.
opening_time
string 
optional
closing_time
string 
optional
part_of
string 
optional
ID of another Location of which this Location is physically a part of.
Example
{
    "name": "Ajah Branch",
    "status": "active",
    "mode": "instance",
    "description": "Description of the Location, which helps in finding or referencing the place.",
    "type": [
        {
            "code": "DX",
            "name": "Diagnostics or therapeutics unit"
        }
    ],
    "telecom": [
        {
            "phone": "12328785665",
            "email": "Christa.Luettgen@hotmail.com"
        },
        {
            "phone": "125468799",
            "email": "Virginie34@hotmail.com"
        },
        {
            "phone": "12438979790",
            "email": "Aletha_Stokes91@gmail.com"
        }
    ],
    "address": {
        "line": "cupidatat Ut",
        "city": "Schambergerport",
        "state": "Hawaii",
        "postal_code": "45511-1589",
        "country": "Mozambique"
    },
    "position": {
        "longitude": -170.867,
        "latitude": 27.8364,
        "altitude": 47047833.39611089
    },
    "hours_of_operation": [
        {
            "days_of_week": [
                "fri"
            ],
            "all_day": true
        },
        {
            "days_of_week": [
                "fri",
                "sat"
            ],
            "all_day": false,
            "opening_time": "15:00:00",
            "closing_time": "18:00:00"
        },
        {
            "days_of_week": [
                "sun",
                "sat",
                "tue"
            ],
            "all_day": true
        }
    ]
}

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 POST 'https://staging.onyeone.com/api/emr/location' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
    "name": "Ajah Branch",
    "status": "active",
    "mode": "instance",
    "description": "Description of the Location, which helps in finding or referencing the place.",
    "type": [
        {
            "code": "DX",
            "name": "Diagnostics or therapeutics unit"
        }
    ],
    "telecom": [
        {
            "phone": "12328785665",
            "email": "Christa.Luettgen@hotmail.com"
        },
        {
            "phone": "125468799",
            "email": "Virginie34@hotmail.com"
        },
        {
            "phone": "12438979790",
            "email": "Aletha_Stokes91@gmail.com"
        }
    ],
    "address": {
        "line": "cupidatat Ut",
        "city": "Schambergerport",
        "state": "Hawaii",
        "postal_code": "45511-1589",
        "country": "Mozambique"
    },
    "position": {
        "longitude": -170.867,
        "latitude": 27.8364,
        "altitude": 47047833.39611089
    },
    "hours_of_operation": [
        {
            "days_of_week": [
                "fri"
            ],
            "all_day": true
        },
        {
            "days_of_week": [
                "fri",
                "sat"
            ],
            "all_day": false,
            "opening_time": "15:00:00",
            "closing_time": "18:00:00"
        },
        {
            "days_of_week": [
                "sun",
                "sat",
                "tue"
            ],
            "all_day": true
        }
    ]
}'

Responses

🟢200Success
application/json
Body
message
string 
required
resource_name
string 
required
resource_id
string 
required
full_resource
object 
required
resourceType
string 
required
id
string 
required
meta
object 
required
status
string 
required
name
string 
required
description
string 
required
mode
string 
optional
type
array [object {2}] 
optional
telecom
array [object {3}] 
optional
address
object 
optional
position
object 
optional
managingOrganization
object 
optional
hoursOfOperation
array [object {4}] 
optional
Example
{
      "message": "Resource created successfully",
      "resource_name": "Location",
      "resource_id": "d0f2ff01-9bc3-5652-87cf-428d1b3f3170",
      "full_resource": {
            "resourceType": "Location",
            "id": "d0f2ff01-9bc3-5652-87cf-428d1b3f3170",
            "meta": {
                  "versionId": "1",
                  "lastUpdated": "2024-12-17T14:19:53.241+00:00",
                  "source": "#bosSD8P99I02rFlU",
                  "tag": [
                        {
                              "system": "http://onyeone.com/facility-tags/origination",
                              "code": "1",
                              "display": "Green Group Hospital"
                        }
                  ]
            },
            "status": "active",
            "name": "Ajah Branch",
            "description": "Description of the Location, which helps in finding or referencing the place.",
            "mode": "instance",
            "type": [
                  {
                        "coding": [
                              {
                                    "system": "http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType",
                                    "code": "DX",
                                    "display": "Diagnostics or therapeutics unit"
                              }
                        ],
                        "text": "Diagnostics or therapeutics unit"
                  }
            ],
            "telecom": [
                  {
                        "system": "phone",
                        "value": "12328785665",
                        "use": "work"
                  },
                  {
                        "system": "email",
                        "value": "Christa.Luettgen@hotmail.com",
                        "use": "work"
                  },
                  {
                        "system": "phone",
                        "value": "125468799",
                        "use": "work"
                  },
                  {
                        "system": "email",
                        "value": "Virginie34@hotmail.com",
                        "use": "work"
                  },
                  {
                        "system": "phone",
                        "value": "12438979790",
                        "use": "work"
                  },
                  {
                        "system": "email",
                        "value": "Aletha_Stokes91@gmail.com",
                        "use": "work"
                  }
            ],
            "address": {
                  "line": [
                        "cupidatat Ut"
                  ],
                  "city": "Schambergerport",
                  "state": "Hawaii",
                  "postalCode": "45511-1589",
                  "country": "Mozambique"
            },
            "position": {
                  "longitude": -170.867,
                  "latitude": 27.8364,
                  "altitude": 47047833.39611089
            },
            "managingOrganization": {
                  "reference": "Organization/5abe99ee-0928-546b-93e9-0207ba8a556b",
                  "display": "Green Group Hospital"
            },
            "hoursOfOperation": [
                  {
                        "daysOfWeek": [
                              "fri"
                        ],
                        "allDay": true
                  },
                  {
                        "daysOfWeek": [
                              "fri",
                              "sat"
                        ],
                        "allDay": false,
                        "openingTime": "15:00:00",
                        "closingTime": "18:00:00"
                  },
                  {
                        "daysOfWeek": [
                              "sun",
                              "sat",
                              "tue"
                        ],
                        "allDay": true
                  }
            ]
      }
}
Previous
Update PractitionerRole Resource
Next
Update Location Resource
Built with