Skip to content

Commit e2d1016

Browse files
test: add pytests
1 parent 0608ede commit e2d1016

15 files changed

+49390
-21082
lines changed

lw_python/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ requires-python = ">=3.12"
77
dependencies = [
88
"amazon-textract-textractor>=1.9.2",
99
"click>=8.3.0",
10+
"pandas>=2.3.3",
1011
]
1112

1213
[dependency-groups]

lw_python/tests/assets/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .assets import assets_path, textract_analyze_result, textract_detect_result

lw_python/tests/assets/assets.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from pathlib import Path
2+
import json
3+
4+
assets_path = Path(__file__).parent
5+
6+
textract_analyze_result_path = assets_path / 'textract_analyze_result.json'
7+
textract_detect_result_path = assets_path / 'textract_detect_result.json'
8+
9+
def _get_json_content(path: str):
10+
with open(path, 'r') as input:
11+
return json.load(input)
12+
13+
def textract_analyze_result():
14+
return _get_json_content(textract_analyze_result_path)
15+
def textract_detect_result():
16+
return _get_json_content(textract_detect_result_path)

lw_python/tests/assets/textract_analyze_result.json

Lines changed: 30188 additions & 0 deletions
Large diffs are not rendered by default.

lw_python/tests/assets/textract_detect_result.json

Lines changed: 18519 additions & 0 deletions
Large diffs are not rendered by default.

lw_python/tests/assets/textract_result.json

Lines changed: 0 additions & 20740 deletions
This file was deleted.

lw_python/tests/assets/textract_result.md

Lines changed: 0 additions & 111 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .expecteds import expecteds_path, textract_analyze_result, textract_detect_result
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# PART 3. CURRENT VITALS. COMPLETE FOR PARAMEDICALS AND MEDICALS. MUST BE COMPLETED BY THE NURSE OR THE EXAMINING PHYSICIAN (i.e., Cardiologist, Internist, or General Practitioner)
2+
3+
4+
5+
| | | |
6+
|------------------------------------------|------------------------------------------|----------------------------|
7+
| Family Name/Last Name of Person Examined | Given Name/First Name of Person Examined | Date of Birth (dd/mm/yyyy) |
8+
| Blondeau | Vincent | 27/9/84 |
9+
10+
11+
12+
13+
14+
| | | |
15+
|----------------------------------------------------------------------------------------------------------------------|---------|--------|
16+
| 1. Of the oral cavity, eyes, ears, nose, throat, skin (including xanthelasma, xanthomata, arcus senilis)? | Yes [ ] | No [ ] |
17+
| 2. Of the lymph nodes or the thyroid gland? | Yes [ ] | No [ ] |
18+
| 3. Of chest, spine or extremities? | Yes [ ] | No [ ] |
19+
| 4. Of lungs on percussion and auscultation? | Yes [ ] | No [ ] |
20+
| Please circle each condition where there is a positive response and report the details of such conditions on page 9. | | |
21+
| Are any murmurs present? | Yes [ ] | No [ ] |
22+
23+
24+
25+
A. Height
26+
m /
27+
cm 64
28+
Weight 75
29+
kg
30+
BMI
31+
Did Proposed Insured's weight change over the past 12 months?
32+
Yes [ ]
33+
No [ ]
34+
35+
If "Yes," please provide details:
36+
37+
Loss of
38+
Gain of
39+
kilograms
40+
41+
B.
42+
Pulse
43+
per minute
44+
Regular
45+
Yes [ ]
46+
No [ ]
47+
48+
If irregular, type of irregularity:
49+
50+
If extra systoles, please state number per minute:
51+
52+
C. Blood pressure (seated) 120 84
53+
2nd 130 / 75
54+
D. Urinalysis (Complete only if age 18 or older. Please fill in blanks or attach results and forward with this form)
55+
56+
Protein
57+
Sugar
58+
Blood
59+
60+
Date of last menses
61+
62+
For Paramedicals only: Skip to Part 6.
63+
64+
PART 4. CURRENT HEALTH STATUS. COMPLETE FOR MEDICALS ONLY. MUST BE COMPLETED BY THE EXAMINING PHYSICIAN
65+
(i.e., Cardiologist, Internist, or General Practitioner)
66+
67+
A. Is there any abnormality:
68+
69+
70+
71+
B.
72+
73+
If "Yes," complete the following:
74+
Describe below the location of transmission, if any, and your diagnostic impression:
75+
1. Location:
76+
apex [ ]
77+
base [ ]
78+
intercostal space [ ]
79+
right of sternum [ ]
80+
left of sternum [ ]
81+
Intensity:
82+
Gr I [ ]
83+
Gr Il [ ]
84+
Gr III [ ]
85+
Gr IV [ ]
86+
Gr V [ ]
87+
Gr VI [ ]
88+
Timing:
89+
systolic
90+
diastolic
91+
Classification:
92+
organic
93+
physiologic
94+
2. Complete if more than one murmur:
95+
96+
Location:
97+
apex [ ]
98+
base [ ]
99+
intercostal space [ ]
100+
right of sternum [ ]
101+
left of sternum [ ]
102+
Intensity:
103+
Gr I [ ]
104+
Gr II [ ]
105+
Gr III [ ]
106+
Gr IV [ ]
107+
Gr V [ ]
108+
Gr VI [ ]
109+
Timing:
110+
systolic
111+
diastolic
112+
Classification:
113+
organic
114+
physiologic
115+
C. Is there:
116+
117+
118+
119+
For "Yes" answers, please provide details on page 9.
120+
121+
122+
123+
124+
| | |
125+
|------------------------------------------------------------------------------------------------------------|----------------|
126+
| 1. Intra-abdominal abnormality? | Yes [ ] No [ ] |
127+
| 2. Any surgical scars? | Yes [ ] No [ ] |
128+
| 3. A hernia? If "Yes," describe: | Yes [ ] No [ ] |
129+
| 4. Abnormality of the central nervous system (muscular power, reflexes, etc.)? | Yes [ ] No [ ] |
130+
| 5. Oedema of the ankles? | Yes [ ] No [ ] |
131+
| 6. Inequality or inadequacy of the pulsations of the femoral, dorsalis pedis or posterior tibial arteries? | Yes [ ] No [ ] |
132+
133+
134+
135+
[SIGNATURE]
136+
137+
138+
139+
Page 8 of 11
140+
141+
142+
IONP-7001 0124 En

0 commit comments

Comments
 (0)