Skip to content

Commit 515db7f

Browse files
committed
adding more info to error message
1 parent 8cc5c24 commit 515db7f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/helpers/patientUtils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ 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. 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. \
95+
Valid fields include: 'gender','mrn','name','address','birthDate','language','ethnicity','birthsex','race'`);
9596
}
9697
// must check if the field exists in the patient resource, so we don't add unnecessary dataAbsent extensions
9798
if (field === 'gender' && 'gender' in patient) {

0 commit comments

Comments
 (0)