GetPatientRegistration
This function is used to retrieve recent patient registration data from the patient portal.
Call example:
string result = SageBridgeAPI.executeAPICall(
"cf389659-588c-4fd9-ab9e-7c37b438905c", // security token
"GetPatientRegistration",
"bos5", // practice Path or Tax ID
"JSON", // output format (XML or JSON)
"--request parameters XML or JSON---" // request parameters
);
Request fields:
| patientId | (string) | Unique patient id. |
| eventStart | (string) | Filter by "from" datetime. |
| eventEnd | (string) | Filter by "to" datetime. |
| unreadOnly | (bool) | To get only items not marked as "read" (if set to "true" then all retrieved items will be marked as "read"). |
| itemsPerCall | (int) | To limit number of items in a response (Sophrona has its own parameter. The minimal value will be used). |
Notes:
- All parameters are optional. If a parameter is not provided then the default value(s) will be used.
- If the itemsPerCall parameter value exceeds Sophrona specified value, then the Sophrona specified value will be used.
- The unreadOnly default value is "true".
- For every registration pulled, it will be marked as "read" and not included into next response if the unreadOnly value is "true".
-
If unreadOnly = true then eventStart and eventEnd parameters will be ignored.
-
If unreadOnly = false then eventStart and eventEnd parameters will be used as a timeframe to restrict a recent registration only.
If a recent registration was completed outside of the specified time frame, it will not be included.
-
If PatientID parameter is specified, then unreadOnly, eventStart and eventEnd
parameters will be ignored. Only a recent registration will be included regardless of its "new" status.
-
If unreadOnly parameter is set to true then all registrations for each patient
included into an output will be marked as not new.
-
If unreadOnly parameter is set to false then "read" status will not be updated.
Request example:
JSON:
{
"itemsPerCall": 10,
"unreadOnly": true,
"patientId": "",
"eventStart": "",
"eventEnd": ""
}
XML:
Response
Response is a XML or JSON representation of APIResponse structure. Payload element of APIResponse is an escaped JSON or XML string representing a list of registrations.
JSON payload:
{
"registrations": [
{
"patientInfo": {
"nickName": "",
"employmentStatus": "",
"employerName": "Sophrona",
"employerPhone": "",
"patientID": "PDGI-001",
"patientNbr": null,
"last": "Pretest",
"first": "Abe",
"middle": "",
"birthdate": "1950-01-01",
"sex": "M",
"SSN": "",
"race": "Caucasian White",
"maritalStatus": "Single",
"preferredLanguage": "English",
"ethnicity": "",
"address": {
"addr1": "123 Berry Hill",
"addr2": "",
"city": "Minneapolis",
"state": "MN",
"zip": "55465",
"zip4": "",
"country": ""
},
"contactInfo": {
"fax": "",
"url": "",
"twitter": "",
"facebook": "",
"cellOptIn": "",
"emailOptIn": "",
"phone": "9523339898",
"phoneExt": "",
"cell": "",
"home": "9523339898",
"work": "",
"workExt": "",
"altPhone": "",
"email": "contact@sophrona.com"
}
},
"pghdData": [
{
"name": "Picture of Eye",
"instruction": "see my image at this site",
"url": "www.iphoto.com/xyz/22933887"
},
{
"name": "Blood Glucose Chart",
"instruction": "use temporary username birdie01 and password of Passw0rd",
"url": "www.myhealthvault.com"
},
{
"name": "Blood Glucose Report",
"instruction": "hit the link; no login required",
"url": "www.myhealthvault/BC/3982"
}
]
},
{
"patientInfo": {
"nickName": "",
"employmentStatus": "",
"employerName": "Sophrona",
"employerPhone": "",
"patientID": "248",
"patientNbr": null,
"last": "Pretest",
"first": "Frank",
"middle": "",
"birthdate": "1950-01-01",
"sex": "M",
"SSN": "",
"race": "Caucasian White",
"maritalStatus": "Single",
"preferredLanguage": "English",
"ethnicity": "",
"address": {
"addr1": "1234 1st Street",
"addr2": "",
"city": "Minneapolis",
"state": "MN",
"zip": "44555",
"zip4": "",
"country": ""
},
"contactInfo": {
"fax": "",
"url": "",
"twitter": "",
"facebook": "",
"cellOptIn": "",
"emailOptIn": "",
"phone": "7634455555",
"phoneExt": "",
"cell": "",
"home": "7634455555",
"work": "",
"workExt": "",
"altPhone": "",
"email": "contact@sophrona.com"
}
},
"pghdData": [
{
"name": "Picture of Eye",
"instruction": "see my image at this site",
"url": "www.iphoto.com/xyz/22933887"
},
{
"name": "Blood Glucose Chart",
"instruction": "use temporary username birdie01 and password of Passw0rd",
"url": "www.myhealthvault.com"
},
{
"name": "Blood Glucose Report",
"instruction": "hit the link; no login required",
"url": "www.myhealthvault/BC/3982"
}
]
}
]
}
XML payload:
Possible return values (see APIResponse )
- 0 - Success. Description can be vary per function
- -1 - General error. Description attribute will show more details about an error
- -2 - Function is not supported
- 500 - Invalid credentials provided
- 501 - License is expired
- 502 - License is not active
- 503 - Token is not active or expired
- 550 - Unknow functionName or not subscribed
- 551 - Unknown practice
- 552 - No Subscription found
- 553 - Subscription is inactive or expired
- 600 - Invalid or empty request parameters
- 601 - No valid route found for this subscription
- 602 - Unable to parse request parameters
Known Issues:
None
See Also:
API Functions,
APIResponse structure,
GetPatientRegistrationChart API function,