x QBOS REST API documentation for PATIENT

QBOS REST API documentation (PATIENT)

(return to Main Document)

Introduction

The PATIENT API allows client applications to maintain PATIENT data record sets.

Audience

This developer's guide is intended for software developers needing a technical reference for using the QBOS REST API. The information you find in this guide is written by software engineering, and is authoritative on how the API behaves.

Additional resources, information about this guide

Occasionally, we make a mistake in this documentation, or unknowingly break a feature that you depend on. If this has happened to you, we apologize! You can help us fix the issue by contacting us at: pkajaani@qbos.com. We appreciate your help.

Getting Started

To place any request in a QBOS API application from a third party application you need to first authenticate your user account and set/calculate values for the following request headers: x-qbos-id, x-qbos-nonce, x-qbos-date-utc, x-qbos-hash-version, x-qbos-auth

See details in Authentication Documentation.

Custom resource vs. standard resource URI format

Custom resource (a.k.a applet) URI contains the resource vendor id in place of "/o/" in the standard object URI. Compare: .../v1/o/...with .../v1/{vendor_id}/...

PATIENT properties

Properties prefixed with '_' (underscore) are read-only properties. i.e. POST and PUT processing will ignore these properties.

Name Type Max
Length
Numeric Required
For POST
Filterable Default Description
_client_Id bigint Yes NULL This is the Data Org Id.
_owner_Id bigint Yes Yes NULL This is the user id of the record owner. Defaults to the creatorOpid.
_creator_Opid bigint Yes Yes NULL This is the user id of the original record submitter.
_create_Date datetime No {timestamp}   Not enterable upon Insert. System sets this date upon record creation.
status_id int Yes Yes 1584 The status id of the record. Taken from the Life Cycle statuses in ADS.
_status_Change_Date datetime No NULL Not enterable. System sets this date whenever the statusid is changed.
Part_D_Fax nvarchar 20 Yes NULL
Part_D_ID nvarchar 20 Yes NULL
Part_D_Name nvarchar 50 Yes NULL
Term_Date_Notes nvarchar(MAX) Yes NULL
DOB datetime No NULL
Patient_First_Name nvarchar 25 Yes NULL
Patient_Last_Name nvarchar 25 Yes NULL
Sex bit Yes No NULL This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Admit_Diagnosis nvarchar 50 No NULL
Primary_Insurance nvarchar 30 No NULL
Primary_InsuranceIDNum nvarchar 20 No NULL
Secondary_Insurance nvarchar 30 No NULL
Secondary_InsuranceIDNum nvarchar 20 No NULL
Other_Insurance nvarchar 30 No NULL
Other_InsuranceIDNum nvarchar 20 No NULL
Customer_ID nvarchar 20 No NULL This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
PDC_Client_ID nvarchar 20 Yes NULL
Group_ID nvarchar 20 Yes NULL This property is populated by a Type 3 Value List.
Click here for the appropriate API and sample of value options for this column.
Member_ID nvarchar 9 Yes NULL
Person_Code integer Yes No 001
Drug_Allergies nvarchar(MAX) No NULL
Effective_Date datetime Yes NULL
Termination_Date datetime Yes 2039-12-31
Misc_Notes nvarchar(MAX) No NULL
Physician nvarchar 30 No NULL
Patient_Location nvarchar 40 No NULL
Pharmacy_1 integer Yes No NULL This property is populated by a Type 3 Value List.
Click here for the appropriate API and sample of value options for this column.
Pharmacy_2 integer Yes No NULL This property is populated by a Type 3 Value List.
Click here for the appropriate API and sample of value options for this column.
Pharmacy_3 integer Yes No NULL This property is populated by a Type 3 Value List.
Click here for the appropriate API and sample of value options for this column.
Other_Pharmacy nvarchar 50 Yes NULL
Other_Pharmacy_Phone nvarchar 20 Yes NULL
Nurse_Teamlead integer Yes Yes NULL This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Admin_Fee decimal(9,4) 9 Yes No 1
Base_None bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_CBC bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_Chem_Profile bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_PTINR bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_VAL bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_Digoxin bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_LFT bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_Lipid bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_HBA1C bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_TSH bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_CarbTeg bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_Theophylline bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_Other nvarchar 100 No NULL
PharmD_RevComment_DEL bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
PharmD_Recommend nvarchar(MAX) No NULL
Pharmacist_Notes_Overview nvarchar(MAX) No NULL
Physician_Phone nvarchar 20 No NULL
Set_Status_To integer Yes No NULL This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Base_Phenytoin bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Pharmacist_Review_Complete bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Physician_DEA nvarchar 20 No NULL
Switch bit Yes Yes 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
chkPharmacy bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
PharmD_Rev_YesNoRec bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
PharmD_Reviewer nvarchar 50 Yes NULL
PharmD_Rev_YesNoTxt nvarchar 50 No NULL
Send_To_SXC bit Yes Yes 0 The Q_507472_sFTP_to_SXC stored procedure, which runs every 30 minutes, sends to SXC all facesheets where this field is 1. Therefore this field does not need to trigger anything.
This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Latest_SXC_Batch_Id integer Yes Yes 0
Client_Type nvarchar 20 Yes NULL
Patient_Review_Type nvarchar 20 Yes NULL This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
MR_Number nvarchar 20 Yes NULL
Other_Pharmacy_Fax bigint Yes Yes NULL
Co_Morbids nvarchar(MAX) Yes NULL
Cancer_Type nvarchar 30 No NULL
TEST_FAX bit Yes No NULL This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Last_Date_Added_or_Modified datetime Yes NULL
Medicare_Part_A_1 bit Yes Yes NULL This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Case_Manager nvarchar 20 Yes NULL
Case_Manager_ACD nvarchar 20 Yes NULL
Review_Title nvarchar 20 No Initial Care Plan
Source_Facesheet integer Yes No NULL
Copy_Requested nvarchar 1 No NULL This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Random_Selection bit Yes Yes 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
chkReFax bit Yes No 0 This property is populated by a Type 1 Value List.
Click here for the appropriate API and sample of value options for this column.
Last_User nvarchar 25 Yes NULL
Date_Review_Complete datetime Yes NULL
Team_ID nvarchar 20 Yes NULL
Secondary_Diagnosis nvarchar 50 Yes NULL
Term_Notes nvarchar(MAX) Yes NULL
Audit_Notes nvarchar(MAX) Yes NULL
Part_D_Name nvarchar 50 Yes NULL
Part_D_ID nvarchar 20 Yes NULL
Part_D_Fax nvarchar 20 Yes NULL
Term_Date_Notes nvarchar(MAX) Yes NULL

PATIENT Relationships

Parent and Child relations to PATIENT.

Note that the only Required status on relationships that affect a POST of an object are on the parent relations. A Required status on a child relation is only meaningful when POSTing the child object.

Linking during POST: a custom object record can be linked to a parent or child record (custom or standard) during POST by including (in the payload) the realtion id paired with the parent or child object record being linked to. For example: { "REl_1384" : 1832 }      Multiple links may be created in the same POST.

Relation Id Cardinality
(Parent-to-Child)
Required
For POST
Links Up To Is Unary?*
REL_1354 1-Many Yes Contact
REL_1395 1-Many Yes Contact
Parent Relations

PATIENT

Child Relations
Relation Id Cardinality
(Parent-to-Child)
Required
**on POST of child
Links Down To  
REL_1384 1-Many Yes** Medications  
REL_1373 1-Many Yes** Drug_Interactions_Found  
REL_1407 1-Many Yes** Medication_Admin_Record  
REL_2666 1-Many Yes** Treatments_and_Procedures  
 



Read PATIENT by id:

GET https:/.../v1/507472/PATIENT/{id}

Response codes:

  • 200 - OK
  • 404 - Not found or user does not have permission to access resources of this type.
  • 400 - Client error
  • 500 - Server error

Response data: GET https:/.../v1/507472/PATIENT/1910
Unauthorized request.

Read PATIENT by parent id:

GET https:/.../v1/507472/{parent_relation_id}/{parent_id}/links/PATIENT[?{filter}]

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 200 - OK

Response data: GET https:/.../v1/507472/1354/527735/links/PATIENT
Unauthorized request.

Read PATIENT by filter:

GET https:/.../v1/507472/PATIENT[?{filter}]

Response codes:

  • 200 - OK
  • 400 - Client error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 500 - Server error

Response data: GET https:/.../v1/507472/PATIENT?id=1910
Unauthorized request.

Create PATIENT:

POST https:/.../v1/507472/PATIENT

Request data [See properties]:

Response codes:

Update PATIENT:

PUT https:/.../v1/507472/PATIENT/{id}

Request data [See properties]:

Response codes:

  • 200 - OK Content returned [See response data]
  • 204 - OK No content
  • 400 - Client error
  • 404 - Not found
  • 500 - Server error

Delete PATIENT:

DELETE https:/.../v1/507472/PATIENT/{id}

The "id" in JSON payload is required to match the {id} in the URI to ensure that deletion requests are intended and safe

Response codes:

  • 204 - OK
  • 400 - Client error
  • 404 - Not found
  • 500 - Server error

Create Link for PATIENT:

POST https:/.../v1/507472/{relation_id}/{link_to_id}/links/PATIENT/{id}


{relation_id} can indicate either a parent or a child relation.

Response codes:

  • 204 - OK
  • 400 - Client error
  • 404 - Not found
  • 500 - Server error

Delete Link for PATIENT:

DELETE https:/.../v1/507472/{parent_relation_id}/{parent_id}/links/PATIENT/{id}


Deleting a link from PATIENT down to a child object must be explicitly indicated by negating the relation id:

DELETE https:/.../v1/507472/{-child_relation_id}/{child_id}/links/PATIENT/{id}

Response codes:

  • 204 - OK
  • 400 - Client error
  • 404 - Not found
  • 500 - Server error