OnyeOne Documentation
  1. Patients
OnyeOne Documentation
  • Overview
  • OnyeOne Use Cases
  • Authentication
  • Guides
    • OnyeOne Request Flow
  • Core EHR/EMR FHIR R4 APIs
    • Administration
      • Patients
        • Create Patient Resource
          POST
        • Update Patient Resource
          PUT
      • 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
        • 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. Patients

Update Patient Resource

Developing
Testing Env
https://staging.onyeone.com/api
Testing Env
https://staging.onyeone.com/api
PUT
/emr/patient/{patient_id}
This endpoint updates an existing Patient resource. Note that this operation replaces the section in the resource as specified in the body of the request.

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Path Params

Body Params application/json

Example
{
    "active": true,
    "name": {
        "first_name": "Kiley",
        "last_name": "Ziemann-Huel",
        "title": "Mr"
    },
    "telecom": [
        {
            "phone": "+1234546798",
            "email": "Carolyn36@yahoo.com"
        }
    ],
    "gender": "other",
    "birth_date": "2025-05-15",
    "deceased": false,
    "address": {
        "line": "exercitation",
        "city": "East Elda",
        "state": "Hawaii",
        "postal_code": "34161-4996",
        "country": "Bulgaria"
    },
    "marital_status": "Polygamous",
    "general_practitioner": [
        "5762e3c4-43ef-5585-9827-177d51c2ed2d"
    ],
    "link": [
        {
            "other": "18ff6238-1f1a-51b3-8a83-04a8492a4fd6",
            "type": "refer"
        }
    ],
    "contact": [
        {
            "relationship": "State Agency",
            "telecom": [
                {
                    "phone": "+1237547468",
                    "email": "Alexandro.Lynch@hotmail.com"
                }
            ],
            "name": {
                "first_name": "Mariela",
                "last_name": "Kunde"
            },
            "address": {
                "line": "nulla",
                "city": "Ilianamouth",
                "state": "Florida",
                "postal_code": "87062",
                "country": "Algeria"
            },
            "gender": "male",
            "period": {
                "start": "2017-02-19",
                "end": "2027-09-24"
            }
        },
        {
            "relationship": "Employer",
            "telecom": [
                {
                    "phone": "+4497598469",
                    "email": "Filomena45@yahoo.com"
                },
                {
                    "phone": "+234565435748",
                    "email": "Madge84@hotmail.com"
                }
            ],
            "name": {
                "first_name": "Preston",
                "last_name": "Waters",
                "title": "Mr"
            },
            "address": {
                "line": "nulla minim",
                "city": "South Kearaville",
                "state": "Vermont",
                "postal_code": "29006-7112",
                "country": "Ireland"
            },
            "gender": "other",
            "period": {
                "start": "2016-09-22",
                "end": "2028-10-13"
            }
        }
    ]
}

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 PUT 'https://staging.onyeone.com/api/emr/patient/' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "active": true,
    "name": {
        "first_name": "Kiley",
        "last_name": "Ziemann-Huel",
        "title": "Mr"
    },
    "telecom": [
        {
            "phone": "+1234546798",
            "email": "Carolyn36@yahoo.com"
        }
    ],
    "gender": "other",
    "birth_date": "2025-05-15",
    "deceased": false,
    "address": {
        "line": "exercitation",
        "city": "East Elda",
        "state": "Hawaii",
        "postal_code": "34161-4996",
        "country": "Bulgaria"
    },
    "marital_status": "Polygamous",
    "general_practitioner": [
        "5762e3c4-43ef-5585-9827-177d51c2ed2d"
    ],
    "link": [
        {
            "other": "18ff6238-1f1a-51b3-8a83-04a8492a4fd6",
            "type": "refer"
        }
    ],
    "contact": [
        {
            "relationship": "State Agency",
            "telecom": [
                {
                    "phone": "+1237547468",
                    "email": "Alexandro.Lynch@hotmail.com"
                }
            ],
            "name": {
                "first_name": "Mariela",
                "last_name": "Kunde"
            },
            "address": {
                "line": "nulla",
                "city": "Ilianamouth",
                "state": "Florida",
                "postal_code": "87062",
                "country": "Algeria"
            },
            "gender": "male",
            "period": {
                "start": "2017-02-19",
                "end": "2027-09-24"
            }
        },
        {
            "relationship": "Employer",
            "telecom": [
                {
                    "phone": "+4497598469",
                    "email": "Filomena45@yahoo.com"
                },
                {
                    "phone": "+234565435748",
                    "email": "Madge84@hotmail.com"
                }
            ],
            "name": {
                "first_name": "Preston",
                "last_name": "Waters",
                "title": "Mr"
            },
            "address": {
                "line": "nulla minim",
                "city": "South Kearaville",
                "state": "Vermont",
                "postal_code": "29006-7112",
                "country": "Ireland"
            },
            "gender": "other",
            "period": {
                "start": "2016-09-22",
                "end": "2028-10-13"
            }
        }
    ]
}'

Responses

🟢200Success
application/json
Body

Example
{
    "message": "Patient resource updated successfully.",
    "resource_id": "1e9c2550-bd42-5ba5-8ba5-db1e7c945054",
    "updated_fields": {
        "active": true,
        "gender": "male",
        "maritalStatus": {
            "coding": [
                {
                    "code": "M",
                    "display": "Married",
                    "system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus"
                }
            ],
            "text": "Married"
        }
    }
}
Modified at 2024-12-19 12:37:56
Previous
Create Patient Resource
Next
Create Practitioner Resource
Built with