Update README.md
Browse files
README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
language:
|
4 |
-
- zh
|
5 |
- en
|
6 |
base_model:
|
7 |
- meta-llama/Llama-3.1-8B-Instruct
|
@@ -45,8 +44,176 @@ output = model.generate(texts, sampling_params)
|
|
45 |
res = json.loads(output[0].outputs[0].text)
|
46 |
```
|
47 |
|
|
|
48 |
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
If you find our paper or models helpful, please consider cite: (to be released)
|
52 |
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
language:
|
|
|
4 |
- en
|
5 |
base_model:
|
6 |
- meta-llama/Llama-3.1-8B-Instruct
|
|
|
44 |
res = json.loads(output[0].outputs[0].text)
|
45 |
```
|
46 |
|
47 |
+
## An example:
|
48 |
|
49 |
+
Input:
|
50 |
+
```python
|
51 |
+
EHR = ["""Unit No:___
|
52 |
+
|
53 |
+
Admission Date:___
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
Discharge Date:___
|
58 |
+
|
59 |
+
Date of Birth:___
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
Sex: F
|
64 |
+
|
65 |
+
Service: MEDICINE
|
66 |
+
|
67 |
+
Allergies:
|
68 |
+
Sulfur / Norvasc
|
69 |
+
|
70 |
+
Attending:___
|
71 |
+
Addendum:
|
72 |
+
See below
|
73 |
+
|
74 |
+
Chief Complaint:
|
75 |
+
abdominal pain
|
76 |
+
|
77 |
+
Major Surgical or Invasive Procedure:
|
78 |
+
none
|
79 |
+
|
80 |
+
History of Present Illness:
|
81 |
+
84 F with PMHx of Renovascular HTN c/b NSTEMI now s/p renal
|
82 |
+
stents, Gout and h/o Crohn's disease who presented to the ED on
|
83 |
+
___with RLQ pain for approx 2 days. She denies any
|
84 |
+
nausea/vomiting/diarrhea or constipation but has not been taking
|
85 |
+
|
86 |
+
po well and felt dehydrated."""]
|
87 |
+
```
|
88 |
+
|
89 |
+
Output:
|
90 |
+
```python
|
91 |
+
res = [{'phrase': 'allergies',
|
92 |
+
'semantic_type': 'Disease, Syndrome or Pathologic Function',
|
93 |
+
'assertion_status': 'title',
|
94 |
+
'body_location': 'null',
|
95 |
+
'modifier': 'null',
|
96 |
+
'value': 'not applicable',
|
97 |
+
'unit': 'not applicable',
|
98 |
+
'purpose': 'not applicable'},
|
99 |
+
{'phrase': 'sulfur',
|
100 |
+
'semantic_type': 'Chemical or Drug',
|
101 |
+
'assertion_status': 'conditional',
|
102 |
+
'body_location': 'not applicable',
|
103 |
+
'modifier': 'not applicable',
|
104 |
+
'value': 'null',
|
105 |
+
'unit': 'units: null',
|
106 |
+
'purpose': 'null'},
|
107 |
+
{'phrase': 'norvasc',
|
108 |
+
'semantic_type': 'Chemical or Drug',
|
109 |
+
'assertion_status': 'conditional',
|
110 |
+
'body_location': 'not applicable',
|
111 |
+
'modifier': 'not applicable',
|
112 |
+
'value': 'null',
|
113 |
+
'unit': 'units: null',
|
114 |
+
'purpose': 'null'},
|
115 |
+
{'phrase': 'abdominal pain',
|
116 |
+
'semantic_type': 'Sign, Symptom, or Finding',
|
117 |
+
'assertion_status': 'present',
|
118 |
+
'body_location': 'Abdominal',
|
119 |
+
'modifier': 'null',
|
120 |
+
'value': 'not applicable',
|
121 |
+
'unit': 'not applicable',
|
122 |
+
'purpose': 'not applicable'},
|
123 |
+
{'phrase': 'surgical or invasive procedure',
|
124 |
+
'semantic_type': 'Therapeutic or Preventive Procedure',
|
125 |
+
'assertion_status': 'title',
|
126 |
+
'body_location': 'null',
|
127 |
+
'modifier': 'not applicable',
|
128 |
+
'value': 'not applicable',
|
129 |
+
'unit': 'not applicable',
|
130 |
+
'purpose': 'null'},
|
131 |
+
{'phrase': 'renovascular hypertension',
|
132 |
+
'semantic_type': 'Disease, Syndrome or Pathologic Function',
|
133 |
+
'assertion_status': 'present',
|
134 |
+
'body_location': 'renal',
|
135 |
+
'modifier': 'null',
|
136 |
+
'value': 'not applicable',
|
137 |
+
'unit': 'not applicable',
|
138 |
+
'purpose': 'not applicable'},
|
139 |
+
{'phrase': 'non-st elevation myocardial infarction',
|
140 |
+
'semantic_type': 'Disease, Syndrome or Pathologic Function',
|
141 |
+
'assertion_status': 'present',
|
142 |
+
'body_location': 'null',
|
143 |
+
'modifier': 'null',
|
144 |
+
'value': 'not applicable',
|
145 |
+
'unit': 'not applicable',
|
146 |
+
'purpose': 'not applicable'},
|
147 |
+
{'phrase': 'gout',
|
148 |
+
'semantic_type': 'Disease, Syndrome or Pathologic Function',
|
149 |
+
'assertion_status': 'present',
|
150 |
+
'body_location': 'null',
|
151 |
+
'modifier': 'null',
|
152 |
+
'value': 'not applicable',
|
153 |
+
'unit': 'not applicable',
|
154 |
+
'purpose': 'not applicable'},
|
155 |
+
{'phrase': "crohn ' s disease",
|
156 |
+
'semantic_type': 'Disease, Syndrome or Pathologic Function',
|
157 |
+
'assertion_status': 'present',
|
158 |
+
'body_location': 'not applicable',
|
159 |
+
'modifier': 'not applicable',
|
160 |
+
'value': 'not applicable',
|
161 |
+
'unit': 'not applicable',
|
162 |
+
'purpose': 'not applicable'},
|
163 |
+
{'phrase': 'emergency department',
|
164 |
+
'semantic_type': 'Therapeutic or Preventive Procedure',
|
165 |
+
'assertion_status': 'present',
|
166 |
+
'body_location': 'null',
|
167 |
+
'modifier': 'not applicable',
|
168 |
+
'value': 'not applicable',
|
169 |
+
'unit': 'not applicable',
|
170 |
+
'purpose': 'null'},
|
171 |
+
{'phrase': 'pain',
|
172 |
+
'semantic_type': 'Sign, Symptom, or Finding',
|
173 |
+
'assertion_status': 'present',
|
174 |
+
'body_location': 'right lower quadrant',
|
175 |
+
'modifier': 'null',
|
176 |
+
'value': 'not applicable',
|
177 |
+
'unit': 'not applicable',
|
178 |
+
'purpose': 'not applicable'},
|
179 |
+
{'phrase': 'nausea',
|
180 |
+
'semantic_type': 'Sign, Symptom, or Finding',
|
181 |
+
'assertion_status': 'absent',
|
182 |
+
'body_location': 'null',
|
183 |
+
'modifier': 'null',
|
184 |
+
'value': 'not applicable',
|
185 |
+
'unit': 'not applicable',
|
186 |
+
'purpose': 'not applicable'},
|
187 |
+
{'phrase': 'vomiting',
|
188 |
+
'semantic_type': 'Sign, Symptom, or Finding',
|
189 |
+
'assertion_status': 'absent',
|
190 |
+
'body_location': 'null',
|
191 |
+
'modifier': 'null',
|
192 |
+
'value': 'not applicable',
|
193 |
+
'unit': 'not applicable',
|
194 |
+
'purpose': 'not applicable'},
|
195 |
+
{'phrase': 'diarrhea',
|
196 |
+
'semantic_type': 'Sign, Symptom, or Finding',
|
197 |
+
'assertion_status': 'absent',
|
198 |
+
'body_location': 'null',
|
199 |
+
'modifier': 'null',
|
200 |
+
'value': 'not applicable',
|
201 |
+
'unit': 'not applicable',
|
202 |
+
'purpose': 'not applicable'},
|
203 |
+
{'phrase': 'constipation',
|
204 |
+
'semantic_type': 'Sign, Symptom, or Finding',
|
205 |
+
'assertion_status': 'absent',
|
206 |
+
'body_location': 'null',
|
207 |
+
'modifier': 'null',
|
208 |
+
'value': 'not applicable',
|
209 |
+
'unit': 'not applicable',
|
210 |
+
'purpose': 'not applicable'}]
|
211 |
+
|
212 |
+
```
|
213 |
+
|
214 |
+
|
215 |
+
|
216 |
+
## Citation
|
217 |
|
218 |
If you find our paper or models helpful, please consider cite: (to be released)
|
219 |
|