494 lines
24 KiB
PHP
Executable File
494 lines
24 KiB
PHP
Executable File
<style type="text/css">
|
|
.required:after {
|
|
content:"*";
|
|
color:red;
|
|
}
|
|
|
|
</style>
|
|
<style type="text/css">
|
|
.app-content .wizard > .steps > ul > li.active .step {
|
|
background-color: #666EE8;
|
|
border-color: #666EE8;
|
|
color: #fff;
|
|
}
|
|
</style>
|
|
<div class="app-content content">
|
|
<section class="content-wrapper">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<h3 class="font-weight-bold"><?php echo lang('Add Referral'); ?></h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr class="mt-0 mb-0" />
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<?php
|
|
$tab1 = '';
|
|
$tab2 = '';
|
|
|
|
$tabPane1 = '';
|
|
$tabPane2 = '';
|
|
|
|
if(!isset($_SESSION['addRef_stat'])){
|
|
$tab1 = 'active';
|
|
$tab2 = 'disabled';
|
|
|
|
$tabPane1 = 'active in show';
|
|
$tabPane2 = '';
|
|
}
|
|
|
|
if(isset($_SESSION['addRef_stat']) && $_SESSION['addRef_stat']=='step1'){
|
|
$tab1 = 'disabled';
|
|
$tab2 = 'active';
|
|
|
|
$tabPane1 = '';
|
|
$tabPane2 = 'active in show';
|
|
}
|
|
?>
|
|
<!-- widzed -->
|
|
<div class="wizard wizard-circle">
|
|
<div class="steps">
|
|
<ul class="nav nav-tabs" id="myTab" role="tablist" style="border: none;">
|
|
<li class="nav-item <?php echo $tab1; ?> first current ">
|
|
<a class="nav-link " id="home-tab" data-toggle="tab" href="#home" role="tab" aria-selected="true" style="padding-top: 52px !important; border: none; cursor: pointer;"><span class="step">1</span>General Information</a>
|
|
</li>
|
|
|
|
<li class="nav-item <?php echo $tab2; ?> first current ">
|
|
<a class="nav-link" id="contact-tab" data-toggle="tab" href="#service_need" role="tab" aria-selected="false" style="padding-top: 52px !important; border: none; cursor: pointer;"><span class="step">2</span>Medical Details & Payor</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- widzed -->
|
|
<!-- basic_info tab -->
|
|
<div class="tab-content" id="myTabContent">
|
|
<div class="tab-pane fade <?php echo $tabPane1; ?>" id="home" role="tabpanel" aria-labelledby="home-tab">
|
|
<form role="form" action="addNewPatient" method="post" enctype="multipart/form-data" name="newGenInfo" onsubmit="return validateForm1()">
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
<label for="firstName3">
|
|
<?php echo lang('Referral Source'); ?>
|
|
<span class="danger">*</span>
|
|
</label>
|
|
<select class="form-control required" id="ref_info" name="pt_refrance_type">
|
|
<option value="New Patient">New Patient</option>
|
|
<option value="Reffered by Patient">Reffered by Patient</option>
|
|
<option value="Reffered by Vendor">Reffered by Vendor</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6" id="ref_by_ptn" style="display: none;">
|
|
<div class="form-group">
|
|
<label for="lastName3">
|
|
<?php echo lang('Referral Patient Id'); ?>
|
|
<span class="danger">*</span>
|
|
</label>
|
|
<!-- <input type="text" class="form-control required" id="ref_pt_id" name="pt_refrance_value"> -->
|
|
<select class="form-control required" id="ref_pt_id" name="pt_refrance_value">
|
|
<option value=''>-- Select Patient--</option>
|
|
<option value='yogesh'>Yogesh Singh</option>
|
|
<option value='sonarika'>Sonarika Bhadoria</option>
|
|
<option value='anil'>Anil Singh</option>
|
|
<option value='akilesh'>Akilesh Sahu</option>
|
|
</select>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-6" id="ref_by_vendor" style="display: none;">
|
|
<div class="form-group">
|
|
<label for="lastName3">
|
|
<?php echo lang('Vendor'); ?>
|
|
<span class="danger">*</span>
|
|
</label>
|
|
<select class="form-control required" id="ref_vnd_id" name="vend_refrance_value">
|
|
<option value="" selected>Choose...</option>
|
|
<?php foreach ($vendorList as $value) { ?>
|
|
<option value="<?php echo $value->id; ?>"><?php echo $value->vedor_name; ?></option>
|
|
<?php } ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
|
|
$("#ref_info").change(function(){
|
|
var selVal = $(this).val();
|
|
if(selVal == 'Reffered by Patient')
|
|
{
|
|
$("#ref_by_ptn").show();
|
|
$("#ref_by_vendor").hide();
|
|
|
|
}
|
|
else if(selVal == 'Reffered by Vendor'){
|
|
$("#ref_by_ptn").hide();
|
|
$("#ref_by_vendor").show();
|
|
}
|
|
else{
|
|
$("#ref_by_ptn").hide();
|
|
$("#ref_by_vendor").hide();
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
</script>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1" class="required"><?php echo lang('First name'); ?></label>
|
|
<input type="text" class="form-control" name="fname" value='' required="">
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1" class="required"><?php echo lang('Last name'); ?></label>
|
|
<input type="text" class="form-control" name="lname" value='' placeholder="" required="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1" class="required"><?php echo lang('email'); ?></label>
|
|
<input type="email" class="form-control" name="email" id="exampleInputEmail1" value='' placeholder="" required="">
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1" class="required"><?php echo lang('Telephone'); ?></label>
|
|
<input type="text" class="form-control onlyNumber" onkeyup="USformatPhoneNumber(this.value,this)" minlength="10" maxlength="10" name="telephone" value='' placeholder="" required="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1" class="required"><?php echo lang('Gender'); ?></label>
|
|
<select class="form-control" id="inputGroupSelect01" name="gender" required="">
|
|
<option value="" selected>Choose...</option>
|
|
<option value="Male">Male</option>
|
|
<option value="Female">Female</option>
|
|
<option value="Others">Others</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1" class="required"><?php echo lang('Language Preferances'); ?></label>
|
|
<select class="form-control" id="inputGroupSelect01" name="pnalguage" required="">
|
|
<option value="" selected>Choose...</option>
|
|
<?php foreach ($langs as $value) { ?>
|
|
<option value="<?php echo $value->id; ?>" attr_name="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
|
|
<?php } ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Date of Birth'); ?></label>
|
|
<input type="date" class="form-control" name="dob" value='' id='ptdob' placeholder="">
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<h4 class="font-weight-bold">Designate Information</h4>
|
|
<hr class="my-2">
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('First name'); ?></label>
|
|
<input type="text" class="form-control" name="dg_fname" value=''>
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Last name'); ?></label>
|
|
<input type="text" class="form-control" name="dg_lname" value='' placeholder="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Telephone'); ?></label>
|
|
<input type="text" onkeyup="USformatPhoneNumber(this.value,this)" minlength="10" maxlength="10" class="form-control onlyNumber" name="dg_telephone" value=''>
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Cell'); ?></label>
|
|
<input type="text" onkeyup="USformatPhoneNumber(this.value,this)" minlength="10" maxlength="10" class="form-control onlyNumber" name="dg_cell" value='' placeholder="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-12 form-group">
|
|
<button type="submit" name="submit" value="gen_info" class="btn btn-info"><?php echo lang('submit'); ?></button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- services tab -->
|
|
<div class="tab-pane fade <?php echo $tabPane2; ?>" id="service_need" role="tabpanel" aria-labelledby="contact-tab">
|
|
<form role="form" action="addNewPatient?pid=<?php echo $_GET['pid']; ?>&phase2=complete" method="post" name="referalFrom" onsubmit="return validateForm3()" enctype="multipart/form-data">
|
|
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1" class="required"><?php echo lang('Level of Care Needed'); ?></label>
|
|
<select class="form-control" name="level_care" id="inputGroupSelect01" required="">
|
|
<option value="" selected disabled="">Choose...</option>
|
|
<option value="1">1 high</option>
|
|
<option value="2">2</option>
|
|
<option value="3">3</option>
|
|
<option value="4">4</option>
|
|
<option value="5">5 low</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1" class="required"><?php echo lang('Referal Recive Date'); ?></label>
|
|
<input type="date" class="form-control" name="referal_recive_date" id="referalRecDate" required="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Primary care physician/MD Info'); ?></label>
|
|
<input type="text" class="form-control" name="primaryCarePhyMdInfo" value=''>
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Diagnosis'); ?></label>
|
|
<input type="text" class="form-control" name="diagnosis" value=''>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Payer Type'); ?></label>
|
|
<input type="text" class="form-control" name="payerType" value=''>
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Corresponding requirements'); ?></label>
|
|
<input type="text" class="form-control" name="correspondingRequirment" value=''>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Referal Mode of Contact'); ?></label>
|
|
<select class="form-control" name="referal_contact" id="inputGroupSelect01">
|
|
<option value="" selected>Choose...</option>
|
|
<!-- <option value="Name">Name</option> -->
|
|
<option value="Address">Address</option>
|
|
<option value="Email">Email</option>
|
|
<option value="Fax">Fax</option>
|
|
<option value="Phone">Phone</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Referal Type'); ?></label>
|
|
<select class="form-control" name="referal_type" id="inputGroupSelect01">
|
|
<option value="" selected >Choose...</option>
|
|
<option value="New">New</option>
|
|
<option value="Restart">Restart</option>
|
|
</select>
|
|
</div>
|
|
<!-- <div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Referal Address'); ?></label>
|
|
<input type="text" class="form-control" name="referal_address" id="exampleInputEmail1">
|
|
</div> -->
|
|
</div>
|
|
</div>
|
|
<!-- <div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Referal email'); ?></label>
|
|
<input type="text" class="form-control" name="referal_email" id="exampleInputEmail1">
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Referal Phone'); ?></label>
|
|
<input type="text" class="form-control" name="referal_phone" id="exampleInputEmail1">
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1" class="required"><?php echo lang('Level of Service needed'); ?></label>
|
|
<select class="form-control" name="level_service" id="inputGroupSelect01" required="">
|
|
<option value="" selected disabled="">Choose...</option>
|
|
<?php foreach ($lvlService as $value) { ?>
|
|
<option value="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
|
|
<?php } ?>
|
|
</select>
|
|
</div>
|
|
|
|
<!-- <div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Service Activity Needed '); ?><b>(press CTRL to select multiple)</b></label>
|
|
<select class="form-control" name="service_activity[]" id="inputGroupSelect01" multiple>
|
|
<option value="" selected>Choose...</option>
|
|
<?php foreach ($serviceActivity as $value) { ?>
|
|
<option value="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
|
|
<?php } ?>
|
|
</select>
|
|
</div> -->
|
|
</div>
|
|
</div>
|
|
<!-- <div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Therapy Type '); ?><b>(press CTRL to select multiple)</b></label>
|
|
<select class="form-control" name="therapy_type[]" id="inputGroupSelect01" multiple>
|
|
<option value="" selected>Choose...</option>
|
|
<?php foreach ($therapyType as $value) { ?>
|
|
<option value="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
|
|
<?php } ?>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col-lg-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Type of access '); ?><b>(press CTRL to select multiple)</b></label>
|
|
<select class="form-control" name="type_access[]" id="inputGroupSelect01" multiple>
|
|
<option value="" selected>Choose...</option>
|
|
<?php foreach ($accessType as $value) { ?>
|
|
<option value="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
|
|
<?php } ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
<div class="col-md-12 form-group">
|
|
<button type="submit" name="submit" value="services" class="btn btn-info"><?php echo lang('submit'); ?></button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
/* future date dob not accept */
|
|
|
|
$(document).ready(function() {
|
|
// alert("dateSec");
|
|
var todaysDate = new Date(); // Gets today's date
|
|
|
|
// Max date attribute is in "YYYY-MM-DD". Need to format today's date accordingly
|
|
|
|
var year = todaysDate.getFullYear(); // YYYY
|
|
var month = ("0" + (todaysDate.getMonth() + 1)).slice(-2); // MM
|
|
var day = ("0" + todaysDate.getDate()).slice(-2); // DD
|
|
|
|
var maxDate = (year + "-" + month + "-" + day); // Results in "YYYY-MM-DD" for today's date
|
|
|
|
// Now to set the max date value for the calendar to be today's date
|
|
$('#ptdob').attr('max', maxDate);
|
|
$("#referalRecDate").attr('max', maxDate);
|
|
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
function validateForm() {
|
|
var fldval = $("#slotEditname").val();
|
|
if (fldval == "") {
|
|
$("#msg_rm").html("<div class='alert alert-danger' role='alert'> Please enter a value</div>");
|
|
return false;
|
|
}
|
|
var fldval = $("#slotEditname").val();
|
|
var currId = $('#nameId').val();
|
|
|
|
var msgs = '';
|
|
$.ajax('master_icd/duplicateCheck', {
|
|
type: 'POST', // http method
|
|
data: { val: fldval, currId: currId }, // data to submit
|
|
async: false,
|
|
success: function(data, status, xhr) {
|
|
// $('p').append('status: ' + status + ', data: ' + data);
|
|
// alert(data);
|
|
msgs = data;
|
|
|
|
},
|
|
error: function(jqXhr, textStatus, errorMessage) {
|
|
// $('p').append('Error' + errorMessage);
|
|
alert("error duc");
|
|
|
|
}
|
|
});
|
|
if (msgs == 'exist') {
|
|
$("#msg_rm").html("<div class='alert alert-danger' role='alert'> Value already exist in the list</div>");
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
|
|
}
|
|
</script>
|
|
<script type="text/javascript">
|
|
function USformatPhoneNumber(phoneNumberString,_this) {
|
|
var cleaned = ('' + phoneNumberString).replace(/\D/g, '')
|
|
var match = cleaned.match(/^(1|)?(\d{3})(\d{3})(\d{4})$/)
|
|
if (match) {
|
|
var intlCode = (match[1] ? '+1 ' : '')
|
|
var fres = [intlCode, '(', match[2], ') ', match[3], '-', match[4]].join('')
|
|
_this.value = fres;
|
|
}
|
|
return null
|
|
}
|
|
</script>
|
|
<script>
|
|
$( document ).ready(function() {
|
|
|
|
$(".onlyNumber").keypress(function(evt){
|
|
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
|
if (charCode > 31 && (charCode < 48 || charCode > 57))
|
|
return false;
|
|
return true;
|
|
})
|
|
|
|
$('.nav-item').click(function(event){
|
|
if ($(this).hasClass('disabled')) {
|
|
return false;
|
|
}
|
|
});
|
|
|
|
});
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function(){
|
|
// Initialize Select2
|
|
$('#ref_pt_id').select2();
|
|
|
|
// Set option selected onchange
|
|
$('#user_selected').change(function()
|
|
{
|
|
var value = $(this).val();
|
|
// Set selected
|
|
$('#ref_pt_id').val(value);
|
|
$('#ref_pt_id').select2().trigger('change');
|
|
});
|
|
});
|
|
|
|
</script>
|