@gefyra/diffyr6-cli 1.1.3 → 1.2.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.
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,8 +45,8 @@
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",
49
- "description": "The data type of an element has changed between R4 and R6. This may require data transformation during migration. Note that changes from 'string' to 'id' are not included in this rule.",
48
+ "name": "Element type changed in R6 at Must-Support",
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": [
@@ -67,8 +67,13 @@
67
67
  },
68
68
  {
69
69
  "column": "L Type",
70
- "operator": "!equals",
70
+ "operator": "!typeSubsetOf",
71
71
  "valueColumn": "R Type"
72
+ },
73
+ {
74
+ "column": "L Flags",
75
+ "operator": "contains",
76
+ "value": "This element must be supported"
72
77
  }
73
78
  ],
74
79
  "template": "The element type switched in R6 at element {{Name}} from {{L Type}} to {{R Type}}"
@@ -77,12 +82,17 @@
77
82
  "name": "Element removed in R6",
78
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.",
79
84
  "rank": 50,
80
- "value": 2,
85
+ "value": 0,
81
86
  "conditions": [
82
87
  {
83
88
  "column": "Comments",
84
89
  "operator": "equals",
85
90
  "value": "Removed this element"
91
+ },
92
+ {
93
+ "column": "L Flags",
94
+ "operator": "!contains",
95
+ "value": "This element must be supported"
86
96
  }
87
97
  ],
88
98
  "template": "The element {{Name}} exists in R4 but was removed in R6."
@@ -110,7 +120,7 @@
110
120
  "name": "Element added in R6",
111
121
  "description": "A new optional element has been added in R6. This is usually unproblematic and offers new possibilities for data modeling.",
112
122
  "rank": 60,
113
- "value": 2,
123
+ "value": 1,
114
124
  "conditions": [
115
125
  {
116
126
  "column": "Comments",
@@ -124,16 +134,50 @@
124
134
  "name": "Change in cardinality",
125
135
  "description": "The cardinality of an element has changed. Check whether this affects your implementation.",
126
136
  "rank": 40,
127
- "value": 5,
137
+ "value": 0,
128
138
  "conditions": [
129
139
  {
130
140
  "column": "Comments",
131
141
  "operator": "contains",
132
142
  "value": "cardinalities differ"
143
+ },
144
+ {
145
+ "column": "L Flags",
146
+ "operator": "!contains",
147
+ "value": "This element must be supported"
133
148
  }
134
149
  ],
135
150
  "template": "For element {{Name}}, the cardinality changed in R6: {{Comments}}"
136
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": "!typeSubsetOf",
176
+ "valueColumn": "R Type"
177
+ }
178
+ ],
179
+ "template": "The element type switched in R6 at element {{Name}} from {{L Type}} to {{R Type}}"
180
+ },
137
181
  {
138
182
  "name": "R5 Preadoption Extensions",
139
183
  "description": "This profile uses R5 Preadoption Extensions that are not fully supported in R4-only contexts. Additional configuration may be needed for compatibility.",