@gefyra/diffyr6-cli 1.0.0 → 1.0.1

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/config/README.md CHANGED
@@ -1,27 +1,27 @@
1
- # Example Configuration
2
-
3
- This directory contains example configuration files for the FHIR R4 to R6 Migration Runner.
4
-
5
- ## Files
6
-
7
- - `default-rules.json` - Default rule set for migration analysis (used automatically if no custom rules specified)
8
-
9
- ## Creating Custom Rules
10
-
11
- Copy `default-rules.json` and modify it for your needs:
12
-
13
- ```bash
14
- cp config/default-rules.json my-custom-rules.json
15
- ```
16
-
17
- Then reference it in your migration config:
18
-
19
- ```json
20
- {
21
- "rulesConfigPath": "./my-custom-rules.json"
22
- }
23
- ```
24
-
25
- ## Rule Configuration Structure
26
-
27
- See README.md for detailed information about rule configuration format and available options.
1
+ # Example Configuration
2
+
3
+ This directory contains example configuration files for the FHIR R4 to R6 Migration Runner.
4
+
5
+ ## Files
6
+
7
+ - `default-rules.json` - Default rule set for migration analysis (used automatically if no custom rules specified)
8
+
9
+ ## Creating Custom Rules
10
+
11
+ Copy `default-rules.json` and modify it for your needs:
12
+
13
+ ```bash
14
+ cp config/default-rules.json my-custom-rules.json
15
+ ```
16
+
17
+ Then reference it in your migration config:
18
+
19
+ ```json
20
+ {
21
+ "rulesConfigPath": "./my-custom-rules.json"
22
+ }
23
+ ```
24
+
25
+ ## Rule Configuration Structure
26
+
27
+ See README.md for detailed information about rule configuration format and available options.
@@ -1,135 +1,135 @@
1
- {
2
- "title": "Structure Differences",
3
- "output": "migration-report.md",
4
- "tables": [
5
- {
6
- "directory": "compare",
7
- "sectionHeading": "Structure",
8
- "rules": [
9
- {
10
- "name": "Element with Must-Support removed in R6",
11
- "description": "An element marked as Must-Support in R4 has been removed in R6. This requires special attention during migration, as systems supporting this element need to be adapted.",
12
- "rank": 1,
13
- "value": 15,
14
- "conditions": [
15
- {
16
- "column": "Comments",
17
- "operator": "equals",
18
- "value": "Removed this element"
19
- },
20
- {
21
- "column": "L Flags",
22
- "operator": "contains",
23
- "value": "This element must be supported"
24
- }
25
- ],
26
- "template": "Element {{Name}} exists in R4 MS, but removed in R6."
27
- },
28
- {
29
- "name": "Change in cardinality for Must-Support element",
30
- "description": "The cardinality of a Must-Support element has changed. This may mean that required fields become optional or vice versa.",
31
- "rank": 30,
32
- "value": 5,
33
- "conditions": [
34
- {
35
- "column": "Comments",
36
- "operator": "contains",
37
- "value": "cardinalities differ"
38
- },
39
- {
40
- "column": "L Flags",
41
- "operator": "contains",
42
- "value": "This element must be supported"
43
- }
44
- ],
45
- "template": "For element {{Name}}, the cardinality changed in R6 and it had an MS in R4: {{Comments}}"
46
- },
47
- {
48
- "name": "Element removed in R6",
49
- "description": "An element from R4 no longer exists in R6. Data in this element may need to be migrated to another element or discarded.",
50
- "rank": 50,
51
- "value": 2,
52
- "conditions": [
53
- {
54
- "column": "Comments",
55
- "operator": "equals",
56
- "value": "Removed this element"
57
- }
58
- ],
59
- "template": "The element {{Name}} exists in R4 but was removed in R6."
60
- },
61
- {
62
- "name": "Element added as required in R6",
63
- "description": "A new required field has been added in R6. Values for this element must be provided during migration.",
64
- "rank": 20,
65
- "value": 15,
66
- "conditions": [
67
- {
68
- "column": "Comments",
69
- "operator": "equals",
70
- "value": "Added this element"
71
- },
72
- {
73
- "column": "L Card",
74
- "operator": "contains",
75
- "value": "1.."
76
- }
77
- ],
78
- "template": "The element {{Name}} was added as required in R6."
79
- },
80
- {
81
- "name": "Element added in R6",
82
- "description": "A new optional element has been added in R6. This is usually unproblematic and offers new possibilities for data modeling.",
83
- "rank": 60,
84
- "value": 2,
85
- "conditions": [
86
- {
87
- "column": "Comments",
88
- "operator": "equals",
89
- "value": "Added this element"
90
- }
91
- ],
92
- "template": "The element {{Name}} was added in R6."
93
- },
94
- {
95
- "name": "Change in cardinality",
96
- "description": "The cardinality of an element has changed. Check whether this affects your implementation.",
97
- "rank": 40,
98
- "value": 5,
99
- "conditions": [
100
- {
101
- "column": "Comments",
102
- "operator": "contains",
103
- "value": "cardinalities differ"
104
- }
105
- ],
106
- "template": "For element {{Name}}, the cardinality changed in R6: {{Comments}}"
107
- },
108
- {
109
- "name": "R5 Preadoption Extensions",
110
- "description": "This profile uses R5 Preadoption Extensions that are not fully supported in R4-only contexts. Additional configuration may be needed for compatibility.",
111
- "rank": 25,
112
- "value": 10,
113
- "conditions": [],
114
- "template": "This profile uses R5 Preadoption Extensions"
115
- },
116
- {
117
- "name": "Resource Removed in R6",
118
- "description": "A resource type that exists in R4 has been completely removed in R6. This requires alternative approaches in migration.",
119
- "rank": 35,
120
- "value": 12,
121
- "conditions": [],
122
- "template": "The resource was removed in R6."
123
- },
124
- {
125
- "name": "R4 vs R6 - Comparison Error",
126
- "description": "The Java Validator encountered an error when comparing this StructureDefinition. This is typically due new R6 types (like CodeableReference) not being supported during validation.",
127
- "rank": 5,
128
- "value": 15,
129
- "conditions": [],
130
- "template": "The StructureDefinition {{name}} had an error while comparing: {{message}}"
131
- }
132
- ]
133
- }
134
- ]
135
- }
1
+ {
2
+ "title": "Structure Differences",
3
+ "output": "migration-report.md",
4
+ "tables": [
5
+ {
6
+ "directory": "compare",
7
+ "sectionHeading": "Structure",
8
+ "rules": [
9
+ {
10
+ "name": "Element with Must-Support removed in R6",
11
+ "description": "An element marked as Must-Support in R4 has been removed in R6. This requires special attention during migration, as systems supporting this element need to be adapted.",
12
+ "rank": 1,
13
+ "value": 15,
14
+ "conditions": [
15
+ {
16
+ "column": "Comments",
17
+ "operator": "equals",
18
+ "value": "Removed this element"
19
+ },
20
+ {
21
+ "column": "L Flags",
22
+ "operator": "contains",
23
+ "value": "This element must be supported"
24
+ }
25
+ ],
26
+ "template": "Element {{Name}} exists in R4 MS, but removed in R6."
27
+ },
28
+ {
29
+ "name": "Change in cardinality for Must-Support element",
30
+ "description": "The cardinality of a Must-Support element has changed. This may mean that required fields become optional or vice versa.",
31
+ "rank": 30,
32
+ "value": 5,
33
+ "conditions": [
34
+ {
35
+ "column": "Comments",
36
+ "operator": "contains",
37
+ "value": "cardinalities differ"
38
+ },
39
+ {
40
+ "column": "L Flags",
41
+ "operator": "contains",
42
+ "value": "This element must be supported"
43
+ }
44
+ ],
45
+ "template": "For element {{Name}}, the cardinality changed in R6 and it had an MS in R4: {{Comments}}"
46
+ },
47
+ {
48
+ "name": "Element removed in R6",
49
+ "description": "An element from R4 no longer exists in R6. Data in this element may need to be migrated to another element or discarded.",
50
+ "rank": 50,
51
+ "value": 2,
52
+ "conditions": [
53
+ {
54
+ "column": "Comments",
55
+ "operator": "equals",
56
+ "value": "Removed this element"
57
+ }
58
+ ],
59
+ "template": "The element {{Name}} exists in R4 but was removed in R6."
60
+ },
61
+ {
62
+ "name": "Element added as required in R6",
63
+ "description": "A new required field has been added in R6. Values for this element must be provided during migration.",
64
+ "rank": 20,
65
+ "value": 15,
66
+ "conditions": [
67
+ {
68
+ "column": "Comments",
69
+ "operator": "equals",
70
+ "value": "Added this element"
71
+ },
72
+ {
73
+ "column": "L Card",
74
+ "operator": "contains",
75
+ "value": "1.."
76
+ }
77
+ ],
78
+ "template": "The element {{Name}} was added as required in R6."
79
+ },
80
+ {
81
+ "name": "Element added in R6",
82
+ "description": "A new optional element has been added in R6. This is usually unproblematic and offers new possibilities for data modeling.",
83
+ "rank": 60,
84
+ "value": 2,
85
+ "conditions": [
86
+ {
87
+ "column": "Comments",
88
+ "operator": "equals",
89
+ "value": "Added this element"
90
+ }
91
+ ],
92
+ "template": "The element {{Name}} was added in R6."
93
+ },
94
+ {
95
+ "name": "Change in cardinality",
96
+ "description": "The cardinality of an element has changed. Check whether this affects your implementation.",
97
+ "rank": 40,
98
+ "value": 5,
99
+ "conditions": [
100
+ {
101
+ "column": "Comments",
102
+ "operator": "contains",
103
+ "value": "cardinalities differ"
104
+ }
105
+ ],
106
+ "template": "For element {{Name}}, the cardinality changed in R6: {{Comments}}"
107
+ },
108
+ {
109
+ "name": "R5 Preadoption Extensions",
110
+ "description": "This profile uses R5 Preadoption Extensions that are not fully supported in R4-only contexts. Additional configuration may be needed for compatibility.",
111
+ "rank": 25,
112
+ "value": 10,
113
+ "conditions": [],
114
+ "template": "This profile uses R5 Preadoption Extensions"
115
+ },
116
+ {
117
+ "name": "Resource Removed in R6",
118
+ "description": "A resource type that exists in R4 has been completely removed in R6. This requires alternative approaches in migration.",
119
+ "rank": 35,
120
+ "value": 12,
121
+ "conditions": [],
122
+ "template": "The resource was removed in R6."
123
+ },
124
+ {
125
+ "name": "R4 vs R6 - Comparison Error",
126
+ "description": "The Java Validator encountered an error when comparing this StructureDefinition. This is typically due new R6 types (like CodeableReference) not being supported during validation.",
127
+ "rank": 5,
128
+ "value": 15,
129
+ "conditions": [],
130
+ "template": "The StructureDefinition {{name}} had an error while comparing: {{message}}"
131
+ }
132
+ ]
133
+ }
134
+ ]
135
+ }
@@ -1,42 +1,42 @@
1
- {
2
- "resources": [
3
- "CatalogEntry",
4
- "ChargeItem",
5
- "ChargeItemDefinition",
6
- "ClinicalImpression",
7
- "DeviceUseStatement",
8
- "DocumentManifest",
9
- "EffectEvidenceSynthesis",
10
- "GraphDefinition",
11
- "ImmunizationEvaluation",
12
- "ImmunizationRecommendation",
13
- "Linkage",
14
- "Media",
15
- "MedicationKnowledge",
16
- "MedicinalProduct",
17
- "MedicinalProductAuthorization",
18
- "MedicinalProductContraindication",
19
- "MedicinalProductIndication",
20
- "MedicinalProductIngredient",
21
- "MedicinalProductInteraction",
22
- "MedicinalProductManufactured",
23
- "MedicinalProductPackaged",
24
- "MedicinalProductPharmaceutical",
25
- "MedicinalProductUndesirableEffect",
26
- "MolecularSequence",
27
- "RequestGroup",
28
- "ResearchDefinition",
29
- "ResearchElementDefinition",
30
- "RiskEvidenceSynthesis",
31
- "SubstancePolymer",
32
- "SubstanceProtein",
33
- "SubstanceReferenceInformation",
34
- "SubstanceSourceMaterial",
35
- "SubstanceSpecification",
36
- "SupplyDelivery",
37
- "SupplyRequest",
38
- "TestReport",
39
- "TestScript",
40
- "VerificationResult"
41
- ]
42
- }
1
+ {
2
+ "resources": [
3
+ "CatalogEntry",
4
+ "ChargeItem",
5
+ "ChargeItemDefinition",
6
+ "ClinicalImpression",
7
+ "DeviceUseStatement",
8
+ "DocumentManifest",
9
+ "EffectEvidenceSynthesis",
10
+ "GraphDefinition",
11
+ "ImmunizationEvaluation",
12
+ "ImmunizationRecommendation",
13
+ "Linkage",
14
+ "Media",
15
+ "MedicationKnowledge",
16
+ "MedicinalProduct",
17
+ "MedicinalProductAuthorization",
18
+ "MedicinalProductContraindication",
19
+ "MedicinalProductIndication",
20
+ "MedicinalProductIngredient",
21
+ "MedicinalProductInteraction",
22
+ "MedicinalProductManufactured",
23
+ "MedicinalProductPackaged",
24
+ "MedicinalProductPharmaceutical",
25
+ "MedicinalProductUndesirableEffect",
26
+ "MolecularSequence",
27
+ "RequestGroup",
28
+ "ResearchDefinition",
29
+ "ResearchElementDefinition",
30
+ "RiskEvidenceSynthesis",
31
+ "SubstancePolymer",
32
+ "SubstanceProtein",
33
+ "SubstanceReferenceInformation",
34
+ "SubstanceSourceMaterial",
35
+ "SubstanceSpecification",
36
+ "SupplyDelivery",
37
+ "SupplyRequest",
38
+ "TestReport",
39
+ "TestScript",
40
+ "VerificationResult"
41
+ ]
42
+ }
package/package.json CHANGED
@@ -1,54 +1,54 @@
1
- {
2
- "name": "@gefyra/diffyr6-cli",
3
- "version": "1.0.0",
4
- "description": "FHIR R4 to R6 migration pipeline runner with automated profile comparison and rule-based analysis",
5
- "main": "src/index.js",
6
- "type": "module",
7
- "bin": {
8
- "fhir-r6-migrate": "src/cli.js"
9
- },
10
- "exports": {
11
- ".": "./src/index.js",
12
- "./config": "./src/config.js",
13
- "./rules-engine": "./src/rules-engine.js"
14
- },
15
- "engines": {
16
- "node": ">=18.0.0"
17
- },
18
- "scripts": {
19
- "test": "echo \"Tests will be added later\" && exit 0"
20
- },
21
- "keywords": [
22
- "fhir",
23
- "r4",
24
- "r6",
25
- "migration",
26
- "profile",
27
- "comparison",
28
- "gofsh",
29
- "sushi",
30
- "healthcare",
31
- "hl7"
32
- ],
33
- "author": "Jonas Schön <js@gefyra.de>",
34
- "license": "MIT",
35
- "repository": {
36
- "type": "git",
37
- "url": "https://github.com/Gefyra/fhir-r6-migration-runner.git"
38
- },
39
- "publishConfig": {
40
- "registry": "https://registry.npmjs.org"
41
- },
42
- "peerDependencies": {
43
- "fsh-sushi": "^3.0.0",
44
- "gofsh": "^2.5.0"
45
- },
46
- "peerDependenciesMeta": {
47
- "fsh-sushi": {
48
- "optional": true
49
- },
50
- "gofsh": {
51
- "optional": true
52
- }
53
- }
54
- }
1
+ {
2
+ "name": "@gefyra/diffyr6-cli",
3
+ "version": "1.0.1",
4
+ "description": "FHIR R4 to R6 migration pipeline runner with automated profile comparison and rule-based analysis",
5
+ "main": "src/index.js",
6
+ "type": "module",
7
+ "bin": {
8
+ "fhir-r6-migrate": "src/cli.js"
9
+ },
10
+ "exports": {
11
+ ".": "./src/index.js",
12
+ "./config": "./src/config.js",
13
+ "./rules-engine": "./src/rules-engine.js"
14
+ },
15
+ "engines": {
16
+ "node": ">=18.0.0"
17
+ },
18
+ "scripts": {
19
+ "test": "echo \"Tests will be added later\" && exit 0"
20
+ },
21
+ "keywords": [
22
+ "fhir",
23
+ "r4",
24
+ "r6",
25
+ "migration",
26
+ "profile",
27
+ "comparison",
28
+ "gofsh",
29
+ "sushi",
30
+ "healthcare",
31
+ "hl7"
32
+ ],
33
+ "author": "Jonas Schön <js@gefyra.de>",
34
+ "license": "MIT",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://github.com/Gefyra/DiffyR6-Cli.git"
38
+ },
39
+ "publishConfig": {
40
+ "registry": "https://registry.npmjs.org"
41
+ },
42
+ "peerDependencies": {
43
+ "fsh-sushi": "^3.0.0",
44
+ "gofsh": "^2.5.0"
45
+ },
46
+ "peerDependenciesMeta": {
47
+ "fsh-sushi": {
48
+ "optional": true
49
+ },
50
+ "gofsh": {
51
+ "optional": true
52
+ }
53
+ }
54
+ }