734 lines
		
	
	
		
			44 KiB
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			734 lines
		
	
	
		
			44 KiB
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
<!-- backend -->
 | 
						||
    <?php
 | 
						||
    $checklist_array1=[
 | 
						||
        "mem_ar_review"=>"Person-Centered Service Plan was reviewed with Member and or Authorized Representative (AR):",
 | 
						||
        "mem_imp_pcsp_review"=>"Member/AR verbalized understanding of importance of PCSP Review:",
 | 
						||
        "mem_agrmt_pcsp_review"=>"Member and or AR in agreement with current PCSP: (If no, include details in Notes)",
 | 
						||
        "mem_agrmt_intervention"=>"Member and or AR in agreement that the intervention(s) support the goal(s): (If no, include details in Notes)",
 | 
						||
        "mem_idf_barriers"=>"Member and or AR identified barriers to the achievement of goals: (If yes, include details in Notes)",
 | 
						||
        "mem_recv_all_authz_services"=>"Member/AR confirm receiving all Authorized Services: (If no, include details in Notes)",
 | 
						||
        "mem_req_modf_pcsp"=>"Member requested modification to the current PCSP: (If yes, include details in Notes)",
 | 
						||
        "mem_req_add_serv"=>"Member /AR placed additional service request (s): (If yes, include details in Notes) ",
 | 
						||
        "mem_stsf_archcare_services"=>"Member is satisfied with ArchCare Services: (If no, include details in Notes)",
 | 
						||
        "mem_home_culture"=>"Members home is safe, and living conditions are adequate, for the provision of services: (If no, include details in Notes)",
 | 
						||
        "mem_home_atmp"=>"Members home environment is clean, clutter free, with a clear pathway: (If no, include details in Notes)",
 | 
						||
        "mem_home_co_detector"=>"Smoke detector and Carbon Monoxide detector present in members home: (If no, include details in Notes)",
 | 
						||
        "mem_additional_issues"=>" Member identified additional issues/concerns that require care coordination: (If yes, include details in Notes)",
 | 
						||
        "mem_emerg_visit_last_ninety"=>" Member had an emergency room visit in the last 90 days: (If yes, include detail in Notes).",
 | 
						||
        "mem_injury_last_ninety"=>"Member experienced a fall with injury in the last 90 days: (If yes, include detail in Notes).",
 | 
						||
        "mem_recent_unctl_pain"=>"Member expressed experiencing uncontrolled pain at present time: (If yes, include detail such as location, pain level etc in Notes)",
 | 
						||
        "mem_is_distressed"=>"Member expressed feeling lonely or distressed:",
 | 
						||
        "mem_influ_vac_last_yr"=>"Member received an influenza vaccination in the last year: (If yes, include approx month, date in Note)",
 | 
						||
        "mem_covid_vac_last_yr"=>"Member received the COVID-19 vaccine in last year (or as required): (If yes, include approx month, date, the name of vaccine in Note)",
 | 
						||
        "mem_is_educated"=>"Member confirmed being educated on Advance Directives, (i.e. Health Care Proxy/DNR/MOLST) by Care Manager/staff from ArchCare Community Life: (If yes, include detail in Notes)",
 | 
						||
        "mem_ppv_vac_last_yr"=>"Member age 65 or older, received a pneumococcal vaccination in the last five years or after age 65: (If yes, include approx month, date in Note)",
 | 
						||
        "mem_dntl_exm_last_yr"=>"Members received a dental exam in the last year: (If yes, include approx month, date in Note)."
 | 
						||
    ];
 | 
						||
    $signature_array1=[
 | 
						||
        'signature_member'=>"Signature of Member:",
 | 
						||
        'signature_auth_representative'=>"Signature of Authorized Representative:",
 | 
						||
        'signature_visiting_rn_sw'=>"Signature of Visiting RN/SW:"
 | 
						||
    ];
 | 
						||
    $checklist_array2=$signature_array2=[];
 | 
						||
    foreach($checklist_array1 as $key => $val){
 | 
						||
        $checklist_array2[]=[
 | 
						||
            'name'=>$key,
 | 
						||
            'description'=>$val
 | 
						||
        ];
 | 
						||
    }
 | 
						||
    foreach($signature_array1 as $key => $val){
 | 
						||
        $signature_array2[]=[
 | 
						||
            'name'=>$key,
 | 
						||
            'description'=>$val
 | 
						||
        ];
 | 
						||
    }
 | 
						||
    ?>
 | 
						||
<!-- backend -->
 | 
						||
 | 
						||
<!-- styling -->
 | 
						||
    <style type="text/css">
 | 
						||
        /*media queries*/
 | 
						||
            :root{
 | 
						||
                --grid-width: 70%;
 | 
						||
                --page-pad:25px 20px 25px 20px;
 | 
						||
                --width-changer:70%;
 | 
						||
                /* --sig-canvas-width:300px;
 | 
						||
                --sig-canvas-height:200px; */
 | 
						||
            }
 | 
						||
            @media screen and (max-width: 320px){
 | 
						||
                :root{
 | 
						||
                    --grid-width: 100%;
 | 
						||
                    --page-pad:15px 10px 15px 10px;
 | 
						||
                    --width-changer:100%;
 | 
						||
                    --sig-canvas-width:90%;
 | 
						||
                    --sig-canvas-height:200px;
 | 
						||
                }
 | 
						||
            }
 | 
						||
            @media screen and (min-width: 321px) and (max-width: 480px){
 | 
						||
                :root{
 | 
						||
                    --grid-width: 100%;
 | 
						||
                    --page-pad:15px 10px 15px 10px;
 | 
						||
                    --width-changer:100%;
 | 
						||
                    --sig-canvas-width:90%;
 | 
						||
                    --sig-canvas-height:200px;
 | 
						||
                }
 | 
						||
            }
 | 
						||
            @media screen and (min-width: 481px) and (max-width: 768px){
 | 
						||
                :root{
 | 
						||
                    --grid-width: 100%;
 | 
						||
                    --page-pad:15px 10px 15px 10px;
 | 
						||
                    /* --sig-canvas-width:300px;
 | 
						||
                    --sig-canvas-height:200px; */
 | 
						||
                }
 | 
						||
            }
 | 
						||
            @media screen and (min-width: 769px) and (max-width: 1024px){
 | 
						||
                :root{
 | 
						||
                    --grid-width: 100%;
 | 
						||
                    --page-pad:25px 20px 25px 20px;
 | 
						||
                    /* --sig-canvas-width:350px;
 | 
						||
                    --sig-canvas-height:220px; */
 | 
						||
                }
 | 
						||
            }
 | 
						||
            @media screen and (min-width: 1025px) and (max-width: 1200px){
 | 
						||
                :root{
 | 
						||
                    --grid-width: 70%;
 | 
						||
                    --page-pad:25px 20px 25px 20px;
 | 
						||
                    /* --sig-canvas-width:350px;
 | 
						||
                    --sig-canvas-height:220px; */
 | 
						||
                }
 | 
						||
            }
 | 
						||
            @media screen and (min-width: 1201px){
 | 
						||
                :root{
 | 
						||
                    --grid-width: 70%;
 | 
						||
                    --page-pad:30px 25px 30px 25px;
 | 
						||
                    /* --sig-canvas-width:350px;
 | 
						||
                    --sig-canvas-height:220px; */
 | 
						||
                }
 | 
						||
            }
 | 
						||
        /*media queries*/
 | 
						||
 | 
						||
        /*footer*/
 | 
						||
            .footer_sec{background: #19b5fe;}
 | 
						||
            .foot_content{width: 100%;}
 | 
						||
            .footer_sec .foot_content p{font: 400 16px/24px 'Poppins', sans-serif;color: #fff;margin-top: 18px;}
 | 
						||
            .footer.footer_sec .copyright{background: #004d71;padding: 20px 0;}
 | 
						||
            .footer.footer_sec .copyright p{color: #fff;margin: 0;font-family: 'Poppins', sans-serif;}
 | 
						||
            .footer.footer_sec .copyright p a{color: #fff;}
 | 
						||
        /*footer*/
 | 
						||
 | 
						||
        /*~~~~~~~*/
 | 
						||
            body, html{
 | 
						||
                background-color: rgba(0,0,0,0.03);
 | 
						||
            }
 | 
						||
            label{
 | 
						||
                color: #2b335e;
 | 
						||
                font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
 | 
						||
            }
 | 
						||
            .required:after {
 | 
						||
                content: "*";
 | 
						||
                color: red;
 | 
						||
            }
 | 
						||
            .width-changer{
 | 
						||
                width:var(--width-changer);
 | 
						||
            }
 | 
						||
            .top-wecuro-logo{
 | 
						||
                width:170px;
 | 
						||
            }
 | 
						||
            .individual-form-page-wrapper{
 | 
						||
                display: flex;
 | 
						||
                flex-flow: wrap;
 | 
						||
                width:var(--grid-width);
 | 
						||
            }
 | 
						||
            .individual-form-page-wrapper .individual-form-page{
 | 
						||
                background:#fff;
 | 
						||
                box-shadow: -2px 2px 2px rgb(0 0 0 / 12%), 2px -2px 2px rgb(0 0 0 / 12%);;
 | 
						||
                transition: 0.5s;
 | 
						||
                min-height: 300px;
 | 
						||
                width:100%;
 | 
						||
                padding: var(--page-pad);
 | 
						||
            }
 | 
						||
            .ftf-home-visit-logo{
 | 
						||
                width:230px;
 | 
						||
                align-self: center;
 | 
						||
            }
 | 
						||
            .border-bottom{
 | 
						||
                border-bottom: 1px solid rgba(0,0,0,0.4);
 | 
						||
            }
 | 
						||
            .gfhgftgv{
 | 
						||
                margin-bottom: 7px;
 | 
						||
            }
 | 
						||
            .gfhgftgv input.form-control[type="text"]{
 | 
						||
                border:none;
 | 
						||
                border-bottom: 1px solid rgba(0,0,0,0.2);
 | 
						||
            }
 | 
						||
            .gfhgftgv input.form-control[type="text"]::placeholder{
 | 
						||
                font-size: 14px;
 | 
						||
            }
 | 
						||
            [data-signature-closure] [data-signature="digital"]{
 | 
						||
                display: none;
 | 
						||
            }
 | 
						||
 | 
						||
            canvas.signature-canvas{
 | 
						||
                width:var(--sig-canvas-width);
 | 
						||
                height:var(--sig-canvas-height);
 | 
						||
            }
 | 
						||
            .erase-signature{
 | 
						||
                cursor: pointer;
 | 
						||
                height: fit-content;
 | 
						||
            }
 | 
						||
 | 
						||
            [data-signature="upload"] input.upload-signature{
 | 
						||
                max-width: 230px;
 | 
						||
            }
 | 
						||
            textarea[name="notes"]{
 | 
						||
                min-height: 100px !important;
 | 
						||
            }
 | 
						||
        /*~~~~~~~*/
 | 
						||
    </style>
 | 
						||
<!-- styling -->
 | 
						||
 | 
						||
<!-- content -->
 | 
						||
    <div class="container w-100 p-0">
 | 
						||
        <div class="row w-100 mx-auto px-0">
 | 
						||
            <div class="col-md-12 mt-3">
 | 
						||
                <a href="<?=base_url()?>">
 | 
						||
                    <img class="top-wecuro-logo" src="<?=base_url()?>common/frontend/assets/images/logo.png" alt="wecuro logo">
 | 
						||
                </a>
 | 
						||
            </div>
 | 
						||
            <div class="col-md-12 p-0 cntr">
 | 
						||
                <div class="individual-form-page-wrapper mt-3 mb-3">
 | 
						||
                    <form role="form" class="form-chgaswexxd3ed4d w-100" id="ftf_home_visit_form" method="post" action="<?=base_url()?>home_visit/save_ftf_home_visit_form" 
 | 
						||
                        onsubmit="return validateForm('ftf_home_visit_form')" enctype="multipart/form-data">
 | 
						||
                        <input type="hidden" name="<?=$this->security->get_csrf_token_name()?>" value="<?=$this->security->get_csrf_hash()?>">
 | 
						||
                        <input type="submit" class="post-hgfrts45stue" hidden>
 | 
						||
 | 
						||
                        <?php for($i=0;$i<count($signature_array2);$i++){?>
 | 
						||
                            <input type="hidden" name="digital_<?=$signature_array2[$i]['name']?>" id="digital_<?=$signature_array2[$i]['name']?>" value="">
 | 
						||
                            <input type="hidden" name="upload_<?=$signature_array2[$i]['name']?>" id="upload_<?=$signature_array2[$i]['name']?>" value="">
 | 
						||
                        <?php } ?>
 | 
						||
 | 
						||
                        <div class="individual-form-page mt-3" title="Page 1">
 | 
						||
                            <div class="row w-100 mx-auto px-4 py-3">
 | 
						||
                                <div class="col-md-12 mt-2 text-center">
 | 
						||
                                    <div class="card mt-2 mb-2 br-none" style="box-shadow: none;border:none">
 | 
						||
                                        <img class="card-img-top ftf-home-visit-logo" src="<?php echo base_url(); ?>common/plan-review-assets/img/archcare.png" alt="logo">
 | 
						||
                                        <div class="card-body pt-0">
 | 
						||
                                            <p class="card-text fs-17p mb-0">
 | 
						||
                                                ArchCare Community Life
 | 
						||
                                            </p>
 | 
						||
                                            <p class="card-text fs-17p mb-0">
 | 
						||
                                                205 Lexington Ave, 8<sup>th</sup> Floor
 | 
						||
                                            </p>
 | 
						||
                                            <p class="card-text fs-17p mb-0">
 | 
						||
                                                New York, NY 10016
 | 
						||
                                            </p>
 | 
						||
                                            <p class="card-text fs-17p mb-0">
 | 
						||
                                                1‑855‑467 9351 (TTY: 711)
 | 
						||
                                            </p>
 | 
						||
                                            <p class="card-text fs-17p mb-0 fw-bold">
 | 
						||
                                                Fax # 646 219 7363
 | 
						||
                                            </p>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="card-footer bg-white br-none">
 | 
						||
                                            <h5 class="text-capitalize text-decoration-underline fs-16p">
 | 
						||
                                                Face to Face Person-Centered Service Plan Review Checklist
 | 
						||
                                            </h5>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                </div>
 | 
						||
                                <div class="col-md-12 mt-2 mb-4">
 | 
						||
                                    <div class="row gfhgftgv">
 | 
						||
                                        <div class="col-auto">
 | 
						||
                                            <label for="member_name" class="col-form-label fs-15p fw-bold required">Member Name: </label>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="col-auto w-70pr">
 | 
						||
                                            <input type="text" class="form-control" id="member_name" name="member_name" aria-describedby="memberName" placeholder="Write member name ..." required>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                    <div class="row gfhgftgv">
 | 
						||
                                        <div class="col-auto">
 | 
						||
                                            <label for="member_medicaid" class="col-form-label fs-15p fw-bold required">Member Medicaid #: </label>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="col-auto w-70pr">
 | 
						||
                                            <input type="text" class="form-control" id="member_medicaid"  name="member_medicaid" aria-describedby="memberMedicaid" placeholder="Write member medicaid ..." required>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                    <div class="row gfhgftgv">
 | 
						||
                                        <div class="col-auto">
 | 
						||
                                            <label for="member_phone" class="col-form-label fs-15p fw-bold required">Member Phone #: </label>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="col-auto w-70pr">
 | 
						||
                                            <input type="text" class="form-control" id="member_phone" name="member_phone" aria-describedby="memberPhone" placeholder="Write member phone ..." required>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                    <div class="row gfhgftgv">
 | 
						||
                                        <div class="col-auto">
 | 
						||
                                            <label for="appointment_date" class="col-form-label fs-15p fw-bold required">Date scheduled appointment or attempted contact : </label>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="col-auto">
 | 
						||
                                            <input type="date" class="form-control" id="appointment_date" name="appointment_date" aria-describedby="appointmentDate" required>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                    <div class="row gfhgftgv">
 | 
						||
                                        <div class="col-auto">
 | 
						||
                                            <label for="visit_date" class="col-form-label fs-15p fw-bold required">Visit date : </label>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="col-auto">
 | 
						||
                                            <input type="date" class="form-control" id="visit_date" name="visit_date" aria-describedby="visitDate" required>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                    <div class="row gfhgftgv">
 | 
						||
                                        <div class="col-auto">
 | 
						||
                                            <label for="visit_time" class="col-form-label fs-15p fw-bold required">Time of Visit : </label>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="col-auto">
 | 
						||
                                            <input type="time" class="form-control" id="visit_time" name="visit_time" aria-describedby="visitTime" required>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                    <div class="row gfhgftgv">
 | 
						||
                                        <div class="col-auto">
 | 
						||
                                            <label for="languages" class="col-form-label fs-15p fw-bold required">Language : </label>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="col-auto w-70pr">
 | 
						||
                                            <select class="form-control w-100 js-example-basic-multiple" id="languages" name="languages[]" multiple="multiple" aria-describedby="language" required>
 | 
						||
                                                <?php 
 | 
						||
                                                foreach($language as $lang){ 
 | 
						||
                                                    ?>
 | 
						||
                                                    <option value="<?=$lang->name?>"> 
 | 
						||
                                                        <?=$lang->name?>
 | 
						||
                                                    </option>
 | 
						||
                                                    <?php 
 | 
						||
                                                } 
 | 
						||
                                                ?>
 | 
						||
                                            </select>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                    <div class="row gfhgftgv">
 | 
						||
                                        <div class="col-auto">
 | 
						||
                                            <label for="review_witness" class="col-form-label fs-15p fw-bold required">
 | 
						||
                                                Person(s) chosen by member to be present during review: (Name and relationship) : 
 | 
						||
                                            </label>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="col-auto w-100">
 | 
						||
                                            <input type="text" class="form-control" id="review_witness" name="review_witness" aria-describedby="reviewWitness" required>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                    <div class="row gfhgftgv">
 | 
						||
                                        <div class="col-md-6">
 | 
						||
                                            <div class="row">
 | 
						||
                                                <div class="col-auto">
 | 
						||
                                                    <label for="name_visiting_rn" class="col-form-label fs-15p fw-bold required rn_label">
 | 
						||
                                                        Name of Visiting RN : 
 | 
						||
                                                    </label>
 | 
						||
                                                </div>
 | 
						||
                                                <div class="col-auto">
 | 
						||
                                                    <input type="text" class="form-control" onkeyup="check_rn()" id="name_visiting_rn" name="name_visiting_rn" aria-describedby="nameVisitingRn" placeholder="Write ..." required>
 | 
						||
                                                </div>
 | 
						||
                                            </div>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="col-md-6">
 | 
						||
                                            <div class="row">
 | 
						||
                                                <div class="col-auto">
 | 
						||
                                                    <label for="license_visiting_rn" class="col-form-label fs-15p fw-bold required rn_label">
 | 
						||
                                                       RN License #: 
 | 
						||
                                                    </label>
 | 
						||
                                                </div>
 | 
						||
                                                <div class="col-auto">
 | 
						||
                                                    <input type="text" class="form-control" onkeyup="check_rn()" id="license_visiting_rn" name="license_visiting_rn" aria-describedby="licenseVisitingRn" placeholder="Write ..." required>
 | 
						||
                                                </div>
 | 
						||
                                            </div>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                    <div class="row gfhgftgv">
 | 
						||
                                        <div class="col-md-6">
 | 
						||
                                            <div class="row">
 | 
						||
                                                <div class="col-auto">
 | 
						||
                                                    <label for="name_visiting_sw" class="col-form-label fs-15p fw-bold required sw_label">
 | 
						||
                                                        Name of Visiting SW :  
 | 
						||
                                                    </label>
 | 
						||
                                                </div>
 | 
						||
                                                <div class="col-auto">
 | 
						||
                                                    <input type="text" class="form-control" onkeyup="check_sw()" id="name_visiting_sw" name="name_visiting_sw" aria-describedby="nameVisitingSw" placeholder="Write ..." required>
 | 
						||
                                                </div>
 | 
						||
                                            </div>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="col-md-6">
 | 
						||
                                            <div class="row">
 | 
						||
                                                <div class="col-auto">
 | 
						||
                                                    <label for="license_visiting_sw" class="col-form-label fs-15p fw-bold required sw_label">
 | 
						||
                                                       SW License #: 
 | 
						||
                                                    </label>
 | 
						||
                                                </div>
 | 
						||
                                                <div class="col-auto">
 | 
						||
                                                    <input type="text" class="form-control" onkeyup="check_sw()" id="license_visiting_sw" name="license_visiting_sw" aria-describedby="licenseVisitingSw" placeholder="Write ..." required>
 | 
						||
                                                </div>
 | 
						||
                                            </div>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                    <div class="row gfhgftgv">
 | 
						||
                                        <div class="col-md-6">
 | 
						||
                                            <div class="row">
 | 
						||
                                                <div class="col-auto">
 | 
						||
                                                    <label for="name_visiting_lchsa" class="col-form-label fs-15p fw-bold">
 | 
						||
                                                        Name of Vendor : 
 | 
						||
                                                    </label>
 | 
						||
                                                </div>
 | 
						||
                                                <div class="col-auto">
 | 
						||
                                                    <input type="text" class="form-control" id="name_visiting_lchsa" name="name_visiting_lchsa" aria-describedby="nameVisitingLchsa" placeholder="Write ..." value="Caregiver Pro">
 | 
						||
                                                </div>
 | 
						||
                                            </div>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="col-md-6">
 | 
						||
                                            <div class="row">
 | 
						||
                                                <div class="col-auto">
 | 
						||
                                                    <label for="phone_visiting_lchsa" class="col-form-label fs-15p fw-bold">
 | 
						||
                                                        Phone # of Vendor : 
 | 
						||
                                                    </label>
 | 
						||
                                                </div>
 | 
						||
                                                <div class="col-auto">
 | 
						||
                                                    <input type="text" class="form-control" id="phone_visiting_lchsa" name="phone_visiting_lchsa" aria-describedby="licenseVisitingLchsa" placeholder="Write ..." value="718-504-8054"> 
 | 
						||
                                                </div>
 | 
						||
                                            </div>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                </div>
 | 
						||
                                <div class="col-md-12">
 | 
						||
                                    <h5 class="text-capitalize text-decoration-underline fs-17p">Checklist:</h5>
 | 
						||
                                    <div class="row">
 | 
						||
                                        <?php
 | 
						||
                                        for($i=0;$i<4;$i++){
 | 
						||
                                            ?>
 | 
						||
                                            <div class="col-md-12 mt-2">
 | 
						||
                                                <label class="d-block" for="<?=$checklist_array2[$i]['name']?>">
 | 
						||
                                                    <?=$i+1?>. <?=$checklist_array2[$i]['description']?>
 | 
						||
                                                </label>
 | 
						||
                                                <div class="mx-3">
 | 
						||
                                                    <div class="form-check form-check-inline">
 | 
						||
                                                        <input class="form-check-input" type="radio" name="<?=$checklist_array2[$i]['name']?>" id="<?=$checklist_array2[$i]['name']?>_yes" value="1" required>
 | 
						||
                                                        <label class="form-check-label" for="<?=$checklist_array2[$i]['name']?>_yes">Yes</label>
 | 
						||
                                                    </div>
 | 
						||
                                                    <div class="form-check form-check-inline">
 | 
						||
                                                        <input class="form-check-input" type="radio" name="<?=$checklist_array2[$i]['name']?>" id="<?=$checklist_array2[$i]['name']?>_no" value="0">
 | 
						||
                                                        <label class="form-check-label" for="<?=$checklist_array2[$i]['name']?>_no">No</label>
 | 
						||
                                                    </div>
 | 
						||
                                                </div>
 | 
						||
                                            </div>
 | 
						||
                                            <?php
 | 
						||
                                        }
 | 
						||
                                        ?>
 | 
						||
                                    </div>
 | 
						||
                                </div>
 | 
						||
                            </div>
 | 
						||
                        </div>
 | 
						||
                        <div class="individual-form-page mt-3" title="Page 2">
 | 
						||
                            <div class="row w-100 mx-auto px-4 py-3">
 | 
						||
                                <div class="col-md-12 mt-2 mb-4">
 | 
						||
                                    <div class="row">
 | 
						||
                                        <?php
 | 
						||
                                        for($i=4;$i<20;$i++){
 | 
						||
                                            ?>
 | 
						||
                                            <div class="col-md-12 mt-3">
 | 
						||
                                                <label class="d-block" for="<?=$checklist_array2[$i]['name']?>">
 | 
						||
                                                    <?=$i+1?>. <?=$checklist_array2[$i]['description']?>
 | 
						||
                                                </label>
 | 
						||
                                                <div class="mx-3">
 | 
						||
                                                    <div class="form-check form-check-inline">
 | 
						||
                                                        <input class="form-check-input" type="radio" name="<?=$checklist_array2[$i]['name']?>" id="<?=$checklist_array2[$i]['name']?>_yes" value="1" required>
 | 
						||
                                                        <label class="form-check-label" for="<?=$checklist_array2[$i]['name']?>_yes">Yes</label>
 | 
						||
                                                    </div>
 | 
						||
                                                    <div class="form-check form-check-inline">
 | 
						||
                                                        <input class="form-check-input" type="radio" name="<?=$checklist_array2[$i]['name']?>" id="<?=$checklist_array2[$i]['name']?>_no" value="0">
 | 
						||
                                                        <label class="form-check-label" for="<?=$checklist_array2[$i]['name']?>_no">No</label>
 | 
						||
                                                    </div>
 | 
						||
                                                </div>
 | 
						||
                                            </div>
 | 
						||
                                            <?php
 | 
						||
                                        }
 | 
						||
                                        ?>
 | 
						||
                                    </div>
 | 
						||
                                </div>
 | 
						||
                            </div>
 | 
						||
                        </div>
 | 
						||
                        <div class="individual-form-page mt-3" title="Page 3">
 | 
						||
                            <div class="row w-100 mx-auto px-4 py-3">
 | 
						||
                                <div class="col-md-12 mt-2 mb-4">
 | 
						||
                                    <div class="row">
 | 
						||
                                        <?php
 | 
						||
                                        for($i=20;$i<count($checklist_array2);$i++){
 | 
						||
                                            ?>
 | 
						||
                                            <div class="col-md-12 mt-3">
 | 
						||
                                                <label class="d-block" for="<?=$checklist_array2[$i]['name']?>">
 | 
						||
                                                    <?=$i+1?>. <?=$checklist_array2[$i]['description']?>
 | 
						||
                                                </label>
 | 
						||
                                                <div class="mx-3">
 | 
						||
                                                    <div class="form-check form-check-inline">
 | 
						||
                                                        <input class="form-check-input" type="radio" name="<?=$checklist_array2[$i]['name']?>" id="<?=$checklist_array2[$i]['name']?>_yes" value="1" required>
 | 
						||
                                                        <label class="form-check-label" for="<?=$checklist_array2[$i]['name']?>_yes">Yes</label>
 | 
						||
                                                    </div>
 | 
						||
                                                    <div class="form-check form-check-inline">
 | 
						||
                                                        <input class="form-check-input" type="radio" name="<?=$checklist_array2[$i]['name']?>" id="<?=$checklist_array2[$i]['name']?>_no" value="0">
 | 
						||
                                                        <label class="form-check-label" for="<?=$checklist_array2[$i]['name']?>_no">No</label>
 | 
						||
                                                    </div>
 | 
						||
                                                    <?php
 | 
						||
                                                    if($checklist_array2[$i]['name']=='mem_ppv_vac_last_yr'){
 | 
						||
                                                        ?>
 | 
						||
                                                        <div class="form-check form-check-inline">
 | 
						||
                                                            <input class="form-check-input" type="radio" name="<?=$checklist_array2[$i]['name']?>" id="<?=$checklist_array2[$i]['name']?>_na" value="2">
 | 
						||
                                                            <label class="form-check-label" for="<?=$checklist_array2[$i]['name']?>_na">N/A</label>
 | 
						||
                                                        </div>
 | 
						||
                                                        <?php
 | 
						||
                                                    }
 | 
						||
                                                    ?>
 | 
						||
                                                </div>
 | 
						||
                                            </div>
 | 
						||
                                            <?php
 | 
						||
                                        }
 | 
						||
                                        ?>
 | 
						||
                                    </div>
 | 
						||
                                </div>
 | 
						||
                                <div class="col-md-12 mt-2 mb-4">
 | 
						||
                                    <div class="row gfhgftgv">
 | 
						||
                                        <div class="col-auto">
 | 
						||
                                            <label for="notes" class="col-form-label fs-15p fw-bold">Note : </label>
 | 
						||
                                        </div>
 | 
						||
                                        <div class="col-auto width-changer">
 | 
						||
                                            <div class="form-floating">
 | 
						||
                                                <textarea class="form-control" id="notes" name="notes" placeholder="Leave a comment here"></textarea>
 | 
						||
                                                <label for="notes" class="fs-14p">Write down notes</label>
 | 
						||
                                            </div>
 | 
						||
                                        </div>
 | 
						||
                                    </div>
 | 
						||
                                </div>
 | 
						||
                                <div class="col-md-12 mt-2 mb-4">
 | 
						||
                                    <?php
 | 
						||
                                    for($i=0;$i<count($signature_array2);$i++){
 | 
						||
                                        ?>
 | 
						||
                                        <div class="row gfhgftgv" data-signature-closure="<?=$signature_array2[$i]['name']?>">
 | 
						||
                                            <div class="col-auto">
 | 
						||
                                                <label class="col-form-label fs-15p fw-bold" for="<?=$signature_array2[$i]['name']?>">
 | 
						||
                                                    <?=$signature_array2[$i]['description']?> 
 | 
						||
                                                </label>
 | 
						||
                                            </div>
 | 
						||
                                            <div class="col-auto mt-2">
 | 
						||
                                                <div class="form-check form-check-inline">
 | 
						||
                                                    <input class="form-check-input" type="radio" name="<?=$signature_array2[$i]['name']?>_type" id="<?=$signature_array2[$i]['name']?>_type_digital" value="digital" toggling-signature-type="">
 | 
						||
                                                    <label class="form-check-label" for="<?=$signature_array2[$i]['name']?>_type_digital">Digital</label>
 | 
						||
                                                </div>
 | 
						||
                                                <div class="form-check form-check-inline">
 | 
						||
                                                    <input class="form-check-input" type="radio" name="<?=$signature_array2[$i]['name']?>_type" id="<?=$signature_array2[$i]['name']?>_type_upload" value="upload" toggling-signature-type="" checked>
 | 
						||
                                                    <label class="form-check-label" for="<?=$signature_array2[$i]['name']?>_type_upload">Upload</label>
 | 
						||
                                                </div>
 | 
						||
                                            </div>
 | 
						||
                                            <div class="col-auto width-changer mt-2" data-signature="digital" id="">
 | 
						||
                                                <div class="flex-start">
 | 
						||
                                                    <canvas class="form-control me-1 signature-canvas" id="signature_canvas_<?=$signature_array2[$i]['name']?>" title="Draw your signaure here"></canvas>
 | 
						||
                                                    <span class="badge bg-primary erase-signature" title="Erase signature" onclick="eraseCanvas('<?=$signature_array2[$i]['name']?>')">
 | 
						||
                                                        <i class="fas fa-eraser"></i>
 | 
						||
                                                    </span>
 | 
						||
                                                </div>
 | 
						||
                                            </div>
 | 
						||
                                            <div class="col-auto mt-2" data-signature="upload">
 | 
						||
                                                <input type="file" class="btn btn-sm btn-primary upload-signature" value="Upload File" accept="image/jpeg,image/jpg,image/png">
 | 
						||
                                            </div>
 | 
						||
                                        </div>
 | 
						||
                                        <?php
 | 
						||
                                    }
 | 
						||
                                    ?>
 | 
						||
                                </div>
 | 
						||
                                <div class="col-md-12 mt-5">
 | 
						||
                                    <div class="flex-end">
 | 
						||
                                        <button type="button" class="btn btn-outline-secondary me-4" style="padding:7px 35px;">Cancel</button>
 | 
						||
                                        <button type="button" class="btn btn-success light post-hgfrts45sweq" style="padding:7px 35px;">Submit</button>
 | 
						||
                                    </div>
 | 
						||
                                </div>
 | 
						||
                            </div>
 | 
						||
                        </div>
 | 
						||
                    </form>
 | 
						||
                </div>
 | 
						||
            </div>
 | 
						||
        </div>
 | 
						||
    </div>
 | 
						||
<!-- content -->
 | 
						||
 | 
						||
<!-- scripting -->
 | 
						||
    <script src="https://cdnjs.cloudflare.com/ajax/libs/signature_pad/1.5.3/signature_pad.min.js"></script>
 | 
						||
    <!-- <script src="<?php echo base_url(); ?>common/signature/drawing-table-multi.js" type="text/javascript"></script> -->
 | 
						||
    <script type="text/javascript">
 | 
						||
        if(typeof swalAlert==="undefined"){
 | 
						||
            function swalAlert(icon,msg){
 | 
						||
                Swal.fire({
 | 
						||
                    position: 'center',
 | 
						||
                    icon: icon,
 | 
						||
                    title: msg,
 | 
						||
                    showConfirmButton: false,
 | 
						||
                    timer: 1500
 | 
						||
                });
 | 
						||
            }
 | 
						||
        }
 | 
						||
    </script>
 | 
						||
    <script type="text/javascript">
 | 
						||
        $(document).ready(function(){
 | 
						||
            $('.js-example-basic-multiple').select2();
 | 
						||
            callLeaveModal(true);
 | 
						||
        });
 | 
						||
        $(document).on('click','[toggling-signature-type]',function(){
 | 
						||
            var val=$(this).val();
 | 
						||
            var trgt=$(this).closest("[data-signature-closure]");
 | 
						||
            var sig_name=trgt.attr('data-signature-closure');
 | 
						||
            if(val=='digital'){
 | 
						||
                resetFileInput(trgt);
 | 
						||
                $("#upload_"+sig_name+"").val('');
 | 
						||
                trgt.find("[data-signature='digital']").show('slow');
 | 
						||
                trgt.find("[data-signature='upload']").hide('slow');
 | 
						||
 | 
						||
                var signaturePad = new SignaturePad(document.getElementById('signature_canvas_'+sig_name), {
 | 
						||
                    backgroundColor: 'rgb(255, 255, 255)',
 | 
						||
                    penColor: 'rgb(0, 0, 0)',
 | 
						||
                    minWidth: 0.8,
 | 
						||
                    maxWidth: 1
 | 
						||
                });
 | 
						||
            }
 | 
						||
            else if(val=='upload'){
 | 
						||
                eraseCanvas(sig_name);
 | 
						||
                $("#digital_"+sig_name+"").val('');
 | 
						||
                trgt.find("[data-signature='digital']").hide('slow');
 | 
						||
                trgt.find("[data-signature='upload']").show('slow');
 | 
						||
            }
 | 
						||
        });
 | 
						||
        $(document).on('change','[data-signature="upload"] input.upload-signature',function(){
 | 
						||
            var trgt=$(this).closest("[data-signature-closure]");
 | 
						||
            var sig_name=trgt.attr('data-signature-closure');
 | 
						||
 | 
						||
            if(!this.files || !this.files[0]){
 | 
						||
                return;
 | 
						||
            }
 | 
						||
 | 
						||
            var file_type=this.files[0].type;
 | 
						||
            if(["image/jpeg","image/jpg","image/png"].includes(file_type)){
 | 
						||
                const FR=new FileReader();
 | 
						||
                FR.addEventListener("load",function(evt){
 | 
						||
                    var signature=evt.target.result;
 | 
						||
                    $("#upload_"+sig_name+"").val(signature);
 | 
						||
                }); 
 | 
						||
                FR.readAsDataURL(this.files[0]);
 | 
						||
            }
 | 
						||
            else{
 | 
						||
                resetFileInput(trgt);
 | 
						||
                swalAlert("error","Only JPEG, JPG, PNG files are allowed! Please Try with another file.");
 | 
						||
                return false;
 | 
						||
            }
 | 
						||
        });
 | 
						||
        $(document).on('click','.post-hgfrts45sweq',function(){
 | 
						||
            $('.post-hgfrts45stue').trigger('click');
 | 
						||
        });
 | 
						||
        $(".form-chgaswexxd3ed4d").submit(function(e){
 | 
						||
            e.preventDefault();
 | 
						||
            var form=$(this);
 | 
						||
            form.serialize();
 | 
						||
            var actionUrl=form.attr('action');
 | 
						||
            $.ajax({
 | 
						||
                type: "POST",
 | 
						||
                url: actionUrl,
 | 
						||
                data: form.serialize(),
 | 
						||
                beforeSend: function(){
 | 
						||
                    callLoader_hgy67vg(true);
 | 
						||
                },
 | 
						||
                success: function(data) {
 | 
						||
                    var data=$.parseJSON(data);
 | 
						||
                    callLoader_hgy67vg(false);
 | 
						||
                    if(data.status==200){
 | 
						||
                        createPdf(data.data.inserted_id);
 | 
						||
                    }
 | 
						||
                },
 | 
						||
                error: function(){ 
 | 
						||
                    callLoader_hgy67vg(false);
 | 
						||
                    console.log('error in form submitting - form-chgaswexxd3ed4d');
 | 
						||
                },
 | 
						||
                complete: function(){
 | 
						||
                }
 | 
						||
            });
 | 
						||
        });
 | 
						||
        function eraseCanvas(of){   
 | 
						||
            var cnvid="signature_canvas_"+of;
 | 
						||
            var ctx = new SignaturePad(document.getElementById('signature_canvas_'+of));
 | 
						||
            ctx.clear();
 | 
						||
        }
 | 
						||
        function validateForm(of){
 | 
						||
            var sig_array=['signature_member','signature_auth_representative','signature_visiting_rn_sw'];
 | 
						||
            for(var i=0;i<sig_array.length;i++){
 | 
						||
                var sig_name=sig_array[i];
 | 
						||
                var sig_type=$("[name='"+sig_name+"_type']:checked").val();
 | 
						||
                if(sig_type=='digital'){
 | 
						||
                    var canvas=document.getElementById('signature_canvas_'+sig_name);
 | 
						||
                    if(canvas){
 | 
						||
                        // var signature = canvas.toDataURL();
 | 
						||
                        var signature=canvas.toDataURL("image/png");
 | 
						||
                        $("#digital_"+sig_name+"").val(signature);
 | 
						||
                    }
 | 
						||
                }
 | 
						||
                else if(sig_type=='upload'){
 | 
						||
                    //...
 | 
						||
                }
 | 
						||
            }
 | 
						||
        }
 | 
						||
        function createPdf(id){
 | 
						||
            var url="<?=base_url()?>home_visit/create_pdf_ftf_home_visit_form";
 | 
						||
            $.ajax({
 | 
						||
                type: "GET",
 | 
						||
                url: url,
 | 
						||
                data: {
 | 
						||
                    id:id
 | 
						||
                },
 | 
						||
                beforeSend: function(){
 | 
						||
                    callLoader_hgy67vg(true,'creating pdf...');
 | 
						||
                },
 | 
						||
                success: function(data) {
 | 
						||
                    var data=$.parseJSON(data);
 | 
						||
                    if(data.status==200){
 | 
						||
                        swalAlert('success','Saved Successfully');
 | 
						||
                        window.location.href="<?=base_url()?>"+data.data.pdf;
 | 
						||
                    }
 | 
						||
                    callLoader_hgy67vg(false,'');
 | 
						||
                },
 | 
						||
                error: function(){ 
 | 
						||
                    callLoader_hgy67vg(false,'');
 | 
						||
                    console.log('error in pdf creation - form-chgaswexxd3ed4d');
 | 
						||
                },
 | 
						||
                complete: function(){
 | 
						||
                }
 | 
						||
            });
 | 
						||
        }
 | 
						||
        function check_rn(){
 | 
						||
            var license_visiting_rn = $('#license_visiting_rn').val();
 | 
						||
            var name_visiting_rn = $('#name_visiting_rn').val();
 | 
						||
            if(license_visiting_rn != '' || name_visiting_rn != ''){
 | 
						||
                $("#name_visiting_sw").attr("required", false);
 | 
						||
                $("#license_visiting_sw").attr("required", false);
 | 
						||
                $('.sw_label').removeClass('required');
 | 
						||
            }
 | 
						||
            else{
 | 
						||
                $("#name_visiting_sw").attr("required", true);
 | 
						||
                $("#license_visiting_sw").attr("required", true);
 | 
						||
                $('.sw_label').addClass('required');
 | 
						||
            }
 | 
						||
        }
 | 
						||
        function check_sw(){
 | 
						||
            var name_visiting_sw = $('#name_visiting_sw').val();
 | 
						||
            var license_visiting_sw = $('#license_visiting_sw').val();
 | 
						||
            if(name_visiting_sw != '' || license_visiting_sw != ''){
 | 
						||
                $("#license_visiting_rn").attr("required", false);
 | 
						||
                $("#name_visiting_rn").attr("required", false);
 | 
						||
                $('.rn_label').removeClass('required');
 | 
						||
            }else{
 | 
						||
                $("#license_visiting_rn").attr("required", true);
 | 
						||
                $("#name_visiting_rn").attr("required", true);
 | 
						||
                $('.rn_label').addClass('required');
 | 
						||
            }
 | 
						||
        }
 | 
						||
        function resetFileInput(trgt){
 | 
						||
            trgt.find("[data-signature='upload']").empty();
 | 
						||
            trgt.find("[data-signature='upload']").html('<input type="file" class="btn btn-sm btn-primary upload-signature" value="Upload File" accept="image/jpeg,image/jpg,image/png">');
 | 
						||
        }
 | 
						||
    </script>
 | 
						||
<!-- scripting -->
 |