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}
emr
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
patient_id
string 
required
Body Params application/json
active
boolean 
optional
name
object 
optional
first_name
string 
optional
last_name
string 
optional
title
string 
optional
telecom
array [object {2}] 
optional
phone
string 
optional
email
string 
optional
gender
enum<string> 
optional
Allowed values:
malefemaleotherunknown
birth_date
string 
optional
deceased
boolean 
optional
address
object 
optional
line
string 
optional
city
string 
optional
state
string 
optional
postal_code
string 
optional
country
string 
optional
marital_status
enum<string> 
optional
Allowed values:
AnnulledDivorcedInterlocutoryLegally SeparatedMarriedCommon LawPolygamousDomestic PartnerUnmarriedNever MarriedWidowed
general_practitioner
array[string]
optional
Practitioner Resources IDs
link
array [object {2}] 
optional
Link to another patient resource that concerns the same actual patient.
other
string 
required
The other patient resource ID that the link refers to.
type
enum<string> 
required
Allowed values:
replaced-byreplacesreferseealso
contact
array [object {6}] 
optional
relationship
enum<string> 
required
Allowed values:
Emergency ContactEmployerFederal AgencyInsurance CompanyNext-of-KinState AgencyUnknown
telecom
array [object {2}] 
required
name
object 
required
address
object 
optional
gender
enum<string> 
optional
Allowed values:
malefemaleotherunknown
period
object 
optional
The period during which this contact person or organization is valid to be contacted relating to this patient.
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 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 'Content-Type: application/json' \
--header 'x-api-key;' \
--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
message
string 
required
resource_id
string 
required
updated_fields
object 
required
active
boolean 
optional
gender
string 
optional
maritalStatus
object 
optional
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"
        }
    }
}
Previous
Create Patient Resource
Next
Create Practitioner Resource
Built with