Results 1 to 12 of 12
  1. #1
    mkfloque is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    24

    Need help finding "New" patients

    Hello All.
    "New" patients are patients that weren't present the prior day. I'm needing a query to show how many patients were NEW on each day [each patient listed once for each service date]. Also, some patients will have multiple visits.

    All advice appreciated, thanks .

    Pt Name & Date/MAINAuto IDpt namedate,1smith1/1/20122smith1/2/20123smith1/3/20124jones1/3/20125jones1/4/20126jones1/5/20127garza1/2/20128garza1/3/20129garza1/4/201210garza1/5/201211smith2/2/201212smith2/3/201213smith2/4/201214smith4/16/201215smith4/17/2012

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    You haven't given much information, but something like this might be what you need:

    Select Patient_ID from Visit_Table where Visit_Date = Date() and Patient_ID not in (Select Patient_ID from Visit_Table where Visit_Date = date()-1)

    This list the patients who are here today, but were not there the previous day. If they were there two days ago but not yesterday, they will be in the list.

    One potiential difficulty with this, though: what about weekends and holidays?

    John

  3. #3
    mkfloque is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    24
    thank you John G. I'll try this. Fortunately, weekends & holidays won't matter.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    Also, please show your tables and relationships.

  5. #5
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    Are you talking about Inpatients or outpatients. I am presuming Inpatients because it shouldn't matter for outpatients you would need each visit even if they came 2 days in a row.

    So I would use the following

    Select patient Information Where admit date = today

  6. #6
    mkfloque is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    24

    here's my test table

    Hello again all,

    Here's my test table. Each patient is listed once for each service date. These are INpatients.
    There's no "admit date" and "discharge date" columns

    As you'll see, Smith had multiple visits; i'm needing to know the first date of each visit (visit=consecutive dates with [no gaps] ).

    The end query should give me # of new patients for each given day (example: 1/3/12 has 1 new patient).


    Thanks again,
    M

  7. #7
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    So If Patient Sam is admitted on June 1, 2011 and Discharged June 10, 2011 He has 10 Records???

  8. #8
    mkfloque is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    24
    Yes; Sam would have 10 records

  9. #9
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    I suggest that you need to rethink your database design. If Sam is admitted on June 1 and discharged on June 10, then that is ONE visit, not 10. Is there a reason why you have to one record for each day? If it is to track things that affect Sam during his 10-day stay, then your structure IS wrong, which is why you are having difficulty.

    Please tell us more about what you are trying to do.

    John

  10. #10
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    In that case John G's suggestion will probably work for you. Although I wish you luck if you ever have to calculate length of Stay. That would be a nightmare in that database.

  11. #11
    mkfloque is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    24
    Actually, the data is imported from "EPIC", the program the hospital uses. EPIC lists each service date on a separate line. It's unfortunate because i know how to find "new" and "total" patients when given an admit date & discharge date on the same line/record.

  12. #12
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    I've used Quadramed, Meditech and Cerner EPIC is the one I've never used. Although I suspect that EPIC has 2 tables 1 that lists the admit date and discharge date and a detail table that lists specific charges. For example,

    A Patient is admitted on june 1, 2011 and discharged June 10, 2011

    The master table will have 1 record with the patient, admit date and discharge date

    Then there's a detail table that will have 1 record per charge.

    June 1 Room Charge
    June 1 Lab Charge
    June 1 Radiology Charge
    June 2 Room Charge
    June 2 Lab Charge

    So you're getting the data from the detail table.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-04-2011, 02:45 AM
  2. Replies: 8
    Last Post: 08-05-2011, 02:55 PM
  3. Replies: 16
    Last Post: 07-22-2011, 09:23 AM
  4. "Group By" causes "ODBC--Call Failed" error
    By kaledev in forum Queries
    Replies: 1
    Last Post: 03-09-2011, 02:43 PM
  5. aSTR = Dir("C:\*.*") >> "Type Mismatch"
    By JGrant in forum Programming
    Replies: 1
    Last Post: 03-28-2009, 05:17 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums