Repository navigation
Expand file tree
/
Copy pathtemplates.py
More file actions
229 lines (227 loc) · 15.7 KB
/
Copy pathtemplates.py
File metadata and controls
229 lines (227 loc) · 15.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
template = {
"patient_name": {"type": "string"},
"date_of_birth": {"type": "string"},
"medical_record_number_MRN": {"type": "string"},
"preferred_language": {"type": "string"},
"sex": {"type": "string"},
"race": {"type": "string"},
"ethnicity": {"type": "string"},
"insurance_payer": {"type": "string"},
"age": {"type": "integer"},
"handedness": {"type": "string", "enum": ["right-handed", "left-handed"]},
"clinical_diagnosis": {"type": "string"},
"clinical_diagnosis_date": {"type": "string"},
"initial_cognitive_domain": {"type": "string"},
"focused_review_of_symptoms": {
"memory_impairment": {"type": "string", "enum": ["YES", "NO"]},
"language_impairment_aphasia": {"type": "string", "enum": ["YES", "NO"]},
"visuospatial_impairment": {"type": "string", "enum": ["YES", "NO"]},
"executive_dysfunction": {"type": "string", "enum": ["YES", "NO"]},
"motor_weakness": {"type": "string", "enum": ["YES", "NO"]},
"gait_disorder": {"type": "string", "enum": ["YES", "NO"]},
"frequent_falls": {"type": "string", "enum": ["YES", "NO"]},
"parkinsonian_symptoms": {"type": "string", "enum": ["YES", "NO"]},
"visual_hallucinations": {"type": "string", "enum": ["YES", "NO"]},
"REM_sleep_behavior_disorder": {"type": "string", "enum": ["YES", "NO"]},
"fluctuating_cognition_with_attention_variations": {"type": "string", "enum": ["YES", "NO"]},
"early_changes_in_personality_or_behavior": {"type": "string", "enum": ["YES", "NO"]},
},
"functional_activities_questionnaire": {
"writing_checks": {"type": "integer"},
"assembling_tax_records": {"type": "integer"},
"shopping_alone": {"type": "integer"},
"playing_game_or_hobby": {"type": "integer"},
"making_coffee_or_heating_water": {"type": "integer"},
"preparing_meal": {"type": "integer"},
"keeping_track_of_current_events": {"type": "integer"},
"paying_attention_to_media": {"type": "integer"},
"remembering_appointments_or_medications": {"type": "integer"},
"traveling_or_driving": {"type": "integer"},
"total_faq_score": {"type": "integer"},
},
"quick_dementia_rating_system_QDRS": {
"memory_and_recall": {"type": "float"},
"orientation": {"type": "float"},
"decision_making_and_problem_solving": {"type": "float"},
"activities_outside_home": {"type": "float"},
"function_at_home_and_hobby_activities": {"type": "float"},
"toileting_and_personal_hygiene": {"type": "float"},
"behavior_and_personality_changes": {"type": "float"},
"language_and_communication_abilities": {"type": "float"},
"mood": {"type": "float"},
"attention_and_concentration": {"type": "float"},
"cognitive_subtotal": {"type": "float"},
"behavioral_subtotal": {"type": "float"},
"total_QDRS_score": {"type": "float"},
},
"CDR": {
"CDR_box_score": {"type": "float"},
"CDR_global": {"type": "float"},
},
"past_medical_history": {
"type": "array",
"items": {"type": "string"},
"description": "Provide a list of strings representing the patient's past medical history. Each condition should be a separate item in the list.",
},
"smoking_status": {
"smoking_status": {"type": "string", "enum": ["YES", "Never", "Not Asked", "Quit/Former", "Passive"]},
"packs_day": {"type": "float"},
"history_length_years": {"type": "float"},
"total_pack_years": {"type": "float"},
"smoking_method": {"type": "string", "description": "Specify the type of smoking method used by the patient."},
"quit_date": {"type": "string"},
"years_since_quitting": {"type": "float"},
},
"alcohol_use": {"drinking_status": {"type": "string"}, "amount_per_week": {"type": "string"}},
"drug_use": {"type": "string", "enum": ["YES", "NO"]},
"living_situation": {"type": "string"},
"current_outpatient_medications_with_dose": {
"type": "array",
"items": {"type": "string"},
"description": "Specify the drug generic with brand name and dose (if there is).",
},
"allergies": {
"type": "array",
"items": {"type": "string"},
"description": "Provide a list of strings representing the patient's allergies.",
},
"examination_of_vital_signs": {
"blood_pressure": {"type": "string", "description": "Ensure that the blood pressure value is formatted as 'dd/dd' (systolic/diastolic)."},
"pulse": {"type": "float"},
"temperature": {"type": "float"},
"height": {"type": "float"},
"weight": {"type": "float"},
"spo2": {"type": "float"},
"bmi": {"type": "float"},
},
"Mini_Mental_State_Examination": {
"orientation_to_time": {"type": "integer", "description": "Extract the score for Orientation to time (year, season, date, day of the week, month) component of MMSE. Return 'missing' if no score is found."},
"orientation_to_place": {"type": "integer", "description": "Extract the score for Orientation to place (state, county, town/city, hospital, floor) component of MMSE. Return 'missing' if no score is found."},
"registration_of_3_words_correctly": {"type": "integer", "description": "Extract the score for correctly registration of 3 words component of MMSE. Return 'missing' if no score is found."},
"series_7_or_word_backward": {"type": "integer", "description": "Extract the score for Serial 7's (93, 86, 79, 72, 65) or WORLD backward (D-L-R-O-W) component of MMSE. The score should be an integer within the range of 0 to 5. Return 'missing' if no score is found."},
"recall_of_3_words": {"type": "integer", "description": "Extract the score for Recall of 3 words component of MMSE. Return 'missing' if no score is found."},
"naming_two_objects_correctly": {"type": "integer", "description": "Extract the score for correct naming two objects component of MMSE. Return 'missing' if no score is found."},
"repeat_no_ifs_ands_or_buts": {"type": "integer", "description": "Extract the score for Repeat No ifs, ands, or buts component of MMSE. Return 'missing' if no score is found."},
"3_step_correct_paper_right_hand_fold_floor": {"type": "integer", "description": "Extract the score for 3 steps testing like Take the paper in your right hand, fold it in half, and put it on the floor component of MMSE. Return 'missing' if no score is found."},
"sentence_correct_read_this_and_do_what_it_says": {"type": "integer", "description": "Extract the score for correct sentence like Please read this and do what it says component of MMSE. Return 'missing' if no score is found."},
"make_up_and_write_a_sentence_about_anything_close_eyes": {"type": "integer", "description": "Extract the score for Please read this and do what it says (Written instructions: Close your eyes.) component of MMSE. Return 'missing' if no score is found."},
"intersecting_pentagons": {"type": "integer", "description": "Extract the score for Intersecting pentagons component of MMSE. Return 'missing' if no score is found."},
"total_score": {"type": "integer", "description": "Extract the total score of MMSE. Return 'missing' if no score is found."},
},
"mri_brain_images_note": {
"atrophy_pattern": {"type": "string"},
"microhemorrhages_count": {"type": "integer"},
"macrohemorrhages_count": {"type": "integer"},
"cortical_hemorrhage": {"type": "string", "enum": ["present", "absent"]},
"superficial_siderosis": {"type": "string", "enum": ["present", "absent"]},
"vasogenic_edema": {"type": "string", "enum": ["present", "absent"]},
"fazekas_score": {"type": "integer"},
"lacunar_infarcts": {"type": "string", "enum": ["present", "absent"]},
"cortical_infarcts": {"type": "string", "enum": ["present", "absent"]},
"other_information_and_comment": {"type": "string"},
},
"laboratory_testing_value": {
"B12": {"type": "float"},
"TSH": {"type": "float"},
"WBC": {"type": "float"},
"RBC": {"type": "float"},
"HGB": {"type": "float"},
"HCT": {"type": "float"},
"PLT": {"type": "float"},
"MCV": {"type": "float"},
"MCH": {"type": "float"},
"MCHC": {"type": "float"},
"RDW": {"type": "float"},
"MVP": {"type": "float"},
"NRBC": {"type": "float"},
"NRBCA": {"type": "float"},
"INR": {"type": "float"},
"PTINR": {"type": "float"},
"PTT": {"type": "float"},
"NA": {"type": "float"},
"K": {"type": "float"},
"CL": {"type": "float"},
"CO2": {"type": "float"},
"BUN": {"type": "float"},
"CSFGLU": {"type": "float"},
"CRE": {"type": "float"},
"UCRE": {"type": "float"},
"CREATPOC": {"type": "float"},
"CREATINE": {"type": "float"},
"CAFL": {"type": "float"},
"GLU": {"type": "float"},
"CA": {"type": "float"},
"GFR": {"type": "float"},
"ANION": {"type": "float"},
"ALB": {"type": "float"},
"TBILI": {"type": "float"},
"DBILI": {"type": "float"},
"ALKP": {"type": "float"},
"SGOT": {"type": "float"},
"SGPT": {"type": "float"},
"TP": {"type": "float"},
"GLOB": {"type": "float"},
},
"apoe_genotype_testing": {
"type": "string",
"enum": ["e2/e3", "e3/e3", "e3/e4", "e4/e4", "missing"],
"description": "Provide the patient's APOE genotype. Harmonize the result to one of the following categories: 'e2/e3', 'e3/e3', 'e3/e4', 'e4/e4'. If the genotype is missing, return 'missing'.",
},
"diagnostic_formulation": {
"clinical_syndrome": {"type": "string"},
"clinical_severity": {"type": "string"},
"etiology": {"type": "string"},
},
"Eligibility": {
"eligibility_determination": {"type": "string"},
},
"Final": {"recommendation": {"type": "string"}},
}
template_biomarker = {
"CSF_or_LP_measures": {
"type": "object",
"description": "Extract the individual metrics from the CSF or LP measures section. If no value is found for a particular metric, return 'missing'.",
"properties": {
"t_tau": {"type": "float", "description": "Extract the value for t-tau, including variations such as 'ttau', 'Total tau', or 't-tau'. If no value is found, return 'missing'."},
"p_tau": {"type": "float", "description": "Extract the value for p-tau, including variations such as 'ptau', 'phosphorylated tau', or 'Phospho tau'. If no value is found, return 'missing'."},
"Abeta42_ptau": {"type": "float", "description": "Extract the value for ratio of Amyloid-beta 42/phosphorylated tau, including variations such as 'Amyloid-beta42/phosphorylated tau', 'Amyloid-beta42/p-tau', 'Abeta42/p-tau', etc. If no value is found, return 'missing'."},
"Amyloid_Tau_Index": {"type": "float", "description": "Extract the value for ratio of the Abeta42/t-tau Index (Amyloid-Tau Index), including variations such as 'Abeta42/t-tau ratio', 'Amyloid-Tau Index'. If no value is found, return 'missing'."},
"Abeta42_Abeta40_ratio": {"type": "float", "description": "Extract the value for the ratio of Abeta42/Abeta40, including variations such as 'Amyloid-beta42/Amyloid-beta40', 'Beta-amyloid 42/Beta-amyloid40', 'Abeta42/Abeta40'. If no value is found, return 'missing'."},
"Abeta42": {"type": "float", "description": "Extract the value for Amyloid-beta 42, including variations such as 'Abeta42', 'Amyloid-beta42', 'Beta-amyloid42'. If no value is found, return 'missing'."},
"Abeta40": {"type": "float", "description": "Extract the value for Amyloid-beta 40, including variations such as 'Abeta40', 'Amyloid-beta40', 'Beta-amyloid40'. If no value is found, return 'missing'."},
},
},
"PET_measures": {
"type": "object",
"description": "Extract the PET measures section, including qualitative and quantitative items, and the impression related to Alzheimer's Disease. Return 'missing' if any value is not found.",
"properties": {
"qualitative": {
"Lateral_temporal_lobe": {"type": "string", "enum": ["Positive", "Negative"], "description": "Extract the qualitative finding for the Lateral temporal lobe (Positive or Negative)."},
"Frontal_cortex": {"type": "string", "enum": ["Positive", "Negative"], "description": "Extract the qualitative finding for the Frontal cortex (Positive or Negative)."},
"Posterior_cingulate": {"type": "string", "enum": ["Positive", "Negative"], "description": "Extract the qualitative finding for the Posterior cingulate (Positive or Negative)."},
"Parietal_cortex": {"type": "string", "enum": ["Positive", "Negative"], "description": "Extract the qualitative finding for the Parietal cortex (Positive or Negative)."},
},
"quantitative": {
"Anterior_cingulate_gyrus_SUVR": {"type": "string", "description": "Extract the SUVR value for Anterior cingulate gyrus. Format: value [mean (range)]"},
"Lateral_temporal_lobe_SUVR": {"type": "string", "description": "Extract the SUVR value for Lateral temporal lobe. Format: value [mean (range)]"},
"Inferior_medial_frontal_gyrus_SUVR": {"type": "string", "description": "Extract the SUVR value for Inferior medial frontal gyrus. Format: value [mean (range)]"},
"Posterior_cingulate_SUVR": {"type": "string", "description": "Extract the SUVR value for Posterior cingulate. Format: value [mean (range)]"},
"Precuneus_SUVR": {"type": "string", "description": "Extract the SUVR value for Precuneus. Format: value [mean (range)]"},
"Superior_parietal_lobule_SUVR": {"type": "string", "description": "Extract the SUVR value for Superior parietal lobule. Format: value [mean (range)]"},
},
"Impression": {"type": "string", "description": "Extract the impression section. Return 'missing' if no impression is provided."},
"Centiloid_value": {"type": "float", "description": "Extract the Centiloid Value. If no value is found, return 'missing'."},
},
},
"Montreal_Cognitive_Assessment": {
"montreal_cognitive_assessment_moca": {"type": "integer", "description": "Return the latest exact total score obtained on the Montreal Cognitive Assessment (MoCA) out of 30. The score should be an integer."},
"date_of_moca_performed": {"type": "string", "description": "Return the latest date that the patient took the MoCA test."},
"Visuospatial_Executive_Function": {"type": "integer", "description": "Extract the total score out of 5 for the Visuospatial/Executive Function component. Return 'missing' if no score is found."},
"Naming": {"type": "integer", "description": "Extract the score out of 3 for the Naming component. Return 'missing' if no score is found."},
"Attention": {"type": "integer", "description": "Extract the total score out of 6 for the Attention component. Return 'missing' if no score is found."},
"Language": {"type": "integer", "description": "Extract the total score out of 3 for the Language component. Return 'missing' if no score is found."},
"Abstraction": {"type": "integer", "description": "Extract the total score out of 2 for the Abstraction component. Return 'missing' if no score is found."},
"Memory_Delayed_Recall": {"type": "integer", "description": "Extract the total score out of 5 for the Memory component. Return 'missing' if no score is found."},
"Orientation": {"type": "integer", "description": "Extract the total score out of 6 for the Orientation component. Return 'missing' if no score is found."},
},
}