Skip to content

Commit 8940186

Browse files
committed
test(typeschema): update introspection snapshot for schema-level slicing
1 parent f85a6f8 commit 8940186

2 files changed

Lines changed: 130 additions & 124 deletions

File tree

‎test/api/write-generator/__snapshots__/introspection.test.ts.snap‎

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,48 +2786,6 @@ exports[`IntrospectionWriter - flat profile output Check bodyweight flat profile
27862786
"excluded": false,
27872787
"array": true,
27882788
"min": 1,
2789-
"slicing": {
2790-
"discriminator": [
2791-
{
2792-
"type": "value",
2793-
"path": "coding.code"
2794-
},
2795-
{
2796-
"type": "value",
2797-
"path": "coding.system"
2798-
}
2799-
],
2800-
"rules": "open",
2801-
"ordered": false,
2802-
"slices": {
2803-
"VSCat": {
2804-
"min": 1,
2805-
"max": 1,
2806-
"match": {
2807-
"coding": [
2808-
{
2809-
"code": "vital-signs",
2810-
"system": "http://terminology.hl7.org/CodeSystem/observation-category"
2811-
}
2812-
]
2813-
},
2814-
"required": [
2815-
"coding"
2816-
],
2817-
"elements": [
2818-
"coding"
2819-
],
2820-
"nameCandidates": {
2821-
"candidates": [
2822-
"VSCat",
2823-
"CategoryVSCat",
2824-
"CategoryVSCatSlice"
2825-
],
2826-
"recommended": "VSCat"
2827-
}
2828-
}
2829-
}
2830-
},
28312789
"binding": {
28322790
"kind": "binding",
28332791
"package": "shared",
@@ -3166,6 +3124,50 @@ exports[`IntrospectionWriter - flat profile output Check bodyweight flat profile
31663124
]
31673125
}
31683126
},
3127+
"slicing": {
3128+
"category": {
3129+
"discriminator": [
3130+
{
3131+
"type": "value",
3132+
"path": "coding.code"
3133+
},
3134+
{
3135+
"type": "value",
3136+
"path": "coding.system"
3137+
}
3138+
],
3139+
"rules": "open",
3140+
"ordered": false,
3141+
"slices": {
3142+
"VSCat": {
3143+
"min": 1,
3144+
"max": 1,
3145+
"match": {
3146+
"coding": [
3147+
{
3148+
"code": "vital-signs",
3149+
"system": "http://terminology.hl7.org/CodeSystem/observation-category"
3150+
}
3151+
]
3152+
},
3153+
"required": [
3154+
"coding"
3155+
],
3156+
"elements": [
3157+
"coding"
3158+
],
3159+
"nameCandidates": {
3160+
"candidates": [
3161+
"VSCat",
3162+
"CategoryVSCat",
3163+
"CategoryVSCatSlice"
3164+
],
3165+
"recommended": "VSCat"
3166+
}
3167+
}
3168+
}
3169+
}
3170+
},
31693171
"dependencies": [
31703172
{
31713173
"kind": "complex-type",

‎test/api/write-generator/__snapshots__/kbv-condition-diagnosis.test.ts.snap‎

Lines changed: 86 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,29 +1850,7 @@ exports[`KBV Condition Diagnosis generation (kbv.basis@1.9.0) TypeSchema: KBV_PR
18501850
},
18511851
"required": false,
18521852
"excluded": false,
1853-
"array": true,
1854-
"slicing": {
1855-
"discriminator": [
1856-
{
1857-
"type": "value",
1858-
"path": "url"
1859-
}
1860-
],
1861-
"rules": "open",
1862-
"slices": {
1863-
"Feststellungsdatum": {
1864-
"max": 1,
1865-
"nameCandidates": {
1866-
"candidates": [
1867-
"Feststellungsdatum",
1868-
"ExtensionFeststellungsdatum",
1869-
"ExtensionFeststellungsdatumSlice"
1870-
],
1871-
"recommended": "ExtensionFeststellungsdatum"
1872-
}
1873-
}
1874-
}
1875-
}
1853+
"array": true
18761854
},
18771855
"clinicalStatus": {
18781856
"type": {
@@ -2042,15 +2020,6 @@ exports[`KBV Condition Diagnosis generation (kbv.basis@1.9.0) TypeSchema: KBV_PR
20422020
"required": false,
20432021
"excluded": false,
20442022
"array": false,
2045-
"slicing": {
2046-
"discriminator": [
2047-
{
2048-
"type": "type",
2049-
"path": "$this"
2050-
}
2051-
],
2052-
"rules": "open"
2053-
},
20542023
"choices": [
20552024
"onsetDateTime",
20562025
"onsetAge",
@@ -2115,15 +2084,6 @@ exports[`KBV Condition Diagnosis generation (kbv.basis@1.9.0) TypeSchema: KBV_PR
21152084
"required": false,
21162085
"excluded": false,
21172086
"array": false,
2118-
"slicing": {
2119-
"discriminator": [
2120-
{
2121-
"type": "type",
2122-
"path": "$this"
2123-
}
2124-
],
2125-
"rules": "open"
2126-
},
21272087
"choices": [
21282088
"abatementDateTime",
21292089
"abatementAge",
@@ -2265,6 +2225,48 @@ exports[`KBV Condition Diagnosis generation (kbv.basis@1.9.0) TypeSchema: KBV_PR
22652225
"array": true
22662226
}
22672227
},
2228+
"slicing": {
2229+
"extension": {
2230+
"discriminator": [
2231+
{
2232+
"type": "value",
2233+
"path": "url"
2234+
}
2235+
],
2236+
"rules": "open",
2237+
"slices": {
2238+
"Feststellungsdatum": {
2239+
"max": 1,
2240+
"nameCandidates": {
2241+
"candidates": [
2242+
"Feststellungsdatum",
2243+
"ExtensionFeststellungsdatum",
2244+
"ExtensionFeststellungsdatumSlice"
2245+
],
2246+
"recommended": "ExtensionFeststellungsdatum"
2247+
}
2248+
}
2249+
}
2250+
},
2251+
"onset": {
2252+
"discriminator": [
2253+
{
2254+
"type": "type",
2255+
"path": "$this"
2256+
}
2257+
],
2258+
"rules": "open"
2259+
},
2260+
"abatement": {
2261+
"discriminator": [
2262+
{
2263+
"type": "type",
2264+
"path": "$this"
2265+
}
2266+
],
2267+
"rules": "open"
2268+
}
2269+
},
22682270
"nested": [
22692271
{
22702272
"identifier": {
@@ -2663,29 +2665,7 @@ exports[`KBV Condition Diagnosis generation (kbv.basis@1.9.0) TypeSchema: KBV_PR
26632665
},
26642666
"required": false,
26652667
"excluded": false,
2666-
"array": true,
2667-
"slicing": {
2668-
"discriminator": [
2669-
{
2670-
"type": "value",
2671-
"path": "url"
2672-
}
2673-
],
2674-
"rules": "open",
2675-
"slices": {
2676-
"Feststellungsdatum": {
2677-
"max": 1,
2678-
"nameCandidates": {
2679-
"candidates": [
2680-
"Feststellungsdatum",
2681-
"ExtensionFeststellungsdatum",
2682-
"ExtensionFeststellungsdatumSlice"
2683-
],
2684-
"recommended": "ExtensionFeststellungsdatum"
2685-
}
2686-
}
2687-
}
2688-
}
2668+
"array": true
26892669
},
26902670
"clinicalStatus": {
26912671
"type": {
@@ -2855,15 +2835,6 @@ exports[`KBV Condition Diagnosis generation (kbv.basis@1.9.0) TypeSchema: KBV_PR
28552835
"required": false,
28562836
"excluded": false,
28572837
"array": false,
2858-
"slicing": {
2859-
"discriminator": [
2860-
{
2861-
"type": "type",
2862-
"path": "$this"
2863-
}
2864-
],
2865-
"rules": "open"
2866-
},
28672838
"choices": [
28682839
"onsetDateTime",
28692840
"onsetAge",
@@ -2928,15 +2899,6 @@ exports[`KBV Condition Diagnosis generation (kbv.basis@1.9.0) TypeSchema: KBV_PR
29282899
"required": false,
29292900
"excluded": false,
29302901
"array": false,
2931-
"slicing": {
2932-
"discriminator": [
2933-
{
2934-
"type": "type",
2935-
"path": "$this"
2936-
}
2937-
],
2938-
"rules": "open"
2939-
},
29402902
"choices": [
29412903
"abatementDateTime",
29422904
"abatementAge",
@@ -3078,6 +3040,48 @@ exports[`KBV Condition Diagnosis generation (kbv.basis@1.9.0) TypeSchema: KBV_PR
30783040
"array": true
30793041
}
30803042
},
3043+
"slicing": {
3044+
"extension": {
3045+
"discriminator": [
3046+
{
3047+
"type": "value",
3048+
"path": "url"
3049+
}
3050+
],
3051+
"rules": "open",
3052+
"slices": {
3053+
"Feststellungsdatum": {
3054+
"max": 1,
3055+
"nameCandidates": {
3056+
"candidates": [
3057+
"Feststellungsdatum",
3058+
"ExtensionFeststellungsdatum",
3059+
"ExtensionFeststellungsdatumSlice"
3060+
],
3061+
"recommended": "ExtensionFeststellungsdatum"
3062+
}
3063+
}
3064+
}
3065+
},
3066+
"onset": {
3067+
"discriminator": [
3068+
{
3069+
"type": "type",
3070+
"path": "$this"
3071+
}
3072+
],
3073+
"rules": "open"
3074+
},
3075+
"abatement": {
3076+
"discriminator": [
3077+
{
3078+
"type": "type",
3079+
"path": "$this"
3080+
}
3081+
],
3082+
"rules": "open"
3083+
}
3084+
},
30813085
"extensions": [
30823086
{
30833087
"name": "Feststellungsdatum",

0 commit comments

Comments
 (0)