@icanbwell/bwell-sdk-ts 1.88.0 → 1.89.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/dist/__version__.d.ts
CHANGED
package/dist/__version__.js
CHANGED
|
@@ -37,9 +37,13 @@ _UpdateProfileRequestFactory_instances = new WeakSet(), _UpdateProfileRequestFac
|
|
|
37
37
|
const name = {};
|
|
38
38
|
if (isNotNullOrUndefined(firstName)) {
|
|
39
39
|
includeName = true;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
// `middleName` is a single UI field but FHIR `HumanName.given` is 0..*.
|
|
41
|
+
// Splitting on whitespace lets records like "Quincy Adams" round-trip
|
|
42
|
+
// as `["Quincy", "Adams"]` instead of collapsing to one entry.
|
|
43
|
+
const middleParts = isNotNullOrUndefined(middleName)
|
|
44
|
+
? middleName.trim().split(/\s+/).filter(Boolean)
|
|
45
|
+
: [];
|
|
46
|
+
name.given = [firstName, ...middleParts];
|
|
43
47
|
}
|
|
44
48
|
if (isNotNullOrUndefined(lastName)) {
|
|
45
49
|
includeName = true;
|