API RefAttaches

See API Specification

RefAttaches POST

Version Added: 21.2

Attaches a patient to a referral source. The referral source must be specified by either ReferralNum or referralName. Before calling this method, use Referrals GET to find the ReferralNum of an existing referral source. Alternatively, specify a referralName to search the LName of existing referrals for an exact match. If a match is not found, a new referral with that name is created and used.

PatNum: Required.
ReferralNum: This or referralName is required.
referralName: This or ReferralNum is required.
RefDate: Optional.
ReferralType: Optional. Either "RefTo", "RefFrom", or "RefCustom". Default "RefFrom".
RefToStatus: Optional. Typically only used with outgoing referrals. Either "None", "Declined", "Scheduled", "Consulted", "InTreatment", or "Complete". Default "None".
Note: Optional.

Example Requests:
POST /refattaches

{
"PatNum": 50,
"ReferralNum": 2
}

{
"PatNum": 50,
"ReferralNum": 2,
"ReferralType": "RefTo",
"RefToStatus": "InTreatment",
"Note": "08/12 - Dr. Bokish called to confirm this is still in progress.",
"RefDate": "2021-07-28"
}

{
"PatNum": 50,
"referralName": "Google"
}

Example Response:
201 Created
400 BadRequest "Referral is already attached to this patient" or Invalid Fields
404 NotFound "Patient not found" or "Referral not found".