@claudebernard/web-component-fhir-utils 1.0.0 → 2.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/README.md
CHANGED
|
@@ -98,6 +98,18 @@ Which produces a diff shaped like this — the original request goes `on-hold` v
|
|
|
98
98
|
}
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
### Supersession reasons
|
|
102
|
+
|
|
103
|
+
`PriorPrescriptionReason` carries *why* the new request replaces the old one, as a `valueCode` on the
|
|
104
|
+
`priorPrescription` extension. Pick the one that matches the user's intent — consumers filter on it
|
|
105
|
+
with `hasPriorPrescriptionReason`:
|
|
106
|
+
|
|
107
|
+
| Value | Code | When |
|
|
108
|
+
|---|---|---|
|
|
109
|
+
| `PriorPrescriptionReason.DOSAGE_OVERRIDE` | `dosage-override` | Same medication, dosage changed |
|
|
110
|
+
| `PriorPrescriptionReason.MEDICATION_OVERRIDE` | `medication-override` | Different medication, same therapeutic intent |
|
|
111
|
+
| `PriorPrescriptionReason.THERAPEUTIC_ALTERNATIVE` | `therapeutic-alternative` | Substitution proposed by `bcb-therapeutic-alternative` |
|
|
112
|
+
|
|
101
113
|
More worked examples (including the therapeutic-alternative case) are in the [Developer Portal](https://platform.claudebernard.fr/doc) guide.
|
|
102
114
|
|
|
103
115
|
## API
|
|
@@ -113,6 +125,12 @@ More worked examples (including the therapeutic-alternative case) are in the [De
|
|
|
113
125
|
| `hasPriorPrescriptionReason(medicationRequest, reason)` | Check why a `MedicationRequest` supersedes another |
|
|
114
126
|
| `PriorPrescriptionReason`, `PRIOR_PRESCRIPTION_REASON_URL`, `BCB_CODE_SYSTEM` | Shared constants |
|
|
115
127
|
|
|
128
|
+
## Versioning
|
|
129
|
+
|
|
130
|
+
This package carries the version of the `fhir-monorepo` repository — one version, tag and changelog
|
|
131
|
+
for the whole repo. Published versions are therefore sparse: a release only reaches npm when this
|
|
132
|
+
package actually changed.
|
|
133
|
+
|
|
116
134
|
## License
|
|
117
135
|
|
|
118
136
|
Copyright of Cegedim. See [LICENSE](LICENSE.md) for details.
|
|
@@ -3,6 +3,7 @@ export declare const PRIOR_PRESCRIPTION_REASON_URL = "https://platform.claudeber
|
|
|
3
3
|
export declare const PriorPrescriptionReason: {
|
|
4
4
|
readonly DOSAGE_OVERRIDE: "dosage-override";
|
|
5
5
|
readonly THERAPEUTIC_ALTERNATIVE: "therapeutic-alternative";
|
|
6
|
+
readonly MEDICATION_OVERRIDE: "medication-override";
|
|
6
7
|
};
|
|
7
8
|
export type PriorPrescriptionReason = typeof PriorPrescriptionReason[keyof typeof PriorPrescriptionReason];
|
|
8
9
|
//# sourceMappingURL=prior-prescription.const.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prior-prescription.const.d.ts","sourceRoot":"","sources":["../../src/constants/prior-prescription.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,+DAA+D,CAAC;AAE5F,eAAO,MAAM,6BAA6B,yFAAyF,CAAC;AAEpI,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"prior-prescription.const.d.ts","sourceRoot":"","sources":["../../src/constants/prior-prescription.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,+DAA+D,CAAC;AAE5F,eAAO,MAAM,6BAA6B,yFAAyF,CAAC;AAEpI,eAAO,MAAM,uBAAuB;;;;CAI1B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -3,5 +3,6 @@ export const PRIOR_PRESCRIPTION_REASON_URL = "https://platform.claudebernard.fr/
|
|
|
3
3
|
export const PriorPrescriptionReason = {
|
|
4
4
|
DOSAGE_OVERRIDE: "dosage-override",
|
|
5
5
|
THERAPEUTIC_ALTERNATIVE: "therapeutic-alternative",
|
|
6
|
+
MEDICATION_OVERRIDE: "medication-override",
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=prior-prescription.const.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prior-prescription.const.js","sourceRoot":"","sources":["../../src/constants/prior-prescription.const.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,4DAA4D,CAAC;AAE5F,MAAM,CAAC,MAAM,6BAA6B,GAAG,sFAAsF,CAAC;AAEpI,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,eAAe,EAAE,iBAAiB;IAClC,uBAAuB,EAAE,yBAAyB;
|
|
1
|
+
{"version":3,"file":"prior-prescription.const.js","sourceRoot":"","sources":["../../src/constants/prior-prescription.const.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,4DAA4D,CAAC;AAE5F,MAAM,CAAC,MAAM,6BAA6B,GAAG,sFAAsF,CAAC;AAEpI,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,eAAe,EAAE,iBAAiB;IAClC,uBAAuB,EAAE,yBAAyB;IAClD,mBAAmB,EAAE,qBAAqB;CAClC,CAAC","sourcesContent":["export const BCB_CODE_SYSTEM = \"https://platform.claudebernard.fr/fhir/CodeSystem/bcb-code\";\n\nexport const PRIOR_PRESCRIPTION_REASON_URL = \"https://platform.claudebernard.fr/fhir/StructureDefinition/prior-prescription-reason\";\n\nexport const PriorPrescriptionReason = {\n DOSAGE_OVERRIDE: \"dosage-override\",\n THERAPEUTIC_ALTERNATIVE: \"therapeutic-alternative\",\n MEDICATION_OVERRIDE: \"medication-override\",\n} as const;\n\nexport type PriorPrescriptionReason = typeof PriorPrescriptionReason[keyof typeof PriorPrescriptionReason];\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claudebernard/web-component-fhir-utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Shared FHIR Bundle utilities (collection/transaction bundles, prior-prescription linking) for Claude Bernard web components and their integrators.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -69,40 +69,5 @@
|
|
|
69
69
|
"eslint-plugin-import": "2.32.0",
|
|
70
70
|
"typescript": "~5.9.3",
|
|
71
71
|
"vitest": "^4.0.18"
|
|
72
|
-
},
|
|
73
|
-
"release": {
|
|
74
|
-
"tagFormat": "${version}",
|
|
75
|
-
"branches": ["master"],
|
|
76
|
-
"plugins": [
|
|
77
|
-
"@semantic-release/commit-analyzer",
|
|
78
|
-
"@semantic-release/release-notes-generator",
|
|
79
|
-
"@semantic-release/changelog",
|
|
80
|
-
[
|
|
81
|
-
"semantic-release-replace-plugin",
|
|
82
|
-
{
|
|
83
|
-
"replacements": [
|
|
84
|
-
{
|
|
85
|
-
"files": ["package.json"],
|
|
86
|
-
"from": "\"version\": \"\\d+\\.\\d+\\.\\d+\"",
|
|
87
|
-
"to": "\"version\": \"${nextRelease.version}\"",
|
|
88
|
-
"results": [
|
|
89
|
-
{
|
|
90
|
-
"file": "package.json",
|
|
91
|
-
"hasChanged": true
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
[
|
|
99
|
-
"@semantic-release/git",
|
|
100
|
-
{
|
|
101
|
-
"message": "chore(release): ${nextRelease.version} [skip ci on prod]",
|
|
102
|
-
"assets": ["package.json", "CHANGELOG.md"]
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
"@semantic-release/gitlab"
|
|
106
|
-
]
|
|
107
72
|
}
|
|
108
73
|
}
|