Skip to content

Commit

Permalink
Merge pull request #930 from bcgov/BCMOHAD-18050
Browse files Browse the repository at this point in the history
BCMOHAD-18050 || Updated the changes
  • Loading branch information
NataliaNikishina authored Oct 6, 2023
2 parents 5c952bf + 839d9d5 commit 4aeca7d
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions force-app/main/default/lwc/odrLookup/odrLookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default class OdrLookup extends LightningElement {
prescriberResult;
submitterResult;
patientResult;
providerIdentifier;
@api patient;
@api prescriber;
@api submitter;
Expand All @@ -17,6 +18,7 @@ export default class OdrLookup extends LightningElement {
this.prescriberResult = event.detail;
this.prescriber = this.prescriberResult?.sobject;
this.prescriberOverrideReason = this.prescriberResult?.overrideReason;
this.providerIdentifier = this.prescriberResult?.sobject?.Provider_Identifier__pc;
}

handleSubmitter(event) {
Expand Down Expand Up @@ -49,12 +51,24 @@ export default class OdrLookup extends LightningElement {
}
}

isPrescriberValid() { // Added this.prescriberResult as we are trying to access prescriberResult.overrideReason without checking if the prescriberResult is undefined or not
return !this.showPrescriber || (this.prescriber && this.prescriberResult.verified) || this.prescriberResult?.overrideReason;
isPrescriberValid() { // Added this.prescriberResult as we are trying to access prescriberResult.overrideReason without checking if the prescriberResult is undefined or not
let prescriberOverriderReason;
if(this.prescriberResult!=undefined && (this.prescriberResult.overrideReason != 'None')){
prescriberOverriderReason = this.prescriberResult.overrideReason;
}else{
prescriberOverriderReason = undefined;
}
return !this.showPrescriber || (this.prescriber && this.prescriberResult?.verified) || prescriberOverriderReason;
}

isPatientValid() { // Added this.patientResult as we are trying to access patientResult.overrideReason without checking if the patientResult is undefined or not
return !this.showPatient || (this.patient && this.patientResult.verified) || this.patientResult?.overrideReason;
let patientOverriderReason;
if(this.patientResult!=undefined && (this.patientResult.overrideReason != 'None')){
patientOverriderReason = this.patientResult.overrideReason;
}else{
patientOverriderReason = undefined;
}
return !this.showPatient || (this.patient && this.patientResult?.verified) || patientOverriderReason;
}

isSubmitterValid() {
Expand Down

0 comments on commit 4aeca7d

Please sign in to comment.