API DiscountPlanSubs

See API Specification

See Discount Plan for more information.

DiscountPlanSubs GET

Version Added: 21.3

Gets the DiscountPlan that is attached to the patient.

PatNum: Required.

Example Request:
GET /discountplansubs?PatNum=56

Example Response:
{
"DiscountSubNum": 32,
"DiscountPlanNum": 8,
"PatNum": 56,
"DateEffective": "2021-01-01",
"DateTerm": "2022-01-01",
"SubNote": ""
}

200 OK
400 BadRequest "PatNum is Required"
404 NotFound "Patient not found"

DiscountPlanSubs POST

Version Added: 21.3

Subscribes a patient to an existing DiscountPlan.

DiscountPlanNum: Required.
PatNum: Required.

DateEffective: Optional. String in "yyyy-MM-dd" format. The date the plan starts impacting procedure fees. Default "0001-01-01" to indicate the beginning of the current calendar year.
DateTerm: Optional. String in "yyyy-MM-dd" format. The date the plan no longer impacts procedure fees.
Default "0001-01-01" to indicate the end of the current calendar year.
SubNote: Optional. The subscriber note.

Example Request:
POST /discountplansubs

{
"DiscountPlanNum": 6,
"PatNum": 67,
"DateEffective": "2021-01-01",
"DateTerm": "2022-01-01"
}

Example Response:
201 Created
400 BadRequest (Missing or invalid fields)
404 NotFound "Patient not found" or "DiscountPlan not found"

DiscountPlanSubs PUT

Version Added: 22.3.13

Updates an existing DiscountPlanSub. Updating SubNote will overwrite any existing subscriber note.

DiscountSubNum: Required in the URL.

PatNum: Required. The PatNum attached to the DiscountPlanSub.
DateEffective: Optional. String in "yyyy-MM-dd" format.
DateTerm: Optional. String in "yyyy-MM-dd" format.
SubNote: Optional. The subscriber note.

Example Request:
PUT /discountplansubs/14

{
"PatNum": 23,
"DateEffective": "2022-09-16",
"DateTerm": "2024-12-31",
"SubNote": "25% discount to services."
}

Example Response:
200 OK
400 BadRequest (Missing or invalid fields)
404 NotFound "DiscountPlanSub not found" or "Patient not found"

DiscountPlanSubs DELETE

Version Added: 23.1.12

Deletes an existing DiscountPlanSub.

DiscountSubNum: Required in URL.

Example Request:
DELETE /discountplansubs/14

Example Response:
200 OK
400 BadRequest (with explanation)
404 NotFound (with explanation)