Skip to content

medikode-ai/langchain-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

langchain-tests

Try different features which accommodates our needs at Medikode.ai

I ran all of them using .venv with python v3.12.1.

Run the following after updating your .env with API key and model you want to use inside the source code.

$ python chatgpt.py FILE-PATH

.env

OPENAI_API_KEY=sk-proj-iTcTcS.....

ChatGPT 3.5

{
   "patient": {
       "name": "Mary Hill",
       "date_of_birth": "1975-05-15",
       "age": 48
   },
   "diagnosis": {
       "hypertension": {
           "icd_9": "401.9",
           "icd_10": "I10",
           "pct": "I10"
       },
       "high_cholesterol": {
           "icd_9": "272.0",
           "icd_10": "E78.5",
           "pct": "E78.5"
       }
   },
   "treatment_plan": {
       "medication": {
           "name": "Lisinopril",
           "dosage": "10mg",
           "frequency": "once daily"
       },
       "lifestyle_modifications": {
           "hypertension": "Maintain a low-sodium diet"
       },
       "dietary_changes": "For high cholesterol",
       "follow_up_monitoring": true,
       "blood_pressure_monitoring": "Regular monitoring at home",
       "medication_adherence": "Emphasized importance of adherence"
   }
}

ChatGPT 4

sample-1

{
 "patient": {
   "name": "Mary Hill",
   "date_of_birth": "May 15, 1975",
   "age": 48
 },
 "diagnosis": {
   "conditions": [
     {
       "name": "hypertension",
       "ICD-9": "401.9",
       "ICD-10": "I10"
     },
     {
       "name": "high cholesterol",
       "ICD-9": "272.4",
       "ICD-10": "E78.0"
     }
   ]
 },
 "treatment_plan": {
   "medications": [
     {
       "name": "Lisinopril",
       "dosage": "10mg",
       "frequency": "once daily",
       "purpose": "hypertension"
     }
   ],
   "lifestyle_modifications": [
     {
       "modification_type": "diet",
       "details": "low-sodium diet",
       "purpose": "hypertension"
     }
   ],
   "monitoring": [
     {
       "activity": "blood pressure",
       "frequency": "regularly",
       "location": "home"
     }
   ],
   "follow_ups": "regular appointments to monitor progress"
 }
}

sample-2

{
  "patient_age": 42,
  "diagnosis": "diabetes",
  "ICD-9_code": "250",
  "ICD-10_code": "E11",
  "treatment_plan": {
    "medications": [
      {
        "name": "Freestyle Libre 14 Day Reader",
        "description": "flash glucose scanning reader used to monitor glucose levels",
        "prescriber": "Dr. Mary Beth Hodge"
      },
      {
        "name": "Freestyle Libre 14 Day Sensor",
        "description": "sensor applied every 14 days to monitor glucose levels",
        "prescriber": "Dr. Mary Beth Hodge"
      }
    ],
    "upcoming_appointment": {
      "healthcare_provider": "Shila O'Reilly, RN",
      "department": "Endocrinology, Diabetes, and Metabolism",
      "date": "November 4",
      "time": "1:45 PM"
    }
  },
  "PCT_codes": {
    "Freestyle Libre 14 Day Reader": "A9279",
    "Freestyle Libre 14 Day Sensor": "A9279"
  }
}

sample-3

{
 "patient_age": "The documents provided do not include information about the patient's age.",
 "diagnosis": {
   "primary_diagnosis": "Calculus of kidney",
   "additional_findings": [
     "small stone in the bladder",
     "cysts in the kidneys"
   ]
 },
 "treatment_plan": {
   "steps": [
     "Elective renal ultrasound correlation to further characterize renal foci and cysts",
     "Follow-up care with Johnson Dunn, MD",
     "Advice on maintaining regular weight, diet, activity, symptom monitoring, and emergency procedures",
     "Educational information provided on various health and safety topics"
   ]
 },
 "coding": {
   "ICD-9": "592.0",
   "ICD-10": "N20.0",
   "PCT": "Not applicable for clinical treatment coding"
 }
}

sample-4

{
 "patient_age": 47,
 "diagnosis": "nephrolithiasis",
 "treatment_plan": {
   "medication": "ciprofloxacin 500 mg",
   "dosage": "500 mg",
   "frequency": "every morning and every evening",
   "quantity": 14,
   "refills": 0
 },
 "codes": {
   "ICD-9": "592.0",
   "ICD-10": "N20.0",
   "PCT": "Not applicable"
 }
}

About

Try different features which accommodates our needs at Medikode.ai

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published