Skip to content

Commit 56114d8

Browse files
committed
fixing error message formatting
1 parent 515db7f commit 56114d8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/helpers/patientUtils.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ function maskPatientData(bundle, mask) {
9191

9292
mask.forEach((field) => {
9393
if (!validFields.includes(field)) {
94-
throw Error(`'${field}' is not a field that can be masked. Patient will only be extracted if all mask fields are valid. \
95-
Valid fields include: 'gender','mrn','name','address','birthDate','language','ethnicity','birthsex','race'`);
94+
throw Error(`'${field}' is not a field that can be masked. Patient will only be extracted if all mask fields are valid. Valid fields include: Valid fields include: ${validFields.join(', ')}`);
9695
}
9796
// must check if the field exists in the patient resource, so we don't add unnecessary dataAbsent extensions
9897
if (field === 'gender' && 'gender' in patient) {

0 commit comments

Comments
 (0)