Custom Error Codes

This document provides a comprehensive reference for custom error codes used across HSAR APIs.

Exposed in operation outcome


Issue Type Issue Details - Code Issue Details - Text http status code APIs Scenarios
not-found E-10001 Patient NRIC is not found 404 All APIs retrieving patient via NRIC as a request parameter (Except: get-health-plan, get-health-plan-list, get-archetype, get-care-report) Patient is not found in HSAR when searching by NRIC
business-rule E-10002 Appeal not allowed (Patient not currently enrolled or not yet hit change limit) 400 put-change-eligibility Patient has not yet reached policy cap or don't have an existing enrollment record with completed status
business-rule E-10003 Patient has current invitation record 400 put-enrollment-eligibility Patient has existing invitation record
business-rule E-10004 Recommended PCP not found 400 get-recommended-pcp Patient has no recommended PCP
business-rule E-10005 Search period should not exceed 7 days 400 get-enrolled-resident-list Date range input for search period is more than 7 days
business-rule E-10006 Unable to retrieve, resident is not eligible for HSG 400 get-enrollment-eligibility, get-resident Resident meets any of the exclusion criteria
not-found E-11001 Organization HCI code is not found 404 All APIs retrieving PCP via HCI code as a request parameter (Except: get-health-plan, get-health-plan-list, get-archetype) Organization is not found in HSAR when searching by HCI Code
duplicate E-11002 An attempt was made to create a duplicate record 400 put-pcp An organization with same HCI Code exist.
business-rule E-11003 Organization is inactive 400 All APIs which requires PCP to be active Organization is found based on HCI Code, but is inactive.
not-found E-11004 Organization code for Cluster/PCN is not found 404 put-pcp When code of PCN or Cluster is not found
business-rule E-11005 Code provided does not match the relationship type 400 put-pcp When code of organization does not correspond to the relationship type (for e.g. relationship is pcn-relationship, but code provided is for cluster (e.g. SHS)
business-rule E-11006 Add or Update is not allowed for organization type other than GP 400 put-pcp When updating organization via put-pcp, organization type needs to be "GP"
business-rule E-11007 Cluster or PCN information can only be updated if period does not overlap with previous record 400 put-pcp When updating organization affiliation via put-pcp, date range provided must not overlap with previous affiliation record
business-rule E-11008 GP not yet on-boarded please use Add instead 400 put-pcp When updating organization via put-pcp, organization must already have status = "complete". Else, SOE should use "Add" instead
not-found I-13001 Enrolment record is not found 200 get-enrollment Unable to locate enrollment record
business-rule E-13002 A completed enrolment record exist 400 put-enrollment Creating enrollment record when resident already has a completed enrollment record. Should use enrollment status reason = change PCP
business-rule E-13003 Consent not provided 400 put-enrollment Creating enrollment record when resident does not have any active consent
business-rule E-13004 PCP Capacity Reached 400 put-enrollment PCP has 0 or negative capacity available. Hence, unable to accept any new enrollment.
business-rule E-13005 Resident's change PCP count > Cap 400 put-enrollment Resident's change PCP Count > Cap. E.g. first 2 CY, resident can change PCP 4 times from first health plan completion date. Refer to check Change PCP eligibility
not-found I-14001 Consent is not found 200 get-consent consent is not found
business-rule E-16001 Patient does not have active enrolment record 400 put-enrollment Unable to locate enrollment record
business-rule E-16001 Patient does not have active enrolment record 400 put-questionnaire-response Patient does not have active enrollment record when submitting questionnaire response
business-rule E-16001 Patient does not have active enrolment record 400 put-health-plan Patient does not have active enrollment record when submitting health plan
business-rule E-16001 Patient does not have active enrolment record 400 get-health-plan Patient does not have active enrollment record when retrieving health plan
business-rule E-16001 Patient does not have active enrolment record 400 get-health-plan-list Patient does not have active enrollment record when retrieving list of health plan
business-rule E-16001 Patient does not have active enrolment record 400 get-archetype Patient does not have active enrollment record when submitting archetype
business-rule E-16001 Patient does not have active enrolment record 400 put-archetype Patient does not have active enrollment record when retrieving archetype
business-rule E-16001 Patient does not have active enrolment record 400 get-care-report Patient does not have active enrollment record when retrieving care report (only applicable for consumer app)
not-found E-16004 Questionnaire is not found 404 get-questionnaire No questionnaire is found based on questionnaire url
not-found E-16004 Questionnaire is not found 404 get-questionnaire-response No questionnaire is found based on questionnaire url
business-rule E-16005 An On-boarding questionnaire response exist 400 put-questionnaire-response Submitting on-boarding questionnaire response when there is already an on-boarding questionnaire response exist for the patient
business-rule E-17001 Patient is not currently enrolled to the organization 400 put-health-plan Patient is not currently enrolled to the organization
business-rule E-17001 Patient is not currently enrolled to the organization 400 get-health-plan Patient is not currently enrolled to the organization (Applicable when the request comes from provider app only. Not applicable to consumer app)
business-rule E-17001 Patient is not currently enrolled to the organization 400 get-health-plan-list Patient is not currently enrolled to the organization (Applicable when the request comes from provider app only. Not applicable to consumer app)
business-rule E-17001 Patient is not currently enrolled to the organization 400 get-archetype Patient is not currently enrolled to the organization (Applicable when the request comes from provider app only. Not applicable to consumer app)
business-rule E-17001 Patient is not currently enrolled to the organization 400 put-archetype Patient is not currently enrolled to the organization (Applicable when the request comes from provider app only. Not applicable to consumer app)
not-found E-17003 Health plan is not found 404 get-health-plan No health plan is found for the patient based on the combination of "_id" + "_x-versionid"
not-found I-17001 Patient does not have health plan record 200 get-health-plan Resident does not have health plan record in HSAR
not-found I-18001 Patient does not have archetype record 200 get-archetype Resident does not have archetype record in HSAR
business-rule E-18002 Organization HCI code is not required 400 put-archetype Consumer app provide HCI code when submitting archetype (Consumer app is not suppose to submit HCI code)
not-found E-19001 No matching patient found based on NRIC, Date of Birth and Gender 404 put-care-report Patient does not match based on the combination of NRIC + Date of Birth + Gender in HSAR patient master
business-rule E-19002 Grace Period for the organization HCI code has lapsed 400 put-care-report PCP submit care report when the Organization withdrew from HSG program and passed the grace period
not-found E-19003 Care Report is not found 404 get-care-report No care report is found for the patient based on the care report ID
business-rule E-19004 Care report ID and NRIC mismatch 400 get-care-report Care Report ID provided is not belong to the resident NRIC
not-found I-19001 No Care Report found 200 get-care-report Resident does not have care report record in HSAR
- - Missing parameter 'HCI code' 400 get-archetype Provider app didn't provide HCI code when retrieving archetype (HCI code is required to be submitted for Provider App)
- - Missing parameter 'HCI code' 400 put-archetype Provider app didn't provide HCI code when submitting archetype (HCI code is required to be submitted for Provider App)
business-rule E-19005 Date (visit-date/chronic-consult-date) is in the future 400 put-care-report Care Report submitted has date values in visit-date and chronic-consult-date strictly greater than date when Care Report is received by HSAR