关于 ubiquitous-language
此技能从对话中提取领域术语,并整理为保存于 `UBIQUITOUS_LANGUAGE.md` 的统一词汇表。它侧重医疗领域及法英双语术语,也提供识别歧义和规范定义的指导。
主要功能
- 01从对话提取领域术语
- 02标记歧义与同义词
- 03提出规范术语
- 04创建法英双语词汇表
- 05加入示例对话
- 06跨轮次更新词汇表
适用场景
- 01统一医疗项目中的术语
- 02厘清不同标准中的术语
- 03维护团队共享领域词汇表
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ dedalus-erp-pas/ foundation-skills --skill ubiquitous-language安装后在 Claude Code 中输入/ubiquitous-language确认已加载。
详细介绍
通用语言
从当前对话中提取并规范领域术语,整理成一致的术语表并保存到本地文件。
医疗保健领域意识
这项技能在医疗保健场景中特别有价值,因为精确的领域语言可以避免造成高昂代价的误解。医疗保健系统涉及多种相互交叠的标准(HL7v2、FHIR、HPK、IHE 配置文件),每种标准都为相似概念引入了自己的术语——FHIR 中的“患者就诊”、HL7v2 中的“ADT 事件”、HPK 中的“场所”,都可能指向彼此交叠但又有所区别的概念。尽早规范通用语言,可以避免在临床环境中代价高昂且危险的错误、规范偏移和集成问题。
双语支持(法语 / 英语)
我们的团队主要使用法语,但医疗保健领域标准(HL7、FHIR、IHE)和 DDD 文献使用英语术语。术语表应同时包含两种语言:
- 规范术语应根据团队对该概念最自然的用语来选择,不论是法语还是英语
- 每条定义旁都应包含一个法语术语列,方便团队成员在不同语言间对应术语
- 当标准规定了英语术语(例如“Encounter”“Observation”“MessageHeader”)时,优先采用标准中的英语术语作为规范术语,并提供对应的法语译法
流程
- 扫描对话,找出与领域相关的名词、动词和概念
- 识别问题:
- 同一个词用于不同概念(歧义)
- 不同词语用于同一个概念(同义词)
- 含义模糊或含义过多的术语
- 与既有医疗保健标准冲突的术语
- 提出规范术语表,并明确给出术语选择建议
- 按照以下格式,在工作目录中写入
UBIQUITOUS_LANGUAGE.md - 在对话中内联输出摘要
输出格式
按以下结构编写 UBIQUITOUS_LANGUAGE.md 文件:
# Ubiquitous Language
## Patient lifecycle
| Term | Terme français | Definition | Aliases to avoid |
|------|---------------|-----------|-----------------|
| **Encounter** | Rencontre / Venue | A single interaction between a patient and a healthcare provider, bounded by admission and discharge | Visit, stay, séjour, passage |
| **Admission** | Admission | The act of formally registering a patient for an encounter | Check-in, entrée |
## Clinical concepts
| Term | Terme français | Definition | Aliases to avoid |
|------|---------------|-----------|-----------------|
| **Observation** | Observation | A single clinical measurement or finding recorded during an encounter | Result, measure, mesure, donnée |
| **Prescription** | Prescription | A clinician's order for medication, treatment, or diagnostic test | Order, ordonnance (when referring to the act, not the document) |
## Relationships
- An **Encounter** belongs to exactly one **Patient**
- A **Prescription** is issued during one **Encounter** but may be fulfilled across multiple **Encounters**
- An **Observation** is always recorded within one **Encounter**
## Example dialogue
> **Dev:** "When a **Patient** arrives, do we create an **Encounter** immediately?"
> **Domain expert:** "Yes — the **Admission** triggers the creation of an **Encounter**. But note that pre-admission paperwork does not constitute an **Encounter**; it is handled separately."
> **Dev:** "And if the **Patient** is transferred to another unit?"
> **Domain expert:** "That is still the same **Encounter**. A transfer changes the location, not the **Encounter** itself. A new **Encounter** only begins if the **Patient** is discharged and readmitted."
> **Dev:** "So the HL7 ADT^A02 transfer message updates the **Encounter**, it doesn't create a new one?"
> **Domain expert:** "Exactly."
## Flagged ambiguities
- "séjour" was used to mean both **Encounter** (a clinical interaction) and a hospital stay (a period of time) — prefer **Encounter** for the clinical concept and **Hospitalization** for the administrative period.
- "venue" in HPK context refers to the location-bound encounter, while "venue" in everyday French means something different entirely — always use **Encounter** in code and documentation.
规则
- 明确给出建议。 同一概念存在多个词语时,选出最合适的词,并将其他词列为应避免的别名。
- 明确标记冲突。 如果对话中的某个术语存在歧义,应在“已标记的歧义”部分指出,并给出明确建议。
- 定义简洁。 最多用一个句子。说明它是什么,而不是它做什么。
- 体现关系。 使用粗体标出术语名称,并在关系明确时注明基数。
- 仅纳入领域术语。 跳过通用编程概念(数组、函数、端点),除非它们具有特定领域含义。
- 在自然形成不同类别时,将术语分成多个表格(例如按子领域、生命周期或参与者分类)。每组使用独立的标题和表格。如果所有术语都属于一个连贯的领域,使用一个表格即可,不要强行分类。
- 编写对话示例。 编写一段简短对话(3-5 轮),由开发人员和领域专家交流,展示术语如何自然地相互关联。对话应厘清相关术语之间的界限,并展示如何准确使用术语。
- 包含法语术语。 每一行表格都必须包含“法语术语”列。如果规范术语本身已是法语,该列可以重复该术语或注明“相同”。
- 遵循医疗保健标准。 如果术语由 HL7、FHIR、IHE 或 HPK 定义,优先使用标准规定的规范拼写和大小写形式。如有帮助,可在定义中注明来源标准。
再次运行
在同一对话中再次调用时:
- 阅读现有的
UBIQUITOUS_LANGUAGE.md - 纳入后续讨论中的新术语
- 根据理解的变化更新定义
- 为已更改的条目添加“(已更新)”标记,为新条目添加“(新增)”标记
- 重新标记任何新发现的歧义
- 改写对话示例,纳入新术语
输出后的指示
写入文件后,请说明:
我已写入/更新
UBIQUITOUS_LANGUAGE.md。从现在起,我会始终如一地使用这些术语。如果我偏离了这套用语,或你发现有需要添加的术语,请告诉我。
评论
支持 Markdown