Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

get_patient_conditions

Retrieve a patient's medical conditions or diagnoses using their ID, with options to filter by onset date and status, leveraging the MCP Server for Google Cloud Healthcare API.

Instructions

Get medical conditions/diagnoses for a patient

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
onsetDateNoYYYY-MM-DD
patientIdYes
statusNo

Implementation Reference

  • Defines the tool schema, description, and input validation schema for 'get_patient_conditions'.
    {
      name: "get_patient_conditions",
      description: "Get medical conditions/diagnoses for a patient",
      inputSchema: {
        type: "object",
        properties: {
          patientId: { type: "string" },
          status: { 
            type: "string",
            enum: ["active", "inactive", "resolved"]
          },
          onsetDate: { type: "string", description: "YYYY-MM-DD" }
        },
        required: ["patientId"]
      }
    },
  • The listTools handler that returns all TOOL_DEFINITIONS including get_patient_conditions schema.
    private handleList = async () => ({
      tools: TOOL_DEFINITIONS
    });
  • Switch case in callTool handler that routes get_patient_conditions calls to FhirClient.
    case "get_patient_conditions":
      return await this.fhirClient.getPatientConditions(request.params.arguments);
  • Core implementation of get_patient_conditions: constructs FHIR search params and queries /Condition endpoint for the patient's conditions.
    async getPatientConditions(args: any) {
      const params = new URLSearchParams();
      params.append('patient', `${args.patientId}`);
      if (args.status) params.append('clinical-status', args.status);
      if (args.onsetDate) params.append('onset-date', args.onsetDate);
    
      const response = await this.client.get(`/Condition?${params}`);
      return this.formatResponse(`fhir://Patient/${args.patientId}/conditions`, response.data);
    }
  • Registers the ToolHandler (which handles tool list and calls) to the MCP server.
    private setupHandlers() {
      this.toolHandler.register(this.mcpServer);

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kartha-AI/google-cloud-healthcare-api-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server