get_patient_procedures
Retrieve detailed records of procedures performed on a patient within a specified date range and status using Google Cloud Healthcare API. Ideal for tracking clinical interventions and patient care history efficiently.
Instructions
Get procedures performed on a patient
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dateFrom | No | YYYY-MM-DD | |
| dateTo | No | YYYY-MM-DD | |
| patientId | Yes | ||
| status | No |
Implementation Reference
- The core handler function that implements the get_patient_procedures tool by searching FHIR Procedure resources filtered by patient ID, status, and date range.async getPatientProcedures(args: any) { const params = new URLSearchParams(); params.append('patient', `${args.patientId}`); if (args.status) params.append('status', args.status); if (args.dateFrom) params.append('date', `ge${args.dateFrom}`); if (args.dateTo) params.append('date', `le${args.dateTo}`); const response = await this.client.get(`/Procedure?${params}`); return this.formatResponse(`fhir://Patient/${args.patientId}/procedures`, response.data); }
- Input schema definition and tool metadata used for validation and listing the tool.{ name: "get_patient_procedures", description: "Get procedures performed on a patient", inputSchema: { type: "object", properties: { patientId: { type: "string" }, status: { type: "string", enum: ["preparation", "in-progress", "completed", "entered-in-error"] }, dateFrom: { type: "string", description: "YYYY-MM-DD" }, dateTo: { type: "string", description: "YYYY-MM-DD" } }, required: ["patientId"] }
- src/server/handlers/ToolHandler.ts:78-79 (registration)Switch case in the central tool dispatcher that routes calls to the get_patient_procedures handler in FhirClient.case "get_patient_procedures": return await this.fhirClient.getPatientProcedures(request.params.arguments);