datdevsteve commited on
Commit
b5210e1
·
verified ·
1 Parent(s): 4c3c386

Upload 16 files

Browse files
.env.example ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ GROQ_API_KEY="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"
2
+ HUGGING_FACE_TOKEN="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"
.gitattributes CHANGED
@@ -1,35 +1,5 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
3
+ agent/chroma_db/b75a830d-8736-407d-ac23-12c31b1e0ede/data_level0.bin filter=lfs diff=lfs merge=lfs -text
4
+ agent/chroma_db/b75a830d-8736-407d-ac23-12c31b1e0ede/index_metadata.pickle filter=lfs diff=lfs merge=lfs -text
5
+ agent/chroma_db/chroma.sqlite3 filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ agent/chroma_db/chroma.sqlite3
2
+ /agent/chroma_db
agent/chroma_db/b75a830d-8736-407d-ac23-12c31b1e0ede/data_level0.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c7e2a5c66a30e0d9228b85d06681048e2d25425ad5b7f8f10b672c87ac37e001
3
+ size 321200
agent/chroma_db/b75a830d-8736-407d-ac23-12c31b1e0ede/header.bin ADDED
Binary file (100 Bytes). View file
 
agent/chroma_db/b75a830d-8736-407d-ac23-12c31b1e0ede/index_metadata.pickle ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ccf314efa9aa64c9e7790bcb8ca39796ba96ba08ffbab69ea2d128df6078db8
3
+ size 1155658
agent/chroma_db/b75a830d-8736-407d-ac23-12c31b1e0ede/length.bin ADDED
Binary file (400 Bytes). View file
 
agent/chroma_db/chroma.sqlite3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4074cbf4b190145e083f50a61bfe8d6a0c9d7a68a54f61d64a329e8f093b16e4
3
+ size 395534336
agent/image_label_config.json ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id2label": {
3
+ "0": "atopic_dermatitis",
4
+ "1": "basal_cell_carcinoma",
5
+ "2": "eczema",
6
+ "3": "fungal_infections",
7
+ "4": "keratosis",
8
+ "5": "melanocytic_nevus",
9
+ "6": "melanoma",
10
+ "7": "psoriasis",
11
+ "8": "viral_warts"
12
+ },
13
+ "label2id": {
14
+ "atopic_dermatitis": 0,
15
+ "basal_cell_carcinoma": 1,
16
+ "eczema": 2,
17
+ "fungal_infections": 3,
18
+ "keratosis": 4,
19
+ "melanocytic_nevus": 5,
20
+ "melanoma": 6,
21
+ "psoriasis": 7,
22
+ "viral_warts": 8
23
+ },
24
+ "class_names": [
25
+ "atopic_dermatitis",
26
+ "basal_cell_carcinoma",
27
+ "eczema",
28
+ "fungal_infections",
29
+ "keratosis",
30
+ "melanocytic_nevus",
31
+ "melanoma",
32
+ "psoriasis",
33
+ "viral_warts"
34
+ ],
35
+ "num_labels": 9,
36
+ "class_weights": {
37
+ "0": 1.0,
38
+ "1": 1.0,
39
+ "2": 1.0,
40
+ "3": 1.0,
41
+ "4": 1.0,
42
+ "5": 1.0,
43
+ "6": 1.0,
44
+ "7": 1.0,
45
+ "8": 1.0
46
+ },
47
+ "version": "2.0-kaggle",
48
+ "model_name": "microsoft/beit-base-patch16-224-pt22k-ft22k",
49
+ "image_size": {
50
+ "height": 224,
51
+ "width": 224
52
+ },
53
+ "platform": "kaggle",
54
+ "improvements": [
55
+ "Medical-safe augmentation",
56
+ "Class weights for imbalance",
57
+ "Reduced batch size (16)",
58
+ "Optimized epochs (20)",
59
+ "Dropout (0.1)",
60
+ "Early stopping",
61
+ "Test-time augmentation support"
62
+ ]
63
+ }
agent/image_symptom_tool.py ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from langchain_core.tools import tool
2
+ import requests
3
+ import base64
4
+ from PIL import Image
5
+ import io
6
+
7
+ @tool
8
+ def analyze_symptom_image(image_url: str, image_description: str = "") -> str:
9
+ """
10
+ Analyzes symptom images using vision classification model via FastAPI backend.
11
+ Input: Image URL and optional image description
12
+ Output: Image symptom analysis with confidence scores
13
+ """
14
+ try:
15
+ # Download image from URL
16
+ print(f"📥 Downloading image from: {image_url}")
17
+ image_response = requests.get(image_url, timeout=15)
18
+ image_response.raise_for_status()
19
+ image = Image.open(io.BytesIO(image_response.content)).convert('RGB')
20
+
21
+ # Convert to base64 for FastAPI transmission
22
+ buffered = io.BytesIO()
23
+ image.save(buffered, format="PNG")
24
+ img_base64 = base64.b64encode(buffered.getvalue()).decode('utf-8')
25
+
26
+ # Call your HF FastAPI Space
27
+ api_url = "https://datdevsteve-nivra-vision-diagnosis.hf.space/run/predict"
28
+ payload = {
29
+ "data": [img_base64],
30
+ "description": image_description or ""
31
+ }
32
+
33
+ print("🔬 Calling Nivra Vision FastAPI backend...")
34
+ response = requests.post(api_url, json=payload, timeout=60)
35
+ response.raise_for_status()
36
+
37
+ result = response.json()
38
+
39
+ # Extract diagnosis from HF Space response format
40
+ if "data" in result and len(result["data"]) > 0:
41
+ diagnosis = result["data"][0]
42
+ return f"""
43
+ [SYMPTOM IMAGE ANALYSIS - SUCCESS]:
44
+ ✅ FastAPI Backend Response: {diagnosis}
45
+
46
+ 🔍 **Image Description**: {image_description or "Not provided"}
47
+ 📡 **Backend**: nivra-vision-diagnosis HF Space"""
48
+ else:
49
+ return "[SYMPTOM IMAGE ANALYSIS - WARNING]: No diagnosis returned from backend"
50
+
51
+ except requests.exceptions.Timeout:
52
+ return "[SYMPTOM IMAGE ANALYSIS - ERROR]: Backend timeout. Please try again."
53
+ except requests.exceptions.RequestException as e:
54
+ return f"[SYMPTOM IMAGE ANALYSIS - ERROR]: Network error: {str(e)}"
55
+ except Exception as e:
56
+ return f"[SYMPTOM IMAGE ANALYSIS - ERROR]: Unexpected error: {str(e)}"
agent/rag_retriever.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from langchain_community.vectorstores import Chroma
2
+ from langchain_huggingface import HuggingFaceEmbeddings
3
+ from langchain_text_splitters import RecursiveCharacterTextSplitter
4
+ import os
5
+
6
+ class NivraRAGRetriever:
7
+ def __init__(self, chroma_path: str = "./chroma_db"):
8
+ self.embeddings = HuggingFaceEmbeddings(
9
+ model_name="sentence-transformers/all-MiniLM-L6-v2"
10
+ )
11
+ self.vectorstore = Chroma(
12
+ persist_directory=chroma_path,
13
+ embedding_function=self.embeddings
14
+ )
15
+ self.retriever = self.vectorstore.as_retriever(
16
+ search_type="similarity_score_threshold",
17
+ search_kwargs={"score_threshold": 0.7, "k":5}
18
+ )
19
+
20
+ def getRelevantDocs(self, query:str):
21
+ return self.retriever.invoke(query)
22
+
agent/text_label_config.json ADDED
@@ -0,0 +1,1516 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id2label": {
3
+ "0": "(vertigo) Paroymsal Positional Vertigo",
4
+ "1": "AIDS",
5
+ "2": "Acne",
6
+ "3": "Alcoholic hepatitis",
7
+ "4": "Allergy",
8
+ "5": "Arthritis",
9
+ "6": "Bronchial Asthma",
10
+ "7": "Cervical spondylosis",
11
+ "8": "Chicken pox",
12
+ "9": "Chronic cholestasis",
13
+ "10": "Common Cold",
14
+ "11": "Dengue",
15
+ "12": "Diabetes",
16
+ "13": "Dimorphic hemmorhoids(piles)",
17
+ "14": "Drug Reaction",
18
+ "15": "Fungal infection",
19
+ "16": "GERD",
20
+ "17": "Gastroenteritis",
21
+ "18": "Heart attack",
22
+ "19": "Hepatitis B",
23
+ "20": "Hepatitis C",
24
+ "21": "Hepatitis D",
25
+ "22": "Hepatitis E",
26
+ "23": "Hypertension",
27
+ "24": "Hyperthyroidism",
28
+ "25": "Hypoglycemia",
29
+ "26": "Hypothyroidism",
30
+ "27": "Impetigo",
31
+ "28": "Jaundice",
32
+ "29": "Malaria",
33
+ "30": "Migraine",
34
+ "31": "Osteoarthristis",
35
+ "32": "Paralysis (brain hemorrhage)",
36
+ "33": "Peptic ulcer diseae",
37
+ "34": "Pneumonia",
38
+ "35": "Psoriasis",
39
+ "36": "Tuberculosis",
40
+ "37": "Typhoid",
41
+ "38": "Urinary tract infection",
42
+ "39": "Varicose veins",
43
+ "40": "abdominal aortic aneurysm",
44
+ "41": "abdominal hernia",
45
+ "42": "abscess of nose",
46
+ "43": "abscess of the lung",
47
+ "44": "abscess of the pharynx",
48
+ "45": "acanthosis nigricans",
49
+ "46": "acariasis",
50
+ "47": "achalasia",
51
+ "48": "actinic keratosis",
52
+ "49": "acute bronchiolitis",
53
+ "50": "acute bronchitis",
54
+ "51": "acute bronchospasm",
55
+ "52": "acute glaucoma",
56
+ "53": "acute kidney injury",
57
+ "54": "acute otitis media",
58
+ "55": "acute pancreatitis",
59
+ "56": "acute respiratory distress syndrome (ards)",
60
+ "57": "acute sinusitis",
61
+ "58": "acute stress reaction",
62
+ "59": "adhesive capsulitis of the shoulder",
63
+ "60": "adjustment reaction",
64
+ "61": "adrenal adenoma",
65
+ "62": "alcohol abuse",
66
+ "63": "alcohol intoxication",
67
+ "64": "alcohol withdrawal",
68
+ "65": "alcoholic liver disease",
69
+ "66": "allergy to animals",
70
+ "67": "alopecia",
71
+ "68": "alzheimer disease",
72
+ "69": "amblyopia",
73
+ "70": "amyloidosis",
74
+ "71": "amyotrophic lateral sclerosis (als)",
75
+ "72": "anal fissure",
76
+ "73": "anal fistula",
77
+ "74": "anemia",
78
+ "75": "anemia due to chronic kidney disease",
79
+ "76": "anemia due to malignancy",
80
+ "77": "anemia of chronic disease",
81
+ "78": "angina",
82
+ "79": "ankylosing spondylitis",
83
+ "80": "anxiety",
84
+ "81": "aortic valve disease",
85
+ "82": "aphakia",
86
+ "83": "aphthous ulcer",
87
+ "84": "aplastic anemia",
88
+ "85": "appendicitis",
89
+ "86": "arrhythmia",
90
+ "87": "arthritis of the hip",
91
+ "88": "ascending cholangitis",
92
+ "89": "asperger syndrome",
93
+ "90": "asthma",
94
+ "91": "astigmatism",
95
+ "92": "atelectasis",
96
+ "93": "athlete's foot",
97
+ "94": "atonic bladder",
98
+ "95": "atrial fibrillation",
99
+ "96": "atrial flutter",
100
+ "97": "atrophic skin condition",
101
+ "98": "atrophic vaginitis",
102
+ "99": "atrophy of the corpus cavernosum",
103
+ "100": "attention deficit hyperactivity disorder (adhd)",
104
+ "101": "autism",
105
+ "102": "autonomic nervous system disorder",
106
+ "103": "avascular necrosis",
107
+ "104": "balanitis",
108
+ "105": "bell palsy",
109
+ "106": "benign kidney cyst",
110
+ "107": "benign paroxysmal positional vertical (bppv)",
111
+ "108": "benign prostatic hyperplasia (bph)",
112
+ "109": "benign vaginal discharge (leukorrhea)",
113
+ "110": "bipolar disorder",
114
+ "111": "birth trauma",
115
+ "112": "bladder cancer",
116
+ "113": "bladder disorder",
117
+ "114": "bladder obstruction",
118
+ "115": "blepharitis",
119
+ "116": "blepharospasm",
120
+ "117": "bone cancer",
121
+ "118": "bone disorder",
122
+ "119": "bone spur of the calcaneous",
123
+ "120": "brachial neuritis",
124
+ "121": "brain cancer",
125
+ "122": "breast cancer",
126
+ "123": "breast cyst",
127
+ "124": "breast infection (mastitis)",
128
+ "125": "broken tooth",
129
+ "126": "bunion",
130
+ "127": "burn",
131
+ "128": "bursitis",
132
+ "129": "callus",
133
+ "130": "carbon monoxide poisoning",
134
+ "131": "cardiac arrest",
135
+ "132": "cardiomyopathy",
136
+ "133": "carpal tunnel syndrome",
137
+ "134": "cat scratch disease",
138
+ "135": "cataract",
139
+ "136": "celiac disease",
140
+ "137": "cellulitis or abscess of mouth",
141
+ "138": "central atherosclerosis",
142
+ "139": "central retinal artery or vein occlusion",
143
+ "140": "cerebral edema",
144
+ "141": "cerebral palsy",
145
+ "142": "cervical cancer",
146
+ "143": "cervical disorder",
147
+ "144": "cervicitis",
148
+ "145": "chalazion",
149
+ "146": "chickenpox",
150
+ "147": "chlamydia",
151
+ "148": "cholecystitis",
152
+ "149": "choledocholithiasis",
153
+ "150": "cholesteatoma",
154
+ "151": "chondromalacia of the patella",
155
+ "152": "chorioretinitis",
156
+ "153": "chronic back pain",
157
+ "154": "chronic constipation",
158
+ "155": "chronic glaucoma",
159
+ "156": "chronic inflammatory demyelinating polyneuropathy (cidp)",
160
+ "157": "chronic kidney disease",
161
+ "158": "chronic knee pain",
162
+ "159": "chronic obstructive pulmonary disease (copd)",
163
+ "160": "chronic otitis media",
164
+ "161": "chronic pain disorder",
165
+ "162": "chronic pancreatitis",
166
+ "163": "chronic rheumatic fever",
167
+ "164": "chronic sinusitis",
168
+ "165": "cirrhosis",
169
+ "166": "coagulation (bleeding) disorder",
170
+ "167": "cold sore",
171
+ "168": "colonic polyp",
172
+ "169": "colorectal cancer",
173
+ "170": "complex regional pain syndrome",
174
+ "171": "concussion",
175
+ "172": "conduct disorder",
176
+ "173": "conductive hearing loss",
177
+ "174": "congenital heart defect",
178
+ "175": "congenital malformation syndrome",
179
+ "176": "conjunctivitis",
180
+ "177": "conjunctivitis due to allergy",
181
+ "178": "conjunctivitis due to bacteria",
182
+ "179": "conjunctivitis due to virus",
183
+ "180": "connective tissue disorder",
184
+ "181": "contact dermatitis",
185
+ "182": "conversion disorder",
186
+ "183": "cornea infection",
187
+ "184": "corneal abrasion",
188
+ "185": "corneal disorder",
189
+ "186": "coronary atherosclerosis",
190
+ "187": "cranial nerve palsy",
191
+ "188": "crohn disease",
192
+ "189": "croup",
193
+ "190": "crushing injury",
194
+ "191": "cryptorchidism",
195
+ "192": "cyst of the eyelid",
196
+ "193": "cystic fibrosis",
197
+ "194": "cysticercosis",
198
+ "195": "cystitis",
199
+ "196": "de quervain disease",
200
+ "197": "decubitus ulcer",
201
+ "198": "deep vein thrombosis (dvt)",
202
+ "199": "degenerative disc disease",
203
+ "200": "delirium",
204
+ "201": "dementia",
205
+ "202": "dental caries",
206
+ "203": "depression",
207
+ "204": "dermatitis due to sun exposure",
208
+ "205": "developmental disability",
209
+ "206": "deviated nasal septum",
210
+ "207": "diabetic ketoacidosis",
211
+ "208": "diabetic peripheral neuropathy",
212
+ "209": "diabetic retinopathy",
213
+ "210": "diaper rash",
214
+ "211": "dislocation of the ankle",
215
+ "212": "dislocation of the elbow",
216
+ "213": "dislocation of the finger",
217
+ "214": "dislocation of the foot",
218
+ "215": "dislocation of the hip",
219
+ "216": "dislocation of the knee",
220
+ "217": "dislocation of the patella",
221
+ "218": "dislocation of the shoulder",
222
+ "219": "dislocation of the vertebra",
223
+ "220": "dislocation of the wrist",
224
+ "221": "dissociative disorder",
225
+ "222": "diverticulitis",
226
+ "223": "diverticulosis",
227
+ "224": "down syndrome",
228
+ "225": "drug abuse",
229
+ "226": "drug abuse (barbiturates)",
230
+ "227": "drug abuse (cocaine)",
231
+ "228": "drug abuse (methamphetamine)",
232
+ "229": "drug abuse (opioids)",
233
+ "230": "drug poisoning due to medication",
234
+ "231": "drug withdrawal",
235
+ "232": "dry eye of unknown cause",
236
+ "233": "dumping syndrome",
237
+ "234": "dyshidrosis",
238
+ "235": "dysthymic disorder",
239
+ "236": "ear drum damage",
240
+ "237": "ear wax impaction",
241
+ "238": "eating disorder",
242
+ "239": "ectopic pregnancy",
243
+ "240": "ectropion",
244
+ "241": "eczema",
245
+ "242": "emphysema",
246
+ "243": "empyema",
247
+ "244": "encephalitis",
248
+ "245": "endocarditis",
249
+ "246": "endometrial cancer",
250
+ "247": "endometrial hyperplasia",
251
+ "248": "endometriosis",
252
+ "249": "endophthalmitis",
253
+ "250": "envenomation from spider or animal bite",
254
+ "251": "ependymoma",
255
+ "252": "epididymitis",
256
+ "253": "epidural hemorrhage",
257
+ "254": "epilepsy",
258
+ "255": "erectile dysfunction",
259
+ "256": "erythema multiforme",
260
+ "257": "esophageal cancer",
261
+ "258": "esophagitis",
262
+ "259": "essential tremor",
263
+ "260": "eustachian tube dysfunction (ear disorder)",
264
+ "261": "extrapyramidal effect of drugs",
265
+ "262": "eye alignment disorder",
266
+ "263": "factitious disorder",
267
+ "264": "female genitalia infection",
268
+ "265": "female infertility of unknown cause",
269
+ "266": "fetal alcohol syndrome",
270
+ "267": "fibroadenoma",
271
+ "268": "fibrocystic breast disease",
272
+ "269": "fibromyalgia",
273
+ "270": "flat feet",
274
+ "271": "floaters",
275
+ "272": "flu",
276
+ "273": "fluid overload",
277
+ "274": "folate deficiency",
278
+ "275": "food allergy",
279
+ "276": "foreign body in the ear",
280
+ "277": "foreign body in the eye",
281
+ "278": "foreign body in the gastrointestinal tract",
282
+ "279": "foreign body in the throat",
283
+ "280": "foreign body in the vagina",
284
+ "281": "fracture of the ankle",
285
+ "282": "fracture of the arm",
286
+ "283": "fracture of the facial bones",
287
+ "284": "fracture of the finger",
288
+ "285": "fracture of the foot",
289
+ "286": "fracture of the hand",
290
+ "287": "fracture of the jaw",
291
+ "288": "fracture of the leg",
292
+ "289": "fracture of the neck",
293
+ "290": "fracture of the patella",
294
+ "291": "fracture of the pelvis",
295
+ "292": "fracture of the rib",
296
+ "293": "fracture of the shoulder",
297
+ "294": "fracture of the skull",
298
+ "295": "fracture of the vertebra",
299
+ "296": "friedrich ataxia",
300
+ "297": "frostbite",
301
+ "298": "fungal infection of the hair",
302
+ "299": "fungal infection of the skin",
303
+ "300": "galactorrhea of unknown cause",
304
+ "301": "gallstone",
305
+ "302": "ganglion cyst",
306
+ "303": "gastritis",
307
+ "304": "gastroduodenal ulcer",
308
+ "305": "gastroesophageal reflux disease (gerd)",
309
+ "306": "gastrointestinal hemorrhage",
310
+ "307": "gastroparesis",
311
+ "308": "genital herpes",
312
+ "309": "gestational diabetes",
313
+ "310": "glaucoma",
314
+ "311": "glucocorticoid deficiency",
315
+ "312": "goiter",
316
+ "313": "gonorrhea",
317
+ "314": "gout",
318
+ "315": "graves disease",
319
+ "316": "guillain barre syndrome",
320
+ "317": "gum disease",
321
+ "318": "gynecomastia",
322
+ "319": "hammer toe",
323
+ "320": "head and neck cancer",
324
+ "321": "head injury",
325
+ "322": "headache after lumbar puncture",
326
+ "323": "heart block",
327
+ "324": "heart failure",
328
+ "325": "heat exhaustion",
329
+ "326": "hemangioma",
330
+ "327": "hemarthrosis",
331
+ "328": "hematoma",
332
+ "329": "hemiplegia",
333
+ "330": "hemochromatosis",
334
+ "331": "hemolytic anemia",
335
+ "332": "hemophilia",
336
+ "333": "hemorrhoids",
337
+ "334": "hepatic encephalopathy",
338
+ "335": "hepatitis A",
339
+ "336": "hepatitis due to a toxin",
340
+ "337": "herniated disk",
341
+ "338": "herpangina",
342
+ "339": "hiatal hernia",
343
+ "340": "hidradenitis suppurativa",
344
+ "341": "hirschsprung disease",
345
+ "342": "hirsutism",
346
+ "343": "histoplasmosis",
347
+ "344": "hormone disorder",
348
+ "345": "hpv",
349
+ "346": "human immunodeficiency virus infection (hiv)",
350
+ "347": "hydatidiform mole",
351
+ "348": "hydrocele of the testicle",
352
+ "349": "hydrocephalus",
353
+ "350": "hydronephrosis",
354
+ "351": "hypercalcemia",
355
+ "352": "hypercholesterolemia",
356
+ "353": "hyperemesis gravidarum",
357
+ "354": "hyperhidrosis",
358
+ "355": "hyperkalemia",
359
+ "356": "hyperlipidemia",
360
+ "357": "hypernatremia",
361
+ "358": "hyperopia",
362
+ "359": "hyperosmotic hyperketotic state",
363
+ "360": "hypertension of pregnancy",
364
+ "361": "hypertensive heart disease",
365
+ "362": "hypertrophic obstructive cardiomyopathy (hocm)",
366
+ "363": "hypocalcemia",
367
+ "364": "hypokalemia",
368
+ "365": "hyponatremia",
369
+ "366": "hypothermia",
370
+ "367": "hypovolemia",
371
+ "368": "idiopathic absence of menstruation",
372
+ "369": "idiopathic excessive menstruation",
373
+ "370": "idiopathic infrequent menstruation",
374
+ "371": "idiopathic irregular menstrual cycle",
375
+ "372": "idiopathic nonmenstrual bleeding",
376
+ "373": "idiopathic painful menstruation",
377
+ "374": "ileus",
378
+ "375": "impulse control disorder",
379
+ "376": "indigestion",
380
+ "377": "induced abortion",
381
+ "378": "infection of open wound",
382
+ "379": "infectious gastroenteritis",
383
+ "380": "ingrown toe nail",
384
+ "381": "inguinal hernia",
385
+ "382": "injury of the ankle",
386
+ "383": "injury to internal organ",
387
+ "384": "injury to the abdomen",
388
+ "385": "injury to the arm",
389
+ "386": "injury to the face",
390
+ "387": "injury to the finger",
391
+ "388": "injury to the hand",
392
+ "389": "injury to the hip",
393
+ "390": "injury to the knee",
394
+ "391": "injury to the leg",
395
+ "392": "injury to the shoulder",
396
+ "393": "injury to the spinal cord",
397
+ "394": "injury to the trunk",
398
+ "395": "insect bite",
399
+ "396": "interstitial lung disease",
400
+ "397": "intertrigo (skin condition)",
401
+ "398": "intestinal cancer",
402
+ "399": "intestinal disease",
403
+ "400": "intestinal malabsorption",
404
+ "401": "intestinal obstruction",
405
+ "402": "intracerebral hemorrhage",
406
+ "403": "intracranial abscess",
407
+ "404": "intracranial hemorrhage",
408
+ "405": "intussusception",
409
+ "406": "iridocyclitis",
410
+ "407": "iron deficiency anemia",
411
+ "408": "irritable bowel syndrome",
412
+ "409": "ischemia of the bowel",
413
+ "410": "ischemic heart disease",
414
+ "411": "itching of unknown cause",
415
+ "412": "jaw disorder",
416
+ "413": "joint effusion",
417
+ "414": "juvenile rheumatoid arthritis",
418
+ "415": "kidney cancer",
419
+ "416": "kidney disease due to longstanding hypertension",
420
+ "417": "kidney failure",
421
+ "418": "kidney stone",
422
+ "419": "knee ligament or meniscus tear",
423
+ "420": "labyrinthitis",
424
+ "421": "lactose intolerance",
425
+ "422": "laryngitis",
426
+ "423": "lateral epicondylitis (tennis elbow)",
427
+ "424": "leukemia",
428
+ "425": "lewy body dementia",
429
+ "426": "lice",
430
+ "427": "lichen planus",
431
+ "428": "lichen simplex",
432
+ "429": "lipoma",
433
+ "430": "liver cancer",
434
+ "431": "liver disease",
435
+ "432": "lumbago",
436
+ "433": "lung cancer",
437
+ "434": "lung contusion",
438
+ "435": "lyme disease",
439
+ "436": "lymphadenitis",
440
+ "437": "lymphedema",
441
+ "438": "lymphogranuloma venereum",
442
+ "439": "lymphoma",
443
+ "440": "macular degeneration",
444
+ "441": "magnesium deficiency",
445
+ "442": "male genitalia infection",
446
+ "443": "malignant hypertension",
447
+ "444": "marijuana abuse",
448
+ "445": "mastectomy",
449
+ "446": "mastoiditis",
450
+ "447": "melanoma",
451
+ "448": "meniere disease",
452
+ "449": "meningioma",
453
+ "450": "meningitis",
454
+ "451": "menopause",
455
+ "452": "metabolic disorder",
456
+ "453": "metastatic cancer",
457
+ "454": "missed abortion",
458
+ "455": "mitral valve disease",
459
+ "456": "mittelschmerz",
460
+ "457": "molluscum contagiosum",
461
+ "458": "mononeuritis",
462
+ "459": "mononucleosis",
463
+ "460": "mucositis",
464
+ "461": "multiple myeloma",
465
+ "462": "multiple sclerosis",
466
+ "463": "mumps",
467
+ "464": "muscle spasm",
468
+ "465": "muscular dystrophy",
469
+ "466": "myasthenia gravis",
470
+ "467": "myelodysplastic syndrome",
471
+ "468": "myocarditis",
472
+ "469": "myoclonus",
473
+ "470": "myopia",
474
+ "471": "myositis",
475
+ "472": "narcolepsy",
476
+ "473": "nasal polyp",
477
+ "474": "necrotizing fasciitis",
478
+ "475": "neonatal jaundice",
479
+ "476": "nerve impingement near the shoulder",
480
+ "477": "neuralgia",
481
+ "478": "neurofibromatosis",
482
+ "479": "neuropathy due to drugs",
483
+ "480": "neurosis",
484
+ "481": "nonalcoholic liver disease (nash)",
485
+ "482": "noninfectious gastroenteritis",
486
+ "483": "normal pressure hydrocephalus",
487
+ "484": "nose disorder",
488
+ "485": "obesity",
489
+ "486": "obsessive compulsive disorder (ocd)",
490
+ "487": "obstructive sleep apnea (osa)",
491
+ "488": "omphalitis",
492
+ "489": "onychomycosis",
493
+ "490": "open wound from surgical incision",
494
+ "491": "open wound of the abdomen",
495
+ "492": "open wound of the arm",
496
+ "493": "open wound of the back",
497
+ "494": "open wound of the ear",
498
+ "495": "open wound of the eye",
499
+ "496": "open wound of the finger",
500
+ "497": "open wound of the foot",
501
+ "498": "open wound of the hand",
502
+ "499": "open wound of the lip",
503
+ "500": "open wound of the mouth",
504
+ "501": "open wound of the neck",
505
+ "502": "open wound of the nose",
506
+ "503": "open wound of the shoulder",
507
+ "504": "oppositional disorder",
508
+ "505": "optic neuritis",
509
+ "506": "oral leukoplakia",
510
+ "507": "oral mucosal lesion",
511
+ "508": "oral thrush (yeast infection)",
512
+ "509": "orbital cellulitis",
513
+ "510": "orthostatic hypotension",
514
+ "511": "osteoarthritis",
515
+ "512": "osteochondroma",
516
+ "513": "osteochondrosis",
517
+ "514": "osteomyelitis",
518
+ "515": "osteoporosis",
519
+ "516": "otitis externa (swimmer's ear)",
520
+ "517": "otitis media",
521
+ "518": "otosclerosis",
522
+ "519": "ovarian cancer",
523
+ "520": "ovarian cyst",
524
+ "521": "ovarian torsion",
525
+ "522": "overflow incontinence",
526
+ "523": "pain after an operation",
527
+ "524": "pain disorder affecting the neck",
528
+ "525": "pancreatic cancer",
529
+ "526": "panic attack",
530
+ "527": "panic disorder",
531
+ "528": "parasitic disease",
532
+ "529": "parathyroid adenoma",
533
+ "530": "parkinson disease",
534
+ "531": "paronychia",
535
+ "532": "paroxysmal supraventricular tachycardia",
536
+ "533": "paroxysmal ventricular tachycardia",
537
+ "534": "pelvic fistula",
538
+ "535": "pelvic inflammatory disease",
539
+ "536": "pelvic organ prolapse",
540
+ "537": "pemphigus",
541
+ "538": "pericarditis",
542
+ "539": "peripheral arterial disease",
543
+ "540": "peripheral arterial embolism",
544
+ "541": "peripheral nerve disorder",
545
+ "542": "perirectal infection",
546
+ "543": "peritonitis",
547
+ "544": "peritonsillar abscess",
548
+ "545": "persistent vomiting of unknown cause",
549
+ "546": "personality disorder",
550
+ "547": "peyronie disease",
551
+ "548": "pharyngitis",
552
+ "549": "phimosis",
553
+ "550": "pilonidal cyst",
554
+ "551": "pinguecula",
555
+ "552": "pinworm infection",
556
+ "553": "pituitary adenoma",
557
+ "554": "pituitary disorder",
558
+ "555": "pityriasis rosea",
559
+ "556": "placenta previa",
560
+ "557": "placental abruption",
561
+ "558": "plantar fasciitis",
562
+ "559": "pleural effusion",
563
+ "560": "pneumoconiosis",
564
+ "561": "pneumothorax",
565
+ "562": "poisoning due to analgesics",
566
+ "563": "poisoning due to anticonvulsants",
567
+ "564": "poisoning due to antidepressants",
568
+ "565": "poisoning due to antihypertensives",
569
+ "566": "poisoning due to antimicrobial drugs",
570
+ "567": "poisoning due to antipsychotics",
571
+ "568": "poisoning due to ethylene glycol",
572
+ "569": "poisoning due to gas",
573
+ "570": "poisoning due to opioids",
574
+ "571": "poisoning due to sedatives",
575
+ "572": "polycystic kidney disease",
576
+ "573": "polycystic ovarian syndrome (pcos)",
577
+ "574": "polycythemia vera",
578
+ "575": "polymyalgia rheumatica",
579
+ "576": "post-traumatic stress disorder (ptsd)",
580
+ "577": "postoperative infection",
581
+ "578": "postpartum depression",
582
+ "579": "preeclampsia",
583
+ "580": "pregnancy",
584
+ "581": "premature atrial contractions (pacs)",
585
+ "582": "premature ovarian failure",
586
+ "583": "premature rupture of amniotic membrane",
587
+ "584": "premature ventricular contractions (pvcs)",
588
+ "585": "premenstrual tension syndrome",
589
+ "586": "presbyacusis",
590
+ "587": "presbyopia",
591
+ "588": "priapism",
592
+ "589": "primary immunodeficiency",
593
+ "590": "primary insomnia",
594
+ "591": "primary kidney disease",
595
+ "592": "primary thrombocythemia",
596
+ "593": "problem during pregnancy",
597
+ "594": "prostate cancer",
598
+ "595": "prostatitis",
599
+ "596": "protein deficiency",
600
+ "597": "pseudohypoparathyroidism",
601
+ "598": "pseudotumor cerebri",
602
+ "599": "psychosexual disorder",
603
+ "600": "psychotic disorder",
604
+ "601": "pterygium",
605
+ "602": "pulmonary congestion",
606
+ "603": "pulmonary embolism",
607
+ "604": "pulmonary eosinophilia",
608
+ "605": "pulmonary fibrosis",
609
+ "606": "pulmonary hypertension",
610
+ "607": "pyelonephritis",
611
+ "608": "pyloric stenosis",
612
+ "609": "pyogenic skin infection",
613
+ "610": "raynaud disease",
614
+ "611": "rectal disorder",
615
+ "612": "restless leg syndrome",
616
+ "613": "retinal detachment",
617
+ "614": "retinopathy due to high blood pressure",
618
+ "615": "rhabdomyolysis",
619
+ "616": "rheumatoid arthritis",
620
+ "617": "rosacea",
621
+ "618": "rotator cuff injury",
622
+ "619": "salivary gland disorder",
623
+ "620": "sarcoidosis",
624
+ "621": "scabies",
625
+ "622": "scar",
626
+ "623": "scarlet fever",
627
+ "624": "schizophrenia",
628
+ "625": "sciatica",
629
+ "626": "scleritis",
630
+ "627": "scleroderma",
631
+ "628": "scoliosis",
632
+ "629": "seasonal allergies (hay fever)",
633
+ "630": "sebaceous cyst",
634
+ "631": "seborrheic dermatitis",
635
+ "632": "seborrheic keratosis",
636
+ "633": "sensorineural hearing loss",
637
+ "634": "sepsis",
638
+ "635": "septic arthritis",
639
+ "636": "shingles (herpes zoster)",
640
+ "637": "sialoadenitis",
641
+ "638": "sick sinus syndrome",
642
+ "639": "sickle cell anemia",
643
+ "640": "sickle cell crisis",
644
+ "641": "sinus bradycardia",
645
+ "642": "sjogren syndrome",
646
+ "643": "skin cancer",
647
+ "644": "skin disorder",
648
+ "645": "skin pigmentation disorder",
649
+ "646": "skin polyp",
650
+ "647": "smoking or tobacco addiction",
651
+ "648": "social phobia",
652
+ "649": "soft tissue sarcoma",
653
+ "650": "somatization disorder",
654
+ "651": "spermatocele",
655
+ "652": "spherocytosis",
656
+ "653": "spina bifida",
657
+ "654": "spinal stenosis",
658
+ "655": "spinocerebellar ataxia",
659
+ "656": "spondylitis",
660
+ "657": "spondylolisthesis",
661
+ "658": "spondylosis",
662
+ "659": "spontaneous abortion",
663
+ "660": "sprain or strain",
664
+ "661": "stenosis of the tear duct",
665
+ "662": "stomach cancer",
666
+ "663": "strep throat",
667
+ "664": "stress incontinence",
668
+ "665": "stricture of the esophagus",
669
+ "666": "stroke",
670
+ "667": "stye",
671
+ "668": "subacute thyroiditis",
672
+ "669": "subarachnoid hemorrhage",
673
+ "670": "subconjunctival hemorrhage",
674
+ "671": "subdural hemorrhage",
675
+ "672": "substance-related mental disorder",
676
+ "673": "syndrome of inappropriate secretion of adh (siadh)",
677
+ "674": "syphilis",
678
+ "675": "syringomyelia",
679
+ "676": "systemic lupus erythematosis (sle)",
680
+ "677": "teething syndrome",
681
+ "678": "temporary or benign blood in urine",
682
+ "679": "temporomandibular joint disorder",
683
+ "680": "tendinitis",
684
+ "681": "tension headache",
685
+ "682": "testicular cancer",
686
+ "683": "testicular disorder",
687
+ "684": "testicular torsion",
688
+ "685": "thoracic aortic aneurysm",
689
+ "686": "thoracic outlet syndrome",
690
+ "687": "threatened pregnancy",
691
+ "688": "thrombocytopenia",
692
+ "689": "thrombophlebitis",
693
+ "690": "thyroid cancer",
694
+ "691": "thyroid disease",
695
+ "692": "thyroid nodule",
696
+ "693": "tic (movement) disorder",
697
+ "694": "tietze syndrome",
698
+ "695": "tinnitus of unknown cause",
699
+ "696": "tonsillar hypertrophy",
700
+ "697": "tonsillitis",
701
+ "698": "tooth abscess",
702
+ "699": "tooth disorder",
703
+ "700": "torticollis",
704
+ "701": "tourette syndrome",
705
+ "702": "toxic multinodular goiter",
706
+ "703": "tracheitis",
707
+ "704": "transient ischemic attack",
708
+ "705": "trichiasis",
709
+ "706": "trichomonas infection",
710
+ "707": "trigeminal neuralgia",
711
+ "708": "trigger finger (finger disorder)",
712
+ "709": "tuberous sclerosis",
713
+ "710": "ulcerative colitis",
714
+ "711": "urethral disorder",
715
+ "712": "urethral stricture",
716
+ "713": "urethral valves",
717
+ "714": "urethritis",
718
+ "715": "urge incontinence",
719
+ "716": "urinary tract obstruction",
720
+ "717": "uterine atony",
721
+ "718": "uterine cancer",
722
+ "719": "uterine fibroids",
723
+ "720": "uveitis",
724
+ "721": "vaginal cyst",
725
+ "722": "vaginal yeast infection",
726
+ "723": "vaginismus",
727
+ "724": "vaginitis",
728
+ "725": "valley fever",
729
+ "726": "varicocele of the testicles",
730
+ "727": "vasculitis",
731
+ "728": "venous insufficiency",
732
+ "729": "vertebrobasilar insufficiency",
733
+ "730": "vesicoureteral reflux",
734
+ "731": "viral exanthem",
735
+ "732": "viral hepatitis",
736
+ "733": "viral warts",
737
+ "734": "vitamin b12 deficiency",
738
+ "735": "vitamin d deficiency",
739
+ "736": "vitreous degeneration",
740
+ "737": "vitreous hemorrhage",
741
+ "738": "vocal cord polyp",
742
+ "739": "volvulus",
743
+ "740": "von willebrand disease",
744
+ "741": "vulvar cancer",
745
+ "742": "vulvar disorder",
746
+ "743": "vulvodynia",
747
+ "744": "wernicke korsakoff syndrome",
748
+ "745": "white blood cell disease",
749
+ "746": "whooping cough",
750
+ "747": "wilson disease",
751
+ "748": "yeast infection",
752
+ "749": "zenker diverticulum"
753
+ },
754
+ "label2id": {
755
+ "(vertigo) Paroymsal Positional Vertigo": 0,
756
+ "AIDS": 1,
757
+ "Acne": 2,
758
+ "Alcoholic hepatitis": 3,
759
+ "Allergy": 4,
760
+ "Arthritis": 5,
761
+ "Bronchial Asthma": 6,
762
+ "Cervical spondylosis": 7,
763
+ "Chicken pox": 8,
764
+ "Chronic cholestasis": 9,
765
+ "Common Cold": 10,
766
+ "Dengue": 11,
767
+ "Diabetes": 12,
768
+ "Dimorphic hemmorhoids(piles)": 13,
769
+ "Drug Reaction": 14,
770
+ "Fungal infection": 15,
771
+ "GERD": 16,
772
+ "Gastroenteritis": 17,
773
+ "Heart attack": 18,
774
+ "Hepatitis B": 19,
775
+ "Hepatitis C": 20,
776
+ "Hepatitis D": 21,
777
+ "Hepatitis E": 22,
778
+ "Hypertension": 23,
779
+ "Hyperthyroidism": 24,
780
+ "Hypoglycemia": 25,
781
+ "Hypothyroidism": 26,
782
+ "Impetigo": 27,
783
+ "Jaundice": 28,
784
+ "Malaria": 29,
785
+ "Migraine": 30,
786
+ "Osteoarthristis": 31,
787
+ "Paralysis (brain hemorrhage)": 32,
788
+ "Peptic ulcer diseae": 33,
789
+ "Pneumonia": 34,
790
+ "Psoriasis": 35,
791
+ "Tuberculosis": 36,
792
+ "Typhoid": 37,
793
+ "Urinary tract infection": 38,
794
+ "Varicose veins": 39,
795
+ "abdominal aortic aneurysm": 40,
796
+ "abdominal hernia": 41,
797
+ "abscess of nose": 42,
798
+ "abscess of the lung": 43,
799
+ "abscess of the pharynx": 44,
800
+ "acanthosis nigricans": 45,
801
+ "acariasis": 46,
802
+ "achalasia": 47,
803
+ "actinic keratosis": 48,
804
+ "acute bronchiolitis": 49,
805
+ "acute bronchitis": 50,
806
+ "acute bronchospasm": 51,
807
+ "acute glaucoma": 52,
808
+ "acute kidney injury": 53,
809
+ "acute otitis media": 54,
810
+ "acute pancreatitis": 55,
811
+ "acute respiratory distress syndrome (ards)": 56,
812
+ "acute sinusitis": 57,
813
+ "acute stress reaction": 58,
814
+ "adhesive capsulitis of the shoulder": 59,
815
+ "adjustment reaction": 60,
816
+ "adrenal adenoma": 61,
817
+ "alcohol abuse": 62,
818
+ "alcohol intoxication": 63,
819
+ "alcohol withdrawal": 64,
820
+ "alcoholic liver disease": 65,
821
+ "allergy to animals": 66,
822
+ "alopecia": 67,
823
+ "alzheimer disease": 68,
824
+ "amblyopia": 69,
825
+ "amyloidosis": 70,
826
+ "amyotrophic lateral sclerosis (als)": 71,
827
+ "anal fissure": 72,
828
+ "anal fistula": 73,
829
+ "anemia": 74,
830
+ "anemia due to chronic kidney disease": 75,
831
+ "anemia due to malignancy": 76,
832
+ "anemia of chronic disease": 77,
833
+ "angina": 78,
834
+ "ankylosing spondylitis": 79,
835
+ "anxiety": 80,
836
+ "aortic valve disease": 81,
837
+ "aphakia": 82,
838
+ "aphthous ulcer": 83,
839
+ "aplastic anemia": 84,
840
+ "appendicitis": 85,
841
+ "arrhythmia": 86,
842
+ "arthritis of the hip": 87,
843
+ "ascending cholangitis": 88,
844
+ "asperger syndrome": 89,
845
+ "asthma": 90,
846
+ "astigmatism": 91,
847
+ "atelectasis": 92,
848
+ "athlete's foot": 93,
849
+ "atonic bladder": 94,
850
+ "atrial fibrillation": 95,
851
+ "atrial flutter": 96,
852
+ "atrophic skin condition": 97,
853
+ "atrophic vaginitis": 98,
854
+ "atrophy of the corpus cavernosum": 99,
855
+ "attention deficit hyperactivity disorder (adhd)": 100,
856
+ "autism": 101,
857
+ "autonomic nervous system disorder": 102,
858
+ "avascular necrosis": 103,
859
+ "balanitis": 104,
860
+ "bell palsy": 105,
861
+ "benign kidney cyst": 106,
862
+ "benign paroxysmal positional vertical (bppv)": 107,
863
+ "benign prostatic hyperplasia (bph)": 108,
864
+ "benign vaginal discharge (leukorrhea)": 109,
865
+ "bipolar disorder": 110,
866
+ "birth trauma": 111,
867
+ "bladder cancer": 112,
868
+ "bladder disorder": 113,
869
+ "bladder obstruction": 114,
870
+ "blepharitis": 115,
871
+ "blepharospasm": 116,
872
+ "bone cancer": 117,
873
+ "bone disorder": 118,
874
+ "bone spur of the calcaneous": 119,
875
+ "brachial neuritis": 120,
876
+ "brain cancer": 121,
877
+ "breast cancer": 122,
878
+ "breast cyst": 123,
879
+ "breast infection (mastitis)": 124,
880
+ "broken tooth": 125,
881
+ "bunion": 126,
882
+ "burn": 127,
883
+ "bursitis": 128,
884
+ "callus": 129,
885
+ "carbon monoxide poisoning": 130,
886
+ "cardiac arrest": 131,
887
+ "cardiomyopathy": 132,
888
+ "carpal tunnel syndrome": 133,
889
+ "cat scratch disease": 134,
890
+ "cataract": 135,
891
+ "celiac disease": 136,
892
+ "cellulitis or abscess of mouth": 137,
893
+ "central atherosclerosis": 138,
894
+ "central retinal artery or vein occlusion": 139,
895
+ "cerebral edema": 140,
896
+ "cerebral palsy": 141,
897
+ "cervical cancer": 142,
898
+ "cervical disorder": 143,
899
+ "cervicitis": 144,
900
+ "chalazion": 145,
901
+ "chickenpox": 146,
902
+ "chlamydia": 147,
903
+ "cholecystitis": 148,
904
+ "choledocholithiasis": 149,
905
+ "cholesteatoma": 150,
906
+ "chondromalacia of the patella": 151,
907
+ "chorioretinitis": 152,
908
+ "chronic back pain": 153,
909
+ "chronic constipation": 154,
910
+ "chronic glaucoma": 155,
911
+ "chronic inflammatory demyelinating polyneuropathy (cidp)": 156,
912
+ "chronic kidney disease": 157,
913
+ "chronic knee pain": 158,
914
+ "chronic obstructive pulmonary disease (copd)": 159,
915
+ "chronic otitis media": 160,
916
+ "chronic pain disorder": 161,
917
+ "chronic pancreatitis": 162,
918
+ "chronic rheumatic fever": 163,
919
+ "chronic sinusitis": 164,
920
+ "cirrhosis": 165,
921
+ "coagulation (bleeding) disorder": 166,
922
+ "cold sore": 167,
923
+ "colonic polyp": 168,
924
+ "colorectal cancer": 169,
925
+ "complex regional pain syndrome": 170,
926
+ "concussion": 171,
927
+ "conduct disorder": 172,
928
+ "conductive hearing loss": 173,
929
+ "congenital heart defect": 174,
930
+ "congenital malformation syndrome": 175,
931
+ "conjunctivitis": 176,
932
+ "conjunctivitis due to allergy": 177,
933
+ "conjunctivitis due to bacteria": 178,
934
+ "conjunctivitis due to virus": 179,
935
+ "connective tissue disorder": 180,
936
+ "contact dermatitis": 181,
937
+ "conversion disorder": 182,
938
+ "cornea infection": 183,
939
+ "corneal abrasion": 184,
940
+ "corneal disorder": 185,
941
+ "coronary atherosclerosis": 186,
942
+ "cranial nerve palsy": 187,
943
+ "crohn disease": 188,
944
+ "croup": 189,
945
+ "crushing injury": 190,
946
+ "cryptorchidism": 191,
947
+ "cyst of the eyelid": 192,
948
+ "cystic fibrosis": 193,
949
+ "cysticercosis": 194,
950
+ "cystitis": 195,
951
+ "de quervain disease": 196,
952
+ "decubitus ulcer": 197,
953
+ "deep vein thrombosis (dvt)": 198,
954
+ "degenerative disc disease": 199,
955
+ "delirium": 200,
956
+ "dementia": 201,
957
+ "dental caries": 202,
958
+ "depression": 203,
959
+ "dermatitis due to sun exposure": 204,
960
+ "developmental disability": 205,
961
+ "deviated nasal septum": 206,
962
+ "diabetic ketoacidosis": 207,
963
+ "diabetic peripheral neuropathy": 208,
964
+ "diabetic retinopathy": 209,
965
+ "diaper rash": 210,
966
+ "dislocation of the ankle": 211,
967
+ "dislocation of the elbow": 212,
968
+ "dislocation of the finger": 213,
969
+ "dislocation of the foot": 214,
970
+ "dislocation of the hip": 215,
971
+ "dislocation of the knee": 216,
972
+ "dislocation of the patella": 217,
973
+ "dislocation of the shoulder": 218,
974
+ "dislocation of the vertebra": 219,
975
+ "dislocation of the wrist": 220,
976
+ "dissociative disorder": 221,
977
+ "diverticulitis": 222,
978
+ "diverticulosis": 223,
979
+ "down syndrome": 224,
980
+ "drug abuse": 225,
981
+ "drug abuse (barbiturates)": 226,
982
+ "drug abuse (cocaine)": 227,
983
+ "drug abuse (methamphetamine)": 228,
984
+ "drug abuse (opioids)": 229,
985
+ "drug poisoning due to medication": 230,
986
+ "drug withdrawal": 231,
987
+ "dry eye of unknown cause": 232,
988
+ "dumping syndrome": 233,
989
+ "dyshidrosis": 234,
990
+ "dysthymic disorder": 235,
991
+ "ear drum damage": 236,
992
+ "ear wax impaction": 237,
993
+ "eating disorder": 238,
994
+ "ectopic pregnancy": 239,
995
+ "ectropion": 240,
996
+ "eczema": 241,
997
+ "emphysema": 242,
998
+ "empyema": 243,
999
+ "encephalitis": 244,
1000
+ "endocarditis": 245,
1001
+ "endometrial cancer": 246,
1002
+ "endometrial hyperplasia": 247,
1003
+ "endometriosis": 248,
1004
+ "endophthalmitis": 249,
1005
+ "envenomation from spider or animal bite": 250,
1006
+ "ependymoma": 251,
1007
+ "epididymitis": 252,
1008
+ "epidural hemorrhage": 253,
1009
+ "epilepsy": 254,
1010
+ "erectile dysfunction": 255,
1011
+ "erythema multiforme": 256,
1012
+ "esophageal cancer": 257,
1013
+ "esophagitis": 258,
1014
+ "essential tremor": 259,
1015
+ "eustachian tube dysfunction (ear disorder)": 260,
1016
+ "extrapyramidal effect of drugs": 261,
1017
+ "eye alignment disorder": 262,
1018
+ "factitious disorder": 263,
1019
+ "female genitalia infection": 264,
1020
+ "female infertility of unknown cause": 265,
1021
+ "fetal alcohol syndrome": 266,
1022
+ "fibroadenoma": 267,
1023
+ "fibrocystic breast disease": 268,
1024
+ "fibromyalgia": 269,
1025
+ "flat feet": 270,
1026
+ "floaters": 271,
1027
+ "flu": 272,
1028
+ "fluid overload": 273,
1029
+ "folate deficiency": 274,
1030
+ "food allergy": 275,
1031
+ "foreign body in the ear": 276,
1032
+ "foreign body in the eye": 277,
1033
+ "foreign body in the gastrointestinal tract": 278,
1034
+ "foreign body in the throat": 279,
1035
+ "foreign body in the vagina": 280,
1036
+ "fracture of the ankle": 281,
1037
+ "fracture of the arm": 282,
1038
+ "fracture of the facial bones": 283,
1039
+ "fracture of the finger": 284,
1040
+ "fracture of the foot": 285,
1041
+ "fracture of the hand": 286,
1042
+ "fracture of the jaw": 287,
1043
+ "fracture of the leg": 288,
1044
+ "fracture of the neck": 289,
1045
+ "fracture of the patella": 290,
1046
+ "fracture of the pelvis": 291,
1047
+ "fracture of the rib": 292,
1048
+ "fracture of the shoulder": 293,
1049
+ "fracture of the skull": 294,
1050
+ "fracture of the vertebra": 295,
1051
+ "friedrich ataxia": 296,
1052
+ "frostbite": 297,
1053
+ "fungal infection of the hair": 298,
1054
+ "fungal infection of the skin": 299,
1055
+ "galactorrhea of unknown cause": 300,
1056
+ "gallstone": 301,
1057
+ "ganglion cyst": 302,
1058
+ "gastritis": 303,
1059
+ "gastroduodenal ulcer": 304,
1060
+ "gastroesophageal reflux disease (gerd)": 305,
1061
+ "gastrointestinal hemorrhage": 306,
1062
+ "gastroparesis": 307,
1063
+ "genital herpes": 308,
1064
+ "gestational diabetes": 309,
1065
+ "glaucoma": 310,
1066
+ "glucocorticoid deficiency": 311,
1067
+ "goiter": 312,
1068
+ "gonorrhea": 313,
1069
+ "gout": 314,
1070
+ "graves disease": 315,
1071
+ "guillain barre syndrome": 316,
1072
+ "gum disease": 317,
1073
+ "gynecomastia": 318,
1074
+ "hammer toe": 319,
1075
+ "head and neck cancer": 320,
1076
+ "head injury": 321,
1077
+ "headache after lumbar puncture": 322,
1078
+ "heart block": 323,
1079
+ "heart failure": 324,
1080
+ "heat exhaustion": 325,
1081
+ "hemangioma": 326,
1082
+ "hemarthrosis": 327,
1083
+ "hematoma": 328,
1084
+ "hemiplegia": 329,
1085
+ "hemochromatosis": 330,
1086
+ "hemolytic anemia": 331,
1087
+ "hemophilia": 332,
1088
+ "hemorrhoids": 333,
1089
+ "hepatic encephalopathy": 334,
1090
+ "hepatitis A": 335,
1091
+ "hepatitis due to a toxin": 336,
1092
+ "herniated disk": 337,
1093
+ "herpangina": 338,
1094
+ "hiatal hernia": 339,
1095
+ "hidradenitis suppurativa": 340,
1096
+ "hirschsprung disease": 341,
1097
+ "hirsutism": 342,
1098
+ "histoplasmosis": 343,
1099
+ "hormone disorder": 344,
1100
+ "hpv": 345,
1101
+ "human immunodeficiency virus infection (hiv)": 346,
1102
+ "hydatidiform mole": 347,
1103
+ "hydrocele of the testicle": 348,
1104
+ "hydrocephalus": 349,
1105
+ "hydronephrosis": 350,
1106
+ "hypercalcemia": 351,
1107
+ "hypercholesterolemia": 352,
1108
+ "hyperemesis gravidarum": 353,
1109
+ "hyperhidrosis": 354,
1110
+ "hyperkalemia": 355,
1111
+ "hyperlipidemia": 356,
1112
+ "hypernatremia": 357,
1113
+ "hyperopia": 358,
1114
+ "hyperosmotic hyperketotic state": 359,
1115
+ "hypertension of pregnancy": 360,
1116
+ "hypertensive heart disease": 361,
1117
+ "hypertrophic obstructive cardiomyopathy (hocm)": 362,
1118
+ "hypocalcemia": 363,
1119
+ "hypokalemia": 364,
1120
+ "hyponatremia": 365,
1121
+ "hypothermia": 366,
1122
+ "hypovolemia": 367,
1123
+ "idiopathic absence of menstruation": 368,
1124
+ "idiopathic excessive menstruation": 369,
1125
+ "idiopathic infrequent menstruation": 370,
1126
+ "idiopathic irregular menstrual cycle": 371,
1127
+ "idiopathic nonmenstrual bleeding": 372,
1128
+ "idiopathic painful menstruation": 373,
1129
+ "ileus": 374,
1130
+ "impulse control disorder": 375,
1131
+ "indigestion": 376,
1132
+ "induced abortion": 377,
1133
+ "infection of open wound": 378,
1134
+ "infectious gastroenteritis": 379,
1135
+ "ingrown toe nail": 380,
1136
+ "inguinal hernia": 381,
1137
+ "injury of the ankle": 382,
1138
+ "injury to internal organ": 383,
1139
+ "injury to the abdomen": 384,
1140
+ "injury to the arm": 385,
1141
+ "injury to the face": 386,
1142
+ "injury to the finger": 387,
1143
+ "injury to the hand": 388,
1144
+ "injury to the hip": 389,
1145
+ "injury to the knee": 390,
1146
+ "injury to the leg": 391,
1147
+ "injury to the shoulder": 392,
1148
+ "injury to the spinal cord": 393,
1149
+ "injury to the trunk": 394,
1150
+ "insect bite": 395,
1151
+ "interstitial lung disease": 396,
1152
+ "intertrigo (skin condition)": 397,
1153
+ "intestinal cancer": 398,
1154
+ "intestinal disease": 399,
1155
+ "intestinal malabsorption": 400,
1156
+ "intestinal obstruction": 401,
1157
+ "intracerebral hemorrhage": 402,
1158
+ "intracranial abscess": 403,
1159
+ "intracranial hemorrhage": 404,
1160
+ "intussusception": 405,
1161
+ "iridocyclitis": 406,
1162
+ "iron deficiency anemia": 407,
1163
+ "irritable bowel syndrome": 408,
1164
+ "ischemia of the bowel": 409,
1165
+ "ischemic heart disease": 410,
1166
+ "itching of unknown cause": 411,
1167
+ "jaw disorder": 412,
1168
+ "joint effusion": 413,
1169
+ "juvenile rheumatoid arthritis": 414,
1170
+ "kidney cancer": 415,
1171
+ "kidney disease due to longstanding hypertension": 416,
1172
+ "kidney failure": 417,
1173
+ "kidney stone": 418,
1174
+ "knee ligament or meniscus tear": 419,
1175
+ "labyrinthitis": 420,
1176
+ "lactose intolerance": 421,
1177
+ "laryngitis": 422,
1178
+ "lateral epicondylitis (tennis elbow)": 423,
1179
+ "leukemia": 424,
1180
+ "lewy body dementia": 425,
1181
+ "lice": 426,
1182
+ "lichen planus": 427,
1183
+ "lichen simplex": 428,
1184
+ "lipoma": 429,
1185
+ "liver cancer": 430,
1186
+ "liver disease": 431,
1187
+ "lumbago": 432,
1188
+ "lung cancer": 433,
1189
+ "lung contusion": 434,
1190
+ "lyme disease": 435,
1191
+ "lymphadenitis": 436,
1192
+ "lymphedema": 437,
1193
+ "lymphogranuloma venereum": 438,
1194
+ "lymphoma": 439,
1195
+ "macular degeneration": 440,
1196
+ "magnesium deficiency": 441,
1197
+ "male genitalia infection": 442,
1198
+ "malignant hypertension": 443,
1199
+ "marijuana abuse": 444,
1200
+ "mastectomy": 445,
1201
+ "mastoiditis": 446,
1202
+ "melanoma": 447,
1203
+ "meniere disease": 448,
1204
+ "meningioma": 449,
1205
+ "meningitis": 450,
1206
+ "menopause": 451,
1207
+ "metabolic disorder": 452,
1208
+ "metastatic cancer": 453,
1209
+ "missed abortion": 454,
1210
+ "mitral valve disease": 455,
1211
+ "mittelschmerz": 456,
1212
+ "molluscum contagiosum": 457,
1213
+ "mononeuritis": 458,
1214
+ "mononucleosis": 459,
1215
+ "mucositis": 460,
1216
+ "multiple myeloma": 461,
1217
+ "multiple sclerosis": 462,
1218
+ "mumps": 463,
1219
+ "muscle spasm": 464,
1220
+ "muscular dystrophy": 465,
1221
+ "myasthenia gravis": 466,
1222
+ "myelodysplastic syndrome": 467,
1223
+ "myocarditis": 468,
1224
+ "myoclonus": 469,
1225
+ "myopia": 470,
1226
+ "myositis": 471,
1227
+ "narcolepsy": 472,
1228
+ "nasal polyp": 473,
1229
+ "necrotizing fasciitis": 474,
1230
+ "neonatal jaundice": 475,
1231
+ "nerve impingement near the shoulder": 476,
1232
+ "neuralgia": 477,
1233
+ "neurofibromatosis": 478,
1234
+ "neuropathy due to drugs": 479,
1235
+ "neurosis": 480,
1236
+ "nonalcoholic liver disease (nash)": 481,
1237
+ "noninfectious gastroenteritis": 482,
1238
+ "normal pressure hydrocephalus": 483,
1239
+ "nose disorder": 484,
1240
+ "obesity": 485,
1241
+ "obsessive compulsive disorder (ocd)": 486,
1242
+ "obstructive sleep apnea (osa)": 487,
1243
+ "omphalitis": 488,
1244
+ "onychomycosis": 489,
1245
+ "open wound from surgical incision": 490,
1246
+ "open wound of the abdomen": 491,
1247
+ "open wound of the arm": 492,
1248
+ "open wound of the back": 493,
1249
+ "open wound of the ear": 494,
1250
+ "open wound of the eye": 495,
1251
+ "open wound of the finger": 496,
1252
+ "open wound of the foot": 497,
1253
+ "open wound of the hand": 498,
1254
+ "open wound of the lip": 499,
1255
+ "open wound of the mouth": 500,
1256
+ "open wound of the neck": 501,
1257
+ "open wound of the nose": 502,
1258
+ "open wound of the shoulder": 503,
1259
+ "oppositional disorder": 504,
1260
+ "optic neuritis": 505,
1261
+ "oral leukoplakia": 506,
1262
+ "oral mucosal lesion": 507,
1263
+ "oral thrush (yeast infection)": 508,
1264
+ "orbital cellulitis": 509,
1265
+ "orthostatic hypotension": 510,
1266
+ "osteoarthritis": 511,
1267
+ "osteochondroma": 512,
1268
+ "osteochondrosis": 513,
1269
+ "osteomyelitis": 514,
1270
+ "osteoporosis": 515,
1271
+ "otitis externa (swimmer's ear)": 516,
1272
+ "otitis media": 517,
1273
+ "otosclerosis": 518,
1274
+ "ovarian cancer": 519,
1275
+ "ovarian cyst": 520,
1276
+ "ovarian torsion": 521,
1277
+ "overflow incontinence": 522,
1278
+ "pain after an operation": 523,
1279
+ "pain disorder affecting the neck": 524,
1280
+ "pancreatic cancer": 525,
1281
+ "panic attack": 526,
1282
+ "panic disorder": 527,
1283
+ "parasitic disease": 528,
1284
+ "parathyroid adenoma": 529,
1285
+ "parkinson disease": 530,
1286
+ "paronychia": 531,
1287
+ "paroxysmal supraventricular tachycardia": 532,
1288
+ "paroxysmal ventricular tachycardia": 533,
1289
+ "pelvic fistula": 534,
1290
+ "pelvic inflammatory disease": 535,
1291
+ "pelvic organ prolapse": 536,
1292
+ "pemphigus": 537,
1293
+ "pericarditis": 538,
1294
+ "peripheral arterial disease": 539,
1295
+ "peripheral arterial embolism": 540,
1296
+ "peripheral nerve disorder": 541,
1297
+ "perirectal infection": 542,
1298
+ "peritonitis": 543,
1299
+ "peritonsillar abscess": 544,
1300
+ "persistent vomiting of unknown cause": 545,
1301
+ "personality disorder": 546,
1302
+ "peyronie disease": 547,
1303
+ "pharyngitis": 548,
1304
+ "phimosis": 549,
1305
+ "pilonidal cyst": 550,
1306
+ "pinguecula": 551,
1307
+ "pinworm infection": 552,
1308
+ "pituitary adenoma": 553,
1309
+ "pituitary disorder": 554,
1310
+ "pityriasis rosea": 555,
1311
+ "placenta previa": 556,
1312
+ "placental abruption": 557,
1313
+ "plantar fasciitis": 558,
1314
+ "pleural effusion": 559,
1315
+ "pneumoconiosis": 560,
1316
+ "pneumothorax": 561,
1317
+ "poisoning due to analgesics": 562,
1318
+ "poisoning due to anticonvulsants": 563,
1319
+ "poisoning due to antidepressants": 564,
1320
+ "poisoning due to antihypertensives": 565,
1321
+ "poisoning due to antimicrobial drugs": 566,
1322
+ "poisoning due to antipsychotics": 567,
1323
+ "poisoning due to ethylene glycol": 568,
1324
+ "poisoning due to gas": 569,
1325
+ "poisoning due to opioids": 570,
1326
+ "poisoning due to sedatives": 571,
1327
+ "polycystic kidney disease": 572,
1328
+ "polycystic ovarian syndrome (pcos)": 573,
1329
+ "polycythemia vera": 574,
1330
+ "polymyalgia rheumatica": 575,
1331
+ "post-traumatic stress disorder (ptsd)": 576,
1332
+ "postoperative infection": 577,
1333
+ "postpartum depression": 578,
1334
+ "preeclampsia": 579,
1335
+ "pregnancy": 580,
1336
+ "premature atrial contractions (pacs)": 581,
1337
+ "premature ovarian failure": 582,
1338
+ "premature rupture of amniotic membrane": 583,
1339
+ "premature ventricular contractions (pvcs)": 584,
1340
+ "premenstrual tension syndrome": 585,
1341
+ "presbyacusis": 586,
1342
+ "presbyopia": 587,
1343
+ "priapism": 588,
1344
+ "primary immunodeficiency": 589,
1345
+ "primary insomnia": 590,
1346
+ "primary kidney disease": 591,
1347
+ "primary thrombocythemia": 592,
1348
+ "problem during pregnancy": 593,
1349
+ "prostate cancer": 594,
1350
+ "prostatitis": 595,
1351
+ "protein deficiency": 596,
1352
+ "pseudohypoparathyroidism": 597,
1353
+ "pseudotumor cerebri": 598,
1354
+ "psychosexual disorder": 599,
1355
+ "psychotic disorder": 600,
1356
+ "pterygium": 601,
1357
+ "pulmonary congestion": 602,
1358
+ "pulmonary embolism": 603,
1359
+ "pulmonary eosinophilia": 604,
1360
+ "pulmonary fibrosis": 605,
1361
+ "pulmonary hypertension": 606,
1362
+ "pyelonephritis": 607,
1363
+ "pyloric stenosis": 608,
1364
+ "pyogenic skin infection": 609,
1365
+ "raynaud disease": 610,
1366
+ "rectal disorder": 611,
1367
+ "restless leg syndrome": 612,
1368
+ "retinal detachment": 613,
1369
+ "retinopathy due to high blood pressure": 614,
1370
+ "rhabdomyolysis": 615,
1371
+ "rheumatoid arthritis": 616,
1372
+ "rosacea": 617,
1373
+ "rotator cuff injury": 618,
1374
+ "salivary gland disorder": 619,
1375
+ "sarcoidosis": 620,
1376
+ "scabies": 621,
1377
+ "scar": 622,
1378
+ "scarlet fever": 623,
1379
+ "schizophrenia": 624,
1380
+ "sciatica": 625,
1381
+ "scleritis": 626,
1382
+ "scleroderma": 627,
1383
+ "scoliosis": 628,
1384
+ "seasonal allergies (hay fever)": 629,
1385
+ "sebaceous cyst": 630,
1386
+ "seborrheic dermatitis": 631,
1387
+ "seborrheic keratosis": 632,
1388
+ "sensorineural hearing loss": 633,
1389
+ "sepsis": 634,
1390
+ "septic arthritis": 635,
1391
+ "shingles (herpes zoster)": 636,
1392
+ "sialoadenitis": 637,
1393
+ "sick sinus syndrome": 638,
1394
+ "sickle cell anemia": 639,
1395
+ "sickle cell crisis": 640,
1396
+ "sinus bradycardia": 641,
1397
+ "sjogren syndrome": 642,
1398
+ "skin cancer": 643,
1399
+ "skin disorder": 644,
1400
+ "skin pigmentation disorder": 645,
1401
+ "skin polyp": 646,
1402
+ "smoking or tobacco addiction": 647,
1403
+ "social phobia": 648,
1404
+ "soft tissue sarcoma": 649,
1405
+ "somatization disorder": 650,
1406
+ "spermatocele": 651,
1407
+ "spherocytosis": 652,
1408
+ "spina bifida": 653,
1409
+ "spinal stenosis": 654,
1410
+ "spinocerebellar ataxia": 655,
1411
+ "spondylitis": 656,
1412
+ "spondylolisthesis": 657,
1413
+ "spondylosis": 658,
1414
+ "spontaneous abortion": 659,
1415
+ "sprain or strain": 660,
1416
+ "stenosis of the tear duct": 661,
1417
+ "stomach cancer": 662,
1418
+ "strep throat": 663,
1419
+ "stress incontinence": 664,
1420
+ "stricture of the esophagus": 665,
1421
+ "stroke": 666,
1422
+ "stye": 667,
1423
+ "subacute thyroiditis": 668,
1424
+ "subarachnoid hemorrhage": 669,
1425
+ "subconjunctival hemorrhage": 670,
1426
+ "subdural hemorrhage": 671,
1427
+ "substance-related mental disorder": 672,
1428
+ "syndrome of inappropriate secretion of adh (siadh)": 673,
1429
+ "syphilis": 674,
1430
+ "syringomyelia": 675,
1431
+ "systemic lupus erythematosis (sle)": 676,
1432
+ "teething syndrome": 677,
1433
+ "temporary or benign blood in urine": 678,
1434
+ "temporomandibular joint disorder": 679,
1435
+ "tendinitis": 680,
1436
+ "tension headache": 681,
1437
+ "testicular cancer": 682,
1438
+ "testicular disorder": 683,
1439
+ "testicular torsion": 684,
1440
+ "thoracic aortic aneurysm": 685,
1441
+ "thoracic outlet syndrome": 686,
1442
+ "threatened pregnancy": 687,
1443
+ "thrombocytopenia": 688,
1444
+ "thrombophlebitis": 689,
1445
+ "thyroid cancer": 690,
1446
+ "thyroid disease": 691,
1447
+ "thyroid nodule": 692,
1448
+ "tic (movement) disorder": 693,
1449
+ "tietze syndrome": 694,
1450
+ "tinnitus of unknown cause": 695,
1451
+ "tonsillar hypertrophy": 696,
1452
+ "tonsillitis": 697,
1453
+ "tooth abscess": 698,
1454
+ "tooth disorder": 699,
1455
+ "torticollis": 700,
1456
+ "tourette syndrome": 701,
1457
+ "toxic multinodular goiter": 702,
1458
+ "tracheitis": 703,
1459
+ "transient ischemic attack": 704,
1460
+ "trichiasis": 705,
1461
+ "trichomonas infection": 706,
1462
+ "trigeminal neuralgia": 707,
1463
+ "trigger finger (finger disorder)": 708,
1464
+ "tuberous sclerosis": 709,
1465
+ "ulcerative colitis": 710,
1466
+ "urethral disorder": 711,
1467
+ "urethral stricture": 712,
1468
+ "urethral valves": 713,
1469
+ "urethritis": 714,
1470
+ "urge incontinence": 715,
1471
+ "urinary tract obstruction": 716,
1472
+ "uterine atony": 717,
1473
+ "uterine cancer": 718,
1474
+ "uterine fibroids": 719,
1475
+ "uveitis": 720,
1476
+ "vaginal cyst": 721,
1477
+ "vaginal yeast infection": 722,
1478
+ "vaginismus": 723,
1479
+ "vaginitis": 724,
1480
+ "valley fever": 725,
1481
+ "varicocele of the testicles": 726,
1482
+ "vasculitis": 727,
1483
+ "venous insufficiency": 728,
1484
+ "vertebrobasilar insufficiency": 729,
1485
+ "vesicoureteral reflux": 730,
1486
+ "viral exanthem": 731,
1487
+ "viral hepatitis": 732,
1488
+ "viral warts": 733,
1489
+ "vitamin b12 deficiency": 734,
1490
+ "vitamin d deficiency": 735,
1491
+ "vitreous degeneration": 736,
1492
+ "vitreous hemorrhage": 737,
1493
+ "vocal cord polyp": 738,
1494
+ "volvulus": 739,
1495
+ "von willebrand disease": 740,
1496
+ "vulvar cancer": 741,
1497
+ "vulvar disorder": 742,
1498
+ "vulvodynia": 743,
1499
+ "wernicke korsakoff syndrome": 744,
1500
+ "white blood cell disease": 745,
1501
+ "whooping cough": 746,
1502
+ "wilson disease": 747,
1503
+ "yeast infection": 748,
1504
+ "zenker diverticulum": 749
1505
+ },
1506
+ "num_labels": 750,
1507
+ "max_length": 512,
1508
+ "version": "3.0",
1509
+ "improvements": [
1510
+ "Increased diseases covered",
1511
+ "Better generalization",
1512
+ "Consistent 512 token length",
1513
+ "Improved regularization",
1514
+ "Better data augmentation"
1515
+ ]
1516
+ }
agent/text_symptom_tool.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import requests
3
+ from langchain_core.tools import tool
4
+
5
+ @tool
6
+ def analyze_symptom_text(symptoms: str) -> str:
7
+ """
8
+ Analyzes text-based symptoms using classification model via api backend.
9
+ Input: Patient's symptom description text.
10
+ Output: Predicted conditions with confidence scores.
11
+ """
12
+ try:
13
+ print(f"🩺 Analyzing symptoms: {symptoms[:50]}...")
14
+
15
+ # Call your HF ClinicalBERT FastAPI Space
16
+ api_url = "https://datdevsteve-nivra-text-diagnosis.hf.space/run/predict"
17
+ payload = {
18
+ "data": [symptoms],
19
+ "fn_index": 0 # Default prediction function
20
+ }
21
+
22
+ print("🔬 Calling ClinicalBERT FastAPI backend...")
23
+ response = requests.post(api_url, json=payload, timeout=30)
24
+ response.raise_for_status()
25
+
26
+ result = response.json()
27
+
28
+ # Extract diagnosis from HF Space response format
29
+ if "data" in result and len(result["data"]) > 0:
30
+ diagnosis = result["data"][0]
31
+
32
+ # Parse confidence if available, else default format
33
+ if isinstance(diagnosis, list) and len(diagnosis) > 0:
34
+ diagnosis = diagnosis[0]
35
+
36
+ return f"""
37
+ [TEXT SYMPTOM ANALYSIS - SUCCESS]:
38
+ ✅ FastAPI Backend Response: {diagnosis}
39
+
40
+ 📡 **Backend**: nivra-text-diagnosis HF Space"""
41
+ else:
42
+ # Fallback with generic advice
43
+ return "[TEXT SYMPTOM ANALYSIS - WARNING]: No diagnosis returned from backend. Please consult a doctor."
44
+
45
+ except requests.exceptions.Timeout:
46
+ return "[TEXT SYMPTOM ANALYSIS - ERROR]: Analysis timeout. Please try again or consult a doctor."
47
+ except requests.exceptions.RequestException as e:
48
+ return f"[TEXT SYMPTOM ANALYSIS - ERROR]: Network error: {str(e)}. Please consult a doctor."
49
+ except Exception as e:
50
+ return f"[TEXT SYMPTOM ANALYSIS - ERROR]: Unexpected error: {str(e)}. Please consult a doctor."
app.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from nivra_agent import nivra_chat
3
+ import os
4
+
5
+ # Gradio interface for HF Spaces
6
+ def chat_interface(message, history, image=None, audio=None):
7
+ # Build multimodal input
8
+ input_text = message
9
+ if image:
10
+ input_text += f"\n[IMAGE: {image}]"
11
+ if audio:
12
+ input_text += f"\n[AUDIO: {audio}]"
13
+
14
+ response = nivra_chat(input_text)
15
+ history.append((message, response))
16
+ return history, ""
17
+
18
+ demo = gr.ChatInterface(
19
+ chat_interface,
20
+ title="🩺 Nivra AI Healthcare Assistant",
21
+ description="India-first symptom diagnosis: Text + Image + Voice",
22
+ examples=[
23
+ ["I have fever and chills"],
24
+ ["Skin rash", gr.Image(type="filepath")],
25
+ ["Stomach pain, vomiting"]
26
+ ],
27
+ multimodal=True
28
+ )
29
+
30
+ if __name__ == "__main__":
31
+ demo.launch()
nivra_agent.py ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #=========================================
2
+ #|| NIVRA AI HEALTHCARE ASSISTANT AGENT ||
3
+ #=========================================
4
+
5
+ from langchain_groq import ChatGroq
6
+ from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
7
+ from langchain_core.messages import HumanMessage, AIMessage
8
+ from langchain.agents import create_tool_calling_agent, AgentExecutor
9
+ from langchain_core.tools import tool
10
+ from agent.rag_retriever import NivraRAGRetriever
11
+ from agent.text_symptom_tool import analyze_symptom_text
12
+ from agent.image_symptom_tool import analyze_symptom_image
13
+ from dotenv import load_dotenv
14
+ import os
15
+
16
+ load_dotenv()
17
+ rag_tool = NivraRAGRetriever.getRelevantDocs
18
+ #instantiate
19
+ llm = ChatGroq(
20
+ temperature=0.1,
21
+ model_name="llama-3.1-70b-versatile",
22
+ api_key= os.getenv("GROQ_API_KEY")
23
+ )
24
+ tools = [analyze_symptom_image, analyze_symptom_text, rag_tool]
25
+ system_prompt = """You are Nivra, a smart and helpful AI Healthcare Assistant with multimodal capabilities. Your role is to only provide medical attention to the user in a structured format of text or voice.
26
+
27
+ You are equipped with these tools:
28
+ - analyze_symptom_image: Performs symptom analysis on provided image input to diagnose skin conditions
29
+ - analyze_symptom_text: Performs symptom analysis on provided text input to diagnose diseases
30
+ - rag_tool: Refers to medical knowledgebase for additional context
31
+
32
+ Always remember these rules:
33
+ - Output text should be structured for easy TTS narration when [VOICE MODE ONLY] is detected
34
+ - You ARE NOT A DOCTOR - provide disease information ONLY, NO treatment advice
35
+ - Always provide doctor referral for Cancer, Dengue, Malaria, or high-risk diagnoses
36
+ - ALWAYS correlate with rag_tool for medical knowledge
37
+ - Keep descriptions short/crisp to limit token usage
38
+
39
+ Basic Output Structure:
40
+ [TOOLS USED]
41
+ [SYMPTOMS]
42
+ [PRIMARY DIAGNOSIS]
43
+ [DIAGNOSIS DESCRIPTION with RAG Knowledgebase]
44
+ [FIRST AID]
45
+ [EMERGENCY CONSULTATION REQUIRED]
46
+
47
+ FEW-SHOT EXAMPLES (FOLLOW EXACT FORMAT):
48
+
49
+ (EXAMPLE 1- Voice Input)
50
+ Input: [VOICE MODE] "I have fever, chills and severe headache."
51
+ ---
52
+ [TOOLS USED] analyze_symptom_text, rag_tool [/TOOLS USED]
53
+ [SYMPTOMS] Fever, Chills, Headache [/SYMPTOMS]
54
+ [PRIMARY DIAGNOSIS] Malaria (78% confidence) [/PRIMARY DIAGNOSIS]
55
+ [DIAGNOSIS DESCRIPTION]
56
+ Malaria is caused by Plasmodium parasite spread by Anopheles mosquitoes.
57
+ It multiplies in red blood cells causing fever, chills, headache cycles.
58
+ Common in India during monsoon season.
59
+ [/DIAGNOSIS DESCRIPTION]
60
+ [FIRST AID]
61
+ Rest completely and drink plenty of fluids. Seek immediate medical attention for malaria test and treatment.
62
+ [/FIRST AID]
63
+ [EMERGENCY] Yes [/EMERGENCY]
64
+
65
+ (EXAMPLE 2- Image Input)
66
+ Input: "I have skin rash" + rash.jpg
67
+ ---
68
+ [TOOLS USED] analyze_symptom_image, rag_tool [/TOOLS USED]
69
+ [SYMPTOMS] Red scaly patches, itching [/SYMPTOMS]
70
+ [PRIMARY DIAGNOSIS] Psoriasis (82% confidence) [/PRIMARY DIAGNOSIS]
71
+ [DIAGNOSIS DESCRIPTION]
72
+ Psoriasis is a chronic autoimmune skin disorder causing rapid skin cell growth.
73
+ Results in thick, dry, scaly patches. Non-contagious, affects 2-3% population.
74
+ [/DIAGNOSIS DESCRIPTION]
75
+ [FIRST AID]
76
+ Keep skin clean and moisturized. Avoid scratching. Consult dermatologist for management.
77
+ [/FIRST AID]
78
+ [EMERGENCY] No [/EMERGENCY]
79
+
80
+ (EXAMPLE 3- Low Confidence)
81
+ Input: "Stomach pain, vomiting frequently"
82
+ ---
83
+ [TOOLS USED] analyze_symptom_text, rag_tool [/TOOLS USED]
84
+ [SYMPTOMS] Stomach pain, vomiting [/SYMPTOMS]
85
+ [PRIMARY DIAGNOSIS] Gastritis or Gastroenteritis [/PRIMARY DIAGNOSIS]
86
+ [DIAGNOSIS DESCRIPTION]
87
+ Multiple causes possible: acidity, infection, food poisoning. Clinical evaluation required.
88
+ [/DIAGNOSIS DESCRIPTION]
89
+ [FIRST AID]
90
+ Seek medical consultation immediately. Ultrasound may be needed.
91
+ [/FIRST AID]
92
+ [EMERGENCY] Yes [/EMERGENCY]
93
+
94
+ **CRITICAL**: High-risk triggers (EMERGENCY=Yes): melanoma, basal_cell_carcinoma, dengue, malaria, typhoid, cancer
95
+ """
96
+ prompt = ChatPromptTemplate.from_messages([
97
+ ("system", system_prompt),
98
+ MessagesPlaceholder(variable_name="chat_history", optional=True),
99
+ ("user", "{input}"),
100
+ MessagesPlaceholder(variable_name="agent_scratchpad")
101
+ ])
102
+
103
+ #create the agent
104
+ agent = create_tool_calling_agent(llm, tools, prompt)
105
+ agent_executor = AgentExecutor(
106
+ agent = agent,
107
+ tools = tools,
108
+ verbose = True,
109
+ handle_parsing_errors = True,
110
+ max_iterations = 5
111
+ )
112
+
113
+ def nivra_chat(user_input: str, chat_history: list = []):
114
+ """Main chat function to be invoked via mobile app"""
115
+ response = agent_executor.invoke({
116
+ "input": user_input,
117
+ "chat_history": chat_history
118
+ })
119
+ return response["output"]
120
+
requirements.txt CHANGED
@@ -1,2 +1,29 @@
1
- gradio
2
- llama-cpp-python
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LangChain Core (Agent + Tools)
2
+ langchain>=0.3.1
3
+ langchain-groq>=0.1.0
4
+ langchain-community>=0.0.20
5
+ langchain-core>=0.1.23
6
+ langchain-huggingface>=0.1.0
7
+
8
+ # RAG (Your chroma_db)
9
+ chromadb>=0.5.11
10
+ sentence-transformers>=2.2.2
11
+ faiss-cpu>=1.7.4
12
+
13
+ # Groq LLM
14
+ groq>=0.4.0
15
+
16
+ # HF Spaces UI
17
+ gradio>=5.4.0
18
+
19
+ # API Clients (Text + Vision Spaces)
20
+ requests>=2.32.0
21
+
22
+ # Image processing (for API calls)
23
+ pillow>=12.1.0
24
+
25
+ # Utilities
26
+ python-dotenv>=1.0.0
27
+ numpy>=1.24.0
28
+ pandas>=2.0.0
29
+ pydantic>=2.5.0