<cfcomponent displayname="Communciations Functions" hint="I Return Communciations Information" output="false">

	<cfset client.Loc_ID = 0 />
	
   <cffunction name="init" displayname="Initialize Component" access="public" returntype="Communciations" hint="I initialize and return the Communciations object.">
		<cfreturn this>
	</cffunction>

<cffunction name="show_assignemployee"  access="remote" output="Yes" returnFormat= "plain">   
		<cfargument name="AgencyID" required="no" hint="AgencyID" default="#session.agencyid#"> 	
		<cfargument name="Comm_ID" required="yes">
		<cfargument name="radionname" required="no" hint="radionname" default="unstablesymptom"> 	
			<cfquery  name="GetEmpList" datasource="#Application.DataSrc#">
			   SELECT phy.Phys_Last,phy.Phys_First,phy.Emp_ID,phy.Phys_Street,
			   phy.Phys_City,phy.Phys_State 
			   FROM   #Request.prefix_db_agency#.Communication cm 
			   JOIN   #Request.prefix_db_agency#.pAdmit ON  pAdmit.Patient_ID =  cm.Patient_ID  AND pAdmit.status = 0
			   JOIN  #Request.prefix_db_lookup#.pPhysicians phy ON phy.Phys_ID =  pAdmit.Render_Phys_ID  
			   WHERE  cm.Comm_ID = '#arguments.Comm_ID#'
			   AND phy.Phys_Fax IS NOT NULL
			   ORDER BY phy.Phys_Last, phy.Phys_First 
			</cfquery>

			<cfsavecontent	variable = "html_employee_list"> 													 		
					<!--- <div class="radio-list" style="width:100%">
						<cfoutput query="GetEmpList" group="Emp_ID">
							<span class="col-md-3">
								<label>
									<input type="radio" name="Employee"  id="Employee#Emp_ID#" value="#Emp_ID#"  onClick="document.getElementById('otherfax').style.display='none'"> #Phys_Last#, #Phys_First# 
								</label>
							</span>
						</cfoutput>
						<span class="col-md-3">
							<label>
								<input type="radio" name="Employee"  id="Employeeother" value="other" onClick="document.getElementById('otherfax').style.display='block'" >  Other
							</label>
						</span>
					</div> --->
						<div class="col-md-6">
							<input type="text" class="form-control" id="employeeSearch" placeholder="Search ..." onkeyup="filterEmployees()" style="margin-bottom: 10px;">
							<select class="form-control" id="Employee" name="Employee" onchange="handleEmployeeSelection()" size="8">
								<option value="">-- Select Physician --</option>
								<cfoutput query="GetEmpList" group="Emp_ID">
									<option value="#Emp_ID#">#Phys_Last#, #Phys_First#  (#Phys_Street# #Phys_City#, #Phys_State#)</option>
								</cfoutput>
								<option value="other">Other</option>
							</select>
						</div>
						<div class="row">	
							<div class="col-md-6" id="otherfax"  style="display:none;">
								<div class="form-group" >
									<label class="control-label">Please enter the 11 digit Fax Number </label>
									<div class="row">
										<div class="col-md-6">
											<input type="text" class="form-control input-medium numberonly" onkeypress="return onlyNumberKey(event)"
										maxlength="11" id="otherfaxnumber" name="otherfaxnumber" value="" >
										</div>
									</div>
								</div>
							</div>
		                </div>
								
			</cfsavecontent>	
			<cfreturn html_employee_list />	
	</cffunction>
</cfcomponent>