|
18 | 18 | }, |
19 | 19 | { |
20 | 20 | "cell_type": "code", |
21 | | - "execution_count": 11, |
| 21 | + "execution_count": 1, |
22 | 22 | "id": "34511af8", |
23 | 23 | "metadata": {}, |
24 | 24 | "outputs": [ |
|
29 | 29 | "<IPython.core.display.Image object>" |
30 | 30 | ] |
31 | 31 | }, |
32 | | - "execution_count": 11, |
| 32 | + "execution_count": 1, |
33 | 33 | "metadata": {}, |
34 | 34 | "output_type": "execute_result" |
35 | 35 | } |
|
50 | 50 | }, |
51 | 51 | { |
52 | 52 | "cell_type": "code", |
53 | | - "execution_count": 12, |
| 53 | + "execution_count": 2, |
54 | 54 | "id": "2c12c8e0", |
55 | 55 | "metadata": {}, |
56 | 56 | "outputs": [ |
57 | 57 | { |
58 | 58 | "name": "stdout", |
59 | 59 | "output_type": "stream", |
60 | 60 | "text": [ |
61 | | - "Processing ./amazon_textract_response_parser-0.1.21-py2.py3-none-any.whl\n", |
62 | | - "Requirement already satisfied: boto3 in /home/ec2-user/anaconda3/envs/mxnet_latest_p37/lib/python3.7/site-packages (1.20.46)\n", |
63 | | - "Requirement already satisfied: s3transfer<0.6.0,>=0.5.0 in /home/ec2-user/anaconda3/envs/mxnet_latest_p37/lib/python3.7/site-packages (from boto3) (0.5.0)\n", |
64 | | - "Requirement already satisfied: botocore<1.24.0,>=1.23.46 in /home/ec2-user/anaconda3/envs/mxnet_latest_p37/lib/python3.7/site-packages (from boto3) (1.23.46)\n", |
65 | | - "Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /home/ec2-user/anaconda3/envs/mxnet_latest_p37/lib/python3.7/site-packages (from boto3) (0.10.0)\n", |
66 | | - "Requirement already satisfied: marshmallow==3.11.1 in /home/ec2-user/anaconda3/envs/mxnet_latest_p37/lib/python3.7/site-packages (from amazon-textract-response-parser==0.1.21) (3.11.1)\n", |
67 | | - "Requirement already satisfied: urllib3<1.27,>=1.25.4 in /home/ec2-user/anaconda3/envs/mxnet_latest_p37/lib/python3.7/site-packages (from botocore<1.24.0,>=1.23.46->boto3) (1.26.7)\n", |
68 | | - "Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /home/ec2-user/anaconda3/envs/mxnet_latest_p37/lib/python3.7/site-packages (from botocore<1.24.0,>=1.23.46->boto3) (2.8.1)\n", |
69 | | - "Requirement already satisfied: six>=1.5 in /home/ec2-user/anaconda3/envs/mxnet_latest_p37/lib/python3.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.24.0,>=1.23.46->boto3) (1.15.0)\n", |
70 | | - "amazon-textract-response-parser is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel.\n", |
71 | | - "\u001b[33mWARNING: You are using pip version 21.3.1; however, version 22.0.3 is available.\n", |
72 | | - "You should consider upgrading via the '/home/ec2-user/anaconda3/envs/mxnet_latest_p37/bin/python -m pip install --upgrade pip' command.\u001b[0m\n" |
| 61 | + "\u001b[33mWARNING: You are using pip version 21.1.3; however, version 22.0.4 is available.\r\n", |
| 62 | + "You should consider upgrading via the '/Users/schadem/.pyenv/versions/amazon-textract-code-samples/bin/python -m pip install --upgrade pip' command.\u001b[0m\r\n" |
73 | 63 | ] |
74 | 64 | } |
75 | 65 | ], |
76 | 66 | "source": [ |
77 | | - "!python -m pip install boto3 amazon_textract_response_parser-0.1.21-py2.py3-none-any.whl" |
| 67 | + "!python -m pip install -q boto3 amazon_textract_response_parser --upgrade" |
78 | 68 | ] |
79 | 69 | }, |
80 | 70 | { |
81 | 71 | "cell_type": "code", |
82 | | - "execution_count": 13, |
83 | | - "id": "7e8319e8", |
84 | | - "metadata": {}, |
85 | | - "outputs": [], |
86 | | - "source": [ |
87 | | - "!aws configure add-model --service-model file://service-2.json --service-name textract" |
88 | | - ] |
89 | | - }, |
90 | | - { |
91 | | - "cell_type": "code", |
92 | | - "execution_count": 14, |
| 72 | + "execution_count": 3, |
93 | 73 | "id": "02e43df1", |
94 | 74 | "metadata": {}, |
95 | 75 | "outputs": [], |
|
105 | 85 | }, |
106 | 86 | { |
107 | 87 | "cell_type": "code", |
108 | | - "execution_count": 16, |
| 88 | + "execution_count": 4, |
109 | 89 | "id": "fd928bb3", |
110 | 90 | "metadata": {}, |
111 | 91 | "outputs": [], |
|
191 | 171 | }, |
192 | 172 | { |
193 | 173 | "cell_type": "code", |
194 | | - "execution_count": 17, |
| 174 | + "execution_count": 5, |
195 | 175 | "id": "f45f043f", |
196 | 176 | "metadata": {}, |
197 | 177 | "outputs": [ |
198 | 178 | { |
199 | 179 | "name": "stdout", |
200 | 180 | "output_type": "stream", |
201 | 181 | "text": [ |
202 | | - "Requirement already satisfied: tabulate in /home/ec2-user/anaconda3/envs/mxnet_latest_p37/lib/python3.7/site-packages (0.8.9)\n", |
203 | | - "\u001b[33mWARNING: You are using pip version 21.3.1; however, version 22.0.3 is available.\n", |
204 | | - "You should consider upgrading via the '/home/ec2-user/anaconda3/envs/mxnet_latest_p37/bin/python -m pip install --upgrade pip' command.\u001b[0m\n" |
| 182 | + "Requirement already satisfied: tabulate in /Users/schadem/.pyenv/versions/3.9.6/envs/amazon-textract-code-samples/lib/python3.9/site-packages (0.8.9)\n", |
| 183 | + "\u001b[33mWARNING: You are using pip version 21.1.3; however, version 22.0.4 is available.\n", |
| 184 | + "You should consider upgrading via the '/Users/schadem/.pyenv/versions/amazon-textract-code-samples/bin/python -m pip install --upgrade pip' command.\u001b[0m\n" |
205 | 185 | ] |
206 | 186 | } |
207 | 187 | ], |
|
212 | 192 | }, |
213 | 193 | { |
214 | 194 | "cell_type": "code", |
215 | | - "execution_count": 18, |
| 195 | + "execution_count": 6, |
216 | 196 | "id": "da63e6c9", |
217 | 197 | "metadata": {}, |
218 | 198 | "outputs": [ |
|
221 | 201 | "output_type": "stream", |
222 | 202 | "text": [ |
223 | 203 | "|------------------------------------------------------------|--------------------------------------------|--------------|\n", |
224 | | - "| last name | PATIENT_LAST_NAME | Mary |\n", |
225 | | - "| Who is the manufacturer for 1st dose of COVID-19? | COVID_VACCINATION_FIRST_DOSE_MANUFACTURER | Pfizer |\n", |
226 | | - "| first name | PATIENT_FIRST_NAME | Major |\n", |
227 | | - "| Who is the manufacturer for 2nd dose of COVID-19? | COVID_VACCINATION_SECOND_DOSE_MANUFACTURER | Pfizer |\n", |
228 | | - "| What is the date for the 2nd dose covid-19? | COVID_VACCINATION_SECOND_DOSE_DATE | 2/8/2021 |\n", |
229 | | - "| Which clinic site was the 2nd dose covid-19 administrated? | COVID_VACCINATION_SECOND_DOSE_CLINIC_SITE | CVS |\n", |
230 | 204 | "| What is the lot number for 1st dose covid-19? | COVID_VACCINATION_FIRST_DOSE_LOT_NUMBER | AA1234 |\n", |
| 205 | + "| What is the date for the 1st dose covid-19? | COVID_VACCINATION_FIRST_DOSE_DATE | 1/18/21 |\n", |
| 206 | + "| patient number (medical record or IIS record number) | PATIENT_NUMBER_1 | 012345abcd67 |\n", |
| 207 | + "| What is the date for the 2nd dose covid-19? | COVID_VACCINATION_SECOND_DOSE_DATE | 2/8/2021 |\n", |
231 | 208 | "| What is the lot number for 2nd dose covid-19? | COVID_VACCINATION_SECOND_DOSE_LOT_NUMBER | BB5678 |\n", |
232 | 209 | "| patient number | PATIENT_NUMBER_2 | 012345abcd67 |\n", |
233 | | - "| patient number (medical record or IIS record number) | PATIENT_NUMBER_1 | 012345abcd67 |\n", |
234 | | - "| Which clinic site was the 1st dose COVID-19 administrated? | COVID_VACCINATION_FIRST_DOSE_CLINIC_SITE | XYZ |\n", |
| 210 | + "| Which clinic site was the 2nd dose covid-19 administrated? | COVID_VACCINATION_SECOND_DOSE_CLINIC_SITE | CVS |\n", |
| 211 | + "| last name | PATIENT_LAST_NAME | Mary |\n", |
| 212 | + "| Who is the manufacturer for 1st dose of COVID-19? | COVID_VACCINATION_FIRST_DOSE_MANUFACTURER | Pfizer |\n", |
235 | 213 | "| MI | MI_NUMBER | M |\n", |
236 | | - "| What is the date for the 1st dose covid-19? | COVID_VACCINATION_FIRST_DOSE_DATE | 1/18/21 |\n" |
| 214 | + "| first name | PATIENT_FIRST_NAME | Major |\n", |
| 215 | + "| Which clinic site was the 1st dose COVID-19 administrated? | COVID_VACCINATION_FIRST_DOSE_CLINIC_SITE | XYZ |\n", |
| 216 | + "| Who is the manufacturer for 2nd dose of COVID-19? | COVID_VACCINATION_SECOND_DOSE_MANUFACTURER | Pfizer |\n" |
237 | 217 | ] |
238 | 218 | } |
239 | 219 | ], |
|
251 | 231 | }, |
252 | 232 | { |
253 | 233 | "cell_type": "code", |
254 | | - "execution_count": 19, |
| 234 | + "execution_count": 7, |
255 | 235 | "id": "5db0cbc0", |
256 | 236 | "metadata": {}, |
257 | 237 | "outputs": [ |
258 | 238 | { |
259 | 239 | "name": "stdout", |
260 | 240 | "output_type": "stream", |
261 | 241 | "text": [ |
262 | | - "vaccination.png,PATIENT_LAST_NAME,Mary\r\n", |
263 | | - "vaccination.png,COVID_VACCINATION_FIRST_DOSE_MANUFACTURER,Pfizer\r\n", |
264 | | - "vaccination.png,PATIENT_FIRST_NAME,Major\r\n", |
265 | | - "vaccination.png,COVID_VACCINATION_SECOND_DOSE_MANUFACTURER,Pfizer\r\n", |
266 | | - "vaccination.png,COVID_VACCINATION_SECOND_DOSE_DATE,2/8/2021\r\n", |
267 | | - "vaccination.png,COVID_VACCINATION_SECOND_DOSE_CLINIC_SITE,CVS\r\n", |
268 | 242 | "vaccination.png,COVID_VACCINATION_FIRST_DOSE_LOT_NUMBER,AA1234\r\n", |
| 243 | + "vaccination.png,COVID_VACCINATION_FIRST_DOSE_DATE,1/18/21\r\n", |
| 244 | + "vaccination.png,PATIENT_NUMBER_1,012345abcd67\r\n", |
| 245 | + "vaccination.png,COVID_VACCINATION_SECOND_DOSE_DATE,2/8/2021\r\n", |
269 | 246 | "vaccination.png,COVID_VACCINATION_SECOND_DOSE_LOT_NUMBER,BB5678\r\n", |
270 | 247 | "vaccination.png,PATIENT_NUMBER_2,012345abcd67\r\n", |
271 | | - "vaccination.png,PATIENT_NUMBER_1,012345abcd67\r\n", |
272 | | - "vaccination.png,COVID_VACCINATION_FIRST_DOSE_CLINIC_SITE,XYZ\r\n", |
| 248 | + "vaccination.png,COVID_VACCINATION_SECOND_DOSE_CLINIC_SITE,CVS\r\n", |
| 249 | + "vaccination.png,PATIENT_LAST_NAME,Mary\r\n", |
| 250 | + "vaccination.png,COVID_VACCINATION_FIRST_DOSE_MANUFACTURER,Pfizer\r\n", |
273 | 251 | "vaccination.png,MI_NUMBER,M\r\n", |
274 | | - "vaccination.png,COVID_VACCINATION_FIRST_DOSE_DATE,1/18/21\r\n", |
| 252 | + "vaccination.png,PATIENT_FIRST_NAME,Major\r\n", |
| 253 | + "vaccination.png,COVID_VACCINATION_FIRST_DOSE_CLINIC_SITE,XYZ\r\n", |
| 254 | + "vaccination.png,COVID_VACCINATION_SECOND_DOSE_MANUFACTURER,Pfizer\r\n", |
275 | 255 | "\n" |
276 | 256 | ] |
277 | 257 | } |
|
286 | 266 | "print(csv_output.getvalue())\n" |
287 | 267 | ] |
288 | 268 | }, |
289 | | - { |
290 | | - "cell_type": "code", |
291 | | - "execution_count": null, |
292 | | - "id": "db43b68b", |
293 | | - "metadata": {}, |
294 | | - "outputs": [], |
295 | | - "source": [ |
296 | | - "# Using S" |
297 | | - ] |
298 | | - }, |
299 | 269 | { |
300 | 270 | "cell_type": "markdown", |
301 | 271 | "id": "0eef24bb", |
|
318 | 288 | ], |
319 | 289 | "metadata": { |
320 | 290 | "kernelspec": { |
321 | | - "display_name": "conda_mxnet_latest_p37", |
| 291 | + "display_name": "Python 3 (ipykernel)", |
322 | 292 | "language": "python", |
323 | | - "name": "conda_mxnet_latest_p37" |
| 293 | + "name": "python3" |
324 | 294 | }, |
325 | 295 | "language_info": { |
326 | 296 | "codemirror_mode": { |
|
332 | 302 | "name": "python", |
333 | 303 | "nbconvert_exporter": "python", |
334 | 304 | "pygments_lexer": "ipython3", |
335 | | - "version": "3.7.10" |
| 305 | + "version": "3.9.6" |
336 | 306 | } |
337 | 307 | }, |
338 | 308 | "nbformat": 4, |
|
0 commit comments