J
johngl
This is another question about eliminating accounting entries in a
clinical database, yet retaining the valid record. Latest wrinkle is
being able to sum the visits to the doctor, and the units of services
received. Here's the problem: If a visit is wrongly coded, then a
reverse entry is made as follows.
PTID CODE UNITS
1 100 2
1 100 -2
1 110 2
This is actually one visit for code 110 and the patient received 2
units of service. Thanks to a member's advice, I used:
SELECT ptid, code, sum(units) AS unit
FROM PTDB
GROUP BY ptid, code
HAVING (((sum(units))<>0));
This gives me a correct unit of service (I checked manually), but I
still need a field with a count of 1 for the visit. Most reports focus
on the number of visits taken, not how long much time you spent in the
office. Is there a way to get both sum of units and count of visits?
This is pretty basic stuff to most people, but it's killing me. Thks.
clinical database, yet retaining the valid record. Latest wrinkle is
being able to sum the visits to the doctor, and the units of services
received. Here's the problem: If a visit is wrongly coded, then a
reverse entry is made as follows.
PTID CODE UNITS
1 100 2
1 100 -2
1 110 2
This is actually one visit for code 110 and the patient received 2
units of service. Thanks to a member's advice, I used:
SELECT ptid, code, sum(units) AS unit
FROM PTDB
GROUP BY ptid, code
HAVING (((sum(units))<>0));
This gives me a correct unit of service (I checked manually), but I
still need a field with a count of 1 for the visit. Most reports focus
on the number of visits taken, not how long much time you spent in the
office. Is there a way to get both sum of units and count of visits?
This is pretty basic stuff to most people, but it's killing me. Thks.