API TreatPlans

See API Specification

Treatment Plans are designed to track treatment the patient has accepted, display treatment charted for the patient that has not been completed, or keep a record of treatment the patient denied.

TreatPlans with a TPStatus of "Active" or "Inactive" use TreatPlanAttach to reference attached procedures. TreatPlans with a TPStatus of "Saved" use ProcTp which are copies of the procedure, and will not change after being saved.

TreatPlans GET

Version Added: 22.4.16

Get a list of treatplans that meet a set of search criteria.

Parameters: All optional.

PatNum: patient.PatNum.
SecDateTEdit : Only include TreatPlans with a SecDateTEdit altered after the specified date and time. String in "yyyy-MM-dd HH:mm:ss" format.
TPStatus : Either "Saved", "Active", or "Inactive". Default all.

Example Requests:
GET /treatplans?PatNum=1897&TPStatus=Saved
GET /treatplans?SecDateTEdit=2022-07-01%2005%3A30%3A00

Example Response:
[
{
"TreatPlanNum": 1786,
"PatNum": 1897,
"DateTP": "0001-01-01",
"Heading": "Active Treatment Plan",
"Note": "Please read this carefully:\nIf you have insurance, THIS IS AN ESTIMATE ONLY. Insurance might not pay what we expect.\nEven if you pay your estimate ahead of time, you will still be responsible for any portion that insurance does not pay.",
"ResponsParty": 0,
"DocNum": 0,
"TPStatus": "Active",
"SecUserNumEntry": 12,
"SecDateEntry": "2022-07-02",
"SecDateTEdit": "2022-07-02 09:39:54",
"UserNumPresenter": 0,
"TPType": "Insurance",
"DateTSigned": "0001-01-01 00:00:00",
"DateTPracticeSigned": "0001-01-01 00:00:00",
"SignatureText": "",
"SignaturePracticeText": ""
},
{
"TreatPlanNum": 1787,
"PatNum": 1901,
"DateTP": "0001-01-01",
"Heading": "Active Treatment Plan",
"Note": "Please read this carefully:\nIf you have insurance, THIS IS AN ESTIMATE ONLY. Insurance might not pay what we expect.\nEven if you pay your estimate ahead of time, you will still be responsible for any portion that insurance does not pay.",
"ResponsParty": 0,
"DocNum": 0,
"TPStatus": "Active",
"SecUserNumEntry": 12,
"SecDateEntry": "2022-07-02",
"SecDateTEdit": "2022-07-02 10:32:51",
"UserNumPresenter": 0,
"TPType": "Insurance",
"DateTSigned": "0001-01-01 00:00:00",
"DateTPracticeSigned": "0001-01-01 00:00:00",
"SignatureText": "",
"SignaturePracticeText": ""
},
{
"TreatPlanNum": 1788,
"PatNum": 1906,
"DateTP": "0001-01-01",
"Heading": "Saved Treatment Plan",
"Note": "Please read this carefully:\nIf you have insurance, THIS IS AN ESTIMATE ONLY. Insurance might not pay what we expect.\nEven if you pay your estimate ahead of time, you will still be responsible for any portion that insurance does not pay.",
"ResponsParty": 0,
"DocNum": 0,
"TPStatus": "Active",
"SecUserNumEntry": 13,
"SecDateEntry": "2022-07-02",
"SecDateTEdit": "2022-07-02 11:39:54",
"UserNumPresenter": 0,
"TPType": "Insurance",
"DateTSigned": "2022-07-02 11:39:54",
"DateTPracticeSigned": "2022-07-02 11:39:54",
"SignatureText": "Brandon Booter",
"SignaturePracticeText": "Dr. Carl Moore"
},
etc...
]

200 OK
400 BadRequest (with explanation)
404 NotFound (with explanation)

TreatPlans POST (create)

Version Added: 23.2.13

Creates an inactive TreatPlan for a patient.

Parameters:

PatNum: Required.
Heading: Optional. Default "Inactive Treatment Plan".
Note: Optional. Defaults to the TreatmentPlanNote preference.
TPType: Optional. Either "Insurance" or "Discount". If the patient is subscribed to a Discount Plan, this will default to "Discount". Otherwise, defaults to "Insurance".

Example Request:
POST /treatplans

{
"PatNum": 31,
"Heading": "Fillings",
"Note": "ONLY AN ESTIMATE.",
"TPType": "Insurance"
}

Example Response:
{
"TreatPlanNum": 18,
"PatNum": 31,
"DateTP": "0001-01-01",
"Heading": "Fillings",
"Note": "ONLY AN ESTIMATE.",
"ResponsParty": 0,
"DocNum": 0,
"TPStatus": "Inactive",
"SecUserNumEntry": 0,
"SecDateEntry": "2023-08-10",
"SecDateTEdit": "2023-08-10 12:18:12",
"UserNumPresenter": 0,
"TPType": "Insurance",
"DateTSigned": "0001-01-01 00:00:00",
"DateTPracticeSigned": "0001-01-01 00:00:00",
"SignatureText": "",
"SignaturePracticeText": ""
}

201 Created
400 BadRequest (with explanation)
404 NotFound (with explanation)

TreatPlans POST Saved

Version Added: 23.2.22

Creates an unsigned Saved Treatment Plan from an existing Active or Inactive Treatment Plan.

Parameters:

TreatPlanNum: Required.
Heading: Optional. Defaults to the heading of the supplied Treatment Plan.
UserNumPresenter: Optional. FK to userod.UserNum. Default 0.

Example Request:
POST /treatplans/Saved

{
"TreatPlanNum": 138,
"Heading": "Saved Plan",
"UserNumPresenter: 5
}

Example Response:
{
"TreatPlanNum": 138,
"PatNum": 15,
"DateTP": "2023-09-22",
"Heading": "Saved Plan",
"Note": "If you have dental insurance, please be aware that THIS IS AN ESTIMATE ONLY. Coverage may be different if your deductible has not been met, annual maximum has been met, or if your coverage table is lower than average.",
"ResponsParty": 0,
"DocNum": 0,
"TPStatus": "Saved",
"SecUserNumEntry": 0,
"SecDateEntry": "2023-09-22",
"SecDateTEdit": "2023-09-22 14:45:35",
"UserNumPresenter": 5,
"TPType": "Insurance",
"DateTSigned": "0001-01-01 00:00:00",
"DateTPracticeSigned": "0001-01-01 00:00:00",
"SignatureText": "",
"SignaturePracticeText": ""
}

201 Created
400 BadRequest (with explanation)
404 NotFound (with explanation)