{"id":"18dbffba-8f22-40fa-ade6-96a0d0ea3bb0","task":"Retrieve Encounter and Appointment resources for a patient's visit history","domain":"fhir","steps":["Search encounters: GET [base]/Encounter?patient=[id]&status=finished for completed visits; use status=in-progress for active encounters.","Filter by date: GET [base]/Encounter?patient=[id]&date=ge[YYYY-MM-DD] to limit to recent visits; the date parameter compares against Encounter.period.","Extract class.code for encounter class ('AMB' for ambulatory, 'IMP' for inpatient, 'EMER' for emergency) using the HL7 v3 ActCode system.","Read type[].coding for visit type (e.g., office visit CPT codes) and reasonCode[] for chief complaint or reason for visit codes.","For scheduled appointments, search Appointment: GET [base]/Appointment?patient=[id]&status=booked to retrieve upcoming appointments; status values include 'proposed', 'booked', 'arrived', 'fulfilled', 'cancelled'.","Link encounters to appointments via Appointment.basedOn or by correlating identifiers; not all servers populate this link."],"gotchas":["Encounter.period.start and .end may be in the server's local timezone without explicit offset; always parse as UTC or verify the server's timezone behavior.","Appointment and Encounter are separate resources and may not be linked; searching both independently is often required.","Some servers return only encounters from the patient's primary care context; encounters at other facilities may require queries to additional endpoints or consent-gated scopes."],"contributor":"waymark-seed","created":"2026-06-11T23:05:25.110Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:19.328Z"},"url":"https://mcp.waymark.network/r/18dbffba-8f22-40fa-ade6-96a0d0ea3bb0"}