From b4f4932d9063c3c6cad23f6ab9c774fe5342aa8f Mon Sep 17 00:00:00 2001 From: Vladimir Buzalka Date: Mon, 3 Nov 2025 06:25:25 +0100 Subject: [PATCH] notebook --- 10ReadPozadavky/0701 test.py | 9 +++++---- 10ReadPozadavky/0702 test.py | 6 ------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/10ReadPozadavky/0701 test.py b/10ReadPozadavky/0701 test.py index 407435c..795b3cd 100644 --- a/10ReadPozadavky/0701 test.py +++ b/10ReadPozadavky/0701 test.py @@ -4,6 +4,7 @@ from pathlib import Path TOKEN_PATH = Path("token.txt") REQUEST_ID = "092a0c63-28be-4c6b-ab3b-204e1e2641d4" +CLINIC_SLUG = "mudr-buzalkova" def read_token(p: Path) -> str: tok = p.read_text(encoding="utf-8").strip() @@ -14,7 +15,7 @@ def read_token(p: Path) -> str: GRAPHQL_QUERY = r""" query ClinicRequestDetail_GetPatientRequest2( $requestId: UUID!, - $isDoctor: Boolean! + ) { patientRequestMedicalRecords: listMedicalRecordsForPatientRequest( attachmentTypes: [ECRF_FILL_ATTACHMENT, MESSAGE_ATTACHMENT, PATIENT_REQUEST_ATTACHMENT] @@ -29,16 +30,16 @@ query ClinicRequestDetail_GetPatientRequest2( downloadUrl id url - visibleToPatient @include(if: $isDoctor) + visibleToPatient } } } """ + variables = { - "isDoctor": True, "requestId": REQUEST_ID, -} + } headers = { "Authorization": f"Bearer {read_token(TOKEN_PATH)}", diff --git a/10ReadPozadavky/0702 test.py b/10ReadPozadavky/0702 test.py index b351002..b1ff733 100644 --- a/10ReadPozadavky/0702 test.py +++ b/10ReadPozadavky/0702 test.py @@ -29,9 +29,6 @@ DB_CONFIG = { GRAPHQL_QUERY = r""" query ClinicRequestDetail_GetPatientRequest2( $requestId: UUID!, - $clinicSlug: String!, - $isDoctor: Boolean!, - $locale: Locale! ) { patientRequestMedicalRecords: listMedicalRecordsForPatientRequest( attachmentTypes: [ECRF_FILL_ATTACHMENT, MESSAGE_ATTACHMENT, PATIENT_REQUEST_ATTACHMENT] @@ -81,9 +78,6 @@ def download_file(url: str, out_path: Path): def fetch_attachments(headers, request_id): variables = { "requestId": request_id, - "clinicSlug": CLINIC_SLUG, - "isDoctor": True, - "locale": "cs", } payload = { "operationName": "ClinicRequestDetail_GetPatientRequest2",