get_patient_careplans
Retrieve patient care plans by specifying patient ID, status, date range, and category using the MCP Server for Google Cloud Healthcare API. Supports clinical workflows with FHIR-based data.
Instructions
Get care plans for a patient
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | ||
| dateFrom | No | YYYY-MM-DD | |
| dateTo | No | YYYY-MM-DD | |
| patientId | Yes | ||
| status | No |
Implementation Reference
- Core implementation of get_patient_careplans tool. Queries FHIR CarePlan resource filtered by patient ID, status, category, and date range. Formats response using formatResponse helper.async getPatientCarePlans(args: any) { const params = new URLSearchParams(); params.append('patient', `${args.patientId}`); if (args.status) params.append('status', args.status); if (args.category) params.append('category', args.category); if (args.dateFrom) params.append('date', `ge${args.dateFrom}`); if (args.dateTo) params.append('date', `le${args.dateTo}`); const response = await this.client.get(`/CarePlan?${params}`); return this.formatResponse(`fhir://Patient/${args.patientId}/careplans`, response.data); }
- Tool definition including name, description, and input schema validation for get_patient_careplans.name: "get_patient_careplans", description: "Get care plans for a patient", inputSchema: { type: "object", properties: { patientId: { type: "string" }, status: { type: "string", enum: ["draft", "active", "suspended", "completed", "cancelled"] }, category: { type: "string" }, dateFrom: { type: "string", description: "YYYY-MM-DD" }, dateTo: { type: "string", description: "YYYY-MM-DD" } }, required: ["patientId"] } },
- src/server/handlers/ToolHandler.ts:82-83 (registration)ToolHandler switch case that registers and dispatches the get_patient_careplans tool call to the FhirClient implementation.case "get_patient_careplans": return await this.fhirClient.getPatientCarePlans(request.params.arguments);