How can I create a report from the supplied table?

  • I need to create a report using this data. The data represents a chest x-ray result on a patient. I created a report using SSRS by dragging the TextSeqID and TextLine onto a blank report template but, this doesn't look very good because of the spacing. Any thoughts?


    create table #T (VisitID varchar(30),ResultID varchar(30),TextSeqID int,TextLine varchar(100))
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',1,' Arial 4Bd ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine)
    values('F0-B20170509055744665','492745',2,'XXXXXX')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine)
    values('F0-B20170509055744665','492745',3,'Any Hospital ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine)
    values('F0-B20170509055744665','492745',4,' 680 Centre St. ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine)
    values('F0-B20170509055744665','492745',5,' Boston, MA 02302 ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine)
    values('F0-B20170509055744665','492745',6,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',7,' XRAY REPORT ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',8,' Signed ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',9,' Arial 4d ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',10,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',11,'Patient: Mickey Mouse MR#: M000999999 ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',12,'DOB: 05/24/1974 Acct:F00090555555 ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',13,'Age/Sex: 43 / M ADM Date: 05/09/17 ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',14,'Loc: CCU CCU-11 ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',15,'Attending Dr: Duck, Donald MD ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',16,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',17,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',18,'Ordering Physician: SCOTT NAVARRETT, MD ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',19,'Date of Service: 05/30/17 ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',20,'Procedure(s): XR chest 1V portable ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',21,'Accession Number(s): A00008888')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',22,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',23,'cc: Minnie Mouse ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',24,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',25,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',26,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',27,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',28,' Arial 4d ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',29,'EXAMINATION: Portable CHEST x-ray. ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',30,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',31,' INDICATION: Adult respiratory distress syndrome, shortness of breath. ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',32,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',33,' FINDINGS: AP portable chest x-ray obtained on 5/30/2017 at 609 hours shows ') insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',34,' normal cardiac size and pulmonary vascularity. Interstitial prominence is seen ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',35,' in bilateral lower lungs. No pneumothorax is seen. ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',36,' Right brachial approach PICC is seen ending at superior vena cava. ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',37,' Tracheostomy tube is seen ending at upper trachea. ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',38,' Dobbhoff feeding tube is seen passing to the abdomen. ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',39,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',40,' IMPRESSION: ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',41,' Since previous chest x-ray obtained on 5/29/2017 at 807 hours, there are: ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',42,' 1. Persistent bilateral lower lung reticular interstitial infiltrates. ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',43,' 2. No interval change in position of tracheostomy tube, right brachial PICC and ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',44,' Dobbhoff feeding tube. ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',45,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',46,' Dictated and Electronically Signed by: Robert Yung, MD ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',47,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',48,' Arial 4d ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',49,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',50,'Dictated Date and Time: 05/30/17 0702 ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',51,' ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',52,'Technologist: MARGARET THATCHER ')
    insert into #T(VisitID, ResultID, TextSeqID, TextLine) values('F0-B20170509055744665','492745',53,' ')

  • Your data in here appears to have a weak attempt at obfuscating your data. There is too much real information in here. Real doctors, hospitals that are vaguely disguised. Makes me wonder if the account numbers are as easy to figure out. I would strongly urge you to not post sensitive information (birthdates etc...).

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Sounds like you need to put a rectangle on your report and then you can put the textboxes inside of it. That way, you can arrange them like you can on Access forms.  (HIPPA is serious stuff. Don't post anything that could be PII. You can get sued for that.)

  • pietlinden - Wednesday, May 31, 2017 2:50 PM

    Sounds like you need to put a rectangle on your report and then you can put the textboxes inside of it. That way, you can arrange them like you can on Access forms.  (HIPPA is serious stuff. Don't post anything that could be PII. You can get sued for that.)

    Yeah, very serious stuff - I've heard of $1M fines.  Don't post either type of PII - direct or indirect.

  • I used to work at a company that did healthcare data reporting.  I was stupefied when I found full names, birthdates and SSNs in the database. Went straight to the company's internal attorney. Just an accident waiting to happen and cost a boatload of money.

  • I'm very aware of HIPAA. None of the identifiers are real and can not be traced back to any patient but, thanks for feedback.

  • I found a solution.

  • NineIron - Thursday, June 1, 2017 5:30 AM

    I found a solution.

    Could you post your solution so people with the same problem in the future can try it for themselves?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • I added this line to the where clause, "and TextLine<>''. Then, used a subreport for the chest x-ray result.

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply