fix: update encounter payment method
This commit is contained in:
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { isValid } from "date-fns"
|
||||
import { z } from 'zod'
|
||||
|
||||
const ERROR_MESSAGES = {
|
||||
@@ -16,6 +17,7 @@ const ERROR_MESSAGES = {
|
||||
}
|
||||
|
||||
const ACCEPTED_UPLOAD_TYPES = ['image/jpeg', 'image/png', 'application/pdf']
|
||||
const isValidationSep = false
|
||||
|
||||
const IntegrationEncounterSchema = z
|
||||
.object({
|
||||
@@ -116,7 +118,7 @@ const IntegrationEncounterSchema = z
|
||||
.refine(
|
||||
(data) => {
|
||||
// If payment type is jkn and SEP type is selected, then SEP number is required
|
||||
if (data.paymentMethod_code === 'jkn' && data.sepType && data.sepType.trim() !== '') {
|
||||
if (isValidationSep && data.paymentMethod_code === 'jkn' && data.sepType && data.sepType.trim() !== '') {
|
||||
return data.sepNumber && data.sepNumber.trim() !== ''
|
||||
}
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user