Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions load-tests/data_entry/anterior.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def fetch_ac(client, patient_id: Any, encounter_id: Optional[Any] = None) -> Opt
"subject": f"Patient/{pid}",
"code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_ANTERIOR}",
"_include": ["List:item"],
"_count": 200,
"_count": 50,
}
if encounter_id is not None:
params["encounter"] = f"Encounter/{str(encounter_id)}"
Expand All @@ -180,7 +180,7 @@ def fetch_ac(client, patient_id: Any, encounter_id: Optional[Any] = None) -> Opt
qr_params: Dict[str, Any] = {
"subject": f"Patient/{pid}",
"_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_ANTERIOR}",
"_count": 200,
"_count": 50,
}
if encounter_id is not None:
qr_params["encounter"] = f"Encounter/{str(encounter_id)}"
Expand All @@ -190,7 +190,7 @@ def fetch_ac(client, patient_id: Any, encounter_id: Optional[Any] = None) -> Opt
obs_params: Dict[str, Any] = {
"subject": f"Patient/{pid}",
"_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_ANTERIOR}",
"_count": 200,
"_count": 50,
}
if encounter_id is not None:
obs_params["encounter"] = f"Encounter/{str(encounter_id)}"
Expand Down
6 changes: 3 additions & 3 deletions load-tests/data_entry/ascan.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def fetch_ascan(client, patient_id: Any, encounter_id: Optional[Any] = None) ->
"subject": f"Patient/{pid}",
"code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_ASCAN}",
"_include": ["List:item"],
"_count": 200,
"_count": 50,
}
if encounter_id is not None:
params["encounter"] = f"Encounter/{str(encounter_id)}"
Expand All @@ -238,7 +238,7 @@ def fetch_ascan(client, patient_id: Any, encounter_id: Optional[Any] = None) ->
qr_params: Dict[str, Any] = {
"subject": f"Patient/{pid}",
"_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_ASCAN}",
"_count": 200,
"_count": 50,
}
if encounter_id is not None:
qr_params["encounter"] = f"Encounter/{str(encounter_id)}"
Expand All @@ -248,7 +248,7 @@ def fetch_ascan(client, patient_id: Any, encounter_id: Optional[Any] = None) ->
obs_params: Dict[str, Any] = {
"subject": f"Patient/{pid}",
"_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_ASCAN}",
"_count": 200,
"_count": 50,
}
if encounter_id is not None:
obs_params["encounter"] = f"Encounter/{str(encounter_id)}"
Expand Down
6 changes: 3 additions & 3 deletions load-tests/data_entry/auto_refractometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def fetch_auto_refractometer(client, patient_id: str, encounter_id: Optional[str
"subject": f"Patient/{pid}",
"code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_AUTOREF}",
"_include": ["List:item"],
"_count": 200,
"_count": 50,
}
if encounter_id:
params["encounter"] = f"Encounter/{encounter_id}"
Expand All @@ -200,7 +200,7 @@ def fetch_auto_refractometer(client, patient_id: str, encounter_id: Optional[str
qr_params: Dict[str, Any] = {
"subject": f"Patient/{pid}",
"_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_AUTOREF}",
"_count": 200,
"_count": 50,
}
if encounter_id:
qr_params["encounter"] = f"Encounter/{encounter_id}"
Expand All @@ -214,7 +214,7 @@ def fetch_auto_refractometer(client, patient_id: str, encounter_id: Optional[str
obs_params: Dict[str, Any] = {
"subject": f"Patient/{pid}",
"_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_AUTOREF}",
"_count": 200,
"_count": 50,
}
if encounter_id:
obs_params["encounter"] = f"Encounter/{encounter_id}"
Expand Down
6 changes: 3 additions & 3 deletions load-tests/data_entry/complaints.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def fetch_complaints(client, patient_id: Any, encounter_id: Optional[Any] = None
"subject": f"Patient/{pid}",
"code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_COMPLAINTS}",
"_include": ["List:item"],
"_count": 200,
"_count": 50,
}
if encounter_id is not None:
params["encounter"] = f"Encounter/{str(encounter_id)}"
Expand All @@ -130,7 +130,7 @@ def fetch_complaints(client, patient_id: Any, encounter_id: Optional[Any] = None
qr_params: Dict[str, Any] = {
"subject": f"Patient/{pid}",
"_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_COMPLAINTS}",
"_count": 200,
"_count": 50,
}
if encounter_id is not None:
qr_params["encounter"] = f"Encounter/{str(encounter_id)}"
Expand All @@ -140,7 +140,7 @@ def fetch_complaints(client, patient_id: Any, encounter_id: Optional[Any] = None
cond_params: Dict[str, Any] = {
"subject": f"Patient/{pid}",
"_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_COMPLAINTS}",
"_count": 200,
"_count": 50,
}
if encounter_id is not None:
cond_params["encounter"] = f"Encounter/{str(encounter_id)}"
Expand Down
4 changes: 2 additions & 2 deletions load-tests/data_entry/drugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def create_drug_prescription_form_with_fake_data(client, patient_id: Any, encoun

def fetch_drug_prescription(client, patient_id: Any, encounter_id: Optional[Any] = None) -> Optional[Dict[str, Any]]:
pid = str(patient_id)
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_DRUG}", "_include": ["List:item"], "_count": 200}
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_DRUG}", "_include": ["List:item"], "_count": 50}
if encounter_id is not None:
params["encounter"] = f"Encounter/{str(encounter_id)}"
list_resp = client.get("List", params=params, name="GET /List?code=drug_prescription&_include=List:item")
Expand All @@ -196,7 +196,7 @@ def fetch_drug_prescription(client, patient_id: Any, encounter_id: Optional[Any]
return bundle
# Fallback by tag
def _fetch(path: str) -> Dict[str, Any]:
p: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_DRUG}", "_count": 200}
p: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_DRUG}", "_count": 50}
if encounter_id is not None:
p["encounter"] = f"Encounter/{str(encounter_id)}"
r = client.get(path, params=p, name=f"GET /{path}?_tag=drug_prescription")
Expand Down
6 changes: 3 additions & 3 deletions load-tests/data_entry/free_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def fetch_free_text(client, patient_id: Any, encounter_id: Optional[Any] = None)
"subject": f"Patient/{pid}",
"code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_FREE_TEXT}",
"_include": ["List:item"],
"_count": 200,
"_count": 50,
}
if encounter_id is not None:
params["encounter"] = f"Encounter/{str(encounter_id)}"
Expand All @@ -99,13 +99,13 @@ def fetch_free_text(client, patient_id: Any, encounter_id: Optional[Any] = None)
return bundle

# Fallback by tag
qr_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_FREE_TEXT}", "_count": 100}
qr_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_FREE_TEXT}", "_count": 50}
if encounter_id is not None:
qr_params["encounter"] = f"Encounter/{str(encounter_id)}"
qr_resp = client.get("QuestionnaireResponse", params=qr_params, name="GET /QuestionnaireResponse?_tag=free_text")
qr_bundle = _resp_json(qr_resp) or {}

comm_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_FREE_TEXT}", "_count": 100}
comm_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_FREE_TEXT}", "_count": 50}
if encounter_id is not None:
comm_params["encounter"] = f"Encounter/{str(encounter_id)}"
comm_resp = client.get("Communication", params=comm_params, name="GET /Communication?_tag=free_text")
Expand Down
4 changes: 2 additions & 2 deletions load-tests/data_entry/glass_prescription.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def fetch_glass_prescription(client, patient_id: Any, encounter_id: Optional[Any
"subject": f"Patient/{pid}",
"code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_GLASSES}",
"_include": ["List:item"],
"_count": 200,
"_count": 50,
}
if encounter_id is not None:
params["encounter"] = f"Encounter/{str(encounter_id)}"
Expand All @@ -182,7 +182,7 @@ def fetch_glass_prescription(client, patient_id: Any, encounter_id: Optional[Any

# Fallback by tag
def _fetch(path: str) -> Dict[str, Any]:
p: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_GLASSES}", "_count": 200}
p: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_GLASSES}", "_count": 50}
if encounter_id is not None:
p["encounter"] = f"Encounter/{str(encounter_id)}"
r = client.get(path, params=p, name=f"GET /{path}?_tag=glass_prescription")
Expand Down
8 changes: 4 additions & 4 deletions load-tests/data_entry/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,25 +102,25 @@ def create_history_form_with_fake_data(client, patient_id: Any, encounter_id: A

def fetch_history(client, patient_id: Any, encounter_id: Optional[Any] = None) -> Optional[Dict[str, Any]]:
pid = str(patient_id)
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_HISTORY}", "_include": ["List:item"], "_count": 200}
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_HISTORY}", "_include": ["List:item"], "_count": 50}
if encounter_id is not None:
params["encounter"] = f"Encounter/{str(encounter_id)}"
list_resp = client.get("List", params=params, name="GET /List?code=treatment_history&_include=List:item")
bundle = _resp_json(list_resp)
if bundle:
return bundle
# Fallback by tag
qr_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_HISTORY}", "_count": 100}
qr_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_HISTORY}", "_count": 50}
if encounter_id is not None:
qr_params["encounter"] = f"Encounter/{str(encounter_id)}"
qr_resp = client.get("QuestionnaireResponse", params=qr_params, name="GET /QuestionnaireResponse?_tag=treatment_history")
qr_bundle = _resp_json(qr_resp) or {}
proc_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_HISTORY}", "_count": 100}
proc_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_HISTORY}", "_count": 50}
if encounter_id is not None:
proc_params["encounter"] = f"Encounter/{str(encounter_id)}"
proc_resp = client.get("Procedure", params=proc_params, name="GET /Procedure?_tag=treatment_history")
proc_bundle = _resp_json(proc_resp) or {}
cond_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_HISTORY}", "_count": 100}
cond_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_HISTORY}", "_count": 50}
if encounter_id is not None:
cond_params["encounter"] = f"Encounter/{str(encounter_id)}"
cond_resp = client.get("Condition", params=cond_params, name="GET /Condition?_tag=treatment_history")
Expand Down
6 changes: 3 additions & 3 deletions load-tests/data_entry/iop.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def fetch_iop(client, patient_id: str, encounter_id: Optional[str] = None) -> Op
"subject": f"Patient/{pid}",
"code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_IOP}",
"_include": ["List:item"],
"_count": 200,
"_count": 50,
}
if encounter_id:
params["encounter"] = f"Encounter/{encounter_id}"
Expand All @@ -252,7 +252,7 @@ def fetch_iop(client, patient_id: str, encounter_id: Optional[str] = None) -> Op
qr_params: Dict[str, Any] = {
"subject": f"Patient/{pid}",
"_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_IOP}",
"_count": 200,
"_count": 50,
}
if encounter_id:
qr_params["encounter"] = f"Encounter/{encounter_id}"
Expand All @@ -262,7 +262,7 @@ def fetch_iop(client, patient_id: str, encounter_id: Optional[str] = None) -> Op
obs_params: Dict[str, Any] = {
"subject": f"Patient/{pid}",
"_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_IOP}",
"_count": 200,
"_count": 50,
}
if encounter_id:
obs_params["encounter"] = f"Encounter/{encounter_id}"
Expand Down
6 changes: 3 additions & 3 deletions load-tests/data_entry/lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,20 @@ def create_lab_form_with_fake_data(client, patient_id: Any, encounter_id: Any, u

def fetch_lab(client, patient_id: Any, encounter_id: Optional[Any] = None) -> Optional[Dict[str, Any]]:
pid = str(patient_id)
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_LAB}", "_include": ["List:item"], "_count": 200}
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_LAB}", "_include": ["List:item"], "_count": 50}
if encounter_id is not None:
params["encounter"] = f"Encounter/{str(encounter_id)}"
list_resp = client.get("List", params=params, name="GET /List?code=lab&_include=List:item")
bundle = _resp_json(list_resp)
if bundle:
return bundle
# Fallback by tag
qr_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_LAB}", "_count": 100}
qr_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_LAB}", "_count": 50}
if encounter_id is not None:
qr_params["encounter"] = f"Encounter/{str(encounter_id)}"
qr_resp = client.get("QuestionnaireResponse", params=qr_params, name="GET /QuestionnaireResponse?_tag=lab")
qr_bundle = _resp_json(qr_resp) or {}
obs_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_LAB}", "_count": 200}
obs_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_LAB}", "_count": 50}
if encounter_id is not None:
obs_params["encounter"] = f"Encounter/{str(encounter_id)}"
obs_resp = client.get("Observation", params=obs_params, name="GET /Observation?_tag=lab")
Expand Down
4 changes: 2 additions & 2 deletions load-tests/data_entry/pgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def va_obs(code_text: str, value: str, eye_text: str) -> Dict[str, Any]:

def fetch_pgp(client, patient_id: Any, encounter_id: Optional[Any] = None) -> Optional[Dict[str, Any]]:
pid = str(patient_id)
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_PGP}", "_include": ["List:item"], "_count": 200}
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_PGP}", "_include": ["List:item"], "_count": 50}
if encounter_id is not None:
params["encounter"] = f"Encounter/{str(encounter_id)}"
list_resp = client.get("List", params=params, name="GET /List?code=pgp&_include=List:item")
Expand All @@ -196,7 +196,7 @@ def fetch_pgp(client, patient_id: Any, encounter_id: Optional[Any] = None) -> Op
return bundle
# Fallback by tag
def _fetch(path: str) -> Dict[str, Any]:
p: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_PGP}", "_count": 200}
p: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_PGP}", "_count": 50}
if encounter_id is not None:
p["encounter"] = f"Encounter/{str(encounter_id)}"
r = client.get(path, params=p, name=f"GET /{path}?_tag=pgp")
Expand Down
6 changes: 3 additions & 3 deletions load-tests/data_entry/posterior.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,19 @@ def create_posterior_chamber_form_with_fake_data(client, patient_id: Any, encou

def fetch_pc(client, patient_id: Any, encounter_id: Optional[Any] = None) -> Optional[Dict[str, Any]]:
pid = str(patient_id)
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_PC}", "_include": ["List:item"], "_count": 200}
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_PC}", "_include": ["List:item"], "_count": 50}
if encounter_id is not None:
params["encounter"] = f"Encounter/{str(encounter_id)}"
list_resp = client.get("List", params=params, name="GET /List?code=posterior_chamber&_include=List:item")
bundle = _resp_json(list_resp)
if bundle:
return bundle
qr_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_PC}", "_count": 200}
qr_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_PC}", "_count": 50}
if encounter_id is not None:
qr_params["encounter"] = f"Encounter/{str(encounter_id)}"
qr_resp = client.get("QuestionnaireResponse", params=qr_params, name="GET /QuestionnaireResponse?_tag=posterior_chamber")
qr_bundle = _resp_json(qr_resp) or {}
obs_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_PC}", "_count": 200}
obs_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_PC}", "_count": 50}
if encounter_id is not None:
obs_params["encounter"] = f"Encounter/{str(encounter_id)}"
obs_resp = client.get("Observation", params=obs_params, name="GET /Observation?_tag=posterior_chamber")
Expand Down
6 changes: 3 additions & 3 deletions load-tests/data_entry/referral.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,20 @@ def create_referral_form_with_fake_data(client, patient_id: Any, encounter_id: A

def fetch_referral(client, patient_id: Any, encounter_id: Optional[Any] = None) -> Optional[Dict[str, Any]]:
pid = str(patient_id)
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_REFERRAL}", "_include": ["List:item"], "_count": 200}
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_REFERRAL}", "_include": ["List:item"], "_count": 50}
if encounter_id is not None:
params["encounter"] = f"Encounter/{str(encounter_id)}"
list_resp = client.get("List", params=params, name="GET /List?code=referral&_include=List:item")
bundle = _resp_json(list_resp)
if bundle:
return bundle
# Fallback by tag
qr_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_REFERRAL}", "_count": 100}
qr_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_REFERRAL}", "_count": 50}
if encounter_id is not None:
qr_params["encounter"] = f"Encounter/{str(encounter_id)}"
qr_resp = client.get("QuestionnaireResponse", params=qr_params, name="GET /QuestionnaireResponse?_tag=referral")
qr_bundle = _resp_json(qr_resp) or {}
sr_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_REFERRAL}", "_count": 100}
sr_params: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_REFERRAL}", "_count": 50}
if encounter_id is not None:
sr_params["encounter"] = f"Encounter/{str(encounter_id)}"
sr_resp = client.get("ServiceRequest", params=sr_params, name="GET /ServiceRequest?_tag=referral")
Expand Down
4 changes: 2 additions & 2 deletions load-tests/data_entry/screening.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def create_screening_form_with_fake_data(client, patient_id: Any, encounter_id:

def fetch_screening(client, patient_id: Any, encounter_id: Optional[Any] = None) -> Optional[Dict[str, Any]]:
pid = str(patient_id)
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_SCREENING}", "_include": ["List:item"], "_count": 200}
params: Dict[str, Any] = {"subject": f"Patient/{pid}", "code": f"{FORM_TAG_SYSTEM}|{FORM_CODE_SCREENING}", "_include": ["List:item"], "_count": 50}
if encounter_id is not None:
params["encounter"] = f"Encounter/{str(encounter_id)}"
list_resp = client.get("List", params=params, name="GET /List?code=screening&_include=List:item")
Expand All @@ -255,7 +255,7 @@ def fetch_screening(client, patient_id: Any, encounter_id: Optional[Any] = None)
return bundle
# Fallback by tag (fetch core types we created)
def _fetch(path: str) -> Dict[str, Any]:
p: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_SCREENING}", "_count": 200}
p: Dict[str, Any] = {"subject": f"Patient/{pid}", "_tag": f"{FORM_TAG_SYSTEM}|{FORM_CODE_SCREENING}", "_count": 50}
if encounter_id is not None:
p["encounter"] = f"Encounter/{str(encounter_id)}"
r = client.get(path, params=p, name=f"GET /{path}?_tag=screening")
Expand Down
Loading