Skip to content

Commit

Permalink
UI Navigation page -> Patients tab : Update patient fails if any attr…
Browse files Browse the repository at this point in the history
…ibute with required or multi in patient.iod.json is being added/updated #2331
  • Loading branch information
shral committed Sep 16, 2021
1 parent 862fe76 commit c724ee2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as _ from 'lodash-es';
import {AppService} from '../../../app.service';
import {SearchPipe} from '../../../pipes/search.pipe';
import {WindowRefService} from "../../../helpers/window-ref.service";
import {j4care} from "../../../helpers/j4care.service";

@Component({
selector: 'app-edit-patient',
Expand Down Expand Up @@ -262,8 +263,11 @@ export class EditPatientComponent {
// console.log("in else", this.dialogRef.componentInstance.patient);
console.log('this.iodattrcod', this.iod[attrcode]);
patient.attrs[attrcode] = _.cloneDeep(this.iod[attrcode]);
delete patient.attrs[attrcode]["multi"];
delete patient.attrs[attrcode]["required"];
j4care.removeKeyFromObject(patient.attrs[attrcode],"multi");
j4care.removeKeyFromObject(patient.attrs[attrcode],"required");

/* delete patient.attrs[attrcode]["multi"];
delete patient.attrs[attrcode]["required"];*/
// patient.attrs[attrcode].Value[0] = "";
console.log('patient=', patient);
}
Expand Down

0 comments on commit c724ee2

Please sign in to comment.