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())
Copy
Ask AI
const encounterId = '123dfg-456dfg-789dfg-012dfg';const response = await fetch( `https://sdp.suki.ai/api/v1/ambient/encounter/${encounterId}/content`, { headers: { 'sdp_suki_token': '<sdp_suki_token>' } });if (response.ok) { const content = await response.json(); console.log('Encounter Summary:'); content.summary?.forEach((section: any) => { console.log(`\nTitle: ${section.title}`); console.log(`LOINC Code: ${section.loinc_code}`); console.log(`Content: ${section.content}`); // Source transcripts used to generate this content if (section.source_transcripts && section.source_transcripts.length > 0) { console.log(`Source Transcripts: ${section.source_transcripts.join(', ')}`); } }); console.log('\nStructured Data:'); content.structured_data?.forEach((structuredBlock: any) => { console.log(`\n${structuredBlock.title}:`); // data is a key-value object if (structuredBlock.data) { Object.entries(structuredBlock.data).forEach(([key, value]) => { console.log(` ${key}: ${value}`); }); } });} else { const error = await response.json(); console.error(`Failed to get encounter content: ${response.status}`, error);}