@rinse-dental/open-dental 2.4.9 → 2.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +3 -1
- package/dist/api/queries.d.ts +20 -0
- package/dist/api/queries.d.ts.map +1 -0
- package/dist/api/queries.js +32 -0
- package/dist/openDental.d.ts +5 -0
- package/dist/openDental.d.ts.map +1 -1
- package/dist/openDental.js +10 -0
- package/dist/transformerTypes/visitTypes.d.ts +1 -6
- package/dist/transformerTypes/visitTypes.d.ts.map +1 -1
- package/dist/transformers/visit.d.ts.map +1 -1
- package/dist/transformers/visit.js +12 -11
- package/dist/types/queryTypes.d.ts +15 -0
- package/dist/types/queryTypes.d.ts.map +1 -0
- package/dist/types/queryTypes.js +2 -0
- package/package.json +1 -1
- package/src/api/index.ts +1 -0
- package/src/api/queries.ts +43 -0
- package/src/openDental.ts +11 -0
- package/src/transformerTypes/visitTypes.ts +6 -5
- package/src/transformers/visit.ts +11 -7
- package/src/types/queryTypes.ts +16 -0
package/dist/api/index.d.ts
CHANGED
|
@@ -20,4 +20,5 @@ export { default as Allergies } from "./allergies";
|
|
|
20
20
|
export { default as MedicationPats } from "./medicationPats";
|
|
21
21
|
export { default as ProcTPs } from "./procTPs";
|
|
22
22
|
export { default as ProcNotes } from "./procNotes";
|
|
23
|
+
export { default as Queries } from "./queries";
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,QAAQ,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AAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/api/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ProcNotes = exports.ProcTPs = exports.MedicationPats = exports.Allergies = exports.Diseases = exports.Fees = exports.DiscountPlans = exports.DiscountPlanSubs = exports.Definitions = exports.Payments = exports.Operatories = exports.Providers = exports.Schedules = exports.TreatmentPlanAttaches = exports.TreatmentPlans = exports.Recalls = exports.ProcedureLogs = exports.Patients = exports.PatFields = exports.CommLogs = exports.ChartModules = exports.Appointments = void 0;
|
|
6
|
+
exports.Queries = exports.ProcNotes = exports.ProcTPs = exports.MedicationPats = exports.Allergies = exports.Diseases = exports.Fees = exports.DiscountPlans = exports.DiscountPlanSubs = exports.Definitions = exports.Payments = exports.Operatories = exports.Providers = exports.Schedules = exports.TreatmentPlanAttaches = exports.TreatmentPlans = exports.Recalls = exports.ProcedureLogs = exports.Patients = exports.PatFields = exports.CommLogs = exports.ChartModules = exports.Appointments = void 0;
|
|
7
7
|
var appointments_1 = require("./appointments");
|
|
8
8
|
Object.defineProperty(exports, "Appointments", { enumerable: true, get: function () { return __importDefault(appointments_1).default; } });
|
|
9
9
|
var chartModules_1 = require("./chartModules");
|
|
@@ -48,4 +48,6 @@ var procTPs_1 = require("./procTPs");
|
|
|
48
48
|
Object.defineProperty(exports, "ProcTPs", { enumerable: true, get: function () { return __importDefault(procTPs_1).default; } });
|
|
49
49
|
var procNotes_1 = require("./procNotes");
|
|
50
50
|
Object.defineProperty(exports, "ProcNotes", { enumerable: true, get: function () { return __importDefault(procNotes_1).default; } });
|
|
51
|
+
var queries_1 = require("./queries");
|
|
52
|
+
Object.defineProperty(exports, "Queries", { enumerable: true, get: function () { return __importDefault(queries_1).default; } });
|
|
51
53
|
// Add other APIs as needed
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import { ShortQueryParams, ShortQueryResult, RowParser } from "../types/queryTypes";
|
|
3
|
+
export default class Queries {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(httpClient: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Execute a ShortQuery (arbitrary SQL). Caller can provide a row type.
|
|
8
|
+
* Example:
|
|
9
|
+
* shortQuery<{ PatNum: number; LName: string }>({
|
|
10
|
+
* SqlCommand: "SELECT PatNum,LName FROM patient LIMIT 10"
|
|
11
|
+
* })
|
|
12
|
+
*
|
|
13
|
+
* Open Dental: PUT /queries/short/{SqlCommand}?Offset=#
|
|
14
|
+
* @see https://www.opendental.com/site/apiqueries.html
|
|
15
|
+
*/
|
|
16
|
+
shortQuery<Row = unknown>({ SqlCommand, Offset }: ShortQueryParams, opts?: {
|
|
17
|
+
parse?: RowParser<Row>;
|
|
18
|
+
}): Promise<ShortQueryResult<Row>>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/api/queries.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;;;;;OASG;IACU,UAAU,CAAC,GAAG,GAAG,OAAO,EACnC,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,gBAAgB,EACxC,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAA;KAAE,GAChC,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;CAelC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class Queries {
|
|
4
|
+
httpClient;
|
|
5
|
+
constructor(httpClient) {
|
|
6
|
+
this.httpClient = httpClient;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Execute a ShortQuery (arbitrary SQL). Caller can provide a row type.
|
|
10
|
+
* Example:
|
|
11
|
+
* shortQuery<{ PatNum: number; LName: string }>({
|
|
12
|
+
* SqlCommand: "SELECT PatNum,LName FROM patient LIMIT 10"
|
|
13
|
+
* })
|
|
14
|
+
*
|
|
15
|
+
* Open Dental: PUT /queries/short/{SqlCommand}?Offset=#
|
|
16
|
+
* @see https://www.opendental.com/site/apiqueries.html
|
|
17
|
+
*/
|
|
18
|
+
async shortQuery({ SqlCommand, Offset }, opts) {
|
|
19
|
+
// Build path with encoded SQL and optional Offset
|
|
20
|
+
let path = `/queries/short/${encodeURIComponent(SqlCommand)}`;
|
|
21
|
+
if (typeof Offset === "number") {
|
|
22
|
+
path += `?Offset=${encodeURIComponent(String(Offset))}`;
|
|
23
|
+
}
|
|
24
|
+
// Your HttpClient.put only accepts (url, data), so send an empty object body
|
|
25
|
+
const data = await this.httpClient.put(path, {});
|
|
26
|
+
if (opts?.parse) {
|
|
27
|
+
return data.map(opts.parse);
|
|
28
|
+
}
|
|
29
|
+
return data;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.default = Queries;
|
package/dist/openDental.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ import Allergies from "./api/allergies";
|
|
|
32
32
|
import MedicationPats from "./api/medicationPats";
|
|
33
33
|
import ProcTPs from "./api/procTPs";
|
|
34
34
|
import ProcNotes from "./api/procNotes";
|
|
35
|
+
import Queries from "./api/queries";
|
|
35
36
|
import * as Transformers from './transformers';
|
|
36
37
|
declare class OpenDental {
|
|
37
38
|
private static httpClient;
|
|
@@ -175,6 +176,10 @@ declare class OpenDental {
|
|
|
175
176
|
* Create a new instance of the ProcNotes API.
|
|
176
177
|
*/
|
|
177
178
|
static ProcNotes(): ProcNotes;
|
|
179
|
+
/**
|
|
180
|
+
* Create a new instance of the ProcNotes API.
|
|
181
|
+
*/
|
|
182
|
+
static Queries(): Queries;
|
|
178
183
|
/**
|
|
179
184
|
* Access stateless Transformers (no initialization needed)
|
|
180
185
|
*/
|
package/dist/openDental.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openDental.d.ts","sourceRoot":"","sources":["../src/openDental.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,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ACW,aAAa;IAO3B;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,cAAc;IAO5B;;OAEG;WACW,qBAAqB;IAOnC;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,WAAW;IAOzB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,WAAW;IAOzB;;OAEG;WACW,aAAa;IAO3B;;OAEG;WACW,gBAAgB;IAO9B;;OAEG;WACW,aAAa;IAO3B;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,WAAW;IAOzB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,UAAU;IAOxB;;OAEG;WACW,WAAW;IAOzB;;OAEG;WACW,cAAc;IAO5B;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,IAAI;IAOlB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,cAAc;IAO5B;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,YAAY;CAI3B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/openDental.js
CHANGED
|
@@ -72,6 +72,7 @@ const allergies_1 = __importDefault(require("./api/allergies"));
|
|
|
72
72
|
const medicationPats_1 = __importDefault(require("./api/medicationPats"));
|
|
73
73
|
const procTPs_1 = __importDefault(require("./api/procTPs"));
|
|
74
74
|
const procNotes_1 = __importDefault(require("./api/procNotes"));
|
|
75
|
+
const queries_1 = __importDefault(require("./api/queries"));
|
|
75
76
|
const Transformers = __importStar(require("./transformers"));
|
|
76
77
|
class OpenDental {
|
|
77
78
|
static httpClient;
|
|
@@ -392,6 +393,15 @@ class OpenDental {
|
|
|
392
393
|
}
|
|
393
394
|
return new procNotes_1.default(this.httpClient);
|
|
394
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Create a new instance of the ProcNotes API.
|
|
398
|
+
*/
|
|
399
|
+
static Queries() {
|
|
400
|
+
if (!this.httpClient) {
|
|
401
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
402
|
+
}
|
|
403
|
+
return new queries_1.default(this.httpClient);
|
|
404
|
+
}
|
|
395
405
|
/**
|
|
396
406
|
* Access stateless Transformers (no initialization needed)
|
|
397
407
|
*/
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Timestamp, DocumentReference } from 'firebase-admin/firestore';
|
|
2
1
|
/**
|
|
3
2
|
* Represents an visit in firebase.
|
|
4
3
|
* Transformer for appointment
|
|
@@ -6,7 +5,6 @@ import { Timestamp, DocumentReference } from 'firebase-admin/firestore';
|
|
|
6
5
|
export interface Visit {
|
|
7
6
|
serverDateTime?: string;
|
|
8
7
|
AptNum?: number;
|
|
9
|
-
docRef?: DocumentReference;
|
|
10
8
|
PatNum?: number;
|
|
11
9
|
AptStatus?: AptStatus;
|
|
12
10
|
Pattern?: string;
|
|
@@ -46,12 +44,9 @@ export type Appendix = {
|
|
|
46
44
|
status?: string;
|
|
47
45
|
duration?: number;
|
|
48
46
|
ProvNum?: number;
|
|
49
|
-
ProviderDocRef?: DocumentReference;
|
|
50
|
-
VisitTypeDocRef?: DocumentReference;
|
|
51
|
-
OpDocRef?: DocumentReference;
|
|
52
47
|
date?: string;
|
|
53
48
|
dateTime?: string;
|
|
54
|
-
|
|
49
|
+
unix?: number;
|
|
55
50
|
date_formats?: Date_Formats;
|
|
56
51
|
};
|
|
57
52
|
export type Date_Formats = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitTypes.d.ts","sourceRoot":"","sources":["../../src/transformerTypes/visitTypes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"visitTypes.d.ts","sourceRoot":"","sources":["../../src/transformerTypes/visitTypes.ts"],"names":[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formers/visit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAKvD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,WAAW,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"visit.d.ts","sourceRoot":"","sources":["../../src/transformers/visit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAKvD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,WAAW,GAAG,KAAK,CAsD1D"}
|
|
@@ -6,23 +6,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.appointmentToVisit = appointmentToVisit;
|
|
7
7
|
const moment_timezone_1 = __importDefault(require("moment-timezone"));
|
|
8
8
|
const firebase_admin_1 = __importDefault(require("firebase-admin"));
|
|
9
|
-
const firestore_1 = require("firebase-admin/firestore");
|
|
10
9
|
function appointmentToVisit(apt) {
|
|
11
10
|
const db = firebase_admin_1.default.firestore();
|
|
12
|
-
let firestoreTimestamp;
|
|
13
11
|
const moment_aptDateTime = moment_timezone_1.default.tz(apt.AptDateTime, 'YYYY-MM-DD HH:mm:ss', 'America/Los_Angeles');
|
|
12
|
+
/*
|
|
13
|
+
let firestoreTimestamp: Timestamp | undefined;
|
|
14
14
|
if (moment_aptDateTime.isValid()) {
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
console.warn(`Invalid AptDateTime: "${apt.AptDateTime}"`);
|
|
15
|
+
//firestoreTimestamp = Timestamp.fromDate(moment_aptDateTime.toDate());
|
|
16
|
+
} else {
|
|
17
|
+
console.warn(`Invalid AptDateTime: "${apt.AptDateTime}"`);
|
|
19
18
|
}
|
|
19
|
+
*/
|
|
20
20
|
const duration = (apt.Pattern?.length || 0) * 5;
|
|
21
21
|
const location = 'NF6YVFAXyRVXGi5nItqV';
|
|
22
22
|
const display_ProvNum = apt.IsHygiene == 'true' ? apt.ProvHyg : apt.ProvNum;
|
|
23
23
|
const AptTypeNum = apt.AppointmentTypeNum == 0 ? updateAptTypeNum(apt.ProcDescript ?? '') : apt.AppointmentTypeNum;
|
|
24
24
|
return {
|
|
25
|
-
docRef: db.doc(`/patients/${apt.PatNum}/patientVisits/${apt.AptNum}`),
|
|
25
|
+
//docRef: db.doc(`/patients/${apt.PatNum}/patientVisits/${apt.AptNum}`),
|
|
26
26
|
...apt,
|
|
27
27
|
TimeLocked: apt.TimeLocked === 'true',
|
|
28
28
|
IsHygiene: apt.IsHygiene == 'true',
|
|
@@ -31,12 +31,13 @@ function appointmentToVisit(apt) {
|
|
|
31
31
|
status: normalizeStatus(apt.AptStatus),
|
|
32
32
|
duration: duration,
|
|
33
33
|
ProvNum: display_ProvNum,
|
|
34
|
-
ProviderDocRef: display_ProvNum != 0 ? db.doc(`/providers/${display_ProvNum}`) : undefined,
|
|
35
|
-
VisitTypeDocRef: db.doc(`/lookups/lookup_definitions/lookup_visitType/${AptTypeNum}`),
|
|
36
|
-
OpDocRef: apt.Op != 0 ? db.doc(`/locations/${location}/locationOperatories/${apt.Op}`) : undefined,
|
|
34
|
+
//ProviderDocRef: display_ProvNum != 0 ? db.doc(`/providers/${display_ProvNum}`) : undefined,
|
|
35
|
+
//VisitTypeDocRef: db.doc(`/lookups/lookup_definitions/lookup_visitType/${AptTypeNum}`),
|
|
36
|
+
//OpDocRef: apt.Op != 0 ? db.doc(`/locations/${location}/locationOperatories/${apt.Op}`) : undefined,
|
|
37
37
|
date: moment_aptDateTime.format('YYYY-MM-DD'),
|
|
38
38
|
dateTime: moment_aptDateTime.format(),
|
|
39
|
-
|
|
39
|
+
unix: moment_aptDateTime.unix(),
|
|
40
|
+
//firestoreTimestamp: firestoreTimestamp,
|
|
40
41
|
date_formats: {
|
|
41
42
|
date_MMM_D: moment_aptDateTime.format('MMM D'),
|
|
42
43
|
month_M: moment_aptDateTime.format('M'),
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameters for ShortQuery (PUT /queries/short/{SqlCommand}?Offset=#)
|
|
3
|
+
* @see https://www.opendental.com/site/apiqueries.html
|
|
4
|
+
*/
|
|
5
|
+
export interface ShortQueryParams {
|
|
6
|
+
/** Required in the URL path (will be URL-encoded) */
|
|
7
|
+
SqlCommand: string;
|
|
8
|
+
/** Optional pagination offset (goes in query string) */
|
|
9
|
+
Offset?: number;
|
|
10
|
+
}
|
|
11
|
+
/** Generic result rows for ShortQuery; supply Row when you know the shape */
|
|
12
|
+
export type ShortQueryResult<Row = unknown> = Row[];
|
|
13
|
+
/** Optional runtime row parser if you want validation */
|
|
14
|
+
export type RowParser<Row> = (value: unknown) => Row;
|
|
15
|
+
//# sourceMappingURL=queryTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryTypes.d.ts","sourceRoot":"","sources":["../../src/types/queryTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,6EAA6E;AAC7E,MAAM,MAAM,gBAAgB,CAAC,GAAG,GAAG,OAAO,IAAI,GAAG,EAAE,CAAC;AAEpD,yDAAyD;AACzD,MAAM,MAAM,SAAS,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC"}
|
package/package.json
CHANGED
package/src/api/index.ts
CHANGED
|
@@ -20,4 +20,5 @@ export { default as Allergies } from "./allergies";
|
|
|
20
20
|
export { default as MedicationPats } from "./medicationPats";
|
|
21
21
|
export { default as ProcTPs } from "./procTPs";
|
|
22
22
|
export { default as ProcNotes } from "./procNotes";
|
|
23
|
+
export { default as Queries } from "./queries";
|
|
23
24
|
// Add other APIs as needed
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import {
|
|
3
|
+
ShortQueryParams,
|
|
4
|
+
ShortQueryResult,
|
|
5
|
+
RowParser,
|
|
6
|
+
} from "../types/queryTypes";
|
|
7
|
+
|
|
8
|
+
export default class Queries {
|
|
9
|
+
private httpClient: HttpClient;
|
|
10
|
+
|
|
11
|
+
constructor(httpClient: HttpClient) {
|
|
12
|
+
this.httpClient = httpClient;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Execute a ShortQuery (arbitrary SQL). Caller can provide a row type.
|
|
17
|
+
* Example:
|
|
18
|
+
* shortQuery<{ PatNum: number; LName: string }>({
|
|
19
|
+
* SqlCommand: "SELECT PatNum,LName FROM patient LIMIT 10"
|
|
20
|
+
* })
|
|
21
|
+
*
|
|
22
|
+
* Open Dental: PUT /queries/short/{SqlCommand}?Offset=#
|
|
23
|
+
* @see https://www.opendental.com/site/apiqueries.html
|
|
24
|
+
*/
|
|
25
|
+
public async shortQuery<Row = unknown>(
|
|
26
|
+
{ SqlCommand, Offset }: ShortQueryParams,
|
|
27
|
+
opts?: { parse?: RowParser<Row> }
|
|
28
|
+
): Promise<ShortQueryResult<Row>> {
|
|
29
|
+
// Build path with encoded SQL and optional Offset
|
|
30
|
+
let path = `/queries/short/${encodeURIComponent(SqlCommand)}`;
|
|
31
|
+
if (typeof Offset === "number") {
|
|
32
|
+
path += `?Offset=${encodeURIComponent(String(Offset))}`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Your HttpClient.put only accepts (url, data), so send an empty object body
|
|
36
|
+
const data = await this.httpClient.put<unknown[]>(path, {});
|
|
37
|
+
|
|
38
|
+
if (opts?.parse) {
|
|
39
|
+
return (data as unknown[]).map(opts.parse);
|
|
40
|
+
}
|
|
41
|
+
return data as Row[];
|
|
42
|
+
}
|
|
43
|
+
}
|
package/src/openDental.ts
CHANGED
|
@@ -33,6 +33,7 @@ import Allergies from "./api/allergies";
|
|
|
33
33
|
import MedicationPats from "./api/medicationPats";
|
|
34
34
|
import ProcTPs from "./api/procTPs";
|
|
35
35
|
import ProcNotes from "./api/procNotes";
|
|
36
|
+
import Queries from "./api/queries";
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
import * as Transformers from './transformers';
|
|
@@ -395,6 +396,16 @@ class OpenDental {
|
|
|
395
396
|
return new ProcNotes(this.httpClient);
|
|
396
397
|
}
|
|
397
398
|
|
|
399
|
+
/**
|
|
400
|
+
* Create a new instance of the ProcNotes API.
|
|
401
|
+
*/
|
|
402
|
+
public static Queries() {
|
|
403
|
+
if (!this.httpClient) {
|
|
404
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
405
|
+
}
|
|
406
|
+
return new Queries(this.httpClient);
|
|
407
|
+
}
|
|
408
|
+
|
|
398
409
|
/**
|
|
399
410
|
* Access stateless Transformers (no initialization needed)
|
|
400
411
|
*/
|
|
@@ -7,7 +7,7 @@ import { Timestamp, DocumentReference } from 'firebase-admin/firestore';
|
|
|
7
7
|
export interface Visit {
|
|
8
8
|
serverDateTime?: string; // Server timestamp of the appointment; returned by some endpoints
|
|
9
9
|
AptNum?: number; // Unique identifier for the appointment
|
|
10
|
-
docRef?: DocumentReference; // docRef of this visit.
|
|
10
|
+
//docRef?: DocumentReference; // docRef of this visit.
|
|
11
11
|
PatNum?: number; // Unique identifier for the patient
|
|
12
12
|
AptStatus?: AptStatus; // Status of the appointment (Scheduled, Complete, etc.)
|
|
13
13
|
Pattern?: string; // Time pattern in 5-minute increments, e.g., "/XX/" for 20 minutes
|
|
@@ -48,12 +48,13 @@ export interface Visit {
|
|
|
48
48
|
status?: string; //
|
|
49
49
|
duration?: number; // pattern * 5
|
|
50
50
|
ProvNum?: number; // ProvNum or ProvHyg depending on IsHygiene
|
|
51
|
-
ProviderDocRef?: DocumentReference; //
|
|
52
|
-
VisitTypeDocRef?: DocumentReference; //
|
|
53
|
-
OpDocRef?: DocumentReference; //
|
|
51
|
+
//ProviderDocRef?: DocumentReference; //
|
|
52
|
+
//VisitTypeDocRef?: DocumentReference; //
|
|
53
|
+
//OpDocRef?: DocumentReference; //
|
|
54
54
|
date?: string; //
|
|
55
55
|
dateTime?: string; //
|
|
56
|
-
|
|
56
|
+
unix?: number //
|
|
57
|
+
//firestoreTimestamp?: Timestamp; // admin.firestore.Timestamp.fromDate(moment_aptDateTime.toDate()),
|
|
57
58
|
date_formats?: Date_Formats; //
|
|
58
59
|
}
|
|
59
60
|
|
|
@@ -6,15 +6,18 @@ import { Timestamp } from 'firebase-admin/firestore';
|
|
|
6
6
|
|
|
7
7
|
export function appointmentToVisit(apt: Appointment): Visit {
|
|
8
8
|
const db = admin.firestore();
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
|
|
11
11
|
const moment_aptDateTime = moment.tz(apt.AptDateTime, 'YYYY-MM-DD HH:mm:ss', 'America/Los_Angeles');
|
|
12
12
|
|
|
13
|
+
/*
|
|
14
|
+
let firestoreTimestamp: Timestamp | undefined;
|
|
13
15
|
if (moment_aptDateTime.isValid()) {
|
|
14
|
-
firestoreTimestamp = Timestamp.fromDate(moment_aptDateTime.toDate());
|
|
16
|
+
//firestoreTimestamp = Timestamp.fromDate(moment_aptDateTime.toDate());
|
|
15
17
|
} else {
|
|
16
18
|
console.warn(`Invalid AptDateTime: "${apt.AptDateTime}"`);
|
|
17
19
|
}
|
|
20
|
+
*/
|
|
18
21
|
|
|
19
22
|
const duration = (apt.Pattern?.length || 0) * 5;
|
|
20
23
|
const location = 'NF6YVFAXyRVXGi5nItqV';
|
|
@@ -22,7 +25,7 @@ export function appointmentToVisit(apt: Appointment): Visit {
|
|
|
22
25
|
const AptTypeNum = apt.AppointmentTypeNum == 0 ? updateAptTypeNum(apt.ProcDescript ?? '') : apt.AppointmentTypeNum;
|
|
23
26
|
|
|
24
27
|
return {
|
|
25
|
-
docRef: db.doc(`/patients/${apt.PatNum}/patientVisits/${apt.AptNum}`),
|
|
28
|
+
//docRef: db.doc(`/patients/${apt.PatNum}/patientVisits/${apt.AptNum}`),
|
|
26
29
|
...apt,
|
|
27
30
|
TimeLocked: apt.TimeLocked === 'true',
|
|
28
31
|
IsHygiene: apt.IsHygiene == 'true',
|
|
@@ -31,12 +34,13 @@ export function appointmentToVisit(apt: Appointment): Visit {
|
|
|
31
34
|
status: normalizeStatus(apt.AptStatus),
|
|
32
35
|
duration: duration,
|
|
33
36
|
ProvNum: display_ProvNum,
|
|
34
|
-
ProviderDocRef: display_ProvNum != 0 ? db.doc(`/providers/${display_ProvNum}`) : undefined,
|
|
35
|
-
VisitTypeDocRef: db.doc(`/lookups/lookup_definitions/lookup_visitType/${AptTypeNum}`),
|
|
36
|
-
OpDocRef: apt.Op != 0 ? db.doc(`/locations/${location}/locationOperatories/${apt.Op}`) : undefined,
|
|
37
|
+
//ProviderDocRef: display_ProvNum != 0 ? db.doc(`/providers/${display_ProvNum}`) : undefined,
|
|
38
|
+
//VisitTypeDocRef: db.doc(`/lookups/lookup_definitions/lookup_visitType/${AptTypeNum}`),
|
|
39
|
+
//OpDocRef: apt.Op != 0 ? db.doc(`/locations/${location}/locationOperatories/${apt.Op}`) : undefined,
|
|
37
40
|
date: moment_aptDateTime.format('YYYY-MM-DD'),
|
|
38
41
|
dateTime: moment_aptDateTime.format(),
|
|
39
|
-
|
|
42
|
+
unix: moment_aptDateTime.unix(),
|
|
43
|
+
//firestoreTimestamp: firestoreTimestamp,
|
|
40
44
|
date_formats: {
|
|
41
45
|
date_MMM_D: moment_aptDateTime.format('MMM D'),
|
|
42
46
|
month_M: moment_aptDateTime.format('M'),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameters for ShortQuery (PUT /queries/short/{SqlCommand}?Offset=#)
|
|
3
|
+
* @see https://www.opendental.com/site/apiqueries.html
|
|
4
|
+
*/
|
|
5
|
+
export interface ShortQueryParams {
|
|
6
|
+
/** Required in the URL path (will be URL-encoded) */
|
|
7
|
+
SqlCommand: string;
|
|
8
|
+
/** Optional pagination offset (goes in query string) */
|
|
9
|
+
Offset?: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** Generic result rows for ShortQuery; supply Row when you know the shape */
|
|
13
|
+
export type ShortQueryResult<Row = unknown> = Row[];
|
|
14
|
+
|
|
15
|
+
/** Optional runtime row parser if you want validation */
|
|
16
|
+
export type RowParser<Row> = (value: unknown) => Row;
|