tebra-mcp-server 0.1.0 → 0.2.1
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/LICENSE +21 -21
- package/README.md +267 -35
- package/dist/config.d.ts +12 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +12 -0
- package/dist/config.js.map +1 -1
- package/dist/fhir-client.d.ts +22 -0
- package/dist/fhir-client.d.ts.map +1 -0
- package/dist/fhir-client.js +86 -0
- package/dist/fhir-client.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +98 -6
- package/dist/index.js.map +1 -1
- package/dist/integrations/epic-notes-integration.d.ts +145 -0
- package/dist/integrations/epic-notes-integration.d.ts.map +1 -0
- package/dist/integrations/epic-notes-integration.js +227 -0
- package/dist/integrations/epic-notes-integration.js.map +1 -0
- package/dist/integrations/fal-integration.d.ts +109 -0
- package/dist/integrations/fal-integration.d.ts.map +1 -0
- package/dist/integrations/fal-integration.js +192 -0
- package/dist/integrations/fal-integration.js.map +1 -0
- package/dist/soap-client.d.ts +1 -0
- package/dist/soap-client.d.ts.map +1 -1
- package/dist/soap-client.js +68 -1
- package/dist/soap-client.js.map +1 -1
- package/dist/tools/appointment-crud.d.ts +117 -0
- package/dist/tools/appointment-crud.d.ts.map +1 -0
- package/dist/tools/appointment-crud.js +218 -0
- package/dist/tools/appointment-crud.js.map +1 -0
- package/dist/tools/appointment-detail.d.ts +25 -0
- package/dist/tools/appointment-detail.d.ts.map +1 -0
- package/dist/tools/appointment-detail.js +85 -0
- package/dist/tools/appointment-detail.js.map +1 -0
- package/dist/tools/appointment-reasons.d.ts +20 -0
- package/dist/tools/appointment-reasons.d.ts.map +1 -0
- package/dist/tools/appointment-reasons.js +48 -0
- package/dist/tools/appointment-reasons.js.map +1 -0
- package/dist/tools/appointments.d.ts +46 -0
- package/dist/tools/appointments.d.ts.map +1 -1
- package/dist/tools/appointments.js +71 -4
- package/dist/tools/appointments.js.map +1 -1
- package/dist/tools/authorizations.d.ts +0 -0
- package/dist/tools/authorizations.d.ts.map +0 -0
- package/dist/tools/authorizations.js +5 -5
- package/dist/tools/authorizations.js.map +0 -0
- package/dist/tools/bulk-patients.d.ts +33 -0
- package/dist/tools/bulk-patients.d.ts.map +1 -0
- package/dist/tools/bulk-patients.js +81 -0
- package/dist/tools/bulk-patients.js.map +1 -0
- package/dist/tools/charges.d.ts +61 -0
- package/dist/tools/charges.d.ts.map +1 -1
- package/dist/tools/charges.js +98 -14
- package/dist/tools/charges.js.map +1 -1
- package/dist/tools/documents.d.ts +71 -0
- package/dist/tools/documents.d.ts.map +1 -0
- package/dist/tools/documents.js +139 -0
- package/dist/tools/documents.js.map +1 -0
- package/dist/tools/eligibility.d.ts +0 -0
- package/dist/tools/eligibility.d.ts.map +0 -0
- package/dist/tools/eligibility.js +5 -5
- package/dist/tools/eligibility.js.map +0 -0
- package/dist/tools/encounter-status.d.ts +34 -0
- package/dist/tools/encounter-status.d.ts.map +1 -0
- package/dist/tools/encounter-status.js +73 -0
- package/dist/tools/encounter-status.js.map +1 -0
- package/dist/tools/encounters.d.ts +0 -0
- package/dist/tools/encounters.d.ts.map +0 -0
- package/dist/tools/encounters.js +29 -29
- package/dist/tools/encounters.js.map +0 -0
- package/dist/tools/external-ids.d.ts +66 -0
- package/dist/tools/external-ids.d.ts.map +1 -0
- package/dist/tools/external-ids.js +140 -0
- package/dist/tools/external-ids.js.map +1 -0
- package/dist/tools/fhir-clinical.d.ts +187 -0
- package/dist/tools/fhir-clinical.d.ts.map +1 -0
- package/dist/tools/fhir-clinical.js +597 -0
- package/dist/tools/fhir-clinical.js.map +1 -0
- package/dist/tools/patient-crud.d.ts +190 -0
- package/dist/tools/patient-crud.d.ts.map +1 -0
- package/dist/tools/patient-crud.js +297 -0
- package/dist/tools/patient-crud.js.map +1 -0
- package/dist/tools/patients.d.ts +87 -1
- package/dist/tools/patients.d.ts.map +1 -1
- package/dist/tools/patients.js +108 -8
- package/dist/tools/patients.js.map +1 -1
- package/dist/tools/payments.d.ts +105 -0
- package/dist/tools/payments.d.ts.map +1 -0
- package/dist/tools/payments.js +206 -0
- package/dist/tools/payments.js.map +1 -0
- package/dist/tools/practices.d.ts +20 -0
- package/dist/tools/practices.d.ts.map +1 -0
- package/dist/tools/practices.js +54 -0
- package/dist/tools/practices.js.map +1 -0
- package/dist/tools/procedure-codes.d.ts +0 -0
- package/dist/tools/procedure-codes.d.ts.map +0 -0
- package/dist/tools/procedure-codes.js +5 -5
- package/dist/tools/procedure-codes.js.map +0 -0
- package/dist/tools/providers.d.ts +25 -0
- package/dist/tools/providers.d.ts.map +1 -0
- package/dist/tools/providers.js +62 -0
- package/dist/tools/providers.js.map +1 -0
- package/dist/tools/service-locations.d.ts +25 -0
- package/dist/tools/service-locations.d.ts.map +1 -0
- package/dist/tools/service-locations.js +62 -0
- package/dist/tools/service-locations.js.map +1 -0
- package/dist/tools/system.d.ts +81 -0
- package/dist/tools/system.d.ts.map +1 -0
- package/dist/tools/system.js +184 -0
- package/dist/tools/system.js.map +1 -0
- package/dist/tools/transactions.d.ts +61 -0
- package/dist/tools/transactions.d.ts.map +1 -0
- package/dist/tools/transactions.js +122 -0
- package/dist/tools/transactions.js.map +1 -0
- package/package.json +61 -54
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tebra MCP tools: Encounter status update.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.encounterStatusTools = void 0;
|
|
7
|
+
exports.handleEncounterStatusTool = handleEncounterStatusTool;
|
|
8
|
+
const soap_client_js_1 = require("../soap-client.js");
|
|
9
|
+
// ─── Tool Definitions ───────────────────────────────────────────
|
|
10
|
+
exports.encounterStatusTools = [
|
|
11
|
+
{
|
|
12
|
+
name: 'tebra_update_encounter_status',
|
|
13
|
+
description: 'Update the status of an encounter in Tebra. Use to move encounters through the workflow (Draft, Review, Approved, Rejected).',
|
|
14
|
+
inputSchema: {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
encounterId: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
description: 'Tebra encounter ID',
|
|
20
|
+
},
|
|
21
|
+
status: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'New status: Draft, Review, Approved, or Rejected',
|
|
24
|
+
enum: ['Draft', 'Review', 'Approved', 'Rejected'],
|
|
25
|
+
},
|
|
26
|
+
reviewNote: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Optional note explaining the status change',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
required: ['encounterId', 'status'],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
// ─── Tool Handler ───────────────────────────────────────────────
|
|
36
|
+
async function handleEncounterStatusTool(name, args, config) {
|
|
37
|
+
if (name !== 'tebra_update_encounter_status') {
|
|
38
|
+
return { content: [{ type: 'text', text: `Unknown encounter status tool: ${name}` }] };
|
|
39
|
+
}
|
|
40
|
+
const encounterId = String(args.encounterId ?? '');
|
|
41
|
+
const status = String(args.status ?? '');
|
|
42
|
+
if (!encounterId || !status) {
|
|
43
|
+
return {
|
|
44
|
+
content: [{ type: 'text', text: 'encounterId and status are required.' }],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const validStatuses = ['Draft', 'Review', 'Approved', 'Rejected'];
|
|
48
|
+
if (!validStatuses.includes(status)) {
|
|
49
|
+
return {
|
|
50
|
+
content: [{ type: 'text', text: `Invalid status "${status}". Must be one of: ${validStatuses.join(', ')}` }],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const reviewNote = args.reviewNote ? String(args.reviewNote) : undefined;
|
|
54
|
+
const bodyXml = `
|
|
55
|
+
<kar:request>
|
|
56
|
+
<kar:EncounterID>${(0, soap_client_js_1.escapeXml)(encounterId)}</kar:EncounterID>
|
|
57
|
+
<kar:Status>${(0, soap_client_js_1.escapeXml)(status)}</kar:Status>
|
|
58
|
+
${reviewNote ? `<kar:Notes>${(0, soap_client_js_1.escapeXml)(reviewNote)}</kar:Notes>` : ''}
|
|
59
|
+
</kar:request>`;
|
|
60
|
+
const xml = await (0, soap_client_js_1.soapRequest)(config, 'UpdateEncounterStatus', bodyXml);
|
|
61
|
+
const updatedId = (0, soap_client_js_1.extractTag)(xml, 'EncounterID') || (0, soap_client_js_1.extractTag)(xml, 'ID') || encounterId;
|
|
62
|
+
return {
|
|
63
|
+
content: [{
|
|
64
|
+
type: 'text',
|
|
65
|
+
text: JSON.stringify({
|
|
66
|
+
encounterId: updatedId,
|
|
67
|
+
status,
|
|
68
|
+
message: `Encounter status updated to ${status}.`,
|
|
69
|
+
}, null, 2),
|
|
70
|
+
}],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=encounter-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encounter-status.js","sourceRoot":"","sources":["../../src/tools/encounter-status.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAoCH,8DA+CC;AAhFD,sDAAuE;AAEvE,mEAAmE;AAEtD,QAAA,oBAAoB,GAAG;IAClC;QACE,IAAI,EAAE,+BAA+B;QACrC,WAAW,EACT,8HAA8H;QAChI,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oBAAoB;iBAClC;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kDAAkD;oBAC/D,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC;iBAClD;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,4CAA4C;iBAC1D;aACF;YACD,QAAQ,EAAE,CAAC,aAAa,EAA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c,IAAA,0BAAS,EAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;mBACxD,CAAC;IAElB,MAAM,GAAG,GAAG,MAAM,IAAA,4BAAW,EAAC,MAAM,EAAE,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACxE,MAAM,SAAS,GAAG,IAAA,2BAAU,EAAC,GAAG,EAAE,aAAa,CAAC,IAAI,IAAA,2BAAU,EAAC,GAAG,EAAE,IAAI,CAAC,IAAI,WAAW,CAAC;IAEzF,OAAO;QACL,OAAO,EAAE,CAAC;gBACR,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,WAAW,EAAE,SAAS;oBACtB,MAAM;oBACN,OAAO,EAAE,+BAA+B,MAAM,GAAG;iBAClD,EAAE,IAAI,EAAE,CAAC,CAAC;aACZ,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
File without changes
|
|
File without changes
|
package/dist/tools/encounters.js
CHANGED
|
@@ -85,11 +85,11 @@ async function handleEncounterTool(name, args, config) {
|
|
|
85
85
|
if (!encounterId) {
|
|
86
86
|
return { content: [{ type: 'text', text: 'encounterId is required.' }] };
|
|
87
87
|
}
|
|
88
|
-
const bodyXml = `
|
|
89
|
-
<kar:request>
|
|
90
|
-
<kar:Fields>
|
|
91
|
-
<kar:EncounterID>${(0, soap_client_js_1.escapeXml)(encounterId)}</kar:EncounterID>
|
|
92
|
-
</kar:Fields>
|
|
88
|
+
const bodyXml = `
|
|
89
|
+
<kar:request>
|
|
90
|
+
<kar:Fields>
|
|
91
|
+
<kar:EncounterID>${(0, soap_client_js_1.escapeXml)(encounterId)}</kar:EncounterID>
|
|
92
|
+
</kar:Fields>
|
|
93
93
|
</kar:request>`;
|
|
94
94
|
const xml = await (0, soap_client_js_1.soapRequest)(config, 'GetEncounterDetails', bodyXml);
|
|
95
95
|
return { content: [{ type: 'text', text: formatEncounterXml(xml) }] };
|
|
@@ -111,36 +111,36 @@ async function handleEncounterTool(name, args, config) {
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
const diagnosisXml = diagnoses
|
|
114
|
-
.map((dx, i) => `
|
|
115
|
-
<kar:EncounterDiagnosisReq>
|
|
116
|
-
<kar:DiagnosisCode>${(0, soap_client_js_1.escapeXml)(dx.code)}</kar:DiagnosisCode>
|
|
117
|
-
<kar:Description>${(0, soap_client_js_1.escapeXml)(dx.description)}</kar:Description>
|
|
118
|
-
<kar:Sequence>${i + 1}</kar:Sequence>
|
|
114
|
+
.map((dx, i) => `
|
|
115
|
+
<kar:EncounterDiagnosisReq>
|
|
116
|
+
<kar:DiagnosisCode>${(0, soap_client_js_1.escapeXml)(dx.code)}</kar:DiagnosisCode>
|
|
117
|
+
<kar:Description>${(0, soap_client_js_1.escapeXml)(dx.description)}</kar:Description>
|
|
118
|
+
<kar:Sequence>${i + 1}</kar:Sequence>
|
|
119
119
|
</kar:EncounterDiagnosisReq>`)
|
|
120
120
|
.join('');
|
|
121
121
|
const procedureXml = procedures
|
|
122
|
-
.map((px) => `
|
|
123
|
-
<kar:EncounterProcedureReq>
|
|
124
|
-
<kar:ProcedureCode>${(0, soap_client_js_1.escapeXml)(px.code)}</kar:ProcedureCode>
|
|
125
|
-
${px.modifiers?.[0] ? `<kar:Modifier1>${(0, soap_client_js_1.escapeXml)(px.modifiers[0])}</kar:Modifier1>` : ''}
|
|
126
|
-
${px.modifiers?.[1] ? `<kar:Modifier2>${(0, soap_client_js_1.escapeXml)(px.modifiers[1])}</kar:Modifier2>` : ''}
|
|
127
|
-
${px.modifiers?.[2] ? `<kar:Modifier3>${(0, soap_client_js_1.escapeXml)(px.modifiers[2])}</kar:Modifier3>` : ''}
|
|
128
|
-
${px.modifiers?.[3] ? `<kar:Modifier4>${(0, soap_client_js_1.escapeXml)(px.modifiers[3])}</kar:Modifier4>` : ''}
|
|
129
|
-
<kar:Units>${px.units ?? 1}</kar:Units>
|
|
122
|
+
.map((px) => `
|
|
123
|
+
<kar:EncounterProcedureReq>
|
|
124
|
+
<kar:ProcedureCode>${(0, soap_client_js_1.escapeXml)(px.code)}</kar:ProcedureCode>
|
|
125
|
+
${px.modifiers?.[0] ? `<kar:Modifier1>${(0, soap_client_js_1.escapeXml)(px.modifiers[0])}</kar:Modifier1>` : ''}
|
|
126
|
+
${px.modifiers?.[1] ? `<kar:Modifier2>${(0, soap_client_js_1.escapeXml)(px.modifiers[1])}</kar:Modifier2>` : ''}
|
|
127
|
+
${px.modifiers?.[2] ? `<kar:Modifier3>${(0, soap_client_js_1.escapeXml)(px.modifiers[2])}</kar:Modifier3>` : ''}
|
|
128
|
+
${px.modifiers?.[3] ? `<kar:Modifier4>${(0, soap_client_js_1.escapeXml)(px.modifiers[3])}</kar:Modifier4>` : ''}
|
|
129
|
+
<kar:Units>${px.units ?? 1}</kar:Units>
|
|
130
130
|
</kar:EncounterProcedureReq>`)
|
|
131
131
|
.join('');
|
|
132
132
|
const authNumber = args.authorizationId ? String(args.authorizationId) : '';
|
|
133
|
-
const bodyXml = `
|
|
134
|
-
<kar:request>
|
|
135
|
-
<kar:Encounter>
|
|
136
|
-
<kar:PatientID>${(0, soap_client_js_1.escapeXml)(patientId)}</kar:PatientID>
|
|
137
|
-
<kar:ProviderID>${(0, soap_client_js_1.escapeXml)(providerId)}</kar:ProviderID>
|
|
138
|
-
<kar:ServiceStartDate>${(0, soap_client_js_1.escapeXml)(serviceDate)}</kar:ServiceStartDate>
|
|
139
|
-
<kar:ServiceEndDate>${(0, soap_client_js_1.escapeXml)(serviceDate)}</kar:ServiceEndDate>
|
|
140
|
-
${authNumber ? `<kar:AuthorizationNumber>${(0, soap_client_js_1.escapeXml)(authNumber)}</kar:AuthorizationNumber>` : ''}
|
|
141
|
-
<kar:EncounterDiagnoses>${diagnosisXml}</kar:EncounterDiagnoses>
|
|
142
|
-
<kar:EncounterProcedures>${procedureXml}</kar:EncounterProcedures>
|
|
143
|
-
</kar:Encounter>
|
|
133
|
+
const bodyXml = `
|
|
134
|
+
<kar:request>
|
|
135
|
+
<kar:Encounter>
|
|
136
|
+
<kar:PatientID>${(0, soap_client_js_1.escapeXml)(patientId)}</kar:PatientID>
|
|
137
|
+
<kar:ProviderID>${(0, soap_client_js_1.escapeXml)(providerId)}</kar:ProviderID>
|
|
138
|
+
<kar:ServiceStartDate>${(0, soap_client_js_1.escapeXml)(serviceDate)}</kar:ServiceStartDate>
|
|
139
|
+
<kar:ServiceEndDate>${(0, soap_client_js_1.escapeXml)(serviceDate)}</kar:ServiceEndDate>
|
|
140
|
+
${authNumber ? `<kar:AuthorizationNumber>${(0, soap_client_js_1.escapeXml)(authNumber)}</kar:AuthorizationNumber>` : ''}
|
|
141
|
+
<kar:EncounterDiagnoses>${diagnosisXml}</kar:EncounterDiagnoses>
|
|
142
|
+
<kar:EncounterProcedures>${procedureXml}</kar:EncounterProcedures>
|
|
143
|
+
</kar:Encounter>
|
|
144
144
|
</kar:request>`;
|
|
145
145
|
const xml = await (0, soap_client_js_1.soapRequest)(config, 'CreateEncounter', bodyXml);
|
|
146
146
|
const encounterId = (0, soap_client_js_1.extractTag)(xml, 'EncounterID') || (0, soap_client_js_1.extractTag)(xml, 'ID');
|
|
File without changes
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tebra MCP tools: External vendor and patient external ID management.
|
|
3
|
+
*/
|
|
4
|
+
import type { TebraConfig } from '../config.js';
|
|
5
|
+
export declare const externalIdTools: ({
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: "object";
|
|
10
|
+
properties: {
|
|
11
|
+
patientId: {
|
|
12
|
+
type: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
externalId: {
|
|
16
|
+
type: string;
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
vendorName: {
|
|
20
|
+
type: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
vendorDescription?: undefined;
|
|
24
|
+
};
|
|
25
|
+
required: string[];
|
|
26
|
+
};
|
|
27
|
+
} | {
|
|
28
|
+
name: string;
|
|
29
|
+
description: string;
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: "object";
|
|
32
|
+
properties: {
|
|
33
|
+
vendorName: {
|
|
34
|
+
type: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
vendorDescription: {
|
|
38
|
+
type: string;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
patientId?: undefined;
|
|
42
|
+
externalId?: undefined;
|
|
43
|
+
};
|
|
44
|
+
required: string[];
|
|
45
|
+
};
|
|
46
|
+
} | {
|
|
47
|
+
name: string;
|
|
48
|
+
description: string;
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: "object";
|
|
51
|
+
properties: {
|
|
52
|
+
patientId?: undefined;
|
|
53
|
+
externalId?: undefined;
|
|
54
|
+
vendorName?: undefined;
|
|
55
|
+
vendorDescription?: undefined;
|
|
56
|
+
};
|
|
57
|
+
required: never[];
|
|
58
|
+
};
|
|
59
|
+
})[];
|
|
60
|
+
export declare function handleExternalIdTool(name: string, args: Record<string, unknown>, config: TebraConfig): Promise<{
|
|
61
|
+
content: Array<{
|
|
62
|
+
type: string;
|
|
63
|
+
text: string;
|
|
64
|
+
}>;
|
|
65
|
+
}>;
|
|
66
|
+
//# sourceMappingURL=external-ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-ids.d.ts","sourceRoot":"","sources":["../../src/tools/external-ids.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKhD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqD3B,CAAC;AAIF,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA6F7D"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tebra MCP tools: External vendor and patient external ID management.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.externalIdTools = void 0;
|
|
7
|
+
exports.handleExternalIdTool = handleExternalIdTool;
|
|
8
|
+
const soap_client_js_1 = require("../soap-client.js");
|
|
9
|
+
// ─── Tool Definitions ───────────────────────────────────────────
|
|
10
|
+
exports.externalIdTools = [
|
|
11
|
+
{
|
|
12
|
+
name: 'tebra_update_patient_external_id',
|
|
13
|
+
description: 'Set or update a patient external ID in Tebra, linking the patient to an external system.',
|
|
14
|
+
inputSchema: {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
patientId: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
description: 'Tebra patient ID',
|
|
20
|
+
},
|
|
21
|
+
externalId: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'External system ID to assign',
|
|
24
|
+
},
|
|
25
|
+
vendorName: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'Optional external vendor name',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
required: ['patientId', 'externalId'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'tebra_register_external_vendor',
|
|
35
|
+
description: 'Register a new external vendor in Tebra for external ID mapping.',
|
|
36
|
+
inputSchema: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
vendorName: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'Vendor name to register',
|
|
42
|
+
},
|
|
43
|
+
vendorDescription: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: 'Optional vendor description',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
required: ['vendorName'],
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'tebra_get_external_vendors',
|
|
53
|
+
description: 'Get all registered external vendors in Tebra.',
|
|
54
|
+
inputSchema: {
|
|
55
|
+
type: 'object',
|
|
56
|
+
properties: {},
|
|
57
|
+
required: [],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
// ─── Tool Handler ───────────────────────────────────────────────
|
|
62
|
+
async function handleExternalIdTool(name, args, config) {
|
|
63
|
+
switch (name) {
|
|
64
|
+
case 'tebra_update_patient_external_id': {
|
|
65
|
+
const patientId = String(args.patientId ?? '');
|
|
66
|
+
const externalId = String(args.externalId ?? '');
|
|
67
|
+
if (!patientId || !externalId) {
|
|
68
|
+
return {
|
|
69
|
+
content: [{ type: 'text', text: 'patientId and externalId are required.' }],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const vendorName = args.vendorName ? String(args.vendorName) : undefined;
|
|
73
|
+
const bodyXml = `
|
|
74
|
+
<kar:request>
|
|
75
|
+
<kar:PatientID>${(0, soap_client_js_1.escapeXml)(patientId)}</kar:PatientID>
|
|
76
|
+
<kar:ExternalID>${(0, soap_client_js_1.escapeXml)(externalId)}</kar:ExternalID>
|
|
77
|
+
${vendorName ? `<kar:VendorName>${(0, soap_client_js_1.escapeXml)(vendorName)}</kar:VendorName>` : ''}
|
|
78
|
+
</kar:request>`;
|
|
79
|
+
await (0, soap_client_js_1.soapRequest)(config, 'UpdatePatientsExternalID', bodyXml);
|
|
80
|
+
return {
|
|
81
|
+
content: [{
|
|
82
|
+
type: 'text',
|
|
83
|
+
text: JSON.stringify({
|
|
84
|
+
patientId,
|
|
85
|
+
externalId,
|
|
86
|
+
message: 'Patient external ID updated successfully.',
|
|
87
|
+
}, null, 2),
|
|
88
|
+
}],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
case 'tebra_register_external_vendor': {
|
|
92
|
+
const vendorName = String(args.vendorName ?? '');
|
|
93
|
+
if (!vendorName) {
|
|
94
|
+
return { content: [{ type: 'text', text: 'vendorName is required.' }] };
|
|
95
|
+
}
|
|
96
|
+
const vendorDescription = args.vendorDescription ? String(args.vendorDescription) : undefined;
|
|
97
|
+
const bodyXml = `
|
|
98
|
+
<kar:request>
|
|
99
|
+
<kar:VendorName>${(0, soap_client_js_1.escapeXml)(vendorName)}</kar:VendorName>
|
|
100
|
+
${vendorDescription ? `<kar:VendorDescription>${(0, soap_client_js_1.escapeXml)(vendorDescription)}</kar:VendorDescription>` : ''}
|
|
101
|
+
</kar:request>`;
|
|
102
|
+
const xml = await (0, soap_client_js_1.soapRequest)(config, 'RegisterExternalVendor', bodyXml);
|
|
103
|
+
const vendorId = (0, soap_client_js_1.extractTag)(xml, 'VendorID') || (0, soap_client_js_1.extractTag)(xml, 'ID');
|
|
104
|
+
return {
|
|
105
|
+
content: [{
|
|
106
|
+
type: 'text',
|
|
107
|
+
text: JSON.stringify({
|
|
108
|
+
vendorId,
|
|
109
|
+
vendorName,
|
|
110
|
+
message: 'External vendor registered successfully.',
|
|
111
|
+
}, null, 2),
|
|
112
|
+
}],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
case 'tebra_get_external_vendors': {
|
|
116
|
+
const bodyXml = `
|
|
117
|
+
<kar:request>
|
|
118
|
+
<kar:Fields />
|
|
119
|
+
</kar:request>`;
|
|
120
|
+
const xml = await (0, soap_client_js_1.soapRequest)(config, 'GetExternalVendors', bodyXml);
|
|
121
|
+
const blocks = (0, soap_client_js_1.extractAllTags)(xml, 'VendorData');
|
|
122
|
+
const vendors = blocks.map((block) => ({
|
|
123
|
+
vendorId: (0, soap_client_js_1.extractTag)(block, 'VendorID') || (0, soap_client_js_1.extractTag)(block, 'ID'),
|
|
124
|
+
vendorName: (0, soap_client_js_1.extractTag)(block, 'VendorName') || (0, soap_client_js_1.extractTag)(block, 'Name'),
|
|
125
|
+
vendorDescription: (0, soap_client_js_1.extractTag)(block, 'VendorDescription') || (0, soap_client_js_1.extractTag)(block, 'Description'),
|
|
126
|
+
}));
|
|
127
|
+
if (vendors.length === 0) {
|
|
128
|
+
return {
|
|
129
|
+
content: [{ type: 'text', text: 'No external vendors registered.' }],
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
content: [{ type: 'text', text: JSON.stringify(vendors, null, 2) }],
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
default:
|
|
137
|
+
return { content: [{ type: 'text', text: `Unknown external ID tool: ${name}` }] };
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=external-ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-ids.js","sourceRoot":"","sources":["../../src/tools/external-ids.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAgEH,oDAiGC;AA9JD,sDAAuF;AAEvF,mEAAmE;AAEtD,QAAA,eAAe,GAAG;IAC7B;QACE,IAAI,EAAE,kCAAkC;QACxC,WAAW,EACT,0FAA0F;QAC5F,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kBAAkB;iBAChC;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,8BAA8B;iBAC5C;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+BAA+B;iBAC7C;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;SACtC;KACF;IACD;QACE,IAAI,EAAE,gCAAgC;QACtC,WAAW,EACT,kEAAkE;QACpE,WAAW,EAAE;YACX,IAAI,EAAE,QA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AM,EAAE,IAAI,EAAE,6BAA6B,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC;IACtF,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tebra MCP tools: FHIR R4 clinical data retrieval.
|
|
3
|
+
*
|
|
4
|
+
* 12 tools for accessing clinical data via Tebra's FHIR API:
|
|
5
|
+
* allergies, medications, conditions, vitals, labs, immunizations,
|
|
6
|
+
* procedures, care plans, care team, diagnostic reports, documents, devices.
|
|
7
|
+
*
|
|
8
|
+
* Only registered when FHIR credentials are configured.
|
|
9
|
+
*/
|
|
10
|
+
export declare const fhirClinicalTools: ({
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: "object";
|
|
15
|
+
properties: {
|
|
16
|
+
patientId: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
status?: undefined;
|
|
21
|
+
clinicalStatus?: undefined;
|
|
22
|
+
fromDate?: undefined;
|
|
23
|
+
toDate?: undefined;
|
|
24
|
+
code?: undefined;
|
|
25
|
+
category?: undefined;
|
|
26
|
+
type?: undefined;
|
|
27
|
+
};
|
|
28
|
+
required: string[];
|
|
29
|
+
};
|
|
30
|
+
} | {
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
inputSchema: {
|
|
34
|
+
type: "object";
|
|
35
|
+
properties: {
|
|
36
|
+
patientId: {
|
|
37
|
+
type: string;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
status: {
|
|
41
|
+
type: string;
|
|
42
|
+
enum: string[];
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
clinicalStatus?: undefined;
|
|
46
|
+
fromDate?: undefined;
|
|
47
|
+
toDate?: undefined;
|
|
48
|
+
code?: undefined;
|
|
49
|
+
category?: undefined;
|
|
50
|
+
type?: undefined;
|
|
51
|
+
};
|
|
52
|
+
required: string[];
|
|
53
|
+
};
|
|
54
|
+
} | {
|
|
55
|
+
name: string;
|
|
56
|
+
description: string;
|
|
57
|
+
inputSchema: {
|
|
58
|
+
type: "object";
|
|
59
|
+
properties: {
|
|
60
|
+
patientId: {
|
|
61
|
+
type: string;
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
clinicalStatus: {
|
|
65
|
+
type: string;
|
|
66
|
+
enum: string[];
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
status?: undefined;
|
|
70
|
+
fromDate?: undefined;
|
|
71
|
+
toDate?: undefined;
|
|
72
|
+
code?: undefined;
|
|
73
|
+
category?: undefined;
|
|
74
|
+
type?: undefined;
|
|
75
|
+
};
|
|
76
|
+
required: string[];
|
|
77
|
+
};
|
|
78
|
+
} | {
|
|
79
|
+
name: string;
|
|
80
|
+
description: string;
|
|
81
|
+
inputSchema: {
|
|
82
|
+
type: "object";
|
|
83
|
+
properties: {
|
|
84
|
+
patientId: {
|
|
85
|
+
type: string;
|
|
86
|
+
description: string;
|
|
87
|
+
};
|
|
88
|
+
fromDate: {
|
|
89
|
+
type: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
toDate: {
|
|
93
|
+
type: string;
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
status?: undefined;
|
|
97
|
+
clinicalStatus?: undefined;
|
|
98
|
+
code?: undefined;
|
|
99
|
+
category?: undefined;
|
|
100
|
+
type?: undefined;
|
|
101
|
+
};
|
|
102
|
+
required: string[];
|
|
103
|
+
};
|
|
104
|
+
} | {
|
|
105
|
+
name: string;
|
|
106
|
+
description: string;
|
|
107
|
+
inputSchema: {
|
|
108
|
+
type: "object";
|
|
109
|
+
properties: {
|
|
110
|
+
patientId: {
|
|
111
|
+
type: string;
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
114
|
+
fromDate: {
|
|
115
|
+
type: string;
|
|
116
|
+
description: string;
|
|
117
|
+
};
|
|
118
|
+
toDate: {
|
|
119
|
+
type: string;
|
|
120
|
+
description: string;
|
|
121
|
+
};
|
|
122
|
+
code: {
|
|
123
|
+
type: string;
|
|
124
|
+
description: string;
|
|
125
|
+
};
|
|
126
|
+
status?: undefined;
|
|
127
|
+
clinicalStatus?: undefined;
|
|
128
|
+
category?: undefined;
|
|
129
|
+
type?: undefined;
|
|
130
|
+
};
|
|
131
|
+
required: string[];
|
|
132
|
+
};
|
|
133
|
+
} | {
|
|
134
|
+
name: string;
|
|
135
|
+
description: string;
|
|
136
|
+
inputSchema: {
|
|
137
|
+
type: "object";
|
|
138
|
+
properties: {
|
|
139
|
+
patientId: {
|
|
140
|
+
type: string;
|
|
141
|
+
description: string;
|
|
142
|
+
};
|
|
143
|
+
category: {
|
|
144
|
+
type: string;
|
|
145
|
+
enum: string[];
|
|
146
|
+
description: string;
|
|
147
|
+
};
|
|
148
|
+
status?: undefined;
|
|
149
|
+
clinicalStatus?: undefined;
|
|
150
|
+
fromDate?: undefined;
|
|
151
|
+
toDate?: undefined;
|
|
152
|
+
code?: undefined;
|
|
153
|
+
type?: undefined;
|
|
154
|
+
};
|
|
155
|
+
required: string[];
|
|
156
|
+
};
|
|
157
|
+
} | {
|
|
158
|
+
name: string;
|
|
159
|
+
description: string;
|
|
160
|
+
inputSchema: {
|
|
161
|
+
type: "object";
|
|
162
|
+
properties: {
|
|
163
|
+
patientId: {
|
|
164
|
+
type: string;
|
|
165
|
+
description: string;
|
|
166
|
+
};
|
|
167
|
+
type: {
|
|
168
|
+
type: string;
|
|
169
|
+
description: string;
|
|
170
|
+
};
|
|
171
|
+
status?: undefined;
|
|
172
|
+
clinicalStatus?: undefined;
|
|
173
|
+
fromDate?: undefined;
|
|
174
|
+
toDate?: undefined;
|
|
175
|
+
code?: undefined;
|
|
176
|
+
category?: undefined;
|
|
177
|
+
};
|
|
178
|
+
required: string[];
|
|
179
|
+
};
|
|
180
|
+
})[];
|
|
181
|
+
export declare function handleFhirClinicalTool(name: string, args: Record<string, unknown>): Promise<{
|
|
182
|
+
content: Array<{
|
|
183
|
+
type: string;
|
|
184
|
+
text: string;
|
|
185
|
+
}>;
|
|
186
|
+
}>;
|
|
187
|
+
//# sourceMappingURL=fhir-clinical.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fhir-clinical.d.ts","sourceRoot":"","sources":["../../src/tools/fhir-clinical.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoRH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyO7B,CAAC;AAIF,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA2G7D"}
|