import { IFormField , IFormData } from '@client/forms' ; import { attachmentToFieldTransformer } from '@client/forms/mappings/query/field-mappings' ; import { birthDocumentForWhomFhirMapping , birthDocumentTypeFhirMapping } from '@client/forms/register/fieldMappings/birth/mutation/documents-mappings' ; const fieldNameMapping = { [ birthDocumentForWhomFhirMapping . Mother ] : 'uploadDocForMother' , [ birthDocumentForWhomFhirMapping . Father ] : 'uploadDocForFather' , [ birthDocumentForWhomFhirMapping . Child ] : 'uploadDocForChildDOB' , [ birthDocumentForWhomFhirMapping . Parent ] : 'uploadDocForParentPermanentAddress' , [ birthDocumentForWhomFhirMapping . Applicant ] : 'uploadDocForApplicant' , [ birthDocumentForWhomFhirMapping . ChildAge ] : 'uploadDocForChildAge' , [ birthDocumentForWhomFhirMapping . AssignedResponsibilityProof ] : 'uploadDocForProofOfAssignedResponsibility' , [ birthDocumentForWhomFhirMapping . LegalGuardianProof ] : 'uploadDocForProofOfLegarGuardian' , [ birthDocumentForWhomFhirMapping . WardCouncillorProof ] : 'uploadDocFromCounsilor' } ; export function birthAttachmentToFieldTransformer ( transformedData , queryData , sectionId , field ) { return attachmentToFieldTransformer ( transformedData , queryData , sectionId , field , 'registration' , birthDocumentForWhomFhirMapping , birthDocumentTypeFhirMapping , fieldNameMapping ) ; }