You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 54ec676
Browse filesBrowse the repository at this point in the historyBrowse files
`from()` wraps an existing resource. The profile class doesn't validate that the resource actually conforms to the profile -- it's a convenience API, not a validator. If the resource doesn't have a VSCat slice, `getVscat()` returns `undefined`.
131
+
`from()` wraps an existing resource. The profile class doesn't validate that the resource actually conforms to the profile -- it's a convenience API, not a validator. If the resource doesn't have a VSCat slice, `getVSCat()` returns `undefined`.
132
132
133
133
### Mutability
134
134
@@ -148,13 +148,13 @@ Slicing is where profiles get interesting. A slice defines a named "view" into a
148
148
149
149
The generator produces three methods for each slice:
150
150
151
-
### `setVscat(input?)`
151
+
### `setVSCat(input?)`
152
152
153
153
Finds an existing element matching the discriminator, or appends a new one. The discriminator values are merged into your input automatically. The parameter is optional -- when called with no arguments, an element containing only the discriminator values is inserted:
154
154
155
155
```typescript
156
156
// You provide only the non-discriminator fields:
157
-
profile.setVscat({ text: "Vital Signs" });
157
+
profile.setVSCat({ text: "Vital Signs" });
158
158
159
159
// The generated code merges in the discriminator:
The input type uses `Omit<CodeableConcept, "coding">` -- the discriminator field `coding` is stripped from the input because it's applied automatically.
170
170
171
-
### `getVscat()`
171
+
### `getVSCat()`
172
172
173
173
Finds the matching element and returns a simplified view with discriminator fields stripped:
174
174
175
175
```typescript
176
-
const vscat =profile.getVscat();
176
+
const vscat =profile.getVSCat();
177
177
// Returns: { text: "Vital Signs" }
178
178
// The coding discriminator is stripped from the result
179
179
```
180
180
181
-
### `getVscatRaw()`
181
+
### `getVSCatRaw()`
182
182
183
183
Returns the full element as-is, including discriminator fields:
0 commit comments