If Im creating my Temp Table can I use:
CREATE TABLE #CURRENT
(
PatientName VARCHAR(100),
PatientID VARCHAR(15),
Ticket Number VARCHAR(20),
DateOfService DATETIME,
DoctorName VARCHAR(100),
FacilityName VARCHAR(100),
Financial Class VARCHAR(100),
CompanyName VARCHAR(100),
Visit Ins...
Most of the endusers arent SQL writers ... putting that in would not hopefully never occur. I didnt write the product .. just have to work with it.
Jeff
SELECT * FROM users WHERE clue > 0
Denis,
This is what "AND --- Filter on Facility" looks like in the application
AND --- Filter on Facility
(
(?FACILITY.ITEMDATA? IS NOT NULL AND pp.FacilityId IN (?FACILITY.ITEMDATA.U?)) OR
(?FACILITY.ITEMDATA? IS NULL)
)
The end user populates a name in a listbox and voila it gives...
George or Monksnake,
I tried the []'s and now Im getting this
Server: Msg 156, Level 15, State 1, Line 205
Incorrect syntax near the keyword 'INTO'.
Server: Msg 156, Level 15, State 1, Line 254
Incorrect syntax near the keyword 'DROP'.
REVISED MAIN QUERY
/* Patient Insurance List Revised...
First off, I am still relatively new to SQL and trying out a Temp table for the first time. I am still in a massive learning curve!!
I am currently getting the following Error in Query Analyzer and can not figure out the error in my coding (please again .... new to SQL)
Server: Msg 170, Level...
Create one formula or three? (Confused)
Am I creating one for Doc ID, one for Fac ID and one Carrier ID? Or are you telling me one formula with "{Doc ID} & {Fac ID} & {Carrier ID}" under the x-2 button?
Jeff
SELECT * FROM users WHERE clue > 0
In my Report (with the SQL code used below), I am pulling to this report the Doctor ID, the Facility ID and the Carrier ID.
What I have occuring right now is I am getting
Doc ID Fac ID Carrier ID
7 3 50
7 3 50
7 3 50
and so on ...
In my Report (with the SQL code used below), I am pulling to this report the Doctor ID, the Facility ID and the Carrier ID.
What I have occuring right now is I am getting
Doc ID Fac ID Carrier ID
7 3 50
7 3 50
7 3 50
and so on ...
In my report code, I am pulling pva.InsBalance + pva.patbalance AS TotalVisitBalance,
What I need is, to know the date in which this balance went to $0.00. Is it possible to script this anyhow?
set nocount on
declare @startdate datetime,
@enddate datetime,
@ticketnumber...
Can anyone describe why this was received? Ive never encountered this error before.
Server: Msg 8152, Level 16, State 9, Line 44
String or binary data would be truncated.
The statement has been terminated.
Server: Msg 8152, Level 16, State 9, Line 132
String or binary data would be truncated...
AlexCuse,
?DATES.DATE1? & ?DATES.DATE2? is for the Termination Date
?DATE.DATE1? & ?DATE.DATE2? is for the Effective Date
To make my coding easier to read, I just renamed these parameter fields:
AND -- Filter on Termination Date
(
(pi.InsCardTerminationDate IS NULL OR...
I am so close to getting this now ... Just encountered one last issue, for which I can not see why its not working right ...
I added a ISNULL(?DATES.DATE1?,'01/01/1900') and DATEADD(d,1, ISNULL(?DATES.DATE2?,'01/01/3000'))) to auto populate the 01/01/1900 and 01/01/3000 values if the fields...
Currently, I am only receiving patients back that have NULL values for the "Termination Date" and "Effective Date". If either one of these fields has a value in it, I'm not receiving them back in my report. The ?DATES.DATE2? will be replaced by actual dates from the end user.
SECTION OF CODE...
George,
I hate it when I make it more difficult than what it really is!! :)
Thanks for your help!
The NULL is NULL and NOT NULL mess is due to parameter fields --- If you saw it in the actual product, it would look like this ...
/*Billing Analysis by Patient*/
SET NOCOUNT ON
CREATE TABLE...
I need this report to report back only the VititBalances greater than $0.00
I know it needs to go into my "Where", but not to sure how to since I made this field from two fields InsBalance plus PatBalance. Any assistance is appreciated.
patientVisitagg.[InsBalance]+...
Strange request ---
The code below provides me the current age of the patient. How can I code it to provide me the age of the patient at the Time of Service (PatientVisitProcs.DateOfServiceFrom AS [Date Of Service])? So if my patient was 16 back in 2004 and on this DOS, I want it to show that...
This should help read this better ...
ORDER BY items must appear in the select list if SELECT DISTINCT is specified.
/*Insurance Termination Report*/
SELECT DISTINCT
ISNULL(pp.first,'')+ ' ' + ISNULL(pp.middle,'')+ ' ' + ISNULL(pp.last,'') AS PatientName,
PatientId...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.