OnyeOne Documentation
  1. Practitioners
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
          POST
        • Update Practitioner Resource
          PUT
        • Create Practitioner Role
          POST
        • Update PractitionerRole Resource
          PUT
      • 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. Practitioners

Update PractitionerRole Resource

Testing Env
https://staging.onyeone.com/api
Testing Env
https://staging.onyeone.com/api
PUT
/emr/practitionerrole/{practitionerrole_id}
This endpoint updates an existing PractitionerRole 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
practitionerrole_id
string 
required
PractitionerRole Resource ID
Body Params application/json
roles
array [object {2}] 
optional
Role of practitioner, e.g "nurse", "doctor", "pharmacist", etc
code
string 
optional
Hl7 code for the role. See https://www.hl7.org/fhir/valueset-practitioner-role.html for value sets.
name
string 
optional
HL7 value for the code. See See https://www.hl7.org/fhir/valueset-practitioner-role.html for value sets.
active
boolean 
optional
Whether this practitioner role record is in active use. Some systems may use this property to mark non-active practitioners, such as those that are not currently employed.
period
object 
optional
The period during which the person is authorized to act as a practitioner in these role(s) for the organization.
start
string 
optional
Start date in "YYYY-MM-DD" format, e.g 2025-03-26.
end
string 
optional
Start date in "YYYY-MM-DD" format, e.g 2025-03-26.
specialties
array [object {2}] 
optional
The specialty of a practitioner that describes the functional role they are practicing at a given organization or location.
code
string 
optional
HL7 specialty code, see http://hl7.org/fhir/ValueSet/c80-practice-codes
name
string 
optional
Specialty name. See http://hl7.org/fhir/ValueSet/c80-practice-codes
available_times
array [object {4}] 
optional
days_of_week
array[string]
optional
Allowed values:
montuewedthurfrisatsun
all_day
boolean 
optional
Always available? i.e. 24 hour service
start_time
string 
optional
Opening time of day (ignored if all_day = true). A time during the day, in the format hh:mm:ss
end_time
string 
optional
Closing time of day (ignored if all_day = true). A time during the day, in the format hh:mm:ss
not_available_times
array [object {3}] 
optional
Not available during this time due to provided reason
description
string 
optional
Reason presented to the user explaining why time not available
start_date
string 
optional
Service not available during this period
end_date
string 
optional
Service not available during this period
Example
{

    "roles": [{
        "code": "doctor", 
        "name": "doctor"
    }],
    "active": true,
    "period": {
        "start": "2024-12-20",
        "end": "2025-04-26"
    },
    "specialties": [
        {
            "code": "39457900",
            "name": "Cardiology"
        }
    ],
    "available_times": [
        {
            "days_of_week": [
                "mon"
            ],
            "all_day": false,
            "start_time": "17:00:00",
            "end_time": "18:00:00"
        },
        {
            "days_of_week": [
                "mon",
                "fri"
            ],
            "all_day": true,
            "start_time": "15:00:00",
            "end_time": "18:00:00"
        },
        {
            "days_of_week": [
                "thu",
                "fri",
                "sun"
            ],
            "all_day": true,
            "start_time": "20:00:00",
            "end_time": "18:00:00"
        }
    ],
    "not_available_times": [
        {
            "description": "Away on a holiday.",
            "start_date": "2025-08-17",
            "end_date": "2025-08-26"
        }
    ]
}

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/practitionerrole/' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{

    "roles": [{
        "code": "doctor", 
        "name": "doctor"
    }],
    "active": true,
    "period": {
        "start": "2024-12-20",
        "end": "2025-04-26"
    },
    "specialties": [
        {
            "code": "39457900",
            "name": "Cardiology"
        }
    ],
    "available_times": [
        {
            "days_of_week": [
                "mon"
            ],
            "all_day": false,
            "start_time": "17:00:00",
            "end_time": "18:00:00"
        },
        {
            "days_of_week": [
                "mon",
                "fri"
            ],
            "all_day": true,
            "start_time": "15:00:00",
            "end_time": "18:00:00"
        },
        {
            "days_of_week": [
                "thu",
                "fri",
                "sun"
            ],
            "all_day": true,
            "start_time": "20:00:00",
            "end_time": "18:00:00"
        }
    ],
    "not_available_times": [
        {
            "description": "Away on a holiday.",
            "start_date": "2025-08-17",
            "end_date": "2025-08-26"
        }
    ]
}'

Responses

🟢200Success
application/json
Body
message
string 
required
resource_id
string 
required
updated_fields
object 
required
active
boolean 
optional
notAvailable
array [object {2}] 
optional
Example
{
  "message": "PractitionerRole resource updated successfully.",
  "resource_id": "ca451d9f-75a9-561b-b839-50dfd6343b2e",
  "updated_fields": {
    "active": false,
    "notAvailable": [
      {
        "description": "Change",
        "during": {
          "start": "2025-06-17",
          "end": "2025-08-26"
        }
      }
    ]
  }
}
Previous
Create Practitioner Role
Next
Create a Location Resource
Built with