get_vital_signs
Retrieve a patient's vital signs history within a specified timeframe using FHIR API, enabling efficient clinical data access and analysis in Google Cloud Healthcare.
Instructions
Get patient's vital signs history
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patientId | Yes | ||
| timeframe | No | e.g., 3m, 6m, 1y, all |
Implementation Reference
- The function that implements the core logic for retrieving the patient's vital signs from the FHIR Observation resource using patient ID and optional date range.async getPatientVitalSigns(args: any) { const params = new URLSearchParams(); params.append('patient', `${args.patientId}`); if (args.dateFrom) params.append('date', `ge${args.dateFrom}`); if (args.dateTo) params.append('date', `le${args.dateTo}`); const response = await this.client.get(`/Observation?${params}`); return this.formatResponse(`fhir://Patient/${args.patientId}/vital-signs`, response.data); }
- src/server/handlers/ToolHandler.ts:84-85 (registration)The switch case statement that dispatches calls to the 'get_vital_signs' tool to the appropriate handler method in FhirClient.case "get_vital_signs": return await this.fhirClient.getPatientVitalSigns(request.params.arguments);
- The JSON schema definition for the 'get_vital_signs' tool, including input parameters patientId (required) and timeframe (optional).{ name: "get_vital_signs", description: "Get patient's vital signs history", inputSchema: { type: "object", properties: { patientId: { type: "string" }, timeframe: { type: "string", description: "e.g., 3m, 6m, 1y, all" } }, required: ["patientId"] } },