关于 health-safety-summarization
此技能面向使用 ServiceNow HR Service Delivery 的 EHS 团队,汇总工作场所健康与安全事件及相关调查、危险源和整改措施。它还支持 OSHA 可记录性评估和按地点、部门、类型及时间分析安全趋势。
主要功能
- 01汇总事件伤害与严重程度
- 02关联根因调查和危险源
- 03评估 OSHA 记录与报告要求
- 04跟踪纠正及预防措施
- 05生成分组安全趋势报告
适用场景
- 01准备月度或季度安全绩效报告
- 02为严重事故调查整理事件资料
- 03为 OSHA 审计汇集记录依据
- 04为安全委员会分析地点趋势
MCP 相关
该技能通过 ServiceNow MCP 工具查询事件、调查、危险源和整改记录,并执行后台脚本进行汇总分析。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ happy-technologies-llc/ happy-platform-skills --skill health-safety-summarization安装后在 Claude Code 中输入/health-safety-summarization确认已加载。
详细介绍
健康与安全事故摘要
概述
此技能可汇总 ServiceNow HR Service Delivery 中的健康与安全(H&S)事故,生成全面的摘要。涵盖:
- 汇总工作场所事故数据,包括受伤类型、严重程度和受影响的身体部位
- 将事故与根本原因调查及促成事故的危险因素关联起来
- 确定 OSHA 记录要求及报告要求(Form 300、300A、301)
- 跟踪纠正措施和预防措施,直至完成
- 按地点、部门、事故类型和时间段生成安全趋势报告
- 为 EHS 管理层生成安全执行仪表板
适用场景:
- 准备月度或季度安全绩效报告时
- 发生需要调查和根本原因分析的工作场所事故后
- 进行需要提供记录证据的 OSHA 合规审计时
- 管理层需要全面了解工作场所安全状况时
- 在需要事故趋势数据的安全委员会会议之前
前提条件
- 角色:
sn_hr_hs.admin、sn_hr_hs.manager、sn_hr_core.manager或admin - 插件:
com.sn_hr_health_safety(健康与安全)、com.sn_hr_core(HR Core) - 访问权限: 对 sn_hr_hs_incident、sn_hr_hs_hazard、sn_hr_hs_investigation 表具有读取权限
- 知识: 了解 OSHA 记录要求(29 CFR 1904)、事故分类和组织的安全报告规程
主要 H&S 表
| 表 | 用途 | 关键字段 |
|---|---|---|
sn_hr_hs_incident | 工作场所安全事故 | number, short_description, state, severity, incident_type, injury_type, body_part, location, incident_date, osha_recordable |
sn_hr_hs_hazard | 工作场所危险因素 | number, short_description, hazard_type, risk_level, location, state, control_measures |
sn_hr_hs_investigation | 事故调查 | number, incident, root_cause, contributing_factors, findings, investigator, state |
sn_hr_hs_corrective_action | 纠正和预防措施 | number, short_description, incident, action_type, state, owner, due_date, completion_date |
cmn_location | 设施和地点记录 | name, city, state, country, building, floor |
流程
第 1 步:检索 H&S 事故
查询近期工作场所事故,并按严重程度排序。
使用 MCP(Claude Code/Desktop):
Tool: SN-Query-Table
Parameters:
table_name: sn_hr_hs_incident
query: active=true^ORDERBYDESCseverity
fields: sys_id,number,short_description,description,state,severity,incident_type,injury_type,body_part,location,incident_date,osha_recordable,days_away,restricted_duty,assigned_to,opened_by,sys_created_on
limit: 100
使用 REST API:
GET /api/now/table/sn_hr_hs_incident?sysparm_query=active=true^ORDERBYDESCseverity&sysparm_fields=sys_id,number,short_description,description,state,severity,incident_type,injury_type,body_part,location,incident_date,osha_recordable,days_away,restricted_duty&sysparm_limit=100&sysparm_display_value=true
第 2 步:检索调查详情
为每起事故提取根本原因调查信息。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: sn_hr_hs_investigation
query: incident=[incident_sys_id]
fields: sys_id,number,root_cause,contributing_factors,findings,investigator,state,methodology,completion_date
limit: 10
使用 REST API:
GET /api/now/table/sn_hr_hs_investigation?sysparm_query=incident=[incident_sys_id]&sysparm_fields=sys_id,number,root_cause,contributing_factors,findings,investigator,state,methodology&sysparm_limit=10&sysparm_display_value=true
第 3 步:识别相关危险因素
查询与事故地点或类型相关的危险因素。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: sn_hr_hs_hazard
query: location=[incident_location]^active=true
fields: sys_id,number,short_description,hazard_type,risk_level,location,state,control_measures,reported_date
limit: 20
使用 REST API:
GET /api/now/table/sn_hr_hs_hazard?sysparm_query=location=[location_sys_id]^active=true&sysparm_fields=sys_id,number,short_description,hazard_type,risk_level,location,state,control_measures&sysparm_limit=20&sysparm_display_value=true
第 4 步:跟踪纠正措施
查询未结事故的纠正和预防措施。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: sn_hr_hs_corrective_action
query: incident=[incident_sys_id]
fields: sys_id,number,short_description,action_type,state,owner,due_date,completion_date,effectiveness_review
limit: 20
使用 REST API:
GET /api/now/table/sn_hr_hs_corrective_action?sysparm_query=incident=[incident_sys_id]&sysparm_fields=sys_id,number,short_description,action_type,state,owner,due_date,completion_date&sysparm_limit=20&sysparm_display_value=true
第 5 步:生成安全绩效摘要
构建全面的安全指标报告:
Tool: SN-Execute-Background-Script
Parameters:
script: |
var summary = {
generated_date: new GlideDateTime().toString(),
incident_metrics: { total_ytd: 0, recordable: 0, lost_time: 0, restricted_duty: 0, first_aid: 0, near_miss: 0 },
by_severity: { critical: 0, high: 0, medium: 0, low: 0 },
by_type: {},
by_location: {},
by_body_part: {},
osha_metrics: { trir: 0, dart: 0, total_hours_worked: 0 },
corrective_actions: { open: 0, overdue: 0, completed_ytd: 0 },
hazards: { open: 0, critical: 0 }
};
var now = new GlideDateTime();
var yearStart = new GlideDateTime(now.getYearUTC() + '-01-01 00:00:00');
// Incident aggregation (YTD)
var gr = new GlideRecord('sn_hr_hs_incident');
gr.addQuery('incident_date', '>=', yearStart.toString());
gr.query();
while (gr.next()) {
summary.incident_metrics.total_ytd++;
if (gr.osha_recordable.toString() == 'true') summary.incident_metrics.recordable++;
if (parseInt(gr.days_away.toString()) > 0) summary.incident_metrics.lost_time++;
if (gr.restricted_duty.toString() == 'true') summary.incident_metrics.restricted_duty++;
var sev = gr.severity.getDisplayValue() || 'Unknown';
if (sev.match(/critical/i)) summary.by_severity.critical++;
else if (sev.match(/high/i)) summary.by_severity.high++;
else if (sev.match(/medium/i)) summary.by_severity.medium++;
else summary.by_severity.low++;
var iType = gr.incident_type.getDisplayValue() || 'Other';
summary.by_type[iType] = (summary.by_type[iType] || 0) + 1;
var loc = gr.location.getDisplayValue() || 'Unknown';
summary.by_location[loc] = (summary.by_location[loc] || 0) + 1;
var bodyPart = gr.body_part.getDisplayValue() || 'Not Specified';
summary.by_body_part[bodyPart] = (summary.by_body_part[bodyPart] || 0) + 1;
}
// Open corrective actions
var ca = new GlideAggregate('sn_hr_hs_corrective_action');
ca.addQuery('active', true);
ca.addAggregate('COUNT');
ca.query();
if (ca.next()) summary.corrective_actions.open = parseInt(ca.getAggregate('COUNT'));
// Overdue corrective actions
var overdueCa = new GlideAggregate('sn_hr_hs_corrective_action');
overdueCa.addQuery('active', true);
overdueCa.addQuery('due_date', '<', now.toString());
overdueCa.addAggregate('COUNT');
overdueCa.query();
if (overdueCa.next()) summary.corrective_actions.overdue = parseInt(overdueCa.getAggregate('COUNT'));
// Open hazards
var hz = new GlideAggregate('sn_hr_hs_hazard');
hz.addQuery('active', true);
hz.addAggregate('COUNT');
hz.query();
if (hz.next()) summary.hazards.open = parseInt(hz.getAggregate('COUNT'));
gs.info('SAFETY PERFORMANCE SUMMARY:\n' + JSON.stringify(summary, null, 2));
description: "H&S: Generate YTD safety performance summary with OSHA metrics"
第 6 步:确定 OSHA 报告要求
根据 OSHA 记录标准评估事故:
Tool: SN-Execute-Background-Script
Parameters:
script: |
var incNumber = 'HS0001234'; // Replace with target incident
var gr = new GlideRecord('sn_hr_hs_incident');
gr.addQuery('number', incNumber);
gr.query();
if (gr.next()) {
var osha = {
incident: gr.number.toString(),
title: gr.short_description.toString(),
incident_date: gr.incident_date.toString(),
recordable: false,
form_300_required: false,
form_301_required: false,
immediate_report_required: false,
reporting_deadline: '',
criteria_met: []
};
// OSHA recordability criteria (29 CFR 1904.7)
var daysAway = parseInt(gr.days_away.toString()) || 0;
var restrictedDuty = gr.restricted_duty.toString() == 'true';
var injuryType = gr.injury_type.getDisplayValue().toLowerCase();
if (daysAway > 0) { osha.criteria_met.push('Days away from work: ' + daysAway); osha.recordable = true; }
if (restrictedDuty) { osha.criteria_met.push('Restricted duty/job transfer'); osha.recordable = true; }
if (injuryType.match(/fracture|amputation|hospitalization|loss of consciousness/)) {
osha.criteria_met.push('Significant injury: ' + injuryType);
osha.recordable = true;
}
// Immediate reporting (29 CFR 1904.39): fatality within 8 hrs, amputation/eye loss/hospitalization within 24 hrs
if (injuryType.match(/fatality|death/)) {
osha.immediate_report_required = true;
osha.reporting_deadline = '8 hours from employer knowledge';
} else if (injuryType.match(/amputation|eye loss|hospitalization/)) {
osha.immediate_report_required = true;
osha.reporting_deadline = '24 hours from employer knowledge';
}
if (osha.recordable) {
osha.form_300_required = true;
osha.form_301_required = true;
}
gs.info('OSHA REPORTING ASSESSMENT:\n' + JSON.stringify(osha, null, 2));
}
description: "H&S: Evaluate OSHA recordability and reporting requirements"
工具用法
| 操作 | MCP 工具 | REST 端点 |
|---|---|---|
| 查询事故 | SN-Query-Table | GET /api/now/table/sn_hr_hs_incident |
| 搜索事故 | SN-Natural-Language-Search | N/A |
| 查询调查 | SN-Query-Table | GET /api/now/table/sn_hr_hs_investigation |
| 查询危险因素 | SN-Query-Table | GET /api/now/table/sn_hr_hs_hazard |
| 查询纠正措施 | SN-Query-Table | GET /api/now/table/sn_hr_hs_corrective_action |
| 汇总分析 | SN-Execute-Background-Script | POST /api/now/table/sys_trigger |
| 架构发现 | SN-Discover-Table-Schema | GET /api/now/table/sys_dictionary |
最佳实践
- 及时性: 事故发生后 24 小时内完成总结,以便准确调查根本原因
- OSHA 合规性: 关闭事故前,务必评估是否符合记录标准;漏报会带来重大处罚
- 根本原因分析深度: 确保调查不止于直接原因,还要找出系统性促成因素
- 纠正措施跟踪: 为逾期纠正措施设定明确的截止日期和升级处理路径
- 先行指标: 除 TRIR 和 DART 等滞后指标外,还应纳入未遂事件和危险情况报告数量
- 地点分析: 按地点细分事故数据,以识别风险较高的设施
- 隐私保护: 从高管摘要中删除可识别个人身份的受伤详情;仅使用汇总数据
- 季节性趋势: 解读趋势时考虑季节性规律(例如,夏季热病、冬季滑倒/跌倒)
故障排除
事故类型字段返回空值
症状: 事故类型细分结果全部显示为“其他”
原因: incident_type 字段可能使用自定义选项列表,或字段名称不同
解决方案:
Tool: SN-Discover-Table-Schema
Parameters:
table_name: sn_hr_hs_incident
检查是否存在 type、category 或 classification 等用于事故分类的字段。
未设置 OSHA 可记录标记
症状: 符合记录标准的事故,其 osha_recordable 值显示为 false
原因: 可记录性判定可能需要手动完成,或由业务规则触发
解决方案: 确认 sn_hr_hs_incident 上的业务规则会评估记录标准。检查是否存在单独的 OSHA 日志表。
调查记录未关联
症状: 对已知事故执行调查查询时没有返回结果
原因: 关系字段可能使用 parent、source 或自定义引用字段,而不是 incident
解决方案: 查询 sys_dictionary,查找 sn_hr_hs_investigation 上指向 sn_hr_hs_incident 的引用字段。
示例
示例 1:月度安全报告
场景: EHS 总监需要为安全委员会准备月度安全摘要
Tool: SN-Query-Table
Parameters:
table_name: sn_hr_hs_incident
query: sys_created_on>=javascript:gs.daysAgoStart(30)
limit: 50
生成的摘要:
- 事故总数(3 月): 12 起(较 2 月的 15 起下降)
- OSHA 可记录事故: 3 起(TRIR:2.1,较之前的 2.8 下降)
- 误工事故: 1 起(滑倒和跌倒,仓库,离岗 5 天)
- 未遂事件: 4 起(靠近叉车:2 起,电气:1 起,化学品泄漏:1 起)
- 事故最多的地点: A 楼仓库(5 起事故,占 42%)
- 最常见的受伤类型: 拉伤/扭伤(4 起事故)
- 纠正措施: 8 项待处理,2 项逾期
- 建议: 在 A 楼仓库开展有针对性的安全停工培训;优先处理 2 项逾期纠正措施
示例 2:单起事故深度分析
场景: 调查团队需要为一起严重受伤事故准备完整的事故资料包
Tool: SN-Get-Record
Parameters:
table_name: sn_hr_hs_incident
sys_id: [incident_sys_id]
fields: sys_id,number,short_description,description,severity,incident_type,injury_type,body_part,location,incident_date,osha_recordable,days_away,restricted_duty,root_cause,work_notes
生成的详情:
- 事故: HS0001456 - 员工从高架平台坠落
- 日期: 2026-03-15,上午 10:30,C 楼,2 层
- 严重程度: 高 | OSHA 可记录:是
- 受伤情况: 右手腕骨折,离岗 15 天
- 根本原因: 临时作业平台缺少护栏;未佩戴防坠落装备
- 促成因素: 作业前安全检查不足,防坠落培训已过期
- 纠正措施: 已分配 3 项(安装护栏、更新培训、更新检查清单)
- OSHA 报告: 需要填写 300 表和 301 表;无需立即报告(非住院、截肢或死亡事故)
相关技能
hrsd/case-summarization- 通用 HR 案例总结hrsd/sentiment-analysis- 与安全文化相关的员工情绪分析grc/issue-summarization- 用于安全合规的 GRC 问题分析security/audit-compliance- 审计与合规报告admin/workflow-creation- 自动化安全事故工作流