HMS Integration Guide

Seamlessly connect your Hospital Management System with DoctorAssist AI

API Status: Operational

Overview

This guide explains how HMS providers can integrate their system with DoctorAssist AI. Providers can send patient demographics, vitals, lab reports, and prescriptions in JSON format. The system consolidates all data into a PatientContext, enabling advanced analysis and insights.

Patient Data

Send comprehensive patient information including demographics, medical history, and insurance details.

Clinical Insights

Get AI-powered analysis, screening recommendations, and treatment insights based on patient data.

Easy Integration

Simple REST API endpoints with comprehensive documentation and sample code for quick implementation.

Patient Demographics

POST Endpoint

Send comprehensive patient demographic and insurance information to create or update a patient record.

POST https://doctorassist.ai/hms/users/patient/data_hms_integration_whole
{
  "hospital_id": "your_hospital_id_here",
  "api_key": "your_api_key_here",
  "bearer_token": "your_bearer_token_here",
  "hms_patient_id": "patient_unique_id_from_your_system",
  "demographics": {
    "name": "Patient Full Name",
    "dob": "1985-07-15",
    "sex": "M",
    "phone": "+1234567890",
    "mrn": "MRN-2024-00123",
    "email": "[email protected]",
    "blood_group": "O+",
    "marital_status": "Married",
    "address": "123 Main Street, City, State, ZIP",
    "occupation": "Software Engineer",
    "education": "Bachelor's Degree",
    "allergies": "Penicillin, Shellfish",
    "height": 175,
    "weight": 72,
    "temperature": 98.6,
    "blood_pressure": "120/80",
    "pulse_rate": 78,
    "respiratory_rate": 18,
    "oxygen_saturation": 98,
    "date_of_appointment": "2024-06-15",
    "time_of_appointment": "10:30 AM",
    "chief_complaint": "Annual physical examination",
    "doctors_reg_id": "doctor_registration_id"
  },
  "insurance_profile": {
    "payer_scheme": "InsuranceProviderName",
    "country": "CountryName",
    "primary": {
      "payer_name": "Insurance Company Name",
      "payer_code": "INSCODE123",
      "policy_number": "POL-987654321",
      "member_id": "MBR-1122334455",
      "card_bin": "BIN-INS-001",
      "coverage_plan": "Premium Health Plan",
      "network_tier": "Preferred",
      "valid_from": "2024-01-01",
      "valid_to": "2024-12-31",
      "relationship_to_insured": "Self",
      "sponsor_name": "Employer Name",
      "emirates_id_or_national_id": "NATIONAL-ID-123456789",
      "co_pay_percent": 20,
      "deductible_amount": 50.00,
      "max_annual_limit": 500000.0,
      "exclusions": ["Cosmetic surgery", "Experimental treatments"],
      "documents": {
        "front_card_image_b64": null,
        "back_card_image_b64": null
      },
      "consents": {
        "insurance_data_share": true,
        "claim_submission": true
      }
    },
    "secondary": null
  }
}

Implementation Notes:

  • hms_patient_id should be a unique identifier from your system for each patient.
  • All fields are optional - send null for unavailable data.
  • This endpoint creates the initial PatientContext for analysis.
  • Include insurance information for automated claim processing.

Patient Vitals

POST Endpoint

Submit patient vital signs and visit information for clinical analysis and tracking.

POST https://doctorassist.ai/hms/users/patient/hms_add_vitals_to_patient
{
  "patient_id": "patient_unique_id_from_your_system",
  "hospital_id": "your_hospital_id_here",
  "api_key": "your_api_key_here",
  "bearer_token": "your_bearer_token_here",
  "vitals": {
    "appointment_id": "appointment_id_from_your_system",
    "visit_serial": 2,
    "doctor_id": "doctor_id_from_your_system",
    "visit_date": "2024-06-15T09:00:00Z",
    "temperature": 98.6,
    "respiration": 20,
    "sbp": 130,
    "dbp": 85,
    "weight": 73.0,
    "bmi": 24.0,
    "oxygen_saturation": 95,
    "blood_pressure": "130/85",
    "pulse_rate": 88,
    "chief_complaint": "Follow-up for hypertension management"
  },
  "insurance_at_pos": {
    "visit_type": "OP",
    "authorization": {
      "required": true,
      "preauth_number": "PA-7788",
      "status": "Approved"
    },
    "cost_sharing_snapshot": {
      "co_pay_percent": 10,
      "deductible_remaining": 50
    }
  }
}

Implementation Notes:

  • Send multiple vital records over time to track patient health trends.
  • visit_serial helps maintain chronological order of patient visits.
  • Include insurance information at point of service for coverage validation.
  • All fields are optional - send null for unavailable measurements.

Lab Reports

POST Endpoint

Submit laboratory test results with structured data for clinical analysis.

POST https://doctorassist.ai/hms/users/patient/hms_add_lab_reports_to_patient
{
  "patient_id": "patient_unique_id_from_your_system",
  "hospital_id": "your_hospital_id_here",
  "api_key": "your_api_key_here",
  "bearer_token": "your_bearer_token_here",
  "lab_reports": [
    {
      "appointment_id": "appointment_id_from_your_system",
      "appointment_date": "2024-06-10",
      "reported_by": "Dr. Laboratory Director",
      "lab_name": "Central Diagnostic Laboratory",
      "status": "Completed",
      "structured_data": [
        {
          "test_name": "Hemoglobin",
          "value": 14.2,
          "unit": "g/dL",
          "reference_range": "13.5-17.5",
          "flag": "Normal",
          "critical": false
        },
        {
          "test_name": "Glucose",
          "value": 95,
          "unit": "mg/dL",
          "reference_range": "70-100",
          "flag": "Normal",
          "critical": false
        },
        {
          "test_name": "Creatinine",
          "value": 1.1,
          "unit": "mg/dL",
          "reference_range": "0.6-1.3",
          "flag": "Normal",
          "critical": false
        }
      ],
      "attachments": []
    }
  ]
}

Implementation Notes:

  • Send multiple lab reports for comprehensive patient history.
  • Each structured_data item represents one laboratory test.
  • Attachments can be URLs or base64-encoded files for additional documentation.
  • Flag critical results appropriately for clinical alerts.

Prescriptions

POST Endpoint

Submit medication prescriptions with dosing instructions and insurance coverage information.

POST https://doctorassist.ai/hms/users/patient/hms_add_prescriptions_to_patient
{
  "patient_id": "patient_unique_id_from_your_system",
  "doctor_id": "doctor_id_from_your_system",
  "hospital_id": "your_hospital_id_here",
  "api_key": "your_api_key_here",
  "bearer_token": "your_bearer_token_here",
  "appointment_id": "appointment_id_from_your_system",
  "prescriptions": [
    {
      "name_and_strength": "Lisinopril 10mg",
      "dosing_instructions": "Take one tablet daily in the morning",
      "quantity": "30",
      "refills": "3"
    },
    {
      "name_and_strength": "Atorvastatin 20mg",
      "dosing_instructions": "Take one tablet daily at bedtime",
      "quantity": "30",
      "refills": "3"
    },
    {
      "name_and_strength": "Metformin 500mg",
      "dosing_instructions": "Take one tablet twice daily with meals",
      "quantity": "60",
      "refills": "2"
    }
  ],
  "insurance": {
    "formulary_status": "TIER-1",
    "coverage_status": "Covered",
    "co_pay_percent": 10,
    "prior_auth_required": false
  }
}

Implementation Notes:

  • Send multiple prescriptions in a single request for efficiency.
  • Include insurance formulary status for coverage validation.
  • Prescriptions are appended to patient's medical history for longitudinal tracking.
  • All fields are optional - send null for unavailable information.

Appointments

POST Endpoint

Submit appointment details including patient information, vitals, and lab reports in a single request.

POST https://doctorassist.ai/hms/users/patient/update_patient_appointments
{
  "hospital_id": "your_hospital_id_here",
  "api_key": "your_api_key_here",
  "bearer_token": "your_bearer_token_here",
  "date": "2024-06-15",
  "appointments": [
    {
      "hms_appointment_id": "APT-001234",
      "hms_patient_id": "patient_unique_id_from_your_system",
      "doctor_id": "doctor_id_from_your_system",
      "scheduled_time": "10:30 AM",
      "visit_type": "Follow Up",
      "personal_data": {
        "first_name": "Patient",
        "middle_name": "Middle",
        "last_name": "Name",
        "dob": "1985-07-15",
        "gender": "Male",
        "blood_group": "O+",
        "marital_status": "Married",
        "mobile": "+1234567890",
        "email": "[email protected]",
        "address": "123 Main Street, City, State, ZIP",
        "education": "Bachelor's Degree",
        "occupation": "Software Engineer",
        "annual_income": 75000,
        "medical_conditions": ["Hypertension", "Type 2 Diabetes"],
        "allergies": "Penicillin",
        "surgeries": "Appendectomy (2015)",
        "current_medications": "Lisinopril, Metformin",
        "family_history": "Father: Heart disease; Mother: Diabetes",
        "height": 175,
        "weight": 72,
        "temperature": 98.6,
        "blood_pressure": "130/85",
        "pulse_rate": 78,
        "respiratory_rate": 18,
        "oxygen_saturation": 98,
        "hms_id": "patient_system_id",
        "date_of_appointment": "2024-06-15",
        "time_of_appointment": "10:30 AM",
        "chief_complaint": "Routine follow-up for chronic conditions",
        "doctors_reg_id": "doctor_registration_id",
        "hospital_id": "your_hospital_id_here"
      },
      "vitals": [
        {
          "appointment_id": "appointment_id_from_your_system",
          "visit_serial": 1,
          "doctor_id": "doctor_id_from_your_system",
          "visit_date": "2024-06-15T10:30:00Z",
          "temperature": 98.6,
          "respiration": 18,
          "sbp": 130,
          "dbp": 85,
          "weight": 72.0,
          "bmi": 23.5,
          "oxygen_saturation": 98,
          "blood_pressure": "130/85",
          "pulse_rate": 78,
          "chief_complaint": "Routine follow-up for chronic conditions"
        }
      ],
      "lab_reports": [
        {
          "appointment_id": "appointment_id_from_your_system",
          "appointment_date": "2024-06-10",
          "reported_by": "Dr. Laboratory Director",
          "lab_name": "Central Diagnostic Laboratory",
          "status": "Completed",
          "structured_data": [
            {
              "test_name": "Hemoglobin A1c",
              "value": 6.2,
              "unit": "%",
              "reference_range": "4.0-5.6",
              "flag": "High",
              "critical": false
            }
          ],
          "attachments": []
        }
      ]
    }
  ]
}

Radiology Documents

POST Endpoint

Submit radiology and imaging documents including X-rays, MRIs, CT scans with AI-generated findings and recommendations.

POST https://doctorassist.ai/hms/users/patient/hms_add_documents_to_patient
      {
        "patient_id": "patient_unique_id_from_your_system",
        "hospital_id": "your_hospital_id_here",
        "api_key": "your_api_key_here",
        "bearer_token": "your_bearer_token_here",
        "documents": [
          {
            "xray": {
              "appointment_id": "appointment_id_from_your_system",
              "document_id": "doc_12345",
              "path": "/path/to/xray/image.jpg",
              "date": "2024-06-15",
              "appointment_date": "2024-06-15",
              "radiologist_name": "AI Analysis System",
              "findings": "Lungs appear clear. Heart size normal. No pleural effusion.",
              "abnormalities": "Suspicious opacity in the left lung lower lobe.",
              "recommendations": "Repeat X-ray in 4-6 weeks or consider CT chest.",
              "diagnosis": "",
              "confidence_score": 85.0,
              "notes": "AI-generated analysis from document"
            }
          },
          {
            "mri": {
              "appointment_id": "appointment_id_from_your_system",
              "document_id": "doc_67890",
              "path": "/path/to/mri/image.jpg",
              "date": "2024-06-15",
              "appointment_date": null,
              "radiologist_name": "AI Analysis System",
              "findings": "Lateral abdomen view shows dense left upper quadrant opacity.",
              "abnormalities": "Possible mass/abscess in LUQ.",
              "recommendations": "CT abdomen or ultrasound recommended.",
              "diagnosis": "Unclear-requires further imaging.",
              "confidence_score": 85.0,
              "notes": "AI-generated analysis"
            }
          }
        ]
      }

Implementation Notes:

  • Support for multiple document types: XRAY, MRI, CT_SCAN, ULTRASOUND, PET_SCAN, ECHO, ANGIOGRAPHY, BIOPSY, HISTOPATHOLOGY, CYTOLOGY.
  • Include AI-generated findings, abnormalities, and recommendations.
  • Confidence scores indicate AI analysis reliability.
  • Path can be file path or URL to document location.

Get Patient Data (Complete History)

GET Endpoint

Retrieve comprehensive patient data including visit history, clinical notes, and treatment plans.

GET https://doctorassist.ai/hms/users/patient/get_hms_user_data_whole/{api_key}/{bearer_token}/{patient_id}/{doctor_id}
{
  "status": "success",
  "patient_id": "patient_unique_id_from_your_system",
  "doctor_id": "doctor_id_from_your_system",
  "total_visits": 3,
  "visits": [
    {
      "appointment_id": "appointment_id_from_your_system",
      "date": "2024-06-15",
      "vitals": [
        {
          "id": "vital_record_id",
          "temperature": 98.6,
          "respiration": 18,
          "sbp": 130,
          "dbp": 85,
          "weight": 72,
          "oxygen_saturation": 98,
          "blood_pressure": "130/85",
          "pulse_rate": 78,
          "chief_complaint": "Routine follow-up for hypertension",
          "screening_analysis": {
            "critical_alerts": ["Blood pressure above target range"],
            "recommended_screenings": [
              "Renal function tests",
              "Lipid profile",
              "Electrolyte panel"
            ],
            "early_detection_indicators": [
              "Monitor for signs of fluid retention",
              "Assess for medication side effects"
            ],
            "risk_factors": [
              "Family history of cardiovascular disease",
              "Sedentary lifestyle"
            ]
          },
          "created_at": "2024-06-15T10:30:00.000000"
        }
      ],
      "radiology": [],
      "lab_reports": [
        {
          "test_name": "Basic Metabolic Panel",
          "value": "Within normal limits",
          "date": "2024-06-10"
        }
      ],
      "bio_markers": [],
      "speciality_data": [
        {
          "id": "treatment_record_id",
          "treatment_summary": "Patient presents with controlled hypertension. Continue current medication regimen with lifestyle modifications.",
          "medication_orders": [
            {
              "drug_name": "Lisinopril",
              "dose": "10 mg",
              "route": "oral",
              "frequency": "once daily",
              "composition": "Lisinopril",
              "remarks": "Monitor for cough and angioedema",
              "review_after_days": 30
            }
          ],
          "treatment_plan": "Continue current antihypertensive therapy. Follow up in 1 month.",
          "full_dictation": "Patient is a 39-year-old male with history of hypertension. Blood pressure is controlled on current medication. No new complaints. Continue current management.",
          "progress_note": "Blood pressure well-controlled. No side effects reported. Continue current regimen.",
          "date": "2024-06-15T11:00:00.000Z"
        }
      ],
      "general_structured_notes": [
        {
          "clinical_note": {
            "subjective": "Patient reports good compliance with medications. No specific complaints.",
            "objective": "Blood pressure 130/85, other vitals stable.",
            "assessment": "Hypertension, controlled",
            "plan": "Continue current medications. Follow up in 1 month."
          },
          "diagnosis_summary": [
            {
              "diagnosis": "Essential Hypertension",
              "icd_10_code": "I10",
              "reasoning": "Consistent elevated blood pressure readings"
            }
          ],
          "procedures_and_investigations": [
            {
              "procedure": "Blood Pressure Measurement",
              "cpt_code": "99213",
              "rationale": "Routine monitoring of hypertension"
            }
          ],
          "lab_analysis": [
            {
              "test_name": "Basic Metabolic Panel",
              "loinc_code": "24320-4",
              "interpretation": "Within normal limits",
              "clinical_relevance": "No evidence of renal impairment"
            }
          ],
          "renal_function_overview": {
            "creatinine_trend": "Stable",
            "eGFR_assessment": "Normal",
            "electrolyte_summary": "Within normal range",
            "notes": "No significant findings"
          },
          "insurance_considerations": {
            "covered_services": "Office visit, laboratory tests",
            "non_covered_services": "None",
            "notes": "Standard coverage applies"
          },
          "metadata": {
            "analysis_date": "2024-06-15T12:00:00.000000",
            "department": "Internal Medicine",
            "model": "standard-clinical-v1",
            "note": "Routine hypertension follow-up"
          },
          "date": "2024-06-15T12:00:00.000Z"
        }
      ],
      "investigation_orders": [
        {
          "investigation_orders": {
            "lab_reports": [
              {
                "test_name": "Basic Metabolic Panel",
                "details": "Renal function and electrolyte assessment"
              }
            ],
            "imaging_reports": [],
            "other": [
              {
                "test_name": "Follow-up Appointment",
                "details": "Schedule in 1 month for blood pressure check"
              }
            ]
          },
          "metadata": {
            "analysis_date": "2024-06-15T11:30:00.000000",
            "note": "Standard monitoring for hypertension"
          },
          "appointment_id": "appointment_id_from_your_system",
          "timestamp": "2024-06-15T11:30:00.000000"
        }
      ]
    }
  ]
}

Implementation Notes:

  • This is a GET endpoint - parameters are passed in the URL path.
  • Returns complete patient history including all visits and clinical data.
  • Use for comprehensive patient review and longitudinal analysis.
  • Includes AI-generated clinical insights and recommendations.

Get Patient Data (Latest Visit)

GET Endpoint

Retrieve the most recent patient visit data with clinical analysis and treatment recommendations.

GET https://doctorassist.ai/hms/users/patient/get_hms_user_data_latest/{api_key}/{bearer_token}/{patient_id}/{doctor_id}
{
  "appointment_summary": {
    "appointment_details": {
      "appointment_id": "appointment_id_from_your_system",
      "date": "2024-06-15",
      "patient_id": "patient_unique_id_from_your_system",
      "doctor_id": "doctor_id_from_your_system",
      "department": "Internal Medicine"
    },
    "vital_signs": {
      "temperature": 98.6,
      "blood_pressure": {
        "systolic": 130,
        "diastolic": 85,
        "reading": "130/85"
      },
      "respiration_rate": 18,
      "oxygen_saturation": 98,
      "pulse_rate": 78,
      "weight": 72,
      "height": 175,
      "bmi": 23.5
    },
    "clinical_presentation": {
      "chief_complaints": ["Routine follow-up", "Hypertension management"],
      "subjective_findings": "Patient reports good medication compliance and no specific complaints",
      "objective_findings": "Blood pressure controlled on current regimen, other vitals stable",
      "screening_analysis": {
        "critical_alerts": [
          "Blood pressure above ideal range - consider medication adjustment"
        ],
        "recommended_screenings": [
          "Annual lipid profile for cardiovascular risk assessment",
          "Renal function tests for medication monitoring"
        ],
        "early_detection_indicators": [
          "Monitor for signs of medication side effects",
          "Assess for development of secondary complications"
        ],
        "risk_factors": [
          "Family history of cardiovascular disease",
          "Sedentary lifestyle despite medical advice"
        ]
      }
    },
    "diagnosis": {
      "primary_diagnosis": {
        "condition": "Essential Hypertension",
        "icd_10_code": "I10",
        "reasoning": "Consistent elevated blood pressure readings without identifiable cause"
      },
      "secondary_diagnoses": []
    },
    "treatment_plan": {
      "medications": [
        {
          "drug_name": "Lisinopril",
          "brand_name": "Zestril",
          "dose": "10 mg",
          "route": "oral",
          "frequency": "once daily",
          "purpose": "Blood pressure control",
          "review_after_days": 30,
          "monitoring": "Blood pressure, renal function, potassium levels"
        }
      ],
      "lifestyle_recommendations": {
        "diet": "Low sodium diet with increased fruits and vegetables",
        "fluid_intake": "Adequate hydration",
        "monitoring": "Home blood pressure monitoring twice weekly",
        "activity": "Regular aerobic exercise 30 minutes daily"
      },
      "follow_up": "Schedule follow-up in 1 month for blood pressure assessment"
    },
    "investigations_ordered": {
      "laboratory_tests": [
        {
          "test_name": "Basic Metabolic Panel",
          "purpose": "Monitor renal function and electrolytes"
        },
        {
          "test_name": "Lipid Profile",
          "purpose": "Cardiovascular risk assessment"
        }
      ],
      "imaging_studies": [],
      "other_investigations": [
        {
          "test_name": "Home Blood Pressure Log",
          "purpose": "Monitor treatment effectiveness between visits"
        }
      ]
    },
    "renal_function_assessment": {
      "current_status": "Normal renal function",
      "creatinine_trend": "Stable",
      "egfr_assessment": "Within normal range",
      "electrolyte_summary": "No significant abnormalities",
      "prognosis": "Good with continued management"
    },
    "clinical_notes_summary": {
      "subjective": "Patient is a 39-year-old male with hypertension, currently controlled on medication. No new complaints.",
      "objective": "Blood pressure 130/85, other vitals within normal limits. Physical examination unremarkable.",
      "assessment": "Essential hypertension, controlled on current regimen.",
      "plan": "Continue current medication. Emphasize lifestyle modifications. Follow up in 1 month."
    }
  }
}

Implementation Notes:

  • This is a GET endpoint - parameters are passed in the URL path.
  • Returns only the most recent patient visit data.
  • Ideal for quick patient status checks and current treatment plans.
  • Includes AI-generated clinical insights specific to the latest visit.

Get All Patient Vitals

GET Endpoint

Retrieve all vital sign records for a specific patient including temperature, blood pressure, pulse rate, and more.

GET https://doctorassist.ai/hms/users/vitals_new/get_vitals_hms/{api_key}/{bearer_token}/{patient_id}/{hospital_id}
      {
        "vitals": [
          {
            "recorded_at": "2024-06-15T10:30:00.000000",
            "temperature": {
              "value": 98.6,
              "unit": "°F"
            },
            "blood_pressure": {
              "systolic": 130,
              "diastolic": 85,
              "unit": "mmHg"
            },
            "pulse_rate": {
              "value": 78,
              "unit": "bpm"
            },
            "respiration_rate": {
              "value": 18,
              "unit": "bpm"
            },
            "oxygen_saturation": {
              "value": 98,
              "unit": "%"
            },
            "weight": {
              "value": 72.0,
              "unit": "kg"
            },
            "height": {
              "value": 175.0,
              "unit": "cm"
            },
            "bmi": 23.5,
            "chief_complaint": "Routine check-up",
            "visit_serial": 1,
            "patient_id": "patient_unique_id_from_your_system",
            "doctor_id": "doctor_id_from_your_system",
            "visit_date": "2024-06-15T10:30:00.000000",
            "id": "vital_record_id_1"
          },
          {
            "recorded_at": "2024-05-15T09:45:00.000000",
            "temperature": {
              "value": 98.4,
              "unit": "°F"
            },
            "blood_pressure": {
              "systolic": 125,
              "diastolic": 80,
              "unit": "mmHg"
            },
            "pulse_rate": {
              "value": 72,
              "unit": "bpm"
            },
            "respiration_rate": {
              "value": 16,
              "unit": "bpm"
            },
            "oxygen_saturation": {
              "value": 99,
              "unit": "%"
            },
            "weight": {
              "value": 71.5,
              "unit": "kg"
            },
            "height": {
              "value": 175.0,
              "unit": "cm"
            },
            "bmi": 23.3,
            "chief_complaint": "Follow-up visit",
            "visit_serial": 2,
            "patient_id": "patient_unique_id_from_your_system",
            "doctor_id": "doctor_id_from_your_system",
            "visit_date": "2024-05-15T09:45:00.000000",
            "id": "vital_record_id_2"
          }
        ]
      }

Implementation Notes:

  • Returns all vital sign records for the specified patient and hospital.
  • Data includes comprehensive measurements with units and timestamps.
  • Use for tracking vital sign trends over time.
  • Visit serial numbers help maintain chronological order.

Get All Patient Lab Reports

GET Endpoint

Retrieve all laboratory test reports for a patient including detailed test results, interpretations, and clinical insights.

GET https://doctorassist.ai/hms/users/vitals_new/get_lab_reports_hms/{api_key}/{bearer_token}/{patient_id}/{hospital_id}
      {
        "lab_reports": [
          {
            "report_id": "LAB_REPORT_001",
            "test_date": "2024-06-15T10:30:00.000000",
            "test_type": "Complete Blood Count",
            "ordered_by": "Dr. Physician Name",
            "lab_name": "Central Laboratory",
            "status": "Completed",
            "results": [
              {
                "test_name": "Hemoglobin (Hb)",
                "value": "14.5",
                "unit": "g/dL",
                "reference_range": "12.0 - 15.5",
                "flag": "normal",
                "critical": false
              },
              {
                "test_name": "WBC Count",
                "value": "8.0",
                "unit": "×10^9/L",
                "reference_range": "4.5 - 11.0",
                "flag": "normal",
                "critical": false
              },
              {
                "test_name": "Platelet Count",
                "value": "250",
                "unit": "×10^9/L",
                "reference_range": "150 - 400",
                "flag": "normal",
                "critical": false
              },
              {
                "test_name": "Blood Glucose",
                "value": "95",
                "unit": "mg/dL",
                "reference_range": "70 - 100",
                "flag": "normal",
                "critical": false
              }
            ],
            "attachments": [],
            "interpretation": "All parameters within normal reference ranges. No significant abnormalities detected."
          },
          {
            "report_id": "LAB_REPORT_002",
            "test_date": "2024-05-15T09:45:00.000000",
            "test_type": "Lipid Profile",
            "ordered_by": "Dr. Physician Name",
            "lab_name": "Central Laboratory",
            "status": "Completed",
            "results": [
              {
                "test_name": "Total Cholesterol",
                "value": "198",
                "unit": "mg/dL",
                "reference_range": "< 200",
                "flag": "normal",
                "critical": false
              },
              {
                "test_name": "LDL Cholesterol",
                "value": "110",
                "unit": "mg/dL",
                "reference_range": "< 100 (optimal)",
                "flag": "borderline",
                "critical": false
              },
              {
                "test_name": "HDL Cholesterol",
                "value": "55",
                "unit": "mg/dL",
                "reference_range": "> 40",
                "flag": "normal",
                "critical": false
              },
              {
                "test_name": "Triglycerides",
                "value": "120",
                "unit": "mg/dL",
                "reference_range": "< 150",
                "flag": "normal",
                "critical": false
              }
            ],
            "attachments": [],
            "interpretation": "Lipid profile shows borderline LDL cholesterol. Consider lifestyle modifications and monitoring."
          }
        ]
      }

Implementation Notes:

  • Returns all laboratory reports for the specified patient and hospital.
  • Each report includes detailed test results with reference ranges and flags.
  • Interpretation field provides clinical context for test results.
  • Use for comprehensive laboratory history review.

Get All Patient Documents

GET Endpoint

Retrieve all patient documents including radiology reports, imaging studies, and clinical notes.

GET https://doctorassist.ai/hms/users/vitals_new/get_documents_hms/{api_key}/{bearer_token}/{patient_id}/{hospital_id}
      {
        "radiology": [
          {
            "study_id": "STUDY_XRAY_001",
            "study_date": "2024-06-15",
            "modality": "XRAY",
            "body_part": "Chest",
            "ordering_physician": "Dr. Physician Name",
            "radiologist": "AI Analysis System",
            "status": "Completed",
            "findings": "The image shows a chest X-ray. The lungs appear relatively clear bilaterally, with no obvious signs of consolidation, pleural effusion, or pneumothorax. The heart size is within normal limits. The mediastinum is unremarkable. The bony structures of the rib cage and clavicles are intact.",
            "impression": "Normal chest X-ray",
            "abnormalities": "There is a suspicious opacity in the left lung field, specifically in the lower lobe. The size and shape of the opacity are not clearly defined, but it appears to be a focal area of increased density. Further evaluation is needed to determine the etiology.",
            "recommendations": "A follow-up chest X-ray is recommended in 4-6 weeks to assess the stability of the opacity. If the opacity persists or enlarges, a CT scan of the chest should be considered to further characterize the lesion and rule out malignancy.",
            "images": []
          },
          {
            "study_id": "STUDY_CT_001",
            "study_date": "2024-05-20",
            "modality": "CT_SCAN",
            "body_part": "Abdomen",
            "ordering_physician": "Dr. Physician Name",
            "radiologist": "AI Analysis System",
            "status": "Completed",
            "findings": "CT abdomen with contrast shows normal liver, spleen, pancreas, and kidneys. No evidence of masses, stones, or fluid collections.",
            "impression": "Normal CT abdomen",
            "abnormalities": "None significant",
            "recommendations": "No further imaging required at this time.",
            "images": []
          }
        ]
      }

Implementation Notes:

  • Returns all patient documents including imaging studies and reports.
  • Includes AI-generated findings, abnormalities, and recommendations.
  • Supports multiple modalities: XRAY, MRI, CT_SCAN, ULTRASOUND, etc.
  • Use for comprehensive imaging history review.

Get Patient Documents by Type

GET Endpoint

Retrieve patient documents filtered by specific document type (XRAY, MRI, CT_SCAN, etc.).

GET https://doctorassist.ai/hms/users/vitals_new/get_documents_hms_by_type/{api_key}/{bearer_token}/{patient_id}/{hospital_id}/{document_type}
      {
        "status": "success",
        "type": "XRAY",
        "documents": [
          {
            "study_id": "STUDY_XRAY_001",
            "study_date": "2024-06-15",
            "modality": "XRAY",
            "body_part": "Chest",
            "ordering_physician": "Dr. Physician Name",
            "radiologist": "AI Analysis System",
            "status": "Completed",
            "findings": "The image shows a chest X-ray. The lungs appear relatively clear bilaterally, with no obvious signs of consolidation, pleural effusion, or pneumothorax. The heart size is within normal limits. The mediastinum is unremarkable. The bony structures of the rib cage and clavicles are intact.",
            "impression": "",
            "abnormalities": "There is a suspicious opacity in the left lung field, specifically in the lower lobe. The size and shape of the opacity are not clearly defined, but it appears to be a focal area of increased density. Further evaluation is needed to determine the etiology.",
            "recommendations": "A follow-up chest X-ray is recommended in 4-6 weeks to assess the stability of the opacity. If the opacity persists or enlarges, a CT scan of the chest should be considered to further characterize the lesion and rule out malignancy.",
            "images": []
          },
          {
            "study_id": "STUDY_XRAY_002",
            "study_date": "2024-05-10",
            "modality": "XRAY",
            "body_part": "Knee",
            "ordering_physician": "Dr. Physician Name",
            "radiologist": "AI Analysis System",
            "status": "Completed",
            "findings": "Normal knee X-ray showing intact bones, normal joint spaces, and no evidence of fracture or degenerative changes.",
            "impression": "Normal knee study",
            "abnormalities": "None",
            "recommendations": "No follow-up imaging required.",
            "images": []
          }
        ]
      }

Implementation Notes:

  • Filter documents by specific type: "xray", "mri", "ct_scan", "ultrasound", "pet_scan", "echo", "angiography", "biopsy", "histopathology", "cytology".
  • Returns only documents matching the specified document type.
  • Use for focused retrieval of specific document categories.
  • Document type must be passed exactly as specified (case-sensitive).

Get Patient Documents by Type and Date

GET Endpoint

Retrieve patient documents filtered by both document type and specific study date.

GET https://doctorassist.ai/hms/users/vitals_new/get_documents_hms_by_type_date/{api_key}/{bearer_token}/{patient_id}/{hospital_id}/{document_type}/{study_date}
      {
        "status": "success",
        "type": "XRAY",
        "date": "2024-06-15",
        "count": 1,
        "documents": [
          {
            "study_id": "STUDY_XRAY_001",
            "study_date": "2024-06-15",
            "modality": "XRAY",
            "body_part": "Chest",
            "ordering_physician": "Dr. Physician Name",
            "radiologist": "AI Analysis System",
            "status": "Completed",
            "findings": "The image shows a chest X-ray. The lungs appear relatively clear bilaterally, with no obvious signs of consolidation, pleural effusion, or pneumothorax. The heart size is within normal limits. The mediastinum is unremarkable. The bony structures of the rib cage and clavicles are intact.",
            "impression": "",
            "abnormalities": "There is a suspicious opacity in the left lung field, specifically in the lower lobe. The size and shape of the opacity are not clearly defined, but it appears to be a focal area of increased density. Further evaluation is needed to determine the etiology.",
            "recommendations": "A follow-up chest X-ray is recommended in 4-6 weeks to assess the stability of the opacity. If the opacity persists or enlarges, a CT scan of the chest should be considered to further characterize the lesion and rule out malignancy.",
            "images": []
          }
        ]
      }

Implementation Notes:

  • Filter documents by both type and specific date.
  • Date format: YYYY-MM-DD (e.g., "2024-06-15").
  • Returns only documents matching both document type AND study date.
  • Use for precise retrieval of documents from specific dates.
  • Document types: "xray", "mri", "ct_scan", "ultrasound", "pet_scan", "echo", "angiography", "biopsy", "histopathology", "cytology".

Get Patient Medication Orders

GET Endpoint

Retrieve all medication orders for a patient under a specific doctor.

GET https://doctorassist.ai/hms/users/patient/get_all_medication_orders_hms/{api_key}/{bearer_token}/{patient_id}/{doctor_id}
      {
        "patient_id": "patient_unique_id_from_your_system",
        "doctor_id": "doctor_id_from_your_system",
        "medication_orders": [
          {
            "order_index": 0,
            "date": "2024-06-15T10:30:00.000000",
            "medications": [
              {
                "drug_name": "Lisinopril",
                "dose": "10 mg",
                "route": "oral",
                "frequency": "once daily"
              },
              {
                "drug_name": "Metformin",
                "dose": "500 mg",
                "route": "oral",
                "frequency": "twice daily with meals"
              },
              {
                "drug_name": "Atorvastatin",
                "dose": "20 mg",
                "route": "oral",
                "frequency": "once daily at bedtime"
              }
            ]
          },
          {
            "order_index": 1,
            "date": "2024-05-15T09:45:00.000000",
            "medications": [
              {
                "drug_name": "Aspirin",
                "dose": "81 mg",
                "route": "oral",
                "frequency": "once daily"
              },
              {
                "drug_name": "Vitamin D",
                "dose": "1000 IU",
                "route": "oral",
                "frequency": "once daily"
              }
            ]
          }
        ]
      }

Implementation Notes:

  • Returns all medication orders for the specified patient and doctor.
  • Each order includes multiple medications with dosing instructions.
  • Order index indicates chronological sequence of prescriptions.
  • Use for comprehensive medication history review.

Get Patient Medication Orders by Date

GET Endpoint

Retrieve medication orders for a patient on a specific date.

GET https://doctorassist.ai/hms/users/patient/get_medication_orders_by_date_hms/{api_key}/{bearer_token}/{patient_id}/{doctor_id}/{date}
      {
        "status": "success",
        "patient_id": "patient_unique_id_from_your_system",
        "doctor_id": "doctor_id_from_your_system",
        "requested_date": "2024-06-15",
        "count": 1,
        "medication_orders": [
          {
            "order_index": 0,
            "date": "2024-06-15T10:30:00.000000",
            "medications": [
              {
                "drug_name": "Lisinopril",
                "dose": "10 mg",
                "route": "oral",
                "frequency": "once daily",
                "brand_name": "Zestril",
                "composition": "Lisinopril"
              },
              {
                "drug_name": "Metformin",
                "dose": "500 mg",
                "route": "oral",
                "frequency": "twice daily with meals",
                "brand_name": "Glucophage",
                "composition": "Metformin hydrochloride"
              },
              {
                "drug_name": "Atorvastatin",
                "dose": "20 mg",
                "route": "oral",
                "frequency": "once daily at bedtime",
                "brand_name": "Lipitor",
                "composition": "Atorvastatin calcium"
              }
            ]
          }
        ]
      }

Implementation Notes:

  • Filter medication orders by specific date (YYYY-MM-DD format).
  • Returns only medication orders prescribed on the specified date.
  • Includes brand names and composition details when available.
  • Use for precise medication history on specific dates.

Get Patient Investigation Notes

GET Endpoint

Retrieve all investigation notes and orders for a patient including lab tests, imaging studies, and other investigations.

GET https://doctorassist.ai/hms/users/patient/get_investigation_note_hms/{api_key}/{bearer_token}/{patient_id}/{doctor_id}
      {
        "id": "investigation_notes_id_1",
        "doctor_id": "doctor_id_from_your_system",
        "patient_id": "patient_unique_id_from_your_system",
        "investigation_orders_history": [
          {
            "investigation_orders": {
              "lab_reports": [
                {
                  "test_name": "Complete Blood Count",
                  "details": "Assess hemoglobin, white blood cells, platelets"
                },
                {
                  "test_name": "Basic Metabolic Panel",
                  "details": "Assess renal function and electrolytes"
                },
                {
                  "test_name": "Lipid Profile",
                  "details": "Cardiovascular risk assessment"
                }
              ],
              "imaging_reports": [
                {
                  "test_name": "Chest X-ray",
                  "details": "Evaluate lungs and heart"
                }
              ],
              "other": [
                {
                  "test_name": "ECG",
                  "details": "Cardiac rhythm assessment"
                }
              ]
            },
            "metadata": {
              "analysis_date": "2024-06-15T10:30:00.000000",
              "note": "Comprehensive health screening ordered"
            }
          },
          {
            "investigation_orders": {
              "lab_reports": [
                {
                  "test_name": "Hemoglobin A1c",
                  "details": "Diabetes monitoring"
                },
                {
                  "test_name": "Liver Function Tests",
                  "details": "Assess liver health"
                }
              ],
              "imaging_reports": [],
              "other": []
            },
            "metadata": {
              "analysis_date": "2024-05-15T09:45:00.000000",
              "note": "Follow-up monitoring"
            }
          }
        ],
        "created_at": "2024-06-15T10:30:00.000000",
        "updated_at": "2024-06-15T10:30:00.000000"
      }

Implementation Notes:

  • Returns all investigation notes for the specified patient and doctor.
  • Includes comprehensive history of ordered tests and studies.
  • Categories: lab_reports, imaging_reports, other investigations.
  • Use for tracking investigation history and follow-up requirements.

Get Patient Investigation Notes by Date

GET Endpoint

Retrieve investigation notes and orders for a patient on a specific date.

GET https://doctorassist.ai/hms/users/patient/get_investigation_note_hms_by_date/{api_key}/{bearer_token}/{patient_id}/{doctor_id}/{date}
      {
        "status": "success",
        "patient_id": "patient_unique_id_from_your_system",
        "doctor_id": "doctor_id_from_your_system",
        "requested_date": "2024-06-15",
        "count": 1,
        "investigation_orders": [
          {
            "investigation_orders": {
              "lab_reports": [
                {
                  "test_name": "Complete Blood Count",
                  "details": "Assess hemoglobin, white blood cells, platelets"
                },
                {
                  "test_name": "Basic Metabolic Panel",
                  "details": "Assess renal function and electrolytes"
                },
                {
                  "test_name": "Lipid Profile",
                  "details": "Cardiovascular risk assessment"
                }
              ],
              "imaging_reports": [
                {
                  "test_name": "Chest X-ray",
                  "details": "Evaluate lungs and heart"
                }
              ],
              "other": [
                {
                  "test_name": "ECG",
                  "details": "Cardiac rhythm assessment"
                }
              ]
            },
            "metadata": {
              "analysis_date": "2024-06-15T10:30:00.000000",
              "note": "Comprehensive health screening ordered"
            },
            "appointment_id": "appointment_id_from_your_system"
          }
        ]
      }

Implementation Notes:

  • Filter investigation notes by specific date (YYYY-MM-DD format).
  • Returns only investigation orders from the specified date.
  • Includes appointment context for investigation orders.
  • Use for precise investigation history on specific dates.

Get All Patient Notes

GET Endpoint

Retrieve all clinical notes for a patient under a specific doctor, including SOAP notes, diagnoses, and treatment plans.

GET https://doctorassist.ai/hms/users/patient/get_notes_hms/{api_key}/{bearer_token}/{patient_id}/{doctor_id}
      {
        "status": "success",
        "doctor_id": "doctor_id_from_your_system",
        "patient_id": "patient_unique_id_from_your_system",
        "total_entries": 2,
        "records": [
          {
            "date": "2024-06-15T10:30:00.000000",
            "structured_note": {
              "chief_complaints": ["Routine follow-up for hypertension"],
              "present_illness": ["Hypertension well-controlled on current medications"],
              "past_history": ["Diagnosed with hypertension 5 years ago"],
              "examination": ["Blood pressure 130/85, other vitals stable"],
              "diagnosis": ["Essential hypertension, controlled"],
              "doctor_advice": ["Continue current medications, lifestyle modifications"],
              "clinical_note": {
                "subjective": "Patient reports good medication compliance and no symptoms",
                "objective": "Blood pressure 130/85, physical examination unremarkable",
                "assessment": "Hypertension well-controlled on current regimen",
                "plan": "Continue current medications, follow up in 1 month"
              },
              "diagnosis_summary": [
                {
                  "diagnosis": "Essential Hypertension",
                  "icd_10_code": "I10",
                  "reasoning": "Consistent elevated blood pressure readings"
                }
              ],
              "procedures_and_investigations": [
                {
                  "procedure": "Blood Pressure Measurement",
                  "cpt_code": "99213",
                  "rationale": "Routine monitoring of hypertension"
                }
              ],
              "insurance_considerations": {
                "covered_services": "Office visit and routine monitoring",
                "non_covered_services": "None"
              },
              "metadata": {
                "analysis_date": "2024-06-15T10:30:00.000000",
                "note": "SOAP-format clinical note with ICD-10, CPT codes, and insurance mapping"
              }
            }
          },
          {
            "date": "2024-05-15T09:45:00.000000",
            "structured_note": {
              "chief_complaints": ["Annual physical examination"],
              "present_illness": ["No active complaints"],
              "past_history": ["Hypertension, no other significant history"],
              "examination": ["Comprehensive physical examination normal"],
              "diagnosis": ["Routine health maintenance"],
              "doctor_advice": ["Continue healthy lifestyle, annual follow-up"],
              "clinical_note": {
                "subjective": "Patient feels well, no specific complaints",
                "objective": "Comprehensive examination within normal limits",
                "assessment": "Healthy individual with controlled hypertension",
                "plan": "Annual follow-up, continue current management"
              },
              "diagnosis_summary": [
                {
                  "diagnosis": "Routine Health Examination",
                  "icd_10_code": "Z00.00",
                  "reasoning": "Annual preventive health check"
                }
              ],
              "procedures_and_investigations": [
                {
                  "procedure": "Comprehensive Preventive Medicine Examination",
                  "cpt_code": "99385",
                  "rationale": "Annual preventive health assessment"
                }
              ],
              "insurance_considerations": {
                "covered_services": "Preventive health services covered",
                "non_covered_services": "None"
              },
              "metadata": {
                "analysis_date": "2024-05-15T09:45:00.000000",
                "note": "SOAP-format clinical note for preventive care"
              }
            }
          }
        ]
      }

Implementation Notes:

  • Returns all clinical notes for the specified patient and doctor.
  • Includes comprehensive SOAP-format notes with ICD-10 and CPT codes.
  • Structured data includes diagnoses, procedures, and insurance considerations.
  • Use for complete clinical documentation review.

Get Patient Notes by Date

GET Endpoint

Retrieve clinical notes for a patient on a specific date.

GET https://doctorassist.ai/hms/users/patient/get_notes_hms_by_date/{api_key}/{bearer_token}/{patient_id}/{doctor_id}/{date}
      {
        "status": "success",
        "doctor_id": "doctor_id_from_your_system",
        "patient_id": "patient_unique_id_from_your_system",
        "requested_date": "2024-06-15",
        "count": 1,
        "records": [
          {
            "date": "2024-06-15T10:30:00.000000",
            "structured_note": {
              "chief_complaints": ["Routine follow-up for hypertension"],
              "present_illness": ["Hypertension well-controlled on current medications"],
              "past_history": ["Diagnosed with hypertension 5 years ago"],
              "examination": ["Blood pressure 130/85, other vitals stable"],
              "diagnosis": ["Essential hypertension, controlled"],
              "doctor_advice": ["Continue current medications, lifestyle modifications"],
              "clinical_note": {
                "subjective": "Patient reports good medication compliance and no symptoms",
                "objective": "Blood pressure 130/85, physical examination unremarkable",
                "assessment": "Hypertension well-controlled on current regimen",
                "plan": "Continue current medications, follow up in 1 month"
              },
              "diagnosis_summary": [
                {
                  "diagnosis": "Essential Hypertension",
                  "icd_10_code": "I10",
                  "reasoning": "Consistent elevated blood pressure readings"
                }
              ],
              "procedures_and_investigations": [
                {
                  "procedure": "Blood Pressure Measurement",
                  "cpt_code": "99213",
                  "rationale": "Routine monitoring of hypertension"
                }
              ],
              "insurance_considerations": {
                "covered_services": "Office visit and routine monitoring",
                "non_covered_services": "None"
              },
              "metadata": {
                "analysis_date": "2024-06-15T10:30:00.000000",
                "note": "SOAP-format clinical note with ICD-10, CPT codes, and insurance mapping"
              }
            }
          }
        ]
      }

Implementation Notes:

  • Filter clinical notes by specific date (YYYY-MM-DD format).
  • Returns only notes from the specified date.
  • Includes complete structured clinical documentation.
  • Use for precise clinical note retrieval on specific dates.

Get Patient Data in FHIR Format

GET Endpoint

Retrieve patient data in standardized FHIR (Fast Healthcare Interoperability Resources) format for interoperability with other healthcare systems.

GET https://doctorassist.ai/hms/users/patient/get_fhir_bundles_hms/{api_key}/{bearer_token}/{patient_id}/{doctor_id}
{
  "resourceType": "Bundle",
  "type": "collection",
  "id": "patient-{patient_id}-grouped-bundles",
  "entry": [
    {
      "resource": {
        "resourceType": "Bundle",
        "type": "collection",
        "id": "vitals-bundle",
        "entry": [
          {
            "resource": {
              "resourceType": "Observation",
              "id": "vital-1",
              "status": "final",
              "category": [
                {
                  "coding": [
                    {
                      "system": "http://terminology.hl7.org/CodeSystem/observation-category",
                      "code": "vital-signs",
                      "display": "Vital Signs"
                    }
                  ]
                }
              ],
              "code": {
                "coding": [
                  {
                    "system": "http://loinc.org",
                    "code": "85353-1",
                    "display": "Vital Signs Panel"
                  }
                ]
              },
              "subject": {
                "reference": "Patient/{patient_id}"
              },
              "effectiveDateTime": "2025-08-14T11:33:18.624303",
              "component": [
                {
                  "code": [
                    {
                      "system": "http://loinc.org",
                      "code": "8310-5",
                      "display": "Body temperature"
                    }
                  ],
                  "valueQuantity": {
                    "value": 100.0,
                    "unit": "°F"
                  }
                }
                // ... other vital sign components (heart rate, blood pressure, etc.)
              ]
            }
          }
          // ... additional vital sign observations
        ]
      }
    },
    {
      "resource": {
        "resourceType": "Bundle",
        "type": "collection",
        "id": "labs-bundle",
        "entry": [
          {
            "resource": {
              "resourceType": "Observation",
              "id": "lab-ob-1",
              "status": "final",
              "code": {
                "text": "BNP (B-type Natriuretic Peptide)"
              },
              "valueQuantity": {
                "value": "85",
                "unit": "pg/mL"
              },
              "interpretation": [
                {
                  "text": "high"
                }
              ]
            }
          }
          // ... additional lab observations
        ]
      }
    },
    {
      "resource": {
        "resourceType": "Bundle",
        "type": "collection",
        "id": "radiology-bundle",
        "entry": [
          {
            "resource": {
              "resourceType": "ImagingStudy",
              "id": "img-1",
              "status": "available",
              "subject": {
                "reference": "Patient/{patient_id}"
              },
              "started": "2025-12-01",
              "description": "Imaging Study",
              "modality": [
                {
                  "system": "http://dicom.nema.org/resources/ontology/DCM",
                  "code": "XRAY"
                }
              ],
              "note": [
                {
                  "text": "The image shows a chest X-ray. The lungs appear relatively clear bilaterally..."
                }
              ]
            }
          }
          // ... additional imaging studies
        ]
      }
    },
    {
      "resource": {
        "resourceType": "Bundle",
        "type": "collection",
        "id": "meds-bundle",
        "entry": [
          {
            "resource": {
              "resourceType": "MedicationRequest",
              "id": "med-0",
              "status": "active",
              "intent": "order",
              "subject": {
                "reference": "Patient/{patient_id}"
              },
              "authoredOn": "2025-11-07T10:56:07.038Z",
              "medicationCodeableConcept": {
                "text": "See dosageInstruction/note"
              },
              "dosageInstruction": [
                {
                  "text": [
                    {
                      "drug_name": "Amoxicillin-Clavulanate",
                      "dose": "625 mg",
                      "route": "oral",
                      "frequency": "1-0-0"
                    }
                  ]
                }
              ],
              "note": [
                {
                  "text": [
                    {
                      "drug_name": "Amoxicillin-Clavulanate",
                      "dose": "625 mg",
                      "route": "oral",
                      "frequency": "1-0-0"
                    }
                  ]
                }
              ]
            }
          }
          // ... additional medication requests
        ]
      }
    },
    {
      "resource": {
        "resourceType": "Bundle",
        "type": "collection",
        "id": "notes-bundle",
        "entry": [
          {
            "resource": {
              "resourceType": "DocumentReference",
              "id": "note-0",
              "status": "current",
              "subject": {
                "reference": "Patient/{patient_id}"
              },
              "date": "2025-11-07T10:56:08.213Z",
              "type": {
                "coding": [
                  {
                    "system": "http://loinc.org",
                    "code": "34109-9",
                    "display": "Outpatient Note"
                  }
                ]
              },
              "content": [
                {
                  "attachment": {
                    "contentType": "application/json",
                    "data": "eyJzdHJ1Y3R1cmVkX25vdGUiOiB7ImNoaWVmX2NvbXBsYWludHMiOiBbIlBlcnNpc3RlbnQgZmV2ZXIsIGdlbmVyYWxpemVkIHdlYWtuZXNzLCBtaWxkIHNob3J0bmVzcyBvZiBicmVhdGgiXS... [Base64 encoded clinical note]"
                  }
                }
              ]
            }
          }
          // ... additional clinical notes
        ]
      }
    },
    {
      "resource": {
        "resourceType": "Bundle",
        "type": "collection",
        "id": "investigations-bundle",
        "entry": [
          {
            "resource": {
              "resourceType": "ServiceRequest",
              "id": "inv-0",
              "status": "active",
              "intent": "order",
              "subject": {
                "reference": "Patient/{patient_id}"
              },
              "authoredOn": "2025-11-07T10:56:08.304007",
              "code": {
                "text": "Investigation orders bundle"
              },
              "note": [
                {
                  "text": "Lab: Complete Blood Count (CBC); Basic Metabolic Panel (BMP); Liver Function Tests (LFTs) | Imaging: Chest X-ray"
                }
              ]
            }
          }
          // ... additional investigation orders
        ]
      }
    }
  ]
}
      

Implementation Notes:

  • After passing the data to the GET endpoint, you will receive all the relevant data in the FHIR format.
  • The returned data will include all patient-related data in the FHIR format for the specified patient under the given doctor.
  • Ensure that the parameters {api_key}, {bearer_token}, {patient_id}, and {doctor_id} are correctly passed in the URL for successful retrieval of the data in FHIR format.