follow-up-task-generator — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited follow-up-task-generator (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Analyze a patient's recent clinical data -- encounters, condition changes, lab results, procedures, and medication changes -- to identify required follow-up actions. Generate FHIR Task resources for each follow-up item with appropriate urgency classification (urgent, soon, routine), responsible party assignment, and due dates based on clinical standards.
| Resource | Purpose | Key Fields |
|---|---|---|
| Task | Generated follow-up tasks | status, priority, code, for, owner, requester, restriction.period, description, focus, reasonReference |
| Encounter | Recent visits triggering follow-up | type, period, reasonCode, class |
| Condition | Active/new conditions requiring monitoring | code, clinicalStatus, onsetDateTime, category |
| Observation | Lab results requiring follow-up | code, valueQuantity, interpretation, effectiveDateTime, referenceRange |
| Procedure | Recent procedures requiring post-procedure follow-up | code, performedDateTime, status |
| MedicationRequest | Medication changes requiring monitoring | medicationCodeableConcept, status, authoredOn, dosageInstruction |
| DiagnosticReport | Imaging/pathology requiring follow-up | code, conclusion, status |
| Practitioner | Provider assignment | name, identifier, specialty |
| ServiceRequest | Existing pending orders | status, code, intent |
Tool: fhir_search
resourceType: "Encounter"
queryParams: "patient=[patient-id]&_sort=-date&_count=3"Identify the encounter(s) triggering follow-up generation. Extract: encounter type, date, reason, provider.
Tool: fhir_search
resourceType: "Observation"
queryParams: "patient=[patient-id]&category=laboratory&date=ge=[30-days-ago]&_sort=-date"Identify results requiring follow-up by checking:
interpretation field: "H" (high), "L" (low), "HH" (critical high), "LL" (critical low), "A" (abnormal)referenceRangereferences/task-prioritization.md)Categorize each abnormal result:
Tool: fhir_search
resourceType: "Condition"
queryParams: "patient=[patient-id]&onset-date=ge=[30-days-ago]"Also check for recently updated conditions:
Tool: fhir_search
resourceType: "Condition"
queryParams: "patient=[patient-id]&clinical-status=active"New diagnoses requiring follow-up:
Tool: fhir_search
resourceType: "MedicationRequest"
queryParams: "patient=[patient-id]&authoredon=ge=[30-days-ago]&status=active"Medications requiring monitoring labs:
Tool: fhir_search
resourceType: "Procedure"
queryParams: "patient=[patient-id]&date=ge=[30-days-ago]&status=completed"Common post-procedure follow-up intervals:
references/follow-up-intervals.md)Tool: fhir_search
resourceType: "DiagnosticReport"
queryParams: "patient=[patient-id]&status=preliminary,registered&_sort=-date"Any preliminary or pending diagnostic reports require a follow-up task to review results when finalized.
Assignment logic based on task type:
If provider information is available in the Encounter or ServiceRequest:
Tool: fhir_read
resourceType: "Practitioner"
id: "[practitioner-id-from-encounter]"For each identified follow-up item:
Tool: fhir_create
resourceType: "Task"
resource: {
"resourceType": "Task",
"status": "requested",
"intent": "order",
"priority": "[routine|urgent|asap|stat]",
"code": { "coding": [{ "system": "http://hl7.org/fhir/CodeSystem/task-code", "code": "fulfill", "display": "Fulfill the focal request" }] },
"description": "[Specific follow-up action required]",
"for": { "reference": "Patient/[patient-id]" },
"requester": { "reference": "Practitioner/[requesting-provider-id]" },
"owner": { "reference": "Practitioner/[responsible-provider-id]" },
"reasonReference": { "reference": "[Condition|Observation|Procedure]/[id]" },
"restriction": {
"period": { "end": "[due-date-ISO-8601]" }
},
"input": [
{
"type": { "text": "follow-up-type" },
"valueString": "[lab-recheck|appointment|imaging|referral|medication-review|result-review]"
}
],
"note": [{ "text": "[Clinical context and specific instructions]" }]
}Priority mapping:
stat: Critical results, same-day action requiredasap: Within 48 hoursurgent: Within 1 weekroutine: Within 1 monthFOLLOW-UP TASK SUMMARY
========================
Patient: [name] | MRN: [mrn]
Generated: [timestamp]
Based on: [Encounter type] on [encounter date]
Total Tasks: [count] (Critical: [n], Urgent: [n], Routine: [n])
CRITICAL (same-day action required)
-------------------------------------
1. [Task description]
Trigger: [what prompted this task]
Owner: [responsible provider]
Due: [date]
Task ID: Task/[id]
URGENT (within 1 week)
-----------------------
1. [Task description]
Trigger: [what prompted this task]
Owner: [responsible provider]
Due: [date]
Task ID: Task/[id]
ROUTINE (within 1 month)
-------------------------
1. [Task description]
Trigger: [what prompted this task]
Owner: [responsible provider]
Due: [date]
Task ID: Task/[id]
TASKS CREATED: [total count]User says: "Generate follow-up tasks for patient 33333 after today's visit"
Actions:
fhir_search Encounter?patient=33333&_sort=-date&_count=1 -- office visit today with Dr. Patel for annual physicalfhir_search Observation?patient=33333&category=laboratory&date=ge=2024-01-01 -- HbA1c 7.8% (H), LDL 168 (H), TSH 8.2 (H), Cr 0.9 (normal), CBC normalfhir_search Condition?patient=33333&onset-date=ge=2024-01-01 -- new T2DM, new hypothyroidism diagnosed todayfhir_search MedicationRequest?patient=33333&authoredon=ge=2024-01-08 -- metformin 500mg BID started, levothyroxine 50mcg started, atorvastatin 20mg startedfhir_search Procedure?patient=33333&date=ge=2023-12-01 -- none recentfhir_search DiagnosticReport?patient=33333&status=preliminary -- none pendingfhir_create Task x6Result:
FOLLOW-UP TASK SUMMARY
========================
Patient: David Kim | MRN: 33333
Generated: 2024-01-08T16:30:00Z
Based on: Office visit on 2024-01-08
Total Tasks: 6 (Critical: 0, Urgent: 1, Routine: 5)
URGENT (within 1 week)
-----------------------
1. Diabetes education referral
Trigger: New T2DM diagnosis (HbA1c 7.8%)
Owner: Dr. Patel (PCP)
Due: 2024-01-15
Task ID: Task/t-001
ROUTINE (within 1 month)
-------------------------
1. Recheck BMP (creatinine, potassium) -- metformin monitoring
Trigger: Metformin 500mg BID started 2024-01-08
Owner: Dr. Patel (PCP)
Due: 2024-02-08
Task ID: Task/t-002
2. Recheck TSH -- levothyroxine monitoring
Trigger: Levothyroxine 50mcg started 2024-01-08, TSH 8.2
Owner: Dr. Patel (PCP)
Due: 2024-03-05 (6-8 weeks)
Task ID: Task/t-003
3. Recheck lipid panel -- statin monitoring
Trigger: Atorvastatin 20mg started 2024-01-08, LDL 168
Owner: Dr. Patel (PCP)
Due: 2024-03-05 (6-8 weeks)
Task ID: Task/t-004
4. Recheck HbA1c -- diabetes monitoring
Trigger: New T2DM, HbA1c 7.8%, metformin started
Owner: Dr. Patel (PCP)
Due: 2024-04-08 (3 months)
Task ID: Task/t-005
5. Ophthalmology referral -- diabetic eye screening
Trigger: New T2DM diagnosis
Owner: Dr. Patel (PCP)
Due: 2025-01-08 (within 1 year of diagnosis)
Task ID: Task/t-006
TASKS CREATED: 6User says: "What follow-up tasks are needed for patient abc-444 who was just discharged?"
Actions:
fhir_search Encounter?patient=abc-444&_sort=-date&_count=1 -- discharge today from 5-day CHF admissionfhir_search Observation?patient=abc-444&category=laboratory&date=ge=2024-01-03 -- K+ 5.6 (H, last day), Cr 1.8 (H, up from 1.2), BNP 450 (H, down from 1200), Hgb 10.2 (L)fhir_search Condition?patient=abc-444&clinical-status=active -- CHF, CKD3, T2DM, AFfhir_search MedicationRequest?patient=abc-444&authoredon=ge=2024-01-03 -- carvedilol 12.5mg BID (NEW), furosemide 40mg BID (increased from 20mg), spironolactone 25mg (NEW)fhir_search Procedure?patient=abc-444&date=ge=2024-01-03 -- nonefhir_search DiagnosticReport?patient=abc-444&status=preliminary -- echocardiogram report pendingfhir_create Task x7Result:
FOLLOW-UP TASK SUMMARY
========================
Patient: Helen Martinez | MRN: abc-444
Generated: 2024-01-08T14:00:00Z
Based on: Inpatient discharge on 2024-01-08 (CHF exacerbation)
Total Tasks: 7 (Critical: 1, Urgent: 3, Routine: 3)
CRITICAL (same-day action required)
-------------------------------------
1. Review echocardiogram results when finalized
Trigger: Echo performed 2024-01-07, report status: preliminary
Owner: Dr. Chen (Cardiology)
Due: 2024-01-08
Task ID: Task/t-101
URGENT (within 1 week)
-----------------------
1. Recheck BMP (potassium, creatinine) -- diuretic and spironolactone monitoring
Trigger: K+ 5.6 on discharge, Cr 1.8 (elevated), spironolactone + furosemide started/changed
Owner: Dr. Rivera (PCP)
Due: 2024-01-11 (3 days post-discharge)
Task ID: Task/t-102
2. PCP follow-up visit -- post-discharge CHF management
Trigger: High-risk CHF discharge, LACE score 12
Owner: Dr. Rivera (PCP)
Due: 2024-01-12 (within 7 days)
Task ID: Task/t-103
3. Cardiology follow-up visit
Trigger: CHF exacerbation, new medications, pending echo results
Owner: Dr. Chen (Cardiology)
Due: 2024-01-15 (within 7-14 days)
Task ID: Task/t-104
ROUTINE (within 1 month)
-------------------------
1. Recheck CBC -- monitor anemia
Trigger: Hgb 10.2 at discharge
Owner: Dr. Rivera (PCP)
Due: 2024-02-08 (1 month)
Task ID: Task/t-105
2. Recheck BNP -- trending response to therapy
Trigger: BNP 450 at discharge (down from 1200)
Owner: Dr. Chen (Cardiology)
Due: 2024-02-08 (1 month)
Task ID: Task/t-106
3. Recheck renal function and electrolytes -- carvedilol and spironolactone monitoring
Trigger: Cr 1.8, K+ 5.6, new spironolactone
Owner: Dr. Rivera (PCP)
Due: 2024-02-08 (1 month)
Task ID: Task/t-107
TASKS CREATED: 7references/follow-up-intervals.md for chronic disease management intervals even without recent changes.owner to the patient's PCP (if known from Patient.generalPractitioner) or leave unassigned and note "Responsible provider to be determined -- assign to ordering provider or PCP."participant array. Check for type.coding.code = "ATND" (attending) or "PPRF" (primary performer).discharge-planning-checklist -- generates the discharge checklist that feeds into follow-up task generationcare-gap-identifier -- identifies preventive care gaps that may generate additional routine taskstransition-of-care-summary -- the TOC document references follow-up tasks in the action list sectionlab-result-interpreter -- provides detailed interpretation of lab results that trigger follow-up~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.