API PatPlans

See API Specification

A PatPlan row in the database indicates coverage aka eligibility. If there is no patplan row, then the patient does not have coverage. So eligibility can be set by adding or removing PatPlan rows.

PatPlans POST (create)

Version Added: 21.1

This adds a PatPlan row to the database.

PatNum: Required.
InsSubNum: Required. This requires that a valid InsSub is already in place. You can obtain the InsSubNum from FamilyModules GET Insurance, or you can obtain it from an InsSubs POST. If this plan is already linked to this InsSub, then response will be BadRequest.

Ordinal: Optional with a default of 1. This is a single digit numeric field (example: 1, 2, 3...). It represents the primary insurance, secondary insurance, etc. 0 is not used. If Ordinal is set to1, and there is already primary insurance, the other insurance will get bumped to Ordinal 2.
Relationship: Optional. Default is Self. Values can be "Self", "Spouse", "Child", "Employee", "HandicapDep", "SignifOther", "InjuredPlantiff", "LifePartner" or "Dependent".
PatID: Added in 21.4. Optional. A patient ID which will override the subscriber ID on eclaims. Also used for Canada.

Example Request:
POST /patplans

{
"PatNum": 15,
"Ordinal":1,
"Relationship":"Self",
"InsSubNum":101
}

Example Response:
{
"PatPlanNum":62,
"PatNum": 15,
"Ordinal":1,
"Relationship":"Self",
"InsSubNum":101,
"PatID":""
}
201 Created
(no "location" Header is returned because there is no GET method yet)
400 (Missing or invalid fields)
404 NotFound "Patient does not exist"

PatPlans PUT (update)

Version Added: 21.4

This updates an existing PatPlan row in the database. You can obtain the PatPlanNum from FamilyModules GET Insurance or PatPlans POST. PatNum cannot be updated. Instead, drop the PatPlan and then recreate it.

InsSubNum: Optional. This corresponds to the Change button in the Subscriber Information section of the Insurance Plan window.
Ordinal: Optional with a default of 1. This is a single digit numeric field (example: 1, 2, 3...). It represents the primary insurance, secondary insurance, etc. 0 is not used. If Ordinal is set to1, and there is already primary insurance, the other insurance will get bumped to Ordinal 2.
Relationship: Optional. Default is Self. Values can be "Self", "Spouse", "Child", "Employee", "HandicapDep", "SignifOther", "InjuredPlantiff", "LifePartner" or "Dependent".
PatID: Optional. A patient ID which will override the subscriber ID on eclaims. Also used for Canada.

Example Request:
PUT /patplans/12

{
"Ordinal":1,
"Relationship":"Self",
"PatID":""
}

Example Response:
200 OK
400 (Missing or invalid fields)
404 "InsSub does not exist"

PatPlans DELETE

Version Added: 21.1

This is called "Drop" in the Open Dental UI. This removes a PatPlan row from the database, indicating no coverage, but does not affect the InsPlan itself. You can obtain the PatPlanNum from FamilyModules GET Insurance.

Example Request:
DELETE /patplans/251

Example Response:
200 OK