@glion/ast 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +2 -1
  2. package/index.d.ts +6 -2
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -89,6 +89,7 @@ interface Segment <: Parent {
89
89
 
90
90
  interface Group <: Parent {
91
91
  type: 'group'
92
+ id: string
92
93
  name: string
93
94
  children: [Segment]
94
95
  }
@@ -118,7 +119,7 @@ interface Subcomponent <: Literal {
118
119
  }
119
120
  ```
120
121
 
121
- `Segment.name` carries the segment identifier (for example `"MSH"`, `"PID"`, `"OBX"`) so visitors can filter without traversing the field hierarchy. `Group.name` names the logical group (for example `"ORDER_OBSERVATION"`).
122
+ `Segment.name` carries the segment identifier (for example `"MSH"`, `"PID"`, `"OBX"`) so visitors can filter without traversing the field hierarchy. `Group.id` identifies the logical group (for example `"ORDER_OBSERVATION"`, `"PATIENT_VISIT"`) and holds only uppercase letters, digits, and `_`; `Group.name` is the group name for display, in title case (for example `"Order Observation"`).
122
123
 
123
124
  ### Position
124
125
 
package/index.d.ts CHANGED
@@ -211,8 +211,12 @@ export interface Group extends Parent {
211
211
  */
212
212
  type: "group";
213
213
  /**
214
- * Name identifier for the group (e.g., "ORDER", "OBSERVATION").
215
- * Used for querying specific groups in nested structures.
214
+ * Group ID (e.g., "ORDER_OBSERVATION", "PATIENT_VISIT"): uppercase letters,
215
+ * digits, and `_`. Query paths name a group by its ID.
216
+ */
217
+ id: string;
218
+ /**
219
+ * Group name, for display (e.g., "Order Observation", "Patient Visit").
216
220
  */
217
221
  name: string;
218
222
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glion/ast",
3
- "version": "0.20.0",
3
+ "version": "0.22.0",
4
4
  "description": "HL7v2 is a specification for representing HL7v2 messages as an abstract syntax tree. It implements the unist spec.",
5
5
  "keywords": [
6
6
  "bin",
@@ -37,8 +37,8 @@
37
37
  "unified": "^11.0.5",
38
38
  "unist-builder": "^4.0.0",
39
39
  "vitest": "4.1.11",
40
- "@glion/check-readme": "0.18.0",
41
- "@glion/tsconfig": "0.18.0"
40
+ "@glion/tsconfig": "0.18.0",
41
+ "@glion/check-readme": "0.18.0"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=22"