@rinse-dental/open-dental 2.0.0 → 2.1.0
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/allergies.d.ts +46 -0
- package/dist/api/allergies.d.ts.map +1 -0
- package/dist/api/allergies.js +85 -0
- package/dist/api/diseases.d.ts +55 -0
- package/dist/api/diseases.d.ts.map +1 -0
- package/dist/api/diseases.js +97 -0
- package/dist/api/fees.d.ts +1 -1
- package/dist/api/fees.d.ts.map +1 -1
- package/dist/api/fees.js +1 -1
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +7 -1
- package/dist/api/medicationPats.d.ts +47 -0
- package/dist/api/medicationPats.d.ts.map +1 -0
- package/dist/api/medicationPats.js +88 -0
- package/dist/openDental.d.ts +12 -0
- package/dist/openDental.d.ts.map +1 -1
- package/dist/openDental.js +27 -0
- package/dist/types/allergyTypes.d.ts +45 -0
- package/dist/types/allergyTypes.d.ts.map +1 -0
- package/dist/types/allergyTypes.js +2 -0
- package/dist/types/diseaseTypes.d.ts +47 -0
- package/dist/types/diseaseTypes.d.ts.map +1 -0
- package/dist/types/diseaseTypes.js +2 -0
- package/dist/types/medicationPatTypes.d.ts +47 -0
- package/dist/types/medicationPatTypes.d.ts.map +1 -0
- package/dist/types/medicationPatTypes.js +2 -0
- package/package.json +1 -1
- package/release.sh +1 -1
- package/src/api/allergies.ts +114 -0
- package/src/api/diseases.ts +130 -0
- package/src/api/fees.ts +1 -1
- package/src/api/index.ts +3 -0
- package/src/api/medicationPats.ts +119 -0
- package/src/openDental.ts +33 -0
- package/src/types/allergyTypes.ts +48 -0
- package/src/types/diseaseTypes.ts +50 -0
- package/src/types/medicationPatTypes.ts +50 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import { Allergy, GetAllergiesParams, AddAllergyParams, UpdateAllergyParams } from "../types/allergyTypes";
|
|
3
|
+
export default class Allergies {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(httpClient: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Fetch patient's allergies with optional pagination.
|
|
8
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
9
|
+
* @param {number} params.PatNum - Required. Filter by patient.
|
|
10
|
+
* @param {number} [params.Offset] - pagination.
|
|
11
|
+
* @returns {Promise<Allergy>} - A list of a patient's allergies.
|
|
12
|
+
*/
|
|
13
|
+
getAllergies({ PatNum, Offset, }: GetAllergiesParams): Promise<Allergy[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Add an allergy to a patient.
|
|
16
|
+
* @param {Object} data - The details of allergy to add.
|
|
17
|
+
* @param {number} data.PatNum - Required: FK to patient.
|
|
18
|
+
* @param {number} [data.AllergyDefNum] - Rarely used. Just use defDescription instead, which handles insertion of AllergyDef automatically.
|
|
19
|
+
* @param {string} [data.defDescription] - Required unless you choose to use AllergyDefNum.
|
|
20
|
+
* @param {string} [data.Reaction] - Optional. String describing the adverse reaction.
|
|
21
|
+
* @param {string} [data.DateAdverseReaction] - Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
|
|
22
|
+
* @param {'true' | 'false'} [data.StatusIsActive] - Optional. Either "true" or "false". Default "true".
|
|
23
|
+
* @returns {Promise<Allergy>} - The attached allergy.
|
|
24
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
25
|
+
*/
|
|
26
|
+
addAllergy({ PatNum, AllergyDefNum, defDescription, Reaction, DateAdverseReaction, StatusIsActive, }: AddAllergyParams): Promise<Allergy>;
|
|
27
|
+
/**
|
|
28
|
+
* update an allergy attached to a patient.
|
|
29
|
+
* @param {Object} data - The details of allergy to update.
|
|
30
|
+
* @param {number} data.AllergyNum - Required: PK
|
|
31
|
+
* @param {string} [data.Reaction] - Optional. String describing the adverse reaction.
|
|
32
|
+
* @param {string} [data.DateAdverseReaction] - Optional. String in "yyyy-MM-dd" format.
|
|
33
|
+
* @param {'true' | 'false'} [data.StatusIsActive] - Optional. Either "true" or "false".
|
|
34
|
+
* @returns {Promise<Allergy>} - The updated allergy.
|
|
35
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
36
|
+
*/
|
|
37
|
+
updateAllergy({ AllergyNum, Reaction, DateAdverseReaction, StatusIsActive, }: UpdateAllergyParams): Promise<Allergy>;
|
|
38
|
+
/**
|
|
39
|
+
* Deletes an allergy for a patient.
|
|
40
|
+
* @param {number} AllergyNum - Required: The unique identifier of the patient allergy to delete.
|
|
41
|
+
* @returns {Promise<void>} - Resolves when the Allergy is deleted.
|
|
42
|
+
* @throws {Error} - If `AllergyNum` is not valid or the API returns an error.
|
|
43
|
+
*/
|
|
44
|
+
deleteAllergy(AllergyNum: number): Promise<void>;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=allergies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allergies.d.ts","sourceRoot":"","sources":["../../src/api/allergies.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,OAAO,EACP,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;;OAMG;IACU,YAAY,CAAC,EACxB,MAAM,EACN,MAAM,GACP,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAa1C;;;;;;;;;;;OAWG;IACU,UAAU,CAAC,EACtB,MAAM,EACN,aAAa,EACb,cAAc,EACd,QAAQ,EACR,mBAAmB,EACnB,cAAc,GACf,EAAG,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAevC;;;;;;;;;OASG;IACU,aAAa,CAAC,EACzB,UAAU,EACV,QAAQ,EACR,mBAAmB,EACnB,cAAc,GACf,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAazC;;;;;OAKG;IACU,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAO9D"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class Allergies {
|
|
4
|
+
httpClient;
|
|
5
|
+
constructor(httpClient) {
|
|
6
|
+
this.httpClient = httpClient;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Fetch patient's allergies with optional pagination.
|
|
10
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
11
|
+
* @param {number} params.PatNum - Required. Filter by patient.
|
|
12
|
+
* @param {number} [params.Offset] - pagination.
|
|
13
|
+
* @returns {Promise<Allergy>} - A list of a patient's allergies.
|
|
14
|
+
*/
|
|
15
|
+
async getAllergies({ PatNum, Offset, }) {
|
|
16
|
+
if (!PatNum || typeof PatNum !== "number") {
|
|
17
|
+
throw new Error("PatNum is required to fetch allergies.");
|
|
18
|
+
}
|
|
19
|
+
return this.httpClient.get("/allergies", {
|
|
20
|
+
params: {
|
|
21
|
+
PatNum,
|
|
22
|
+
Offset,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Add an allergy to a patient.
|
|
28
|
+
* @param {Object} data - The details of allergy to add.
|
|
29
|
+
* @param {number} data.PatNum - Required: FK to patient.
|
|
30
|
+
* @param {number} [data.AllergyDefNum] - Rarely used. Just use defDescription instead, which handles insertion of AllergyDef automatically.
|
|
31
|
+
* @param {string} [data.defDescription] - Required unless you choose to use AllergyDefNum.
|
|
32
|
+
* @param {string} [data.Reaction] - Optional. String describing the adverse reaction.
|
|
33
|
+
* @param {string} [data.DateAdverseReaction] - Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
|
|
34
|
+
* @param {'true' | 'false'} [data.StatusIsActive] - Optional. Either "true" or "false". Default "true".
|
|
35
|
+
* @returns {Promise<Allergy>} - The attached allergy.
|
|
36
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
37
|
+
*/
|
|
38
|
+
async addAllergy({ PatNum, AllergyDefNum, defDescription, Reaction, DateAdverseReaction, StatusIsActive, }) {
|
|
39
|
+
if (!PatNum || (!AllergyDefNum && !defDescription)) {
|
|
40
|
+
throw new Error("Invalid data: PatNum and either AllergyDefNum or defDescription are required.");
|
|
41
|
+
}
|
|
42
|
+
return this.httpClient.post("/allergies", {
|
|
43
|
+
PatNum,
|
|
44
|
+
AllergyDefNum,
|
|
45
|
+
defDescription,
|
|
46
|
+
Reaction,
|
|
47
|
+
DateAdverseReaction,
|
|
48
|
+
StatusIsActive,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* update an allergy attached to a patient.
|
|
53
|
+
* @param {Object} data - The details of allergy to update.
|
|
54
|
+
* @param {number} data.AllergyNum - Required: PK
|
|
55
|
+
* @param {string} [data.Reaction] - Optional. String describing the adverse reaction.
|
|
56
|
+
* @param {string} [data.DateAdverseReaction] - Optional. String in "yyyy-MM-dd" format.
|
|
57
|
+
* @param {'true' | 'false'} [data.StatusIsActive] - Optional. Either "true" or "false".
|
|
58
|
+
* @returns {Promise<Allergy>} - The updated allergy.
|
|
59
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
60
|
+
*/
|
|
61
|
+
async updateAllergy({ AllergyNum, Reaction, DateAdverseReaction, StatusIsActive, }) {
|
|
62
|
+
if (!AllergyNum || typeof AllergyNum !== "number") {
|
|
63
|
+
throw new Error("Invalid data: AllergyNum is required.");
|
|
64
|
+
}
|
|
65
|
+
return this.httpClient.put(`/allergies/${AllergyNum}`, {
|
|
66
|
+
AllergyNum,
|
|
67
|
+
Reaction,
|
|
68
|
+
DateAdverseReaction,
|
|
69
|
+
StatusIsActive,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Deletes an allergy for a patient.
|
|
74
|
+
* @param {number} AllergyNum - Required: The unique identifier of the patient allergy to delete.
|
|
75
|
+
* @returns {Promise<void>} - Resolves when the Allergy is deleted.
|
|
76
|
+
* @throws {Error} - If `AllergyNum` is not valid or the API returns an error.
|
|
77
|
+
*/
|
|
78
|
+
async deleteAllergy(AllergyNum) {
|
|
79
|
+
if (!AllergyNum || typeof AllergyNum !== "number") {
|
|
80
|
+
throw new Error("Invalid parameter: AllergyNum must be a valid number.");
|
|
81
|
+
}
|
|
82
|
+
return this.httpClient.delete(`/allergies/${AllergyNum}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.default = Allergies;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import { Disease, GetDiseasesParams, AddDiseaseParams, UpdateDiseaseParams } from "../types/diseaseTypes";
|
|
3
|
+
export default class Diseases {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(httpClient: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Fetch a a single disease (Problem) assigned to a patient.
|
|
8
|
+
* @param {number} DiseaseNum - The ID of the Disease.
|
|
9
|
+
* @returns {Promise<Disease>} - The Disease data.
|
|
10
|
+
* @throws {Error} - If `DiseaseNum` is not valid or the API returns an error.
|
|
11
|
+
*/
|
|
12
|
+
getDisease(DiseaseNum: number): Promise<Disease>;
|
|
13
|
+
/**
|
|
14
|
+
* Fetch patient's diseases with optional filtering and pagination.
|
|
15
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
16
|
+
* @param {number} [params.PatNum] - Filter by patient.
|
|
17
|
+
* @param {number} [params.Offset] - pagination.
|
|
18
|
+
* @returns {Promise<Disease>} - A list of patient diseases.
|
|
19
|
+
*/
|
|
20
|
+
getDiseases({ PatNum, Offset, }?: GetDiseasesParams): Promise<Disease>;
|
|
21
|
+
/**
|
|
22
|
+
* Add a diseaseDef (Problem) to a patient.
|
|
23
|
+
* @param {Object} data - The details of disease to add.
|
|
24
|
+
* @param {number} data.PatNum - Required: FK to patient.
|
|
25
|
+
* @param {number} [data.DiseaseDefNum] - Rarely used. Just use diseaseDefName instead, which handles insertion of DiseaseDef automatically.
|
|
26
|
+
* @param {string} [data.diseaseDefName] - Required unless you choose to use DiseaseDefNum.
|
|
27
|
+
* @param {string} [data.DateStart] - Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
|
|
28
|
+
* @param {string} [data.DateStop] - Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
|
|
29
|
+
* @param {"Active" | "Resolved" | "Inactive"} [data.ProbStatus] - Optional. Either "Active", "Resolved" or "Inactive". Default "Active".
|
|
30
|
+
* @param {string} [data.PatNote] - Optional.
|
|
31
|
+
* @returns {Promise<Disease>} - The attached disease.
|
|
32
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
33
|
+
*/
|
|
34
|
+
addDisease({ PatNum, DiseaseDefNum, diseaseDefName, DateStart, DateStop, ProbStatus, PatNote, }: AddDiseaseParams): Promise<Disease>;
|
|
35
|
+
/**
|
|
36
|
+
* update a diseaseDef (Problem) attached to a patient.
|
|
37
|
+
* @param {Object} data - The details of disease to update.
|
|
38
|
+
* @param {number} data.DiseaseNum - Required.
|
|
39
|
+
* @param {string} [data.DateStart] - Optional. String in "yyyy-MM-dd" format.
|
|
40
|
+
* @param {string} [data.DateStop] - Optional. String in "yyyy-MM-dd" format.
|
|
41
|
+
* @param {"Active" | "Resolved" | "Inactive"} [data.ProbStatus] - Optional. Either "Active", "Resolved" or "Inactive".
|
|
42
|
+
* @param {string} [data.PatNote] - Optional. Will overwrite existing note.
|
|
43
|
+
* @returns {Promise<Disease>} - The updated disease.
|
|
44
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
45
|
+
*/
|
|
46
|
+
updateDisease({ DiseaseNum, DateStart, DateStop, ProbStatus, PatNote, }: UpdateDiseaseParams): Promise<Disease>;
|
|
47
|
+
/**
|
|
48
|
+
* Deletes a disease (Problem) for a patient.
|
|
49
|
+
* @param {number} DiseaseNum - Required: The unique identifier of the patient disease to delete.
|
|
50
|
+
* @returns {Promise<void>} - Resolves when the Disease is deleted.
|
|
51
|
+
* @throws {Error} - If `DiseaseNum` is not valid or the API returns an error.
|
|
52
|
+
*/
|
|
53
|
+
deleteDiscountPlanSub(DiseaseNum: number): Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=diseases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diseases.d.ts","sourceRoot":"","sources":["../../src/api/diseases.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,OAAO,EACP,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,QAAQ;IAC3B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;SAKK;IACU,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ/D;;;;;;OAMG;IACU,WAAW,CAAC,EACvB,MAAM,EACN,MAAM,GACP,GAAE,iBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC;IAS5C;;;;;;;;;;;;OAYG;IACU,UAAU,CAAC,EACtB,MAAM,EACN,aAAa,EACb,cAAc,EACd,SAAS,EACT,QAAQ,EACR,UAAU,EACV,OAAO,GACR,EAAG,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAgBvC;;;;;;;;;;OAUG;IACU,aAAa,CAAC,EACzB,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,EACV,OAAO,GACR,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAczC;;;;;OAKG;IACU,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAOtE"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class Diseases {
|
|
4
|
+
httpClient;
|
|
5
|
+
constructor(httpClient) {
|
|
6
|
+
this.httpClient = httpClient;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Fetch a a single disease (Problem) assigned to a patient.
|
|
10
|
+
* @param {number} DiseaseNum - The ID of the Disease.
|
|
11
|
+
* @returns {Promise<Disease>} - The Disease data.
|
|
12
|
+
* @throws {Error} - If `DiseaseNum` is not valid or the API returns an error.
|
|
13
|
+
*/
|
|
14
|
+
async getDisease(DiseaseNum) {
|
|
15
|
+
if (!DiseaseNum || typeof DiseaseNum !== "number") {
|
|
16
|
+
throw new Error("Invalid parameter: DiseaseNum must be a valid number.");
|
|
17
|
+
}
|
|
18
|
+
return await this.httpClient.get(`/diseases/${DiseaseNum}`);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Fetch patient's diseases with optional filtering and pagination.
|
|
22
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
23
|
+
* @param {number} [params.PatNum] - Filter by patient.
|
|
24
|
+
* @param {number} [params.Offset] - pagination.
|
|
25
|
+
* @returns {Promise<Disease>} - A list of patient diseases.
|
|
26
|
+
*/
|
|
27
|
+
async getDiseases({ PatNum, Offset, } = {}) {
|
|
28
|
+
const params = {
|
|
29
|
+
PatNum,
|
|
30
|
+
Offset,
|
|
31
|
+
};
|
|
32
|
+
return this.httpClient.get("/diseases", params);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Add a diseaseDef (Problem) to a patient.
|
|
36
|
+
* @param {Object} data - The details of disease to add.
|
|
37
|
+
* @param {number} data.PatNum - Required: FK to patient.
|
|
38
|
+
* @param {number} [data.DiseaseDefNum] - Rarely used. Just use diseaseDefName instead, which handles insertion of DiseaseDef automatically.
|
|
39
|
+
* @param {string} [data.diseaseDefName] - Required unless you choose to use DiseaseDefNum.
|
|
40
|
+
* @param {string} [data.DateStart] - Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
|
|
41
|
+
* @param {string} [data.DateStop] - Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
|
|
42
|
+
* @param {"Active" | "Resolved" | "Inactive"} [data.ProbStatus] - Optional. Either "Active", "Resolved" or "Inactive". Default "Active".
|
|
43
|
+
* @param {string} [data.PatNote] - Optional.
|
|
44
|
+
* @returns {Promise<Disease>} - The attached disease.
|
|
45
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
46
|
+
*/
|
|
47
|
+
async addDisease({ PatNum, DiseaseDefNum, diseaseDefName, DateStart, DateStop, ProbStatus, PatNote, }) {
|
|
48
|
+
if (!PatNum || (!DiseaseDefNum && !diseaseDefName)) {
|
|
49
|
+
throw new Error("Invalid data: PatNum and either DiseaseDefNum or diseaseDefName are required.");
|
|
50
|
+
}
|
|
51
|
+
return this.httpClient.post("/diseases", {
|
|
52
|
+
PatNum,
|
|
53
|
+
DiseaseDefNum,
|
|
54
|
+
diseaseDefName,
|
|
55
|
+
DateStart,
|
|
56
|
+
DateStop,
|
|
57
|
+
ProbStatus,
|
|
58
|
+
PatNote,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* update a diseaseDef (Problem) attached to a patient.
|
|
63
|
+
* @param {Object} data - The details of disease to update.
|
|
64
|
+
* @param {number} data.DiseaseNum - Required.
|
|
65
|
+
* @param {string} [data.DateStart] - Optional. String in "yyyy-MM-dd" format.
|
|
66
|
+
* @param {string} [data.DateStop] - Optional. String in "yyyy-MM-dd" format.
|
|
67
|
+
* @param {"Active" | "Resolved" | "Inactive"} [data.ProbStatus] - Optional. Either "Active", "Resolved" or "Inactive".
|
|
68
|
+
* @param {string} [data.PatNote] - Optional. Will overwrite existing note.
|
|
69
|
+
* @returns {Promise<Disease>} - The updated disease.
|
|
70
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
71
|
+
*/
|
|
72
|
+
async updateDisease({ DiseaseNum, DateStart, DateStop, ProbStatus, PatNote, }) {
|
|
73
|
+
if (!DiseaseNum || typeof DiseaseNum !== "number") {
|
|
74
|
+
throw new Error("Invalid data: DiseaseNum is required.");
|
|
75
|
+
}
|
|
76
|
+
return this.httpClient.put(`/diseases/${DiseaseNum}`, {
|
|
77
|
+
DiseaseNum,
|
|
78
|
+
DateStart,
|
|
79
|
+
DateStop,
|
|
80
|
+
ProbStatus,
|
|
81
|
+
PatNote,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Deletes a disease (Problem) for a patient.
|
|
86
|
+
* @param {number} DiseaseNum - Required: The unique identifier of the patient disease to delete.
|
|
87
|
+
* @returns {Promise<void>} - Resolves when the Disease is deleted.
|
|
88
|
+
* @throws {Error} - If `DiseaseNum` is not valid or the API returns an error.
|
|
89
|
+
*/
|
|
90
|
+
async deleteDiscountPlanSub(DiseaseNum) {
|
|
91
|
+
if (!DiseaseNum || typeof DiseaseNum !== "number") {
|
|
92
|
+
throw new Error("Invalid parameter: DiseaseNum must be a valid number.");
|
|
93
|
+
}
|
|
94
|
+
return this.httpClient.delete(`/diseases/${DiseaseNum}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.default = Diseases;
|
package/dist/api/fees.d.ts
CHANGED
|
@@ -13,6 +13,6 @@ export default class Fees {
|
|
|
13
13
|
* @param {number} [params.Offset] - Optional. Pagination offset for results.
|
|
14
14
|
* @returns {Promise<Fee[]>} - A list of fees.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
getFees({ FeeSched, CodeNum, ClinicNum, ProvNum, Offset, }?: GetFeesParams): Promise<Fee[]>;
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=fees.d.ts.map
|
package/dist/api/fees.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fees.d.ts","sourceRoot":"","sources":["../../src/api/fees.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,GAAG,EACH,aAAa,EAGd,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,OAAO,OAAO,IAAI;IACvB,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIpC;;;;;;;;;OASG;IACU,
|
|
1
|
+
{"version":3,"file":"fees.d.ts","sourceRoot":"","sources":["../../src/api/fees.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,GAAG,EACH,aAAa,EAGd,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,OAAO,OAAO,IAAI;IACvB,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIpC;;;;;;;;;OASG;IACU,OAAO,CAAC,EACjB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,OAAO,EACP,MAAM,GACP,GAAE,aAAkB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;CAWvC"}
|
package/dist/api/fees.js
CHANGED
|
@@ -15,7 +15,7 @@ class Fees {
|
|
|
15
15
|
* @param {number} [params.Offset] - Optional. Pagination offset for results.
|
|
16
16
|
* @returns {Promise<Fee[]>} - A list of fees.
|
|
17
17
|
*/
|
|
18
|
-
async
|
|
18
|
+
async getFees({ FeeSched, CodeNum, ClinicNum, ProvNum, Offset, } = {}) {
|
|
19
19
|
const params = {
|
|
20
20
|
FeeSched,
|
|
21
21
|
CodeNum,
|
package/dist/api/index.d.ts
CHANGED
|
@@ -15,4 +15,7 @@ export { default as Definitions } from "./definitions";
|
|
|
15
15
|
export { default as DiscountPlanSubs } from "./discountPlanSubs";
|
|
16
16
|
export { default as DiscountPlans } from "./discountPlans";
|
|
17
17
|
export { default as Fees } from "./fees";
|
|
18
|
+
export { default as Diseases } from "./diseases";
|
|
19
|
+
export { default as Allergies } from "./allergies";
|
|
20
|
+
export { default as MedicationPats } from "./medicationPats";
|
|
18
21
|
//# 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,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC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,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,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.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.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");
|
|
@@ -38,4 +38,10 @@ var discountPlans_1 = require("./discountPlans");
|
|
|
38
38
|
Object.defineProperty(exports, "DiscountPlans", { enumerable: true, get: function () { return __importDefault(discountPlans_1).default; } });
|
|
39
39
|
var fees_1 = require("./fees");
|
|
40
40
|
Object.defineProperty(exports, "Fees", { enumerable: true, get: function () { return __importDefault(fees_1).default; } });
|
|
41
|
+
var diseases_1 = require("./diseases");
|
|
42
|
+
Object.defineProperty(exports, "Diseases", { enumerable: true, get: function () { return __importDefault(diseases_1).default; } });
|
|
43
|
+
var allergies_1 = require("./allergies");
|
|
44
|
+
Object.defineProperty(exports, "Allergies", { enumerable: true, get: function () { return __importDefault(allergies_1).default; } });
|
|
45
|
+
var medicationPats_1 = require("./medicationPats");
|
|
46
|
+
Object.defineProperty(exports, "MedicationPats", { enumerable: true, get: function () { return __importDefault(medicationPats_1).default; } });
|
|
41
47
|
// Add other APIs as needed
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import { MedicationPat, GetMedicationPatsParams, AddMedicationPatParams, UpdateMedicationPatParams } from "../types/medicationPatTypes";
|
|
3
|
+
export default class MedicationPats {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(httpClient: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Fetch patient's medications with optional pagination.
|
|
8
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
9
|
+
* @param {number} params.PatNum - Required. Filter by patient.
|
|
10
|
+
* @param {number} [params.Offset] - pagination.
|
|
11
|
+
* @returns {Promise<MedicationPat>} - A list of a patient's medications.
|
|
12
|
+
*/
|
|
13
|
+
getMedicationPats({ PatNum, Offset, }: GetMedicationPatsParams): Promise<MedicationPat[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Add a medication to a patient.
|
|
16
|
+
* @param {Object} data - The details of MedicationPat to add.
|
|
17
|
+
* @param {number} data.PatNum - Required: FK to patient.
|
|
18
|
+
* @param {string} [data.medName] - Required unless MedicationNum is used. Tries to match to an existing medication. If a new medication must be created, it will be assumed to be generic rather than brand. For more control, use medication POST.
|
|
19
|
+
* @param {number} [data.MedicationNum] - Rarely used. Just use medName instead, which handles insertion of a Medication automatically. If MedicationNum is used, then medName is not required.
|
|
20
|
+
* @param {string} [data.PatNote] - Optional. String for notes specific to this patient's medication.
|
|
21
|
+
* @param {string} [data.DateStart] - Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
|
|
22
|
+
* @param {string} [data.DateStop] - Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
|
|
23
|
+
* @param {number} [data.ProvNum] - Optional. Default is 0.
|
|
24
|
+
* @returns {Promise<MedicationPat>} - The attached medicationPat.
|
|
25
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
26
|
+
*/
|
|
27
|
+
addMedicationPat({ PatNum, medName, MedicationNum, PatNote, DateStart, DateStop, ProvNum, }: AddMedicationPatParams): Promise<MedicationPat>;
|
|
28
|
+
/**
|
|
29
|
+
* update an medication attached to a patient.
|
|
30
|
+
* @param {number} data.MedicationPatNum - Required.
|
|
31
|
+
* @param {string} [data.PatNote] - Optional. String for notes specific to this patient's medication.
|
|
32
|
+
* @param {string} [data.DateStart] - Optional. String in "yyyy-MM-dd" format.
|
|
33
|
+
* @param {string} [data.DateStop] - Optional. String in "yyyy-MM-dd" format.
|
|
34
|
+
* @param {number} [data.ProvNum] - Optional.
|
|
35
|
+
* @returns {Promise<MedicationPat>} - The attached medicationPat.
|
|
36
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
37
|
+
*/
|
|
38
|
+
updateMedicationPat({ MedicationPatNum, PatNote, DateStart, DateStop, ProvNum, }: UpdateMedicationPatParams): Promise<MedicationPat>;
|
|
39
|
+
/**
|
|
40
|
+
* Deletes an MedicationPat for a patient.
|
|
41
|
+
* @param {number} MedicationPatNum - Required: The unique identifier of the patient MedicationPat to delete.
|
|
42
|
+
* @returns {Promise<void>} - Resolves when the MedicationPat is deleted.
|
|
43
|
+
* @throws {Error} - If `MedicationPatNum` is not valid or the API returns an error.
|
|
44
|
+
*/
|
|
45
|
+
deleteMedicationPat(MedicationPatNum: number): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=medicationPats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"medicationPats.d.ts","sourceRoot":"","sources":["../../src/api/medicationPats.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,6BAA6B,CAAC;AAErC,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;;OAMG;IACU,iBAAiB,CAAC,EAC7B,MAAM,EACN,MAAM,GACP,EAAE,uBAAuB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAarD;;;;;;;;;;;;OAYG;IACU,gBAAgB,CAAC,EAC5B,MAAM,EACN,OAAO,EACP,aAAa,EACb,OAAO,EACP,SAAS,EACT,QAAQ,EACR,OAAO,GACR,EAAG,sBAAsB,GAAG,OAAO,CAAC,aAAa,CAAC;IAgBnD;;;;;;;;;OASG;IACU,mBAAmB,CAAC,EAC/B,gBAAgB,EAChB,OAAO,EACP,SAAS,EACT,QAAQ,EACR,OAAO,GACR,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;IAcrD;;;;;OAKG;IACU,mBAAmB,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAO1E"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class MedicationPats {
|
|
4
|
+
httpClient;
|
|
5
|
+
constructor(httpClient) {
|
|
6
|
+
this.httpClient = httpClient;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Fetch patient's medications with optional pagination.
|
|
10
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
11
|
+
* @param {number} params.PatNum - Required. Filter by patient.
|
|
12
|
+
* @param {number} [params.Offset] - pagination.
|
|
13
|
+
* @returns {Promise<MedicationPat>} - A list of a patient's medications.
|
|
14
|
+
*/
|
|
15
|
+
async getMedicationPats({ PatNum, Offset, }) {
|
|
16
|
+
if (!PatNum || typeof PatNum !== "number") {
|
|
17
|
+
throw new Error("PatNum is required to fetch medicationpats.");
|
|
18
|
+
}
|
|
19
|
+
return this.httpClient.get("/medicationpats", {
|
|
20
|
+
params: {
|
|
21
|
+
PatNum,
|
|
22
|
+
Offset,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Add a medication to a patient.
|
|
28
|
+
* @param {Object} data - The details of MedicationPat to add.
|
|
29
|
+
* @param {number} data.PatNum - Required: FK to patient.
|
|
30
|
+
* @param {string} [data.medName] - Required unless MedicationNum is used. Tries to match to an existing medication. If a new medication must be created, it will be assumed to be generic rather than brand. For more control, use medication POST.
|
|
31
|
+
* @param {number} [data.MedicationNum] - Rarely used. Just use medName instead, which handles insertion of a Medication automatically. If MedicationNum is used, then medName is not required.
|
|
32
|
+
* @param {string} [data.PatNote] - Optional. String for notes specific to this patient's medication.
|
|
33
|
+
* @param {string} [data.DateStart] - Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
|
|
34
|
+
* @param {string} [data.DateStop] - Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
|
|
35
|
+
* @param {number} [data.ProvNum] - Optional. Default is 0.
|
|
36
|
+
* @returns {Promise<MedicationPat>} - The attached medicationPat.
|
|
37
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
38
|
+
*/
|
|
39
|
+
async addMedicationPat({ PatNum, medName, MedicationNum, PatNote, DateStart, DateStop, ProvNum, }) {
|
|
40
|
+
if (!PatNum || (!medName && !MedicationNum)) {
|
|
41
|
+
throw new Error("Invalid data: PatNum and either medName or MedicationNum are required.");
|
|
42
|
+
}
|
|
43
|
+
return this.httpClient.post("/medicationpats", {
|
|
44
|
+
PatNum,
|
|
45
|
+
medName,
|
|
46
|
+
MedicationNum,
|
|
47
|
+
PatNote,
|
|
48
|
+
DateStart,
|
|
49
|
+
DateStop,
|
|
50
|
+
ProvNum,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* update an medication attached to a patient.
|
|
55
|
+
* @param {number} data.MedicationPatNum - Required.
|
|
56
|
+
* @param {string} [data.PatNote] - Optional. String for notes specific to this patient's medication.
|
|
57
|
+
* @param {string} [data.DateStart] - Optional. String in "yyyy-MM-dd" format.
|
|
58
|
+
* @param {string} [data.DateStop] - Optional. String in "yyyy-MM-dd" format.
|
|
59
|
+
* @param {number} [data.ProvNum] - Optional.
|
|
60
|
+
* @returns {Promise<MedicationPat>} - The attached medicationPat.
|
|
61
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
62
|
+
*/
|
|
63
|
+
async updateMedicationPat({ MedicationPatNum, PatNote, DateStart, DateStop, ProvNum, }) {
|
|
64
|
+
if (!MedicationPatNum || typeof MedicationPatNum !== "number") {
|
|
65
|
+
throw new Error("Invalid data: MedicationPatNum is required.");
|
|
66
|
+
}
|
|
67
|
+
return this.httpClient.put(`/medicationpats/${MedicationPatNum}`, {
|
|
68
|
+
MedicationPatNum,
|
|
69
|
+
PatNote,
|
|
70
|
+
DateStart,
|
|
71
|
+
DateStop,
|
|
72
|
+
ProvNum,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Deletes an MedicationPat for a patient.
|
|
77
|
+
* @param {number} MedicationPatNum - Required: The unique identifier of the patient MedicationPat to delete.
|
|
78
|
+
* @returns {Promise<void>} - Resolves when the MedicationPat is deleted.
|
|
79
|
+
* @throws {Error} - If `MedicationPatNum` is not valid or the API returns an error.
|
|
80
|
+
*/
|
|
81
|
+
async deleteMedicationPat(MedicationPatNum) {
|
|
82
|
+
if (!MedicationPatNum || typeof MedicationPatNum !== "number") {
|
|
83
|
+
throw new Error("Invalid parameter: MedicationPatNum must be a valid number.");
|
|
84
|
+
}
|
|
85
|
+
return this.httpClient.delete(`/medicationpats/${MedicationPatNum}`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.default = MedicationPats;
|
package/dist/openDental.d.ts
CHANGED
|
@@ -149,6 +149,18 @@ declare class OpenDental {
|
|
|
149
149
|
* Create a new instance of the Fees API.
|
|
150
150
|
*/
|
|
151
151
|
static Fees(): Fees;
|
|
152
|
+
/**
|
|
153
|
+
* Create a new instance of the Diseases API.
|
|
154
|
+
*/
|
|
155
|
+
static Diseases(): Fees;
|
|
156
|
+
/**
|
|
157
|
+
* Create a new instance of the Allergies API.
|
|
158
|
+
*/
|
|
159
|
+
static Allergies(): Fees;
|
|
160
|
+
/**
|
|
161
|
+
* Create a new instance of the MedicationPats API.
|
|
162
|
+
*/
|
|
163
|
+
static MedicationPats(): Fees;
|
|
152
164
|
}
|
|
153
165
|
export { OpenDental };
|
|
154
166
|
//# sourceMappingURL=openDental.d.ts.map
|
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,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,OAAO,MAA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B;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,IAAI;IAOlB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,cAAc;CAO7B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/openDental.js
CHANGED
|
@@ -308,5 +308,32 @@ class OpenDental {
|
|
|
308
308
|
}
|
|
309
309
|
return new fees_1.default(this.httpClient);
|
|
310
310
|
}
|
|
311
|
+
/**
|
|
312
|
+
* Create a new instance of the Diseases API.
|
|
313
|
+
*/
|
|
314
|
+
static Diseases() {
|
|
315
|
+
if (!this.httpClient) {
|
|
316
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
317
|
+
}
|
|
318
|
+
return new fees_1.default(this.httpClient);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Create a new instance of the Allergies API.
|
|
322
|
+
*/
|
|
323
|
+
static Allergies() {
|
|
324
|
+
if (!this.httpClient) {
|
|
325
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
326
|
+
}
|
|
327
|
+
return new fees_1.default(this.httpClient);
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Create a new instance of the MedicationPats API.
|
|
331
|
+
*/
|
|
332
|
+
static MedicationPats() {
|
|
333
|
+
if (!this.httpClient) {
|
|
334
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
335
|
+
}
|
|
336
|
+
return new fees_1.default(this.httpClient);
|
|
337
|
+
}
|
|
311
338
|
}
|
|
312
339
|
exports.OpenDental = OpenDental;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents an Allergy that is assigned to a patient in the Open Dental system.
|
|
3
|
+
* @see https://www.opendental.com/site/apiallergies.html
|
|
4
|
+
*/
|
|
5
|
+
export interface Allergy {
|
|
6
|
+
AllergyNum?: number;
|
|
7
|
+
AllergyDefNum?: number;
|
|
8
|
+
PatNum?: number;
|
|
9
|
+
defDescription?: string;
|
|
10
|
+
defSnomedType?: string;
|
|
11
|
+
Reaction?: string;
|
|
12
|
+
StatusIsActive?: 'true' | 'false';
|
|
13
|
+
DateAdverseReaction?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Parameters for GET allergies attached to a patient.
|
|
17
|
+
* @see https://www.opendental.com/site/apiallergies.html
|
|
18
|
+
*/
|
|
19
|
+
export interface GetAllergiesParams {
|
|
20
|
+
PatNum: number;
|
|
21
|
+
Offset?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parameters for attaching an allergy to a patient.
|
|
25
|
+
* @see https://www.opendental.com/site/apiallergies.html
|
|
26
|
+
*/
|
|
27
|
+
export interface AddAllergyParams {
|
|
28
|
+
PatNum: number;
|
|
29
|
+
AllergyDefNum?: number;
|
|
30
|
+
defDescription?: string;
|
|
31
|
+
Reaction?: string;
|
|
32
|
+
StatusIsActive?: 'true' | 'false';
|
|
33
|
+
DateAdverseReaction?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Parameters for updating an allergy attached to a patient.
|
|
37
|
+
* @see https://www.opendental.com/site/apiallergies.html
|
|
38
|
+
*/
|
|
39
|
+
export interface UpdateAllergyParams {
|
|
40
|
+
AllergyNum: number;
|
|
41
|
+
Reaction?: string;
|
|
42
|
+
StatusIsActive?: 'true' | 'false';
|
|
43
|
+
DateAdverseReaction?: string;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=allergyTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allergyTypes.d.ts","sourceRoot":"","sources":["../../src/types/allergyTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,OAAO;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|