Vaccination Record Management Skill
Manage vaccination records and schedules, support multi-dose vaccine tracking, vaccination plan management, adverse reaction recording, and safety checks.
Core Process
用户输入 -> 识别操作类型 -> 解析信息 -> 接种前安全检查 -> 生成计划/记录 -> 保存数据
Step 1: Parse User Input
Operation Type Recognition
| Input Keywords |
Operation Type |
| add |
Add vaccination plan |
| record |
Record actual vaccination |
| schedule |
View vaccination schedule |
| due |
View pending vaccinations |
| history |
View vaccination history |
| status |
View vaccination statistics |
| check |
Pre-vaccination safety check |
Vaccine Name Recognition
| Vaccine |
Alias |
| Hepatitis B vaccine |
HepB, hepatitis B vaccine |
| Influenza vaccine |
Flu vaccine, influenza vaccine |
| HPV vaccine |
cervical cancer vaccine, human papillomavirus vaccine |
| COVID-19 vaccine |
COVID-19 vaccine, coronavirus vaccine |
| DTaP vaccine |
DPT |
| MMR vaccine |
MMR |
| Polio vaccine |
polio vaccine |
Dose Number Recognition
| User Input |
Standardization |
| 1st shot, first shot, 1st dose |
dose_number: 1 |
| 2nd shot, second shot, 2nd dose |
dose_number: 2 |
| 3rd shot, third shot, 3rd dose |
dose_number: 3 |
Vaccination Schedule Recognition
| User Input |
Standardization |
Total Doses |
| 0-1-6, 016 schedule |
0-1-6 |
3 doses |
| 0-2-6, 026 schedule |
0-2-6 |
3 doses |
| single, 1 time |
single |
1 dose |
Step 2: Pre-vaccination Safety Check
Safety Check Items
1. Allergy Check
// 伪代码示例
function checkVaccineAllergies(vaccine) {
const allergies = loadAllergies('data/allergies.json');
const warnings = [];
for (const allergy of allergies.allergies) {
if (allergy.current_status.status !== 'active') continue;
const isContraindication = vaccine.contraindications.some(c =>
c.type === 'allergy' && c.allergen === allergy.allergen.name
);
if (isContraindication) {
warnings.push({
allergen: allergy.allergen.name,
severity: allergy.severity.level,
recommendation: getRecommendation(allergy.severity.level)
});
}
}
return warnings;
}
2. Age Appropriateness Check
function checkAgeAppropriateness(vaccine, birthDate) {
const age = calculateAge(birthDate);
const recommendation = vaccine.age_recommendations;
if (age < recommendation.min_age) {
return {
appropriate: false,
reason: `年龄不足,建议${recommendation.min_age}后再接种`
};
}
return {
appropriate: true,
recommended_age: recommendation.recommended_age
};
}
3. Drug Interaction Check
function checkVaccineInteractions(vaccine) {
const medications = loadMedications();
const interactions = [];
for (const vaccineInteraction of vaccine.interactions) {
const matchingMeds = medications.filter(med =>
med.active && med.category === vaccineInteraction.drug_category
);
if (matchingMeds.length > 0) {
interactions.push({
drugs: matchingMeds.map(m => m.name),
interaction: vaccineInteraction
});
}
}
return interactions;
}
Step 3: Generate Vaccination Plan
Vaccination Plan Generation Algorithm
function generateVaccineSchedule(vaccine, firstDoseDate) {
const scheduleTypes = {
'0-1-6': [
{ dose: 1, offset: 0, unit: 'months' },
{ dose: 2, offset: 1, unit: 'months' },
{ dose: 3, offset: 6, unit: 'months' }
],
'0-2-6': [
{ dose: 1, offset: 0, unit: 'months' },
{ dose: 2, offset: 2, unit: 'months' },
{ dose: 3, offset: 6, unit: 'months' }
],
'annual': [
{ dose: 1, offset: 1, unit: 'years' }
],
'single': [
{ dose: 1, offset: 0, unit: 'days' }
]
};
const pattern = scheduleTypes[vaccine.standard_schedule];
const schedule = [];
for (const doseInfo of pattern) {
const scheduledDate = addOffset(firstDoseDate, doseInfo.offset, doseInfo.unit);
const isFirstDose = doseInfo.dose === 1;
schedule.push({
dose_number: doseInfo.dose,
scheduled_date: formatDate(scheduledDate),
administered_date: isFirstDose && firstDoseDate <= new Date() ? formatDate(firstDoseDate) : null,
status: isFirstDose && firstDoseDate <= new Date() ? 'completed' : 'scheduled'
});
}
return schedule;
}
Step 4: Generate JSON
Vaccination Data Structure
{
"id": "vax_20251231123456789",
"vaccine_info": {
"name": "乙型肝炎疫苗",
"type": "recombinant",
"manufacturer": "北京生物制品研究所",
"batch_number": "202512001",
"dose_volume": {
"value": 0.5,
"unit": "ml"
},
"route": "intramuscular"
},
"series_info": {
"is_series": true,
"series_type": "primary",
"total_doses": 3,
"current_dose": 2,
"schedule_type": "0-1-6"
},
"doses": [
{
"dose_number": 1,
"scheduled_date": "2025-11-15",
"administered_date": "2025-11-15",
"site": "left_arm",
"facility": "社区卫生服务中心",
"status": "completed"
},
{
"dose_number": 2,
"scheduled_date": "2025-12-15",
"administered_date": "2025-12-16",
"site": "right_arm",
"status": "completed"
},
{
"dose_number": 3,
"scheduled_date": "2026-05-15",
"administered_date": null,
"status": "scheduled"
}
],
"adverse_reactions": [],
"safety_checks": {
"allergy_warnings": [],
"drug_interactions": [],
"age_appropriate": true,
"contraindications": []
},
"status": {
"series_status": "in_progress",
"completion_percentage": 66.7,
"next_dose_due": "2026-05-15",
"is_overdue": false
}
}
See the complete Schema definition at schema.json。
Step 5: Save Data
- Generate unique ID:
vax_YYYYMMDDHHmmssSSS
- Save to
data/vaccinations.json
- Update statistics
Safety Alert Levels
| Severity |
Recommendation |
| mild |
Can be vaccinated, requires observation |
| moderate |
Vaccinate with caution, consult a doctor recommended |
| severe |
Vaccination not recommended, or consult a specialist |
| anaphylaxis |
Absolute contraindication, vaccination prohibited |
Execution Instructions
1. 识别操作类型
2. 解析输入参数,提取疫苗信息
3. 从疫苗数据库匹配疫苗信息
4. 执行接种前安全检查:
- 过敏检查
- 年龄适宜性检查
- 药物相互作用检查
- 禁忌症检查
5. 生成接种计划
6. 生成符合 schema.json 的 JSON
7. 保存到数据文件
8. 向用户确认保存成功,并显示摘要和建议
Example Interactions
Example 1: Add a hepatitis B vaccination plan
用户: 添加疫苗 乙肝疫苗 0-1-6程序 第一针已打昨天
AI: 🔍 疫苗接种前安全检查
1️⃣ 过敏史检查: ✅ 通过
2️⃣ 年龄适宜性检查: ✅ 通过
3️⃣ 当前健康状况检查: ✅ 通过
4️⃣ 药物相互作用检查: ⚠️ 无影响
5️⃣ 疫苗接种史检查: 📋 无既往记录
✅ 综合评估: 可以接种
✅ 疫苗接种计划已添加
乙肝疫苗 0-1-6月程序:
第1针: 2025-01-07 ✅ 已接种
第2针: 2025-02-07 (计划中)
第3针: 2025-07-07 (计划中)
进度: 1/3 (33.3%)
💡 提示: 第2针可在2025-01-24至2025-03-07之间完成
Example 2: View upcoming vaccinations
用户: 待接种疫苗
AI: ⚠️ 待接种提醒
🔴 紧急(已逾期)
1. 乙肝疫苗第3针
逾期: 11天(应种: 2025-12-20)
💡 建议尽快补种
⏰ 近期待种(30天内)
1. HPV疫苗第2针 - 还有15天
2. 流感疫苗 - 还有30天
行动建议:
• 立即联系接种点补种逾期疫苗
• 为即将到期的疫苗预约接种时间
Example 3: Pre-vaccination safety check
用户: 疫苗检查 乙肝疫苗
AI: 🔍 疫苗接种前安全检查
疫苗: 乙型肝炎疫苗(重组)
1️⃣ 过敏史检查: ✅ 通过
检查结果: 无相关过敏史
2️⃣ 年龄适宜性检查: ✅ 通过
当前年龄: 35岁
推荐年龄: 任何年龄均可接种
3️⃣ 当前健康状况检查: ✅ 通过
无发热或急性疾病
4️⃣ 药物相互作用检查: ⚠️ 发现1项
当前用药: 环孢素 100mg 每日2次
影响: 可能降低疫苗免疫效果
建议: 接种后2-3个月检测抗体滴度
━━━━━━━━━━━━━━━━━━━━━━━━━
综合评估: ✅ 可以接种
━━━━━━━━━━━━━━━━━━━━━━━━━
注意事项:
• 接种后留观30分钟
• 如出现不良反应,及时记录
• 建议接种后2个月检测抗体
是否继续添加疫苗计划?
A. 继续添加
B. 取消
Important Notes
- This system is for personal vaccination records only and cannot replace professional medical advice
- Please consult a doctor or vaccination site staff before vaccination
- If you have a history of severe allergies, you must inform the vaccination staff
- Stay for observation for 30 minutes after vaccination
- All data is stored locally only