This endpoint allows an EHR to check the status of a facility that they registered.
Connecting to the API
URL Endpoint: https://naatpdata.com/v2/api/registration_status.php
Important Variables
- EHR_reference_facilityId varChar(254) utf_bin Case Sensitive variable is generated by your EHR.
- It must be supplied and must exactly match (Case Sensitive!) the original EHR_reference_facilityId sent when using register_new_company.php.
javascript Postman pre-request script
const FACILITY_ID = 'ABCDEFG'; //YOUR EHR facilityId (not the id of the facility which you want to sign up)
const SECRET_KEY = 'a1b.....x9z'; //YOUR EHR secret_key (not that of the facility which you want to sign up)
const apiDate = parseInt(new Date().getTime() / 1000).toString();
const apiSignature = CryptoJS.HmacSHA256(apiDate + FACILITY_ID, SECRET_KEY).toString();
pm.environment.set("facilityId", FACILITY_ID);
pm.environment.set("apiDate", apiDate);
pm.environment.set("apiSignature", apiSignature);
Sample Postman POST :: Body = raw :: JSON
{
"facilityId": "{{facilityId}}",
"apiDate": {{apiDate}},
"apiSignature": "{{apiSignature}}",
"EHR_reference_facilityId": "ABC-ReferenceID-CreatedBy-EHR"
}
Sample Reply from API
Responses will be a JSON array and always include status and status_msg:
[
status: 'string', // success|fail
status_msg: 'string', // reason for failure
EHR_reference_facilityId => 'string', // the EHR_reference_facilityId that you originally sent us
facilityId => 'string', // ON SUCCESS ONLY, the facilityId that WE generated
is_test_facility: 'string', // ON SUCCESS ONLY, 'y' or 'n'
is_active => 'string', // ON SUCCESS ONLY, 'y' or 'n'.
api_secret_key => 'string', // ON SUCCESS ONLY, and ONLY if is_active = 'y'.
]