MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 8.0.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/public_html/imenso.co/dev/revspring/createvisit.html
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
	<!-- CSS only -->
	<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">

	<!-- JavaScript Bundle with Popper -->
	<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa" crossorigin="anonymous"></script>

	<title>RevSpring</title>
</head>
<body>
	<div class="container p-4">
		<div class="text-center">
			<h2>Create Visit</h2>
		</div>
		<div class="text-left d-flex">
			<div class="d-flex"><span class="text-success"> #</span>&nbsp;<h6> Recommended Fields</h6></div>
			<div class="d-flex ms-3"><span class="text-danger"> *</span>&nbsp;<h6> Required Fields</h6></div>
		</div>
		<div class="mt-5">
			<div class="row">
				<div class="col-6">
					<label for="facilityId">Facility ID</label><span class="text-danger"> *</span><br>
					<input class="form-control" placeholder="Facility ID" type="text" id="facilityId" name="facilityId">
				</div>
				<div class="col-6">
					<label for="visitServiceDate">Visit Service Date</label><span class="text-danger"> *</span><br>
					<input class="form-control" placeholder="Visit Service Date" type="date" id="visitServiceDate" name="visitServiceDate">
				</div>
			</div>
			<div class="row mt-3">
				<div class="col-6">
					<label for="serviceCategoryCode">Service Category Code</label><span class="text-danger"> *</span><br>
					<input class="form-control" placeholder="Service Category Code" type="text" id="serviceCategoryCode" name="serviceCategoryCode">
				</div>
			</div>
			<div class="row justify-content-left mt-5">
				<div class="col-12">
					<h4>Patient</h4>
				</div>
			</div>
			<div class="row mt-3">
				<div class="col-6">
					<label for="pfirstName">First Name</label><span class="text-danger"> *</span><br>
					<input class="form-control" placeholder="First Name" type="text" id="pfirstName" name="pfirstName">
				</div>
				<div class="col-6">
					<label for="plastName">Last Name</label><span class="text-danger"> *</span><br>
					<input class="form-control" placeholder="Last Name" type="text" id="plastName" name="plastName">
				</div>
			</div>
			<div class="row mt-3">
				<div class="col-6">
					<label for="patientAccountNumber">Patient Account Number</label><span class="text-danger"> *</span><br>
					<input class="form-control" placeholder="Patient Account Number" type="text" id="patientAccountNumber" name="patientAccountNumber">
				</div>
				<div class="col-6">
					<label for="medicalRecordNumber">Medical Record Number</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="Medical Record Number" type="text" id="medicalRecordNumber" name="medicalRecordNumber">
				</div>
			</div>
			<div class="row mt-3">
				<div class="col-6">
					<label for="pbirthDate">Birth Date</label><span class="text-danger"> *</span><br>
					<input class="form-control" placeholder="Birth Date" type="date" id="pbirthDate" name="pbirthDate">
				</div>
				<div class="col-6">
					<label for="genderCode">Gender Code</label><span class="text-danger"> *</span><br>
					<select class="form-select" id="genderCode">
						<option value="" selected>Select Gender Code</option>
						<option value="M">M</option>
						<option value="F">F</option>
					</select>
				</div>
			</div>
			<div class="row justify-content-left mt-5">
				<div class="col-12">
					<h4>Guarantor</h4>
				</div>
			</div>
			<div class="row mt-3">
				<div class="col-6">
					<label for="gfirstName">First Name</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="First Name" type="text" id="gfirstName" name="gfirstName">
				</div>
				<div class="col-6">
					<label for="glastName">Last Name</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="Last Name" type="text" id="glastName" name="glastName">
				</div>
			</div>
			<div class="row mt-3">
				<div class="col-6">
					<label for="gbirthDate">Birth Date</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="Birth Date" type="date" id="gbirthDate" name="gbirthDate">
				</div>
				<div class="col-6">
					<label for="ggenderCode">Gender Code</label><span class="text-danger"> *</span><br>
					<select class="form-select" id="ggenderCode">
						<option value="" selected>Select Gender Code</option>
						<option value="M">M</option>
						<option value="F">F</option>
					</select>
				</div>
			</div>
			<div class="row justify-content-left mt-3">
				<div class="col-12">
					<h6>Guarantor's Address</h6>
				</div>
			</div>
			<div class="row mt-1">
				<div class="col-6">
					<label for="line1">Line</label><span class="text-danger"> *</span><br>
					<input class="form-control" placeholder="Line" type="text" id="line1" name="line1">
				</div>
				<div class="col-6">
					<label for="city">City</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="City" type="text" id="city" name="city">
				</div>
			</div>
			<div class="row mt-3">
				<div class="col-6">
					<label for="stateCode">State Code</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="State Code" type="text" id="stateCode" name="stateCode">
				</div>
				<div class="col-6">
					<label for="zipCode">Zip Code</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="Zip Code" type="text" id="zipCode" name="zipCode">
				</div>
			</div>
			<div class="row justify-content-left mt-5">
				<div class="col-12">
					<h4>Coverages</h4>
				</div>
			</div>
			<div class="row mt-3">
				<div class="col-6">
					<label for="payerId">Payer Id</label><span class="text-danger"> *</span><br>
					<input class="form-control" placeholder="Payer Id" type="text" id="payerId" name="payerId">
				</div>
				<div class="col-6">
					<label for="priorityNumber">Priority Number</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="Priority Number" type="text" id="priorityNumber" name="priorityNumber">
				</div>
			</div>

			<div class="mt-3">
				<label for="serviceTypeCodes">Service Type Codes</label><span class="text-success"> #</span><br>
				<div id="stc_div" class="d-flex flex-wrap">
					<!-- <div class="row mt-3" id="stc_row_1">
						<div class="col-6"> -->
							<div class="w-50 pe-2" id="stc_div_1">
								<input class="form-control" placeholder="Service Type Codes" type="text" id="serviceTypeCodes_1" name="serviceTypeCodes">
							</div>
						<!-- </div>
						<div class="col-6 mt-auto"> -->
						<!-- </div>
					</div> -->
				</div>
				<div class="mt-2">
					<button type="button" class="btn btn-primary" id="addMore" data-toggle="tooltip" data-placement="right" title="Add More Service Type Codes" onclick="addMore()"> + </button>
				</div>
			</div>
			<div class="row justify-content-left mt-3">
				<div class="col-12">
					<h6>Subscriber</h6>
				</div>
			</div>
			<div class="row mt-1">
				<div class="col-6">
					<label for="sfirstName">First Name</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="First Name" type="text" id="sfirstName" name="sfirstName">
				</div>
				<div class="col-6">
					<label for="slastName">Last Name</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="Last Name" type="text" id="slastName" name="slastName">
				</div>
			</div>
			<div class="row mt-3">
				<div class="col-6">
					<label for="birthDate">Birth Date</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="Birth Date" type="date" id="birthDate" name="birthDate">
				</div>
				<div class="col-6">
					<label for="sgenderCode">Gender Code</label><span class="text-danger"> *</span><br>
					<select class="form-select" id="sgenderCode">
						<option value="" selected>Select Gender Code</option>
						<option value="M">M</option>
						<option value="F">F</option>
					</select>
				</div>
			</div>
			<div class="row mt-3">
				<div class="col-6">
					<label for="memberId">Member Id</label><span class="text-danger"> *</span><br>
					<input class="form-control" placeholder="Member Id" type="text" id="memberId" name="memberId">
				</div>
				<div class="col-6">
					<label for="patientRelationship">Patient Relationship</label><span class="text-danger"> *</span><br>
					<select class="form-select" id="patientRelationship">
						<option value="" selected>Select Patient Relationship</option>
						<option value="Self">Self</option>
						<option value="Child">Child</option>
						<option value="Spouse">Spouse</option>
						<option value="Other Adult">Other Adult</option>
					</select>
				</div>
			</div>
			<div class="row justify-content-left mt-5">
				<div class="col-12">
					<h4>Services</h4>
				</div>
			</div>
			<div class="row mt-3">
				<div class="col-6">
					<label for="procedureCode">Procedure Code</label><span class="text-danger"> *</span><br>
					<input class="form-control" placeholder="Procedure Code" type="text" id="procedureCode" name="procedureCode">
				</div>
				<div class="col-6">
					<label for="units">Units</label><span class="text-danger"> *</span><br>
					<input class="form-control" placeholder="Units" type="text" id="units" name="units">
				</div>
			</div>
			<div class="row justify-content-left mt-3">
				<div class="col-12">
					<h6>Ordering Provider</h6>
				</div>
			</div>
			<div class="row mt-1">
				<div class="col-6">
					<label for="serfirstName">First Name</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="First Name" type="text" id="serfirstName" name="serfirstName">
				</div>
				<div class="col-6">
					<label for="serlastName">Last Name</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="Last Name" type="text" id="serlastName" name="serlastName">
				</div>
			</div>
			<div class="row mt-3">
				<div class="col-6">
					<label for="npi">NPI</label><span class="text-success"> #</span><br>
					<input class="form-control" placeholder="NPI" type="text" id="npi" name="npi">
				</div>
			</div>
		</div>
		<div class="text-center mt-5">
			<button type="button" class="btn btn-primary" id="createVisit" onclick="createVisit()"> Submit </button>
			<button class="btn btn-primary" type="button" disabled id="loader" style="display:none;">
				<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
		  		Loading...
			</button>
		</div>
		<div id="responseDiv" class="px-5 mt-5" style="display: none;">
			<h5>Response: </h5>
			<div id="showResponse" class="mt-2">
			</div>
		</div>
	</div>
</body>
</html>

<script type="text/javascript">

	function createVisit() {
		$('#createVisit').hide();
		$('#loader').show();

		var stcDivChild = $("#stc_div").children().length;
		var stcArray = [];

		for(var i=0; i<parseInt(stcDivChild); i++) {
			stcArray.push($('#serviceTypeCodes_'+(i+1)).val());
		}

		var facilityId = $('#facilityId').val();
		var visitServiceDate = $('#visitServiceDate').val();
		var serviceCategoryCode = $('#serviceCategoryCode').val();

		var pfirstName = $('#pfirstName').val();
		var plastName = $('#plastName').val();
		var patientAccountNumber = $('#patientAccountNumber').val();
		var medicalRecordNumber = $('#medicalRecordNumber').val();
		var pbirthDate = $('#pbirthDate').val();
		var genderCode = $('#genderCode').val();

		var gfirstName = $('#gfirstName').val();
		var glastName = $('#glastName').val();
		var gbirthDate = $('#gbirthDate').val();
		var ggenderCode = $('#ggenderCode').val();
		var line1 = $('#line1').val();
		var city = $('#city').val();
		var stateCode = $('#stateCode').val();
		var zipCode = $('#zipCode').val();
		
		var payerId = $('#payerId').val();
		var priorityNumber = $('#priorityNumber').val();
		var serviceTypeCodes = stcArray;
		var sfirstName = $('#sfirstName').val();
		var slastName = $('#slastName').val();
		var birthDate = $('#birthDate').val();
		var sgenderCode = $('#sgenderCode').val();
		var memberId = $('#memberId').val();
		var patientRelationship = $('#patientRelationship').val();

		var procedureCode = $('#procedureCode').val();
		var units = $('#units').val();
		var serfirstName = $('#serfirstName').val();
		var serlastName = $('#serlastName').val();
		var npi = $('#npi').val();

		var data = {
			"facilityId": facilityId,
			"visitServiceDate": visitServiceDate,
			"serviceCategoryCode": serviceCategoryCode, 
			"pfirstName": pfirstName,
			"plastName": plastName,
			"patientAccountNumber": patientAccountNumber,
			"medicalRecordNumber": medicalRecordNumber,
			"pbirthDate": pbirthDate,
			"genderCode": genderCode,
			"gfirstName": gfirstName,
			"glastName": glastName,
			"gbirthDate": gbirthDate,
			"ggenderCode": ggenderCode,
			"line1": line1,
			"city": city,
			"stateCode": stateCode, 
			"zipCode": zipCode,
			"payerId": payerId,
			"priorityNumber": priorityNumber,
			"serviceTypeCodes": serviceTypeCodes,
			"sfirstName": sfirstName,
			"slastName": slastName,
			"birthDate": birthDate,
			"sgenderCode": sgenderCode,
			"memberId": memberId,
			"patientRelationship": patientRelationship,
			"procedureCode": procedureCode,
			"units": units,
			"serfirstName": serfirstName,
			"serlastName": serlastName,
			"npi": npi,
		}

        $.ajax({
            type: "POST",
            url: 'CreateVisit.php',
            data: data,
            success: function(response)
            {
            	$('#showResponse').html(response);
            	$('#responseDiv').show();
            	$('#createVisit').show();
				$('#loader').hide();
           	}
       });
	}

	function addMore() {

		var child = $("#stc_div").children().length;
		var childNumber = parseInt(child);
		var nextChild = childNumber+1;
		var paddingVar = "";

		//var stcHTML = '<div class="row mt-3" id="stc_row_'+nextChild+'"><div class="col-6"><input class="form-control" placeholder="Service Type Codes" type="text" id="serviceTypeCodes_'+nextChild+'" name="serviceTypeCodes_'+nextChild+'"></div></div>';
		// <div class="col-6"><button type="button" class="btn btn-primary" id="remove_'+nextChild+'" onclick="removeChild('+nextChild+')"> - </button>	</div>
		//$(stcHTML).insertAfter("#stc_row_"+child);
		if(childNumber%2 != 0) {
			paddingVar = "ps-2";
		} else {
			paddingVar = "pe-2";
		}

		var stcHTML = '<div class="w-50 mb-2 '+paddingVar+'" id="stc_div_'+nextChild+'"><input class="form-control" placeholder="Service Type Codes" type="text" id="serviceTypeCodes_'+nextChild+'" name="serviceTypeCodes_'+nextChild+'"></div>';

		$(stcHTML).insertAfter("#stc_div_"+child);
	}

	$(function () {
  		$('[data-toggle="tooltip"]').tooltip()
	})
</script>