Post

zMed Data Export API Manual

zMed API User Manual

Table of Contents

Roles

  • The api provides features to give role-based access to the users.

  • The roles are identified by numbers and the users can give any combination of these roles to the various users depending on their requirements.

  • In case the user tries to access which outside of its role, it will be responsed with a status code of 403 along with a message indicating that the user is not allowed to access that resource. For example, if the user is not allowed to make queries, it will be responded with the following response:

    1
    2
    3
    4
    
    {
      "message": "You are not allowed to query patient data.",
      "userRoles": [] // the list of roles that are allowed
    }
    

The following table shows the roles available, their corresponding number codes, and the corresponding error messages in case of authorized access:

RoleCodeUnauthorized Access message
Change password for self0You are not allowed to change your password
Change password for a user1You are not allowed to change your password for this user
Logout of all devices2You are not allowed to logout from all devices
View size of data queried for self3You are not allowed to view the total data queried
View size of data queried for other users4You are not allowed to view the total data queried for that user
View rate-limits for self5You are not allowed to view the rate limits set for you
View rate-limits for other users6You are not allowed to view the rate limits set for that user
Queries7You are not allowed to query patient data
Change roles for a user (including self)8You are not allowed to change roles for users

For example, a user will have the roles [0, 7] if the user can change password for its own account and make queries.

Note: Adding, removing users, setting, changing the rate limits can only be done by the zMed in this case.

Rate Limiting

  • To prevent the servers from getting spammed, users can enable rate limiting for each user. There are 4 different rate limiters available (based on the basis):

    • User id
    • Session id
    • IP address
    • Data size (in bytes)
  • Individual users can have any combination (including all the 4) types of rate limits.

  • For a given type of rate limiter, the user can have different layers of rate limiting too (For example, 15 requests per second and 100 requests per minute for the user id rate limiter).

  • The values number of requests and the unit of time for a given layer of a specified rate limiter can also be different for different users.

  • Disabling a specified type of rate limiter means no checks will be done for that basis.

Authentication and Access Management

  • There are 4 apis for access management:
    • Login
    • Generate new access token
    • Logout
    • Logout for all users
    • Change password for other users
    • Change password for self
    • Update roles for users

Token-based authentication

  • Authentication will be done using refresh and access tokens.
  • Both the tokens will be issued after the user successfully logs in.
  • Access tokens are short-lived credentials that are used to access protected resources on behalf of a user.
  • Access tokens are sent with each API request as Bearer tokens in the request headers to authenticate the user.
  • When the access token expires, the user is required to obtain a new one by re-authenticating with their credentials.
  • Refresh tokens are long-lived credentials that are used to obtain new access tokens without requiring the user to re-enter their credentials.
  • Refresh tokens should be stored securely, in a secure HTTP-only cookie.
  • Refresh tokens should not be accessibile to the application code.
  • When an access token expires, the client can send the refresh token to the authentication server to request a new access token.

Authentication workflow

  • The user logs in with their credentials (username/password in this case).
  • The authentication server validates the credentials and, if successful, issues an access token and a refresh token.
  • The access token is sent along with the API response, while the refresh token is sent as an HTTP-only cookie.
  • When the access token expires, the resource server returns an authentication error.
  • The client (application) detects the expired access token and uses the refresh token to request a new access token from the authentication server. In case, the client has cookies disabled, the user will be required to log in again.
  • The authentication server validates the refresh token and issues a new access token.
  • The new access token is then used for subsequent API requests, and the process repeats as needed until the refresh token itself expires.
  • Once the refresh token expires, the user is required to log in again to obtain new tokens.
  • While logging out, the authentication server removes the refresh token from the cookie as well as the database, but it will be the responsibility of the client to delete the access token.
  • Users also have the ability to logout of all devices if they believe their tokens are leaked (subject to the relevant role).

Login

  • Method: POST
  • Base URL: /api/v1/auth
  • Authentication required: false
  • Request body
ParamsDescriptionCommentsSample
usernameusername of the authenticated userrequireduser1 or user2@xyz.in
passwordpassword of the authenticated userrequired 
  • Reponse format
ParameterDescriptionData type
messagedescription of the responsestring
accessTokenaccess token which should be added as the Bearer token the request headers for subsequent requestsstring
  • Sample request url:

    /api/v1/auth/login

  • Sample response:

    1
    2
    3
    4
    
    {
      "message": "User logged in successfully",
      "accessToken": "eyJskdnwdkmlw802..."
    }
    

(Note: In addition to the response, this API also sets a httpOnly cookie zid on the client which can be used to generate access tokens)

Generate Access Token API

  • Method: GET
  • Base URL: /api/v1/auth/generate-access-token
  • Authentication required: partially (need to have a valid refresh token in the request cookies)

Logout API

  • Method: POST
  • Base URL: /api/v1/auth/logout
  • Authentication required: true
  • Sample request url:

    /api/v1/auth/logout

  • Sample response:

    1
    2
    3
    
    {
      "message": "Logged out successfully"
    }
    

Logout of all users API

  • Method: POST
  • Base URL: /api/v1/auth/logout-of-all-devices
  • Authentication required: true
  • Sample request url:

    /api/v1/auth/logout-of-all-devices

  • Sample response:

    1
    2
    3
    
    {
      "message": "Successfully logged out of all devices"
    }
    

Change password API

  • Method: PATCH
  • Base URL: /api/v1/auth/change-password
  • Authentication required: true
  • Request body
ParamsDescriptionComments
currentPasswordusername of the authenticated userrequired
newPassworddesired new password of the authenticated userrequired
confirmNewPassworddesired new password of the authenticated user (should be same as newPassword)required

Change roles API

  • Method: PATCH
  • Base URL: /api/v1/auth/roles
  • Authentication required: true
ParamsDescriptionCommentsSample
usernameusername of the authenticated userrequireduser1 or user2@xyz.in
rolesArray of the new rolesrequired[0,1,6]

Account APIs

Logs API

  • Method: GET
  • Base URL: /api/v1/account
  • Authentication required: true
Query ParamsDescriptionCommentsSample
startDatestarting time of the form in milisecondsoptional1655546340000
endDateending time of the form in milisecondsoptional1655546340000
ipAddressIPV4 address of the clientoptional192.168.0.1
usernameEmail address of the useroptionalabc@example.com
querySlug of the query api (with the params)optional/api/v1/forms
includeResultsBoolean value to include the results of the queries or not (Maybe be empty if the query was made long ago)optionaltrue or false

View Rate Limits (for own account)

  • Method: GET
  • Base URL: /api/v1/limits
  • Authentication required: true

View Rate Limits (for other accounts)

  • Method: GET
  • Base URL: /api/v1/limits/user
  • Authentication required: true
Query ParamsDescriptionCommentsSample
usernameEmail address of the useroptionalabc@example.com

Total Data Queried (for own account)

  • Method: GET
  • Base URL: /api/v1/account/total-bill
  • Authentication required: true
Query ParamsDescriptionCommentsSample
usernameEmail address of the useroptionalabc@example.com
startDatestarting time of the form in milisecondsoptional1655546340000
endDateending time of the form in milisecondsoptional1655546340000

Total Data Queried (for other accounts)

  • Method: GET
  • Base URL: /api/v1/account/total-bill/user
  • Authentication required: true
Query ParamsDescriptionCommentsSample
startDatestarting time of the form in milisecondsoptional1655546340000
endDateending time of the form in milisecondsoptional1655546340000

Query APIs

All Forms API

  • Method: GET
  • Base URL: /api/v1/list/forms
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 
typetype of form user wants to queryoptional, make its value core to get all core forms. For all other values it returns the list of all normal forms 

All ICE Elements API

  • Method: GET
  • Base URL: /api/v1/list/ice-elements
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 

All Units API

  • Method: GET
  • Base URL: /api/v1/list/units
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 

All Users API

  • Method: GET
  • Base URL: /api/v1/list/users
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 

All Patients API

  • Method: GET
  • Base URL: /api/v1/list/patients
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 
unitIdName of the unitoptionalHDU
startDatestarting time of the form in milisecondsoptional1655546340000
endDateending time of the form in milisecondsoptional1655546340000

Forms API

  • Method: GET
  • Base URL: /api/v1/query/forms
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 
unitIdName of the unitoptionalHDU
zUnitIdName of the unit as used by zMedoptional but specify only one of zUnitId and unitId62a71ae6951eb42813f55c19
employeeIDEmployee ID of the doctoroptional62a71ae6951eb42813f55c19
patientUHIDUHID of the patientoptional but specify only one for patientUHID and patientZhrIdZB00001105
patientZhrIdzMed patient IDoptional but specify only one for patientUHID and patientZhrId62ab1d825a2b7b1a06e7e1e1
formIdId of the form or the core formoptional6373311a1b1d975a2d50e42c
coreFormNameName of the core formoptional but specify only one for formId and coreFormNameems_triage_form
userIdId of the user (email/username)optional but specify only one for userId and zmedUserIdexample@zmed.com
zmedUserIdId of the user used by zMedoptional but specify only one for userId and zmedUserId639720373cb96ad5ed52934b
ipNumberIp number of the patientoptional but specify only one for userId and zmedUserIdIP-09890
zAdmissionInfoIdAdmission info ID used by zMedoptional but specify only one for ipNumber and zAdmissionInfoId1655546340000
startDatestarting time of the form in milisecondsoptional1655546340000
endDateending time of the form in milisecondsoptional1655546340000

(Note: Keep all fields blank to fetch all the forms.)

  • Reponse format
ParameterDescriptionData type
messagesuccess in case of a successful querystring
resultsthe response of the query based on the parameters passedArray
currentPagethe current page number of the responsenumber
pageSizenumber of results in the current pagenumber
pageCountnumber of pages for that responsenumber
totalResultstotal number of results for that querynumber
responseSizesize of the results in bytesnumber
responseTimethe response time in miliseconds. Calculated since when zMed received the request (Actual response time may depend upon various factors like internet speed, geographic location of the user, network latency, etc)number

Sample request url:

/api/v1/query/forms?userId=xyz@zmed.com&startDate=1671703560200&endDate=1672903570203

(Note: for representation purposes only. Actual request should contain the Bearer token as well.)

Device Data - Monitor API

  • Method: GET
  • Base URL: /api/v1/query/device-data/monitor
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 
typeThe type of device data. For multiple types, pass in a comma-separated string with the valid values.required (the full list of valid values is available in a table in the next point)pulse_rate or or pulse_rate,cvp
unitIdName of the unitoptionalHDU
zUnitIdName of the unit as used by zMedoptional but specify only one of zUnitId and unitId62a71ae6951eb42813f55c19
startDatestarting time of the form in milisecondsoptional1655546340000
endDateending time of the form in milisecondsoptional1655546340000
patientUHIDUHID of the patientoptional but specify only one for patientUHID and patientZhrIdZB00001105
patientZhrIdzMed patient IDoptional but specify only one for patientUHID and patientZhrId62ab1d825a2b7b1a06e7e1e1

Sample request url:

/api/v1/query/device-data/monitor?patientUHID=ZB00001105&type=pulse_rate&page=3

(Note: for representation purposes only. Actual request should contain the Bearer token as well.)

  • The list of valid values of type:
Device data typeCode name
Pulmonary Artery Pressure - Systolic Blood Pressurepap_syst_bp
Pulmonary Artery Pressure - Diastolic Blood Pressurepap_diast_bp
Pulmonary Artery Pressure - Mean Blood Pressurepap_mean_bp
Heart Rateheart_rate
LAla
Central Venous Pressurecvp
Arterial Diastolic Blood Pressureart_diast_bp
ST segment as measured in Lead II of the ECGst_l2
Pulse ratepulse_rate
Signal Quality Indexsqi
Arterial Systolic Blood Pressureart_syst_bp
RAra
Intra-Abdominal Pressureiap
Bispectral Indexbis
Peripheral Capillary Oxygen Saturationspo2
ST segment as measured in Lead V5 of the ECGst_v5
Respiratory Raterr
Noninvasive Mean Blood Pressurenoninvasive_mean_bp
End-tidal Carbon Dioxideetco2
Body Temperaturetemperature
Noninvasive Diastolic Blood Pressurenoninvasive_diast_bp
Noninvasive Systolic Blood Pressurenoninvasive_syst_bp

Device Data - Anesthesia/Ventilator API

  • Method: GET
  • Base URL: /api/v1/query/device-data/anes-vent
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 
typeThe page of the responserequired (the full list of valid values is available in a table in the next point) 
startDatestarting time of the form in milisecondsoptional1655546340000
endDateending time of the form in milisecondsoptional1655546340000
patientUHIDUHID of the patientoptionalZB00001105
unitIdName of the unitoptionalHDU

Sample request url:

/api/v1/query/device-data/anes-vent?patientUHID=ZB00001105&type=ventilator&page=3

(Note: for representation purposes only. Actual request should contain the Bearer token as well.)

  • The list of valid values of type:
Device data typeCode name
Ventilatorventilator
Anesthesiaanesthesia

Lab reports API

  • Method: GET
  • Base URL: /api/v1/query/lab-report
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 
startDatestarting time of the form in milisecondsoptional1655546340000
endDateending time of the form in milisecondsoptional1655546340000
patientUHIDUHID of the patientoptionalZB00001105
ipNumberIp number of the patientoptionalIP-09890
unitIdName of the unitoptional but if specifying, adding patientUHID is mandatoryHDU

Sample request url:

/api/v1/query/lab-report?patientUHID=ZB00001105&page=3

(Note: for representation purposes only. Actual request should contain the Bearer token as well.)

ICE elements API

  • Method: GET
  • Base URL: /api/v1/query/ice-elements
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 
startDatestarting time of the form in milisecondsoptional1655546340000
endDateending time of the form in milisecondsoptional1655546340000
patientUHIDUHID of the patientoptionalZB00001105
ipNumberIp number of the patientoptionalIP-09890
unitIdName of the unitoptionalHDU
elementIdName of the elementoptionalCardiac Rhythm

Sample request url:

/api/v1/query/ice-elements?patientUHID=ZB00001105&page=3

(Note: for representation purposes only. Actual request should contain the Bearer token as well.)

Progress notes API

  • Method: GET
  • Base URL: /api/v1/query/progress-note
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 
startDatestarting time of the form in milisecondsoptional1655546340000
endDateending time of the form in milisecondsoptional1655546340000
userIdId of the user (email/username)optional but specify only one for userId and zmedUserIdexample@zmed.com
zmedUserIdId of the user used by zMedoptional but specify only one for userId and zmedUserId639720373cb96ad5ed52934b
employeeIDEmployee ID of the doctoroptional62a71ae6951eb42813f55c19
patientUHIDUHID of the patientoptional but specify only one for patientUHID and patientZhrIdZB00001105
patientZhrIdzMed patient IDoptional but specify only one for patientUHID and patientZhrId62ab1d825a2b7b1a06e7e1e1
ipNumberIp number of the patientoptional but specify only one for userId and zmedUserIdIP-09890
zAdmissionInfoIdAdmission info ID used by zMedoptional but specify only one for ipNumber and zAdmissionInfoId1655546340000
unitIdName of the unitoptionalHDU
zUnitIdName of the unit as used by zMedoptional but specify only one of zUnitId and unitId62a71ae6951eb42813f55c19

Sample request url:

/api/v1/query/progress-note?patientUHID=ZB00001105&page=3

(Note: for representation purposes only. Actual request should contain the Bearer token as well.)

Fluid Balance API

  • Method: GET
  • Base URL: /api/v1/query/fluid-balance
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 
typeThe type of device datarequired (the full list of valid values is available in a table in the next point)fluid_infusions
startDatestarting time of the form in milisecondsoptional1655546340000
endDateending time of the form in milisecondsoptional1655546340000
patientUHIDUHID of the patientoptional but specify only one for patientUHID and patientZhrIdZB00001105
patientZhrIdzMed patient IDoptional but specify only one for patientUHID and patientZhrId62ab1d825a2b7b1a06e7e1e1
unitIdName of the unitoptionalHDU
zUnitIdName of the unit as used by zMedoptional but specify only one of zUnitId and unitId62a71ae6951eb42813f55c19

Sample request url:

/api/v1/query/fluid-balance?patientUHID=ZB00001105&type=fluid_infusions&page=3

(Note: for representation purposes only. Actual request should contain the Bearer token as well.)

  • The list of valid values of type:
Device data typeCode name
Fluid Infusionsfluid_infusions
Fluid Inputsfluid_inputs
Fluid Outputsfluid_outputs
Fluid miscellaneousfluid_misc

OT Anesthesia API

  • Method: GET
  • Base URL: /api/v1/query/ot/anesthesia
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 
startDatestarting time in milisecondsoptional1655546340000
endDateending time in milisecondsoptional1655546340000
patientUHIDUHID of the patientoptionalZB00001105
unitIdName of the unitoptionalOperation_Theater
ipNumberIp number of the patientoptionalIP-09890

Sample request url:

/api/v1/query/ot/anesthesia?patientUHID=ZB00001105&page=3

(Note: for representation purposes only. Actual request should contain the Bearer token as well.)

Ambulance GPS API

  • Method: GET
  • Base URL: /api/v1/query/ambulance/gps
  • Authentication required: true
Query ParamsDescriptionCommentsSample
pageThe page of the responseoptional defaults to 1 
startDatestarting time in milisecondsoptional1655546340000
endDateending time in milisecondsoptional1655546340000
deviceIdDevice IDoptionaldevice_id_123
ambulanceIdID of the ambulanceoptionalamb_003934

Sample request url:

/api/v1/query/ambulance/gps?page=3

(Note: for representation purposes only. Actual request should contain the Bearer token as well.)

Error codes

General Errors

Status codeStatus code meaningmessageReason for error
500Internal Server ErrorInternal Server ErrorVarious reasons like bad request syntax, database (local or master) unreachable, cache server down
404Not FoundInternal Server ErrorThe requested endpoint is does not exist

Role-based access

Status codeStatus code meaningmessageReason for error
403UnauthorizedYou are not allowed to change your passwordUser does not have the permission to change the account password
403UnauthorizedYou are not allowed to change your password for this userUser does not have the permission to change the account password for other users
403UnauthorizedYou are not allowed to logout from all devicesUser does not have the permission to logout from all devices
403UnauthorizedYou are not allowed to view the total data queriedUser does not have the permission to view the size of the data (in bytes) queried by it
403UnauthorizedYou are not allowed to view the total data queried for that userUser does not have the permission to view the the size of the data (in bytes) queried for other users
403UnauthorizedYou are not allowed to view the rate limits set for youUser does not have the permission to view the rate limits set for its own account
403UnauthorizedYou are not allowed to view the rate limits set for that userUser does not have the permission to view the rate limits set for other users
403UnauthorizedYou are not allowed to query patient dataUser does not have the permission to make queries
403UnauthorizedYou are not allowed to change roles for usersUser does not have the permission to change roles for other users

Authentication

Status codeStatus code meaningmessageReason for error
403UnauthorizedAccess deniedUser is not a super user
400Bad RequestPlease provide a username and passwordUsername and/or password not provided to register that user
400Bad RequestUser already existsThe user being tried to register already exists
400Bad RequestError while retrieving the user information <username> <password>Local database connection failed. Users collection deleted
401UnauthorizedUser does not existNo such user found in the database
401UnauthorizedInvalid credentialsWrong username/password provided
401UnauthorizedAccess token missingBearer token is missing in the request headers for authentication
401UnauthorizedInvalid access tokenBearer token is either wrong or expired
401UnauthorizedUser not foundNo registered user found. Registration of the user required
401UnauthorizedInvalid access token. Someone logged out of all devices. Please re-loginBearer token invalidated because of someone logging out of all devices
400Bad RequestConfirm password and new password are not the samenewPassword and confirmNewPassword do not match
400Bad RequestCurrent password and the new password are the sameNew password and the old password cannot be the same
400Bad RequestInvalid credentials for the userusername/password is wrong for that user
400Bad RequestError parsing rolesthe roles(s) is not valid. Please refer to the roles section for the list of valid roles and their codes
400Bad RequestRole <role> is not a number of is out of rangethe roles is not valid. Please refer to the roles section for the list of valid roles and their codes

Rate Limiters

Status codeStatus code meaningmessageReason for error
429Too Many RequestsIP rate limit exceededLimits for IP address rate limiter have been reached. Please try after some time.
429Too Many RequestsData rate limit exceededLimits for Data size rate limiter have been reached. Please try after some time.
429Too Many RequestsSession rate limit exceededLimits for Session id rate limiter have been reached. Please try after some time.
429Too Many RequestsUser rate limit exceededLimits for User id rate limiter have been reached. Please try after some time.

All patients query API

Status codeStatus code meaningmessageReason for error
400Bad RequestThe start date is not a valid datestartDate is not in the valid format.
400Bad RequestThe end date is not a valid dateendDate is not in the valid format.
400Bad RequestThe start date cannot be after the end datestartDate should always be less than endDate

Forms query API

Status codeStatus code meaningmessageReason for error
409ConflictConflict: You cannot specify both coreFormName and formIdBoth coreFormName and formId cannot be passed
409ConflictConflict: You cannot specify both unitId and zUnitIdBoth unitId and zUnitId cannot be passed
409ConflictConflict: You cannot specify both patientId and patientZhrIdBoth patientId and patientZhrId cannot be passed
409ConflictConflict: You cannot specify both userId and zmedUserIdBoth userId and zmedUserId cannot be passed
409ConflictConflict: You cannot specify both ipNumber and zAdmissionInfoIdBoth ipNumber and zAdmissionInfoId cannot be passed
400Bad RequestBad request: Patient UHID or patientZhrId is requiredpatientUHID or patientZhrId is required if admissionInfoId is specified.
400Bad RequestError processing the datesstartDate and/or endDate is not in the valid format.
400Bad RequestThe start date is not a valid datestartDate is not in the valid format.
400Bad RequestThe end date is not a valid dateendDate is not in the valid format.
400Bad RequestThe start date cannot be after the end datestartDate should always be less than endDate
400Bad RequestNo unit found for the specified unitIdThe specified unitId does not exist
400Bad RequestNo patient found for the specified UHIDThe specified patientUHID does not exist
400Bad RequestNo admission info found for the specified ipNumberThe specified ipNumber does not exist
400Bad RequestNo user with the specified email address foundThe specified userId does not exist
400Bad RequestForm not foundThe specified coreFormName does not exist
400Bad RequestMultiple forms foundThe specified coreFormName has multiple forms linked to it (Please contact zMed to resolve this)

Device Data - Monitor query API

Status codeStatus code meaningmessageReason for error
400Bad RequestBad request: type is requiredtype parameter is not passed
409ConflictConflict: You cannot specify both unitId and zUnitIdBoth unitId and zUnitId cannot be passed
409ConflictConflict: You cannot specify both patientId and patientZhrIdBoth patientId and patientZhrId cannot be passed
400Bad RequestError processing the datesstartDate and/or endDate is not in the valid format.
400Bad RequestThe start date is not a valid datestartDate is not in the valid format.
400Bad RequestThe end date is not a valid dateendDate is not in the valid format.
400Bad RequestThe start date cannot be after the end datestartDate should always be less than endDate
400Bad RequestNo unit found for the specified unitIdThe specified unitId does not exist
400Bad RequestNo patient found for the specified UHIDThe specified patientUHID does not exist
400Bad RequestInvalid device data typeThe specified type does not exist

Device Data - Anesthesia/Ventilator query API

Status codeStatus code meaningmessageReason for error
400Bad RequestBad request: type is requiredtype parameter is not passed
400Bad RequestError processing the datesstartDate and/or endDate is not in the valid format.
400Bad RequestThe start date is not a valid datestartDate is not in the valid format.
400Bad RequestThe end date is not a valid dateendDate is not in the valid format.
400Bad RequestThe start date cannot be after the end datestartDate should always be less than endDate
400Bad RequestNo unit found for the specified unitIdThe specified unitId does not exist
400Bad RequestNo patient found for the specified UHIDThe specified patientUHID does not exist
400Bad RequestInvalid typeThe specified type is invalid

Lab Report query API

Status codeStatus code meaningmessageReason for error
409ConflictConflict: You cannot specify only one of patientUHID and unitIdif specifying unitId, then patientUHID is mandatory
400Bad RequestError processing the datesstartDate and/or endDate is not in the valid format.
400Bad RequestThe start date is not a valid datestartDate is not in the valid format.
400Bad RequestThe end date is not a valid dateendDate is not in the valid format.
400Bad RequestThe start date cannot be after the end datestartDate should always be less than endDate

ICE elements query API

Status codeStatus code meaningmessageReason for error
400Bad RequestError processing the datesstartDate and/or endDate is not in the valid format.
400Bad RequestThe start date is not a valid datestartDate is not in the valid format.
400Bad RequestThe end date is not a valid dateendDate is not in the valid format.
400Bad RequestThe start date cannot be after the end datestartDate should always be less than endDate
400Bad RequestNo patient found for the specified UHIDThe specified patientUHID does not exist
400Bad RequestNo unit found for the specified unitIdThe specified unitId does not exist
400Bad RequestInvalid IP numberThe specified ipNumber does not exist

Progress notes query API

Status codeStatus code meaningmessageReason for error
409ConflictConflict: You cannot specify both patientId and patientZhrIdBoth patientId and patientZhrId cannot be passed
409ConflictConflict: You cannot specify both unitId and zUnitIdBoth unitId and zUnitId cannot be passed
409ConflictConflict: You cannot specify both userId and zmedUserIdBoth userId and zmedUserId cannot be passed
409ConflictConflict: You cannot specify both ipNumber and zAdmissionInfoIdBoth ipNumber and zAdmissionInfoId cannot be passed
400Bad RequestError processing the datesstartDate and/or endDate is not in the valid format.
400Bad RequestThe start date is not a valid datestartDate is not in the valid format.
400Bad RequestThe end date is not a valid dateendDate is not in the valid format.
400Bad RequestThe start date cannot be after the end datestartDate should always be less than endDate
400Bad RequestMultiple patients found for the specified IP numberSpecified IP number exists for multiple patients
400Bad RequestNo unit found for the specified unitIdThe specified unitId does not exist
400Bad RequestNo user with the specified email address foundThe specified userId does not exist
400Bad RequestNo patient found for the specified UHIDThe specified patientUHID does not exist

Fluid Balance query API

Status codeStatus code meaningmessageReason for error
400Bad RequestBad request: type is requiredtype parameter is not passed
400Bad RequestError processing the datesstartDate and/or endDate is not in the valid format.
400Bad RequestThe start date is not a valid datestartDate is not in the valid format.
400Bad RequestThe end date is not a valid dateendDate is not in the valid format
400Bad RequestThe start date cannot be after the end datestartDate should always be less than endDate
400Bad RequestNo unit found for the specified unitIdThe specified unitId does not exist
400Bad RequestNo patient found for the specified UHIDThe specified patientUHID does not exist
400Bad RequestInvalid device data typeThe specified patientUHID does not exist

OT Anesthesia query API

Status codeStatus code meaningmessageReason for error
400Bad RequestError processing the datesstartDate and/or endDate is not in the valid format.
400Bad RequestThe start date is not a valid datestartDate is not in the valid format.
400Bad RequestThe end date is not a valid dateendDate is not in the valid format.
400Bad RequestThe start date cannot be after the end datestartDate should always be less than endDate
400Bad RequestNo unit found for the specified unitIdThe specified unitId does not exist
400Bad RequestNo patient found for the specified UHIDThe specified patientUHID does not exist
400Bad RequestInvalid IP numberThe specified ipNumber does not exist

Ambulance GPS query API

Status codeStatus code meaningmessageReason for error
400Bad RequestError processing the datesstartDate and/or endDate is not in the valid format.
400Bad RequestThe start date is not a valid datestartDate is not in the valid format.
400Bad RequestThe end date is not a valid dateendDate is not in the valid format.
400Bad RequestThe start date cannot be after the end datestartDate should always be less than endDate

Public Schema

Public Schema

This post is licensed under CC BY 4.0 by the author.