API ProcedureLogs

See API Specification

ProcedureLogs GET (single)

Version Added: 23.3.13

Get a single procedurelog.

ProcNum: Required in URL.

Example Request:
GET /procedurelogs/20

Example Response:
{
"ProcNum": 20,
"PatNum": 12,
"AptNum": "0",
"ProcDate": "2022-05-05",
"ProcFee": "130.00",
"Surf": "MODL",
"ToothNum": "4",
"ToothRange": "",
"Priority": 0,
"priority": "",
"ProcStatus": "C",
"ProvNum": 2,
"provAbbr": "DOC2",
"Dx": "",
"dxName": "",
"PlannedAptNum": "0",
"Prosthesis": "",
"DateOriginalProsth": "0001-01-01",
"ClinicNum": 0,
"CodeNum": 2,
"procCode": "D0120",
"descript": "periodic oral evaluation - established patient",
"UnitQty": 1,
"BaseUnits": 0,
"DateTStamp": "2022-05-05 07:00:34",
"IsDateProsthEst": "false",
"serverDateTime": "2022-05-05 09:00:34"
}

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

ProcedureLogs GET (multiple)

Version Added: 21.1

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

Parameters:

PatNum: All procedures for a single patient.
AptNum: (Added in version 22.3.32) All procedures associated to a single appointment.
ClinicNum: (Added in version 23.3.13) All procedures associated to a single clinic.
DateTStamp: Only useful if not supplying a PatNum. Only include procedurelogs with a DateTStamp altered on or after the specified date and time. This provides a good way for you to keep a synchronized copy of procedurelogs. Store serverDateTime that gets returned and use it to run the next GET.

Example Requests:
GET /procedurelogs?PatNum=261
GET /procedurelogs?DateTStamp=2020-07-30 08:00:00&Offset=400
GET /procedurelogs?AptNum=202
GET /procedurelogs?ClinicNum=1

Example Response:
{
"ProcNum": 1,
"PatNum": 1,
"AptNum": "0",
"ProcDate": "2021-04-01",
"ProcFee": "255.00",
"Surf": "MODL",
"ToothNum": "4",
"ToothRange": "",
"Priority": 0,
"priority": "",
"ProcStatus": "C",
"ProvNum": 1,
"provAbbr": "DOC1",
"Dx": "",
"dxName": "",
"PlannedAptNum": "0",
"Prosthesis": "",
"DateOriginalProsth": "0001-01-01",
"ClinicNum": 0,
"CodeNum": 2,
"procCode": "D0120",
"descript": "periodic oral evaluation - established patient",
"UnitQty": 1,
"BaseUnits": 0,
"DateTStamp": "2021-11-03 05:30:06",
"IsDateProsthEst": "false",
"serverDateTime": "2021-11-03 09:32:45"
}

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

ProcedureLogs GET InsuranceHistory

Version Added: 22.4.31

Gets the previous treatment dates of procedures for a patient's insurance plan, similarly to how it shows in the Insurance History form.

Parameters:

PatNum: Required. FK to patient.PatNum.
InsSubNum: Required. FK to inssub.InsSubNum.

Returned fields are detaled below:

insHistPrefName: Name of the Preference that is storing the ProcedureCodes for that category.
procDate: Previous treatement date for this category. Returns "No History" if there is no record, or "Not Set" if that preference has no procedure codes.
ProcNum: FK to procedure.ProcNum for the most recent procedure for that category.

Example Requests:
GET /procedurelogs/InsuranceHistory?PatNum=2617&InsSubNum=2046

Example Response:
[
{
"insHistPrefName": "InsHistBWCodes",
"procDate": "2021-12-12",
"ProcNum": 13073
},
{
"insHistPrefName": "InsHistPanoCodes",
"procDate": "2023-03-08",
"ProcNum": 17068
},
{
"insHistPrefName": "InsHistExamCodes",
"procDate": "No History",
"ProcNum": 0
},
{
"insHistPrefName": "InsHistProphyCodes",
"procDate": "2023-03-07",
"ProcNum": 17064
},
{
"insHistPrefName": "InsHistPerioURCodes",
"procDate": "No History",
"ProcNum": 0
},
{
"insHistPrefName": "InsHistPerioULCodes",
"procDate": "Not Set",
"ProcNum": 0
},
{
"insHistPrefName": "InsHistPerioLRCodes",
"procDate": "No History",
"ProcNum": 0
},
{
"insHistPrefName": "InsHistPerioLLCodes",
"procDate": "2009-06-19",
"ProcNum": 1074
},
{
"insHistPrefName": "InsHistPerioMaintCodes",
"procDate": "No History",
"ProcNum": 0
},
{
"insHistPrefName": "InsHistDebridementCodes",
"procDate": "2023-03-01",
"ProcNum": 17067
}
]

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

ProcedureLogs POST (create)

Version Added: 21.4

Creates a new procedure for a given patient. The following fields cannot be set as part of a POST: ProcNum, provAbbr, CodeNum, and descript. Attempts to set them will be silently ignored. Furthermore, the following pairs of fields may only have one of the two passed in at once: Priority and priority, Dx and dxName. Not all procedure codes support Surfs, ToothNums, and ToothRanges. Procedure code default notes will not be used.

PatNum: Required.
ProcDate: Required. String in "yyyy-MM-dd" format.
ProcStatus: Required. Either Treatment Planned (TP), Complete (C), or Existing Other Provider (EO).
procCode: Required. This should be a valid D code, example: D0120. CodeNum is set automatically.
AptNum: Optional.
ProcFee: Optional. If none is given this will default to the procedurecodes default, with consideration of the patient's insurance.
Surf: Required for the treatment areas of some procCodes. Can be tooth Surfaces (B/F,V,M,O/I,D,L), mouth Quadrants (UL,UR,LR,LL), Sextants (1,2,3,4,5,6), or Arches (U or L).
ToothNum: Required by procCodes with a Surf or Tooth treatment area.
ToothRange: Required by procCodes with a ToothRange treatment area, or for Quadrants and Arches when AreaAlsoToothRange is true. A string of numbers separated by commas and/or hyphen separated ranges.
Priority: Optional. Definition.DefNum where definition.Category=20. Default is the first definition in that Category. If Priority is used, then priority will be set automatically.
priority: Optional. String version of Priority. If priority is used, then Priority will be set automatically.
ProvNum: Optional. Defaults to the PriProv of the appointment if given, otherwise it will check the patient's default provider. Failing either of the previous options, it will be set to the dental office's default provider. If ProvNum is used, then provAbbr will be set automatically.
Dx: Optional. Definition.DefNum where definition.Category=16. Default is the first definition in that Category. If Dx is used, then dxName will be set automatically.
dxName: Optional. String version of Dx. If dxName is used, then Dx will be set automatically.
PlannedAptNum: Optional. Only set if this procedure is on a planned appointment, otherwise it will be 0.
ClinicNum: Optional. Defaults to the patient's clinic.

Example Requests:
POST /procedurelogs

{
"PatNum": 31,
"ProcDate": "2021-04-28",
"ToothRange": "2,3, 13-15",
"Priority": 149,
"ProcStatus": "TP",
"dxName": "Defect (or miss fill)",
"procCode": "D1206"
}

{
"PatNum": 29,
"AptNum": 0,
"ProcDate": "2021-04-25",
"ProcFee": "125.95",
"Surf": "MO",
"ToothNum": "4",
"priority": "Low",
"ProcStatus": "TP",
"ProvNum": 1,
"Dx": 126,
"PlannedAptNum": 0,
"ClinicNum": 0,
"procCode": "D2331"
}

Example Responses:
{
"ProcNum": 301,
"PatNum": 29,
"AptNum": 0,
"ProcDate": "2021-04-25",
"ProcFee": "125.95",
"Surf": "MO",
"ToothNum": "4",
"ToothRange": "",
"Priority": 148,
"priority": "Low",
"ProcStatus": "TP",
"ProvNum": 1,
"provAbbr": "DOC 1",
"Dx": 126,
"dxName": "Cracked Tooth",
"PlannedAptNum": 0,
"ClinicNum": "0",
"CodeNum": 187,
"procCode": "D2331",
"descript": "resin-based composite - two surfaces, anterior",
"UnitQty": 1,
"BaseUnits": 0,
"DateTStamp": "",
"serverDateTime": ""
}

400 BadRequest (Missing or invalid fields)
404 NotFound "Patient not found", "Appointment not found", "procCode not found", "Priority not found", "Dx not found"
201 Created
Header "location": https://api.opendental.com/api/v1/procedurelogs/345

ProcedureLogs POST GroupNote

Version Added: 22.2

Creates a Group Note for a set of procedures. These procedures must have the same procdate, clinic, and provider. Any repeated ProcNums will be silently ignored.

Some dental offices choose to include an aggregate of the individual procedures' notes into their Group Notes, with the new Note text appended. For more information about Group Notes see Procedure Group Note. To create a Note for a single procedure see API ProcNotes.

PatNum: Required.
ProcNums: Required. An array of ProcNums, in [1,2,3] format.
Note: Required. The text for the Group Note.

Example Request:
POST /procedurelogs/GroupNote

{
"PatNum": 52,
"ProcNums": [1470, 1472],
"Note": "Medical: no changes \r\nPt concerns: none"
}

Example Responses:
{
"PatNum": 52,
"ProcNums": [1470, 1472],
"Note": "Medical: no changes \r\nPt concerns: none"
}

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

ProcedureLogs POST InsuranceHistory

Version Added: 22.4.31

This functions similarly to entering a date in the Insurance History form for a single category. Creates a new Existing Other Provider (EO) procedure and Insurance History (InsHist) claimproc for a given patient. The new procedure will use the patient's default clinic, default provider, and the first alphanumeric procedure code in the category for the insHistPrefName.

PatNum: Required. FK to patient.PatNum.
InsSubNum: Required. FK to inssub.InsSubNum.
insHistPrefName: Required. String. The PrefName of the Insurance History category. Either "InsHistBWCodes", "InsHistPanoCodes", "InsHistExamCodes", "InsHistProphyCodes", "InsHistPerioURCodes", "InsHistPerioULCodes", "InsHistPerioLRCodes", "InsHistPerioLLCodes", "InsHistPerioMaintCodes", or "InsHistDebridementCodes". Case sensitive.
ProcDate: Required. String in "yyyy-MM-dd" format. The date the procedure was completed.

Example Request:
POST /procedurelogs/InsuranceHistory

{
"PatNum": 572,
"InsSubNum": 49,
"insHistPrefName": "InsHistExamCodes",
"ProcDate": "2023-01-23"
}

Example Responses:
{
"ProcNum": 19087,
"PatNum": 572,
"AptNum": 0,
"ProcDate": "2023-01-23",
"ProcFee": "0.00",
"Surf": "",
"ToothNum": "",
"ToothRange": "",
"Priority": 0,
"priority": "",
"ProcStatus": "EO",
"ProvNum": 1,
"provAbbr": "DOC1",
"Dx": 0,
"dxName": "",
"PlannedAptNum": 0,
"ClinicNum": 3,
"CodeNum": 2,
"procCode": "D0120",
"descript": "periodic oral evaluation - established patient",
"UnitQty": 1,
"BaseUnits": 0,
"DateTStamp": "0001-01-01 00:00:00",
"serverDateTime": ""
}

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

ProcedureLogs PUT (update)

Version Added: 22.1

Updates an existing procedure. When changing procCode, the treatment area of the current and passed in procedure codes must match. Attempting to pass in empty strings for ToothNum, Surf, and ToothRange will be silently ignored. The procCode, ToothNum, Surf, and ToothRange fields cannot be updated on procedures with a ProcStatus of C. Procedure code default notes will not be used.

ProcedureLogs associated with adjustments, appointments, claimprocs, payments, payplancharges, paysplits, are updated exactly as in Open Dental.

ProcNum: Required in URL.

AptNum: AptNum of the appointment to attach this procedure to.
ProcDate: String in "yyyy-MM-dd" format.
ProcFee: Procedure fee.
Priority: Definition.DefNum where definition.Category=20.
ProcStatus: Either Treatment Planned (TP), Complete (C), or Existing Other Provider (EO).
ProvNum: ProvNum for a provider.
Dx: Definition.DefNum where definition.Category=16.
PlannedAptNum: AptNum of a planned appointment this procedure is attached to.
ClinicNum: ClinicNum of a clinic.
procCode: ProcCode of a procedurecode entry. If passed in, the treatment area must be the same as the current procCode's.
ToothNum: Can only be updated if the treatment area of this procCode supports ToothNum.
Surf: Can only be updated if the treatment area of this procCode supports Surf.
ToothRange: Comma separated ToothNums and/or dash separated ranges of ToothNums. Can only be updated if the treatment area of this procCode supports ToothRange, whether the procCode's TreatArea is ToothRange or its 'AreaAlsoToothRange' field is true.

Example Requests:
PUT /procedurelogs/100

{
"AptNum": "1023",
"ProcDate": "2022-04-25",
"ProcFee": "250",
"Priority": "153",
"ProcStatus": "TP",
"ProvNum": "2",
"Dx": "139",
"PlannedAptNum": "0",
"ClinicNum": "2",
"ToothNum":"14",
"Surf":"MO",
"ToothRange": ""
}

{
"procCode": "D9972",
"Surf": "L",
"ToothRange":"31,30, 18-21"
}

Example Responses:
{
"ProcNum": 179,
"PatNum": 23,
"AptNum": "1023",
"ProcDate": "2022-04-25",
"ProcFee": "250.00",
"Surf": "MO",
"ToothNum": "14",
"ToothRange": "",
"Priority": 153,
"priority": "3",
"ProcStatus": "TP",
"ProvNum": 2,
"provAbbr": "HYG1",
"Dx": 139,
"dxName": "None",
"PlannedAptNum": "0",
"ClinicNum": "2",
"CodeNum": 193,
"procCode": "D2393",
"descript": "resin-based composite - three surfaces, posterior",
"UnitQty": 1,
"BaseUnits": 0,
"DateTStamp": "2022-04-26 13:44:55",
"serverDateTime": ""
}

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

ProcedureLogs PUT GroupNote

Version Added: 22.2.29

Updates a specific Group Note procedure for a given patient.

For more information about Group Notes see Procedure Group Note. To update a Note for a single procedure see API ProcNotes.

PatNum: Required.
ProcNum: Required. Must be the ProcNum of a procedure with a procCode of "~GRP~".
Note: Required. The text for the Group Note.

Example Request:
PUT /procedurelogs/GroupNote

{
"PatNum": 30,
"ProcNum": 865,
"Note": "Dental exam"
}

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

ProcedureLogs DELETE

Version Added: 22.1

Deletes a procedure. Can only delete procedures with a ProcStatus of TP, TPi, or (added in version 23.1.11) C. Procedures cannot be deleted if they are attached to a claim, insurance payment, patient payment, adjustment, prescription, or payment plan. Also cannot delete a procedure if it has referrals attached, is linked to an ortho case, or if it's the last procedure from a preauthorization claim.

ProcNum: Required in the URL.

Example Request:
DELETE /procedurelogs/25

Example Responses:
200 OK
400 BadRequest (With explanation)
404 NotFound "Procedure not found."

ProcedureLogs DELETE GroupNote

Version Added: 22.3.8

Deletes a GroupNote procedure.

ProcNum: Required in the URL. Must be the ProcNum of a procedure with a procCode of "~GRP~".

Example Request:
DELETE /procedurelogs/144/GroupNote

Example Responses:
200 OK
400 BadRequest (With explanation)
404 NotFound "Procedure not found."