import requestsencounter_id = "123dfg-456dfg-789dfg-012dfg"url = f"https://sdp.suki.ai/api/v1/ambient/encounter/{encounter_id}/content"headers = { "sdp_suki_token": "<sdp_suki_token>"}response = requests.get(url, headers=headers)if response.status_code == 200: content = response.json() print("Encounter Summary:") for section in content.get("summary", []): print(f"\nTitle: {section.get('title')}") print(f"LOINC Code: {section.get('loinc_code')}") print(f"Content: {section.get('content')}") # Source transcripts used to generate this content source_transcripts = section.get('source_transcripts', []) if source_transcripts: print(f"Source Transcripts: {', '.join(source_transcripts)}") print("\nStructured Data:") for structured_block in content.get("structured_data", []): print(f"\n{structured_block.get('title')}:") # data is a key-value object data = structured_block.get('data', {}) for key, value in data.items(): print(f" {key}: {value}")else: print(f"Failed to get encounter content: {response.status_code}") print(response.json())
The structured data in the block. This is a key-value pair where the key is the name of the data and the value is the data itself.
For example, for medications, the key can be the name of the medication and the value can be the dosage.
This is kept as map since we don't know the structure of the data that will be extracted.