tebra-mcp-server 0.2.1 → 0.2.2

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.
Files changed (60) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +21 -1
  3. package/dist/index.js +40 -8
  4. package/dist/index.js.map +1 -1
  5. package/dist/soap-client.d.ts.map +1 -1
  6. package/dist/soap-client.js +42 -9
  7. package/dist/soap-client.js.map +1 -1
  8. package/dist/tools/fhir/allergies.d.ts +24 -0
  9. package/dist/tools/fhir/allergies.d.ts.map +1 -0
  10. package/dist/tools/fhir/allergies.js +52 -0
  11. package/dist/tools/fhir/allergies.js.map +1 -0
  12. package/dist/tools/fhir/care-plans.d.ts +29 -0
  13. package/dist/tools/fhir/care-plans.d.ts.map +1 -0
  14. package/dist/tools/fhir/care-plans.js +61 -0
  15. package/dist/tools/fhir/care-plans.js.map +1 -0
  16. package/dist/tools/fhir/care-team.d.ts +24 -0
  17. package/dist/tools/fhir/care-team.d.ts.map +1 -0
  18. package/dist/tools/fhir/care-team.js +47 -0
  19. package/dist/tools/fhir/care-team.js.map +1 -0
  20. package/dist/tools/fhir/conditions.d.ts +29 -0
  21. package/dist/tools/fhir/conditions.d.ts.map +1 -0
  22. package/dist/tools/fhir/conditions.js +57 -0
  23. package/dist/tools/fhir/conditions.js.map +1 -0
  24. package/dist/tools/fhir/devices.d.ts +24 -0
  25. package/dist/tools/fhir/devices.d.ts.map +1 -0
  26. package/dist/tools/fhir/devices.js +48 -0
  27. package/dist/tools/fhir/devices.js.map +1 -0
  28. package/dist/tools/fhir/diagnostic-reports.d.ts +29 -0
  29. package/dist/tools/fhir/diagnostic-reports.d.ts.map +1 -0
  30. package/dist/tools/fhir/diagnostic-reports.js +58 -0
  31. package/dist/tools/fhir/diagnostic-reports.js.map +1 -0
  32. package/dist/tools/fhir/documents.d.ts +30 -0
  33. package/dist/tools/fhir/documents.d.ts.map +1 -0
  34. package/dist/tools/fhir/documents.js +61 -0
  35. package/dist/tools/fhir/documents.js.map +1 -0
  36. package/dist/tools/fhir/helpers.d.ts +37 -0
  37. package/dist/tools/fhir/helpers.d.ts.map +1 -0
  38. package/dist/tools/fhir/helpers.js +113 -0
  39. package/dist/tools/fhir/helpers.js.map +1 -0
  40. package/dist/tools/fhir/immunizations.d.ts +24 -0
  41. package/dist/tools/fhir/immunizations.d.ts.map +1 -0
  42. package/dist/tools/fhir/immunizations.js +46 -0
  43. package/dist/tools/fhir/immunizations.js.map +1 -0
  44. package/dist/tools/fhir/lab-results.d.ts +36 -0
  45. package/dist/tools/fhir/lab-results.d.ts.map +1 -0
  46. package/dist/tools/fhir/lab-results.js +53 -0
  47. package/dist/tools/fhir/lab-results.js.map +1 -0
  48. package/dist/tools/fhir/medications.d.ts +29 -0
  49. package/dist/tools/fhir/medications.d.ts.map +1 -0
  50. package/dist/tools/fhir/medications.js +55 -0
  51. package/dist/tools/fhir/medications.js.map +1 -0
  52. package/dist/tools/fhir/procedures.d.ts +32 -0
  53. package/dist/tools/fhir/procedures.d.ts.map +1 -0
  54. package/dist/tools/fhir/procedures.js +60 -0
  55. package/dist/tools/fhir/procedures.js.map +1 -0
  56. package/dist/tools/fhir/vitals.d.ts +32 -0
  57. package/dist/tools/fhir/vitals.d.ts.map +1 -0
  58. package/dist/tools/fhir/vitals.js +47 -0
  59. package/dist/tools/fhir/vitals.js.map +1 -0
  60. package/package.json +61 -61
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /**
3
+ * FHIR Observation (laboratory category) — lab results with reference ranges.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fhirLabResultsTools = void 0;
7
+ exports.handleFhirLabResultsTool = handleFhirLabResultsTool;
8
+ const helpers_js_1 = require("./helpers.js");
9
+ exports.fhirLabResultsTools = [
10
+ {
11
+ name: 'tebra_fhir_get_lab_results',
12
+ description: 'Get patient laboratory results from Tebra FHIR API. Returns test name, value, units, reference ranges.',
13
+ inputSchema: {
14
+ type: 'object',
15
+ properties: {
16
+ patientId: {
17
+ type: 'string',
18
+ description: 'Tebra FHIR patient ID',
19
+ },
20
+ fromDate: {
21
+ type: 'string',
22
+ description: 'Date range start (YYYY-MM-DD)',
23
+ },
24
+ toDate: {
25
+ type: 'string',
26
+ description: 'Date range end (YYYY-MM-DD)',
27
+ },
28
+ code: {
29
+ type: 'string',
30
+ description: 'LOINC code to filter by',
31
+ },
32
+ },
33
+ required: ['patientId'],
34
+ },
35
+ },
36
+ ];
37
+ async function handleFhirLabResultsTool(_name, args) {
38
+ const config = (0, helpers_js_1.getFhirConfig)();
39
+ const patientId = String(args.patientId ?? '');
40
+ if (!patientId)
41
+ return { content: [{ type: 'text', text: 'patientId is required.' }] };
42
+ const params = {
43
+ patient: patientId,
44
+ category: 'laboratory',
45
+ };
46
+ (0, helpers_js_1.addDateRange)(params, args);
47
+ if (args.code)
48
+ params.code = String(args.code);
49
+ const data = await (0, helpers_js_1.fhirRequest)(config, 'Observation', params);
50
+ const resources = (0, helpers_js_1.extractBundleResources)(data);
51
+ return (0, helpers_js_1.formatFhirResult)(resources, 'lab results', helpers_js_1.summarizeObservation);
52
+ }
53
+ //# sourceMappingURL=lab-results.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lab-results.js","sourceRoot":"","sources":["../../../src/tools/fhir/lab-results.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyCH,4DAkBC;AAzDD,6CAOsB;AAET,QAAA,mBAAmB,GAAG;IACjC;QACE,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACT,wGAAwG;QAC1G,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uBAAuB;iBACrC;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+BAA+B;iBAC7C;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6BAA6B;iBAC3C;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yBAAyB;iBACvC;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;CACF,CAAC;AAEK,KAAK,UAAU,wBAAwB,CAC5C,KAAa,EACb,IAA6B;IAE7B,MAAM,MAAM,GAAG,IAAA,0BAAa,GAAE,CAAC;IAC/B,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;IAC/C,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC,EAAE,CAAC;IAEvF,MAAM,MAAM,GAA2B;QACrC,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,YAAY;KACvB,CAAC;IACF,IAAA,yBAAY,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC3B,IAAI,IAAI,CAAC,IAAI;QAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE/C,MAAM,IAAI,GAAG,MAAM,IAAA,wBAAW,EAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,IAAA,mCAAsB,EAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,IAAA,6BAAgB,EAAC,SAAS,EAAE,aAAa,EAAE,iCAAoB,CAAC,CAAC;AAC1E,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * FHIR MedicationRequest — patient medication orders.
3
+ */
4
+ export declare const fhirMedicationTools: {
5
+ name: string;
6
+ description: string;
7
+ inputSchema: {
8
+ type: "object";
9
+ properties: {
10
+ patientId: {
11
+ type: string;
12
+ description: string;
13
+ };
14
+ status: {
15
+ type: string;
16
+ enum: string[];
17
+ description: string;
18
+ };
19
+ };
20
+ required: string[];
21
+ };
22
+ }[];
23
+ export declare function handleFhirMedicationTool(_name: string, args: Record<string, unknown>): Promise<{
24
+ content: Array<{
25
+ type: string;
26
+ text: string;
27
+ }>;
28
+ }>;
29
+ //# sourceMappingURL=medications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"medications.d.ts","sourceRoot":"","sources":["../../../src/tools/fhir/medications.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;GAqB/B,CAAC;AAgBF,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,MAAM,EACb,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,CAW7D"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /**
3
+ * FHIR MedicationRequest — patient medication orders.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fhirMedicationTools = void 0;
7
+ exports.handleFhirMedicationTool = handleFhirMedicationTool;
8
+ const helpers_js_1 = require("./helpers.js");
9
+ exports.fhirMedicationTools = [
10
+ {
11
+ name: 'tebra_fhir_get_medications',
12
+ description: 'Get patient medication requests from Tebra FHIR API. Returns medication name, dosage, status, and prescriber.',
13
+ inputSchema: {
14
+ type: 'object',
15
+ properties: {
16
+ patientId: {
17
+ type: 'string',
18
+ description: 'Tebra FHIR patient ID',
19
+ },
20
+ status: {
21
+ type: 'string',
22
+ enum: ['active', 'completed', 'stopped'],
23
+ description: 'Filter by medication status',
24
+ },
25
+ },
26
+ required: ['patientId'],
27
+ },
28
+ },
29
+ ];
30
+ function summarize(r) {
31
+ return {
32
+ id: r.id,
33
+ medication: (0, helpers_js_1.codeDisplay)(r.medicationCodeableConcept) || (0, helpers_js_1.refDisplay)(r.medicationReference),
34
+ status: r.status,
35
+ intent: r.intent,
36
+ authoredOn: r.authoredOn,
37
+ requester: (0, helpers_js_1.refDisplay)(r.requester),
38
+ dosageInstructions: Array.isArray(r.dosageInstruction)
39
+ ? r.dosageInstruction.map((d) => d.text).filter(Boolean)
40
+ : [],
41
+ };
42
+ }
43
+ async function handleFhirMedicationTool(_name, args) {
44
+ const config = (0, helpers_js_1.getFhirConfig)();
45
+ const patientId = String(args.patientId ?? '');
46
+ if (!patientId)
47
+ return { content: [{ type: 'text', text: 'patientId is required.' }] };
48
+ const params = { patient: patientId };
49
+ if (args.status)
50
+ params.status = String(args.status);
51
+ const data = await (0, helpers_js_1.fhirRequest)(config, 'MedicationRequest', params);
52
+ const resources = (0, helpers_js_1.extractBundleResources)(data);
53
+ return (0, helpers_js_1.formatFhirResult)(resources, 'medications', summarize);
54
+ }
55
+ //# sourceMappingURL=medications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"medications.js","sourceRoot":"","sources":["../../../src/tools/fhir/medications.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAiDH,4DAcC;AA7DD,6CAQsB;AAET,QAAA,mBAAmB,GAAG;IACjC;QACE,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACT,+GAA+G;QACjH,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uBAAuB;iBACrC;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,SAAS,CAAC;oBACxC,WAAW,EAAE,6BAA6B;iBAC3C;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;CACF,CAAC;AAEF,SAAS,SAAS,CAAC,CAAe;IAChC,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,UAAU,EAAE,IAAA,wBAAW,E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D,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * FHIR Procedure — patient procedure history.
3
+ */
4
+ export declare const fhirProcedureTools: {
5
+ name: string;
6
+ description: string;
7
+ inputSchema: {
8
+ type: "object";
9
+ properties: {
10
+ patientId: {
11
+ type: string;
12
+ description: string;
13
+ };
14
+ fromDate: {
15
+ type: string;
16
+ description: string;
17
+ };
18
+ toDate: {
19
+ type: string;
20
+ description: string;
21
+ };
22
+ };
23
+ required: string[];
24
+ };
25
+ }[];
26
+ export declare function handleFhirProcedureTool(_name: string, args: Record<string, unknown>): Promise<{
27
+ content: Array<{
28
+ type: string;
29
+ text: string;
30
+ }>;
31
+ }>;
32
+ //# sourceMappingURL=procedures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"procedures.d.ts","sourceRoot":"","sources":["../../../src/tools/fhir/procedures.ts"],"names":[],"mappings":"AAAA;;GAEG;AAcH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;GAwB9B,CAAC;AAmBF,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,MAAM,EACb,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,CAW7D"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /**
3
+ * FHIR Procedure — patient procedure history.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fhirProcedureTools = void 0;
7
+ exports.handleFhirProcedureTool = handleFhirProcedureTool;
8
+ const helpers_js_1 = require("./helpers.js");
9
+ exports.fhirProcedureTools = [
10
+ {
11
+ name: 'tebra_fhir_get_procedures',
12
+ description: 'Get patient procedure history from Tebra FHIR API. Returns procedure name, CPT code, date, and performer.',
13
+ inputSchema: {
14
+ type: 'object',
15
+ properties: {
16
+ patientId: {
17
+ type: 'string',
18
+ description: 'Tebra FHIR patient ID',
19
+ },
20
+ fromDate: {
21
+ type: 'string',
22
+ description: 'Date range start (YYYY-MM-DD)',
23
+ },
24
+ toDate: {
25
+ type: 'string',
26
+ description: 'Date range end (YYYY-MM-DD)',
27
+ },
28
+ },
29
+ required: ['patientId'],
30
+ },
31
+ },
32
+ ];
33
+ function summarize(r) {
34
+ return {
35
+ id: r.id,
36
+ procedure: (0, helpers_js_1.codeDisplay)(r.code),
37
+ code: (0, helpers_js_1.codeValue)(r.code),
38
+ status: r.status,
39
+ performedDateTime: r.performedDateTime,
40
+ performedPeriod: r.performedPeriod,
41
+ performer: Array.isArray(r.performer)
42
+ ? r.performer.map((p) => (0, helpers_js_1.refDisplay)(p.actor))
43
+ : [],
44
+ reasonCode: Array.isArray(r.reasonCode)
45
+ ? r.reasonCode.map((c) => (0, helpers_js_1.codeDisplay)(c))
46
+ : [],
47
+ };
48
+ }
49
+ async function handleFhirProcedureTool(_name, args) {
50
+ const config = (0, helpers_js_1.getFhirConfig)();
51
+ const patientId = String(args.patientId ?? '');
52
+ if (!patientId)
53
+ return { content: [{ type: 'text', text: 'patientId is required.' }] };
54
+ const params = { patient: patientId };
55
+ (0, helpers_js_1.addDateRange)(params, args);
56
+ const data = await (0, helpers_js_1.fhirRequest)(config, 'Procedure', params);
57
+ const resources = (0, helpers_js_1.extractBundleResources)(data);
58
+ return (0, helpers_js_1.formatFhirResult)(resources, 'procedures', summarize);
59
+ }
60
+ //# sourceMappingURL=procedures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"procedures.js","sourceRoot":"","sources":["../../../src/tools/fhir/procedures.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyDH,0DAcC;AArED,6CAUsB;AAET,QAAA,kBAAkB,GAAG;IAChC;QACE,IAAI,EAAE,2BAA2B;QACjC,WAAW,EACT,2GAA2G;QAC7G,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,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S,IAAI,EAAE,CAAC,CAAC;IAC/C,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC,EAAE,CAAC;IAEvF,MAAM,MAAM,GAA2B,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAC9D,IAAA,yBAAY,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAE3B,MAAM,IAAI,GAAG,MAAM,IAAA,wBAAW,EAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAC5D,MAAM,SAAS,GAAG,IAAA,mCAAsB,EAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,IAAA,6BAAgB,EAAC,SAAS,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * FHIR Observation (vital-signs category) — BP, HR, temp, weight, height, BMI, SpO2.
3
+ */
4
+ export declare const fhirVitalsTools: {
5
+ name: string;
6
+ description: string;
7
+ inputSchema: {
8
+ type: "object";
9
+ properties: {
10
+ patientId: {
11
+ type: string;
12
+ description: string;
13
+ };
14
+ fromDate: {
15
+ type: string;
16
+ description: string;
17
+ };
18
+ toDate: {
19
+ type: string;
20
+ description: string;
21
+ };
22
+ };
23
+ required: string[];
24
+ };
25
+ }[];
26
+ export declare function handleFhirVitalsTool(_name: string, args: Record<string, unknown>): Promise<{
27
+ content: Array<{
28
+ type: string;
29
+ text: string;
30
+ }>;
31
+ }>;
32
+ //# sourceMappingURL=vitals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitals.d.ts","sourceRoot":"","sources":["../../../src/tools/fhir/vitals.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;GAwB3B,CAAC;AAEF,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,MAAM,EACb,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,CAc7D"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ /**
3
+ * FHIR Observation (vital-signs category) — BP, HR, temp, weight, height, BMI, SpO2.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fhirVitalsTools = void 0;
7
+ exports.handleFhirVitalsTool = handleFhirVitalsTool;
8
+ const helpers_js_1 = require("./helpers.js");
9
+ exports.fhirVitalsTools = [
10
+ {
11
+ name: 'tebra_fhir_get_vitals',
12
+ description: 'Get patient vital signs from Tebra FHIR API. Returns BP, HR, temp, weight, height, BMI, SpO2, etc.',
13
+ inputSchema: {
14
+ type: 'object',
15
+ properties: {
16
+ patientId: {
17
+ type: 'string',
18
+ description: 'Tebra FHIR patient ID',
19
+ },
20
+ fromDate: {
21
+ type: 'string',
22
+ description: 'Date range start (YYYY-MM-DD)',
23
+ },
24
+ toDate: {
25
+ type: 'string',
26
+ description: 'Date range end (YYYY-MM-DD)',
27
+ },
28
+ },
29
+ required: ['patientId'],
30
+ },
31
+ },
32
+ ];
33
+ async function handleFhirVitalsTool(_name, args) {
34
+ const config = (0, helpers_js_1.getFhirConfig)();
35
+ const patientId = String(args.patientId ?? '');
36
+ if (!patientId)
37
+ return { content: [{ type: 'text', text: 'patientId is required.' }] };
38
+ const params = {
39
+ patient: patientId,
40
+ category: 'vital-signs',
41
+ };
42
+ (0, helpers_js_1.addDateRange)(params, args);
43
+ const data = await (0, helpers_js_1.fhirRequest)(config, 'Observation', params);
44
+ const resources = (0, helpers_js_1.extractBundleResources)(data);
45
+ return (0, helpers_js_1.formatFhirResult)(resources, 'vital signs', helpers_js_1.summarizeObservation);
46
+ }
47
+ //# sourceMappingURL=vitals.js.map
@@ -0,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aAAa,EAAE,iCAAoB,CAAC,CAAC;AAC1E,CAAC"}
package/package.json CHANGED
@@ -1,61 +1,61 @@
1
- {
2
- "name": "tebra-mcp-server",
3
- "version": "0.2.1",
4
- "mcpName": "com.jamesrosingmd/tebra",
5
- "description": "MCP server for Tebra/Kareo practice management — 45 tools covering patients, appointments, encounters, billing, payments, documents, providers, and FHIR clinical data for AI agents via the Model Context Protocol",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "bin": {
9
- "tebra-mcp-server": "dist/index.js"
10
- },
11
- "files": [
12
- "dist/",
13
- "README.md",
14
- "LICENSE"
15
- ],
16
- "scripts": {
17
- "build": "node node_modules/typescript/bin/tsc",
18
- "prepublishOnly": "npm run build",
19
- "start": "node dist/index.js",
20
- "dev": "tsx src/index.ts"
21
- },
22
- "dependencies": {
23
- "@modelcontextprotocol/sdk": "^1.0.0"
24
- },
25
- "devDependencies": {
26
- "@types/node": "^25.5.0",
27
- "tsx": "^4.7.0",
28
- "typescript": "^5.4.0"
29
- },
30
- "engines": {
31
- "node": ">=18"
32
- },
33
- "keywords": [
34
- "mcp",
35
- "mcp-server",
36
- "tebra",
37
- "kareo",
38
- "practice-management",
39
- "medical-billing",
40
- "healthcare",
41
- "ehr",
42
- "soap-api",
43
- "fhir",
44
- "fhir-r4",
45
- "scheduling",
46
- "appointments",
47
- "payments",
48
- "patient-management",
49
- "claude",
50
- "model-context-protocol"
51
- ],
52
- "repository": {
53
- "type": "git",
54
- "url": "https://github.com/jamesrosing/tebra-mcp-server.git"
55
- },
56
- "author": "James Rosing <james@allure-md.com>",
57
- "license": "MIT",
58
- "publishConfig": {
59
- "access": "public"
60
- }
61
- }
1
+ {
2
+ "name": "tebra-mcp-server",
3
+ "version": "0.2.2",
4
+ "mcpName": "com.jamesrosingmd/tebra",
5
+ "description": "MCP server for Tebra/Kareo practice management — 45 tools covering patients, appointments, encounters, billing, payments, documents, providers, and FHIR clinical data for AI agents via the Model Context Protocol",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "tebra-mcp-server": "dist/index.js"
10
+ },
11
+ "files": [
12
+ "dist/",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "scripts": {
17
+ "build": "node node_modules/typescript/bin/tsc",
18
+ "prepublishOnly": "npm run build",
19
+ "start": "node dist/index.js",
20
+ "dev": "tsx src/index.ts"
21
+ },
22
+ "dependencies": {
23
+ "@modelcontextprotocol/sdk": "^1.0.0"
24
+ },
25
+ "devDependencies": {
26
+ "@types/node": "^25.5.0",
27
+ "tsx": "^4.7.0",
28
+ "typescript": "^5.4.0"
29
+ },
30
+ "engines": {
31
+ "node": ">=18"
32
+ },
33
+ "keywords": [
34
+ "mcp",
35
+ "mcp-server",
36
+ "tebra",
37
+ "kareo",
38
+ "practice-management",
39
+ "medical-billing",
40
+ "healthcare",
41
+ "ehr",
42
+ "soap-api",
43
+ "fhir",
44
+ "fhir-r4",
45
+ "scheduling",
46
+ "appointments",
47
+ "payments",
48
+ "patient-management",
49
+ "claude",
50
+ "model-context-protocol"
51
+ ],
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "https://github.com/jamesrosing/tebra-mcp-server.git"
55
+ },
56
+ "author": "James Rosing <james@allure-md.com>",
57
+ "license": "MIT",
58
+ "publishConfig": {
59
+ "access": "public"
60
+ }
61
+ }