Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Added Validation for Insurance input fields in patient registration issue (#8672) #8681

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from
Open
Changes from 6 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d1c1cd5
fix: Add Validation for Insurance input fields in patient registratio…
syedfardeenjeelani Oct 1, 2024
96b810f
fix: Add Validation for Insurance input fields in patient registratio…
syedfardeenjeelani Oct 1, 2024
90dcac7
fix: fixed the validation logic of the insurance form
syedfardeenjeelani Oct 4, 2024
6bc35c4
fix: fixed the validation logic of the insurance form
syedfardeenjeelani Oct 4, 2024
8768f3b
fix: fixed the validator.ts
syedfardeenjeelani Oct 4, 2024
8941616
Update fireRequest.tsx
syedfardeenjeelani Oct 4, 2024
64963bf
fix: Move validation messages to i18n locale files and refactor HCXPo…
syedfardeenjeelani Oct 6, 2024
0ce16b3
Merge branch 'issues/8672/fix-issue' of https://github.com/syedfardee…
syedfardeenjeelani Oct 6, 2024
795d4de
fix: Add Validation for Insurance input fields in patient registratio…
syedfardeenjeelani Oct 1, 2024
7eebafc
fix: Add Validation for Insurance input fields in patient registratio…
syedfardeenjeelani Oct 1, 2024
983b154
fix: fixed the validation logic of the insurance form
syedfardeenjeelani Oct 4, 2024
3059959
fix: fixed the validation logic of the insurance form
syedfardeenjeelani Oct 4, 2024
1085cbd
fix: fixed the validator.ts
syedfardeenjeelani Oct 4, 2024
0c39cc6
fix: Move validation messages to i18n locale files and refactor HCXPo…
syedfardeenjeelani Oct 6, 2024
27fb884
Update fireRequest.tsx
syedfardeenjeelani Oct 4, 2024
be234ea
fix: moved i18 files to en.json
syedfardeenjeelani Oct 12, 2024
482075a
deleted common.json
syedfardeenjeelani Oct 12, 2024
ff32463
Merge branch 'develop' into issues/8672/fix-issue
syedfardeenjeelani Oct 14, 2024
72e89b0
Merge branch 'develop' into issues/8672/fix-issue
rithviknishad Oct 15, 2024
ea0291d
avoid passing `t` as param
rithviknishad Oct 15, 2024
10f9aba
Merge branch 'develop' into issues/8672/fix-issue
nihal467 Oct 16, 2024
a33a94a
Merge branch 'develop' into issues/8672/fix-issue
nihal467 Oct 16, 2024
f5a2651
fixed validation
syedfardeenjeelani Oct 17, 2024
9bdfdc6
sorted en.json alphabetically
syedfardeenjeelani Oct 17, 2024
2f75935
Merge branch 'develop' into issues/8672/fix-issue
syedfardeenjeelani Oct 17, 2024
d7da9f8
Merge branch 'develop' into issues/8672/fix-issue
syedfardeenjeelani Oct 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/Components/HCX/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ const HCXPolicyValidator: FieldValidator<HCXPolicyModel> = (
value,
enable_hcx,
) => {
if (
!value.policy_id.trim() ||
!value.subscriber_id.trim() ||
(enable_hcx && (!value.insurer_id?.trim() || !value.insurer_name?.trim()))
)
return "All fields are mandatory";
if (!value.subscriber_id.trim()) {
return "Member Id is required";
} else if (!value.policy_id.trim()) {
return "Policy Id or Policy Name is required";
}
if (enable_hcx) {
if (!value.insurer_id?.trim() || !value.insurer_name?.trim()) {
return "Insurer Name is required";
}
}
};

export default HCXPolicyValidator;
Loading