<!--- codingdelay.cfm --->
<cfparam name="url.status" default ="">
<cfparam name="url.id" default ="0">
<cfif url.status contains 'unable'>
<cfquery  name="GetA" datasource="#Application.DataSrc#">
	SELECT * FROM #Request.prefix_db_lookup#.Coding_Request 
	WHERE   ID  = <cfqueryparam cfsqltype="cf_sql_integer" value="#url.ID#">
</cfquery>

<cfoutput>#GetA.delay_reason#</cfoutput>
	   <div class="form-group">
		 <label>Delay Reason</label>
	        <cfoutput>
	             <div align="center">
	                <select name="delay_reason" id="delay_reason" class="form-control">
	                    <option value="0">----select----</option>
	                    <cfif url.status EQ 'unable_to_complete_coding'>
	                            <option value="No referral documents (H&P/F2F)" <cfif GetA.delay_reason EQ 'No referral documents (H&P/F2F)'>selected</cfif>>No referral documents (H&P/F2F)</option>
	                            <option value="Need clarification on OASIS entries vs uploaded docs" <cfif GetA.delay_reason eq 'Need clarification on OASIS entries vs uploaded docs'>selected</cfif>>Need clarification on OASIS entries vs uploaded docs</option>
	                            <option value="Need clarification on a diagnosis" <cfif GetA.delay_reason eq 'Need clarification on a diagnosis'>selected</cfif>>Need clarification on a diagnosis</option> 
	                            <option value="need clarification on assessment type" <cfif GetA.delay_reason eq 'need clarification on assessment type'>selected</cfif>>Need clarification on assessment type</option> 
	                            <option value="patient not found in Kinnser" <cfif GetA.delay_reason eq 'patient not found in Kinnser'>selected</cfif>>Patient not found in Kinnser</option> 
	                            <option value="patient not found in Axxess" <cfif GetA.delay_reason eq 'patient not found in Axxess'>selected</cfif>>patient not found in Axxess</option> 
	                      	<cfelseif url.status EQ 'unable_to_complete_OASIS'>
	                            <option value="patient is being 'precoded'; OASIS is not yet complete" <cfif GetA.delay_reason EQ "patient is being 'precoded'; OASIS is not yet complete">selected </cfif> >patient is being 'precoded'; OASIS is not yet complete</option>
	                            <option value="unable to export xml due to missing entries (incomplete OASIS)" <cfif GetA.delay_reason EQ "unable to export xml due to missing entries (incomplete OASIS)">selected </cfif>>unable to export xml due to missing entries (incomplete OASIS)</option> 
	                            <option value="unable to export xml due to fatal error (invalid/incorrect entries)" <cfif GetA.delay_reason EQ "unable to export xml due to fatal error (invalid/incorrect entries)">selected </cfif>>unable to export xml due to fatal error (invalid/incorrect entries)</option>
	                            <option value="patient not yet admitted" <cfif GetA.delay_reason eq 'patient not yet admitted'>selected</cfif>>Patient not yet admitted</option> 
	                  		<cfelseif url.status EQ 'unable_to_complete_OASIS_review'>
	                            <option value="waiting for PT/OT Eval" <cfif GetA.delay_reason EQ "waiting for PT/OT Eval">selected </cfif>>waiting for PT/OT Eval</option>
	                        <cfelseif url.status EQ 'unable_to_update_OASIS'>    
	                            <option value="waiting for requested response from client - verification requested on OASIS changes" <cfif GetA.delay_reason EQ "waiting for requested response from client - verification requested on OASIS changes">selected </cfif>>waiting for requested response from client - verification requested on OASIS changes</option>
	                            <option value="waiting for additional documentation" <cfif GetA.delay_reason EQ "waiting for additional documentation">selected </cfif>>waiting for additional documentation</option>
	                        <cfelseif url.status EQ 'unable_to_update_485'>  
	                       		<option value="medication discrepancy" <cfif GetA.delay_reason EQ "medication discrepancy">selected </cfif> >medication discrepancy</option>
	                            <option value="unable to add G&I because plan of care is locked." <cfif GetA.delay_reason EQ "unable to add G&I because plan of care is locked.">selected </cfif> >unable to add G&I because plan of care is locked.</option>
	                            <option value="unable to edit CMS485 because it has been approved" <cfif GetA.delay_reason EQ "unable to edit CMS485 because it has been approved">selected </cfif> >unable to edit CMS485 because it has been approved</option> 
	                            <option value="no existing plan of care (Axxess)" <cfif GetA.delay_reason EQ "no existing plan of care (Axxess)">selected </cfif> >no existing plan of care (Axxess)</option> 
	                        <cfelseif url.status EQ 'unable_to_complete_eligibility'>  
	                       		<option value="Incomplete/incorrect payer information" <cfif GetA.delay_reason EQ "Incomplete/incorrect payer information">selected </cfif> >Incomplete/incorrect payer information</option>
	                            <option value="Incomplete/incorrect patient information" <cfif GetA.delay_reason EQ "Incomplete/incorrect patient information">selected </cfif> >Incomplete/incorrect patient information</option>
	                        <cfelseif url.status EQ 'unable_to_complete_authorization'>  
	                       		<option value="Waiting for coding" <cfif GetA.delay_reason EQ "Waiting for coding">selected </cfif> >Waiting for coding</option>
	                            <option value="Missing orders" <cfif GetA.delay_reason EQ "Missing orders">selected </cfif> >Missing orders</option>
	                            <option value="Missing number of visits and frequency" <cfif GetA.delay_reason EQ "Missing number of visits and frequency">selected </cfif> >Missing number of visits and frequency</option>
	                            <option value="Missing documentations" <cfif GetA.delay_reason EQ "Missing documentations">selected </cfif> >Missing documentations</option>
	                            
	                    </cfif>
	                 </select>
	            </div>
	        </cfoutput>
		</div>
</cfif>
				   