@gefyra/diffyr6-cli 1.1.2 → 1.1.4

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.
package/README.md CHANGED
@@ -107,6 +107,19 @@ fhir-r6-migrate --version
107
107
  fhir-r6-migrate --help
108
108
  ```
109
109
 
110
+ **Managing Multiple IGs in Parallel**
111
+
112
+ The `--config` parameter enables you to manage multiple implementation guides simultaneously. To do this, create separate config files for each IG and adjust the `workdir` field to point to different directories. All other paths (like `resourcesDir`, `resourcesR6Dir`, `compareDir`, and `outputDir`) can remain the same across configs, as they will be resolved relative to each specific `workdir`.
113
+
114
+ Example:
115
+ ```bash
116
+ # IG 1 configuration (config-basisprofil.json with "workdir": "./igs/basisprofil")
117
+ fhir-r6-migrate --config config-basisprofil.json
118
+
119
+ # IG 2 configuration (config-medikation.json with "workdir": "./igs/medikation")
120
+ fhir-r6-migrate --config config-medikation.json
121
+ ```
122
+
110
123
  ### Programmatic Usage
111
124
 
112
125
  ```javascript
@@ -301,10 +314,18 @@ The package includes a default set of rules for common migration issues. You can
301
314
 
302
315
  The impact score is calculated by summing the `value` field from all rule matches across all differences found.
303
316
 
317
+ **Purpose:**
318
+
319
+ The score is designed to **estimate the effort required for analysis**, not the effort required for the migration itself. Each finding represents a structural difference that requires review and evaluation to determine its implications for your implementation.
320
+
321
+ **Why there are no zero scores:**
322
+
323
+ Every detected element receives a score value, even for seemingly minor differences. This reflects the principle that each finding deserves at least a moment of attention during the analysis phase. Even small structural changes may have unexpected consequences that need to be evaluated in the context of your specific use case.
324
+
304
325
  **Interpretation:**
305
- - **0-50**: Low impact - minor differences, straightforward adaptation
306
- - **51-150**: Medium impact - moderate structural changes requiring attention
307
- - **151+**: High impact - significant breaking changes and redesign needed
326
+ - **0-50**: Low analysis effort - minor differences, straightforward review
327
+ - **51-150**: Medium analysis effort - moderate structural changes requiring careful attention
328
+ - **151+**: High analysis effort - significant differences requiring thorough evaluation and planning
308
329
 
309
330
  ## Output
310
331
 
@@ -45,11 +45,16 @@
45
45
  "template": "For element {{Name}}, the cardinality changed in R6 and it had an MS in R4: {{Comments}}"
46
46
  },
47
47
  {
48
- "name": "Element type changed in R6",
48
+ "name": "Element type changed in R6 at Must-Support",
49
49
  "description": "The data type of an element has changed between R4 and R6. This may require data transformation during migration.",
50
50
  "rank": 15,
51
51
  "value": 10,
52
52
  "conditions": [
53
+ {
54
+ "column": "R Type",
55
+ "operator": "!equals",
56
+ "value": "id"
57
+ },
53
58
  {
54
59
  "column": "L Type",
55
60
  "operator": "!equals",
@@ -64,6 +69,11 @@
64
69
  "column": "L Type",
65
70
  "operator": "!equals",
66
71
  "valueColumn": "R Type"
72
+ },
73
+ {
74
+ "column": "L Flags",
75
+ "operator": "contains",
76
+ "value": "This element must be supported"
67
77
  }
68
78
  ],
69
79
  "template": "The element type switched in R6 at element {{Name}} from {{L Type}} to {{R Type}}"
@@ -72,12 +82,17 @@
72
82
  "name": "Element removed in R6",
73
83
  "description": "An element from R4 no longer exists in R6. Data in this element may need to be migrated to another element or discarded.",
74
84
  "rank": 50,
75
- "value": 2,
85
+ "value": 0,
76
86
  "conditions": [
77
87
  {
78
88
  "column": "Comments",
79
89
  "operator": "equals",
80
90
  "value": "Removed this element"
91
+ },
92
+ {
93
+ "column": "L Flags",
94
+ "operator": "!contains",
95
+ "value": "This element must be supported"
81
96
  }
82
97
  ],
83
98
  "template": "The element {{Name}} exists in R4 but was removed in R6."
@@ -105,7 +120,7 @@
105
120
  "name": "Element added in R6",
106
121
  "description": "A new optional element has been added in R6. This is usually unproblematic and offers new possibilities for data modeling.",
107
122
  "rank": 60,
108
- "value": 2,
123
+ "value": 1,
109
124
  "conditions": [
110
125
  {
111
126
  "column": "Comments",
@@ -119,16 +134,50 @@
119
134
  "name": "Change in cardinality",
120
135
  "description": "The cardinality of an element has changed. Check whether this affects your implementation.",
121
136
  "rank": 40,
122
- "value": 5,
137
+ "value": 0,
123
138
  "conditions": [
124
139
  {
125
140
  "column": "Comments",
126
141
  "operator": "contains",
127
142
  "value": "cardinalities differ"
143
+ },
144
+ {
145
+ "column": "L Flags",
146
+ "operator": "!contains",
147
+ "value": "This element must be supported"
128
148
  }
129
149
  ],
130
150
  "template": "For element {{Name}}, the cardinality changed in R6: {{Comments}}"
131
151
  },
152
+ {
153
+ "name": "Element type changed in R6",
154
+ "description": "The data type of an element has changed between R4 and R6. This may require data transformation during migration.",
155
+ "rank": 40,
156
+ "value": 0,
157
+ "conditions": [
158
+ {
159
+ "column": "R Type",
160
+ "operator": "!equals",
161
+ "value": "id"
162
+ },
163
+ {
164
+ "column": "L Type",
165
+ "operator": "!equals",
166
+ "value": ""
167
+ },
168
+ {
169
+ "column": "R Type",
170
+ "operator": "!equals",
171
+ "value": ""
172
+ },
173
+ {
174
+ "column": "L Type",
175
+ "operator": "!equals",
176
+ "valueColumn": "R Type"
177
+ }
178
+ ],
179
+ "template": "The element type switched in R6 at element {{Name}} from {{L Type}} to {{R Type}}"
180
+ },
132
181
  {
133
182
  "name": "R5 Preadoption Extensions",
134
183
  "description": "This profile uses R5 Preadoption Extensions that are not fully supported in R4-only contexts. Additional configuration may be needed for compatibility.",
@@ -156,4 +205,4 @@
156
205
  ]
157
206
  }
158
207
  ]
159
- }
208
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gefyra/diffyr6-cli",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "FHIR R4 to R6 migration pipeline runner with automated profile comparison and rule-based analysis",
5
5
  "main": "src/index.js",
6
6
  "type": "module",