Syntax help needed

Syntax help needed

Post by Joan » Thu, 03 Jul 2003 16:56:12



I am using looking at clients  the number of and hospital admissions
they may have had.  Many of the clients have numerous hospital
admissions that may be either:

 An admission on it s own
 Overlapping admissions
 Concurrent admissions
 Admissions within admissions.

I have rolled up the admissions so that any that are overlapping,
concurrent or admissions within admissions are now identified and now
look like this:

Admdate            Sepdate          Flag1     Flag2
30-JUN-1999     07-JUL-1999     1.00    .00
14-FEB-2000     19-FEB-2000     2.00    .00
16-MAR-2001     20-MAR-2001     3.00    .00
16-MAR-2001     03-APR-2001     3.00    1.00
28-AUG-2000     30-AUG-2000     1.00    .00
30-SEP-1999     12-OCT-1999     1.00    .00
30-SEP-1999     19-OCT-1999     1.00    1.00
30-SEP-1999     24-OCT-1999     1.00    1.00
29-APR-2000     06-MAY-2000     1.00    .00
06-JUN-2000     08-JUN-2000     2.00    .00
04-SEP-2000     13-SEP-2000     3.00    .00
04-SEP-2000     04-OCT-2000     3.00    1.00

In Flag 1, I have added a mobidity sequence with the number repeated
if the admission date is the same.  Flag2 is whre I have tried to flag
the final record for the admission period so that I can capture the
whole period of time in one record.

What I can t seem to do (with my limited skills of syntax) select the
appropriate record that encompasses the time period (4th record) and
also select any that are admissions on their own (the 1st and
2ndrecords)

I would be most grateful for any pointers

Joanna

 
 
 

Syntax help needed

Post by Rich Ulric » Sat, 05 Jul 2003 05:24:32




Quote:> I am using looking at clients  the number of and hospital admissions
> they may have had.  Many of the clients have numerous hospital
> admissions that may be either:

>  An admission on it s own
>  Overlapping admissions
>  Concurrent admissions
>  Admissions within admissions.

> I have rolled up the admissions so that any that are overlapping,
> concurrent or admissions within admissions are now identified and now
> look like this:

I am used to looking at data where one line represents
one fact that I am able to count.
If necessary, we have to invent new definitions so that
one fact can fit into exactly one category - "hospital admissions"
is a tricky thing here, too.  

Our administrators had to be taught, about 15 years ago,
that they *did*  need to create explicit definitions, in order
to produce an unambiguous count -- one which wouldn't be
at the mercy of some computer-programmer's  default
assumptions.

If you are going to use a computer to generate explicit
counts, you want explicit categories.

Quote:

> Admdate            Sepdate          Flag1     Flag2
> 30-JUN-1999        07-JUL-1999     1.00    .00
> 14-FEB-2000        19-FEB-2000     2.00    .00
> 16-MAR-2001        20-MAR-2001     3.00    .00
> 16-MAR-2001        03-APR-2001     3.00    1.00
> 28-AUG-2000        30-AUG-2000     1.00    .00
> 30-SEP-1999        12-OCT-1999     1.00    .00
> 30-SEP-1999        19-OCT-1999     1.00    1.00
> 30-SEP-1999        24-OCT-1999     1.00    1.00
> 29-APR-2000        06-MAY-2000     1.00    .00
> 06-JUN-2000        08-JUN-2000     2.00    .00
> 04-SEP-2000        13-SEP-2000     3.00    .00
> 04-SEP-2000        04-OCT-2000     3.00    1.00

> In Flag 1, I have added a mobidity sequence with the number repeated
> if the admission date is the same.  Flag2 is whre I have tried to flag
> the final record for the admission period so that I can capture the
> whole period of time in one record.

Does each line, above, represent (already) some
sort of aggregation?

I expect to see a line that has a Patient ID number,
and an "event".   Further information might exist
when the record is collected, but it is of a nature that
it also can be confirmed by comparing what is
generated from earlier data --
  Admission.  (noting perhaps, if 'already admitted'?)
  Separation. (noting perhaps, if 'still active for
some admission'?)

Quote:

> What I can t seem to do (with my limited skills of syntax) select the
> appropriate record that encompasses the time period (4th record) and
> also select any that are admissions on their own (the 1st and
> 2ndrecords)

I can't tell what the above record is supposed to
represent, but on the quickest look, the full set does not
seem to be limited to one person.  But the context, above,
emphasizes that there are multiple entries for each one.

That makes the full set rather unintelligible, since each line
does not identify *which* Person by means of an ID number.

That's all I can make of it.

--

http://www.pitt.edu/~wpilib/index.html
"Taxes are the price we pay for civilization."  Justice Holmes.

 
 
 

Syntax help needed

Post by Joan » Sat, 05 Jul 2003 10:58:25


My apologies.  I completely ommitted the ID by error.  The revised
data is as follows:
ID              Admdate            Sepdate          Flag1     Flag2
1               30-JUN-1999     07-JUL-1999     1.00    .00
1               14-FEB-2000     19-FEB-2000     2.00    .00
1               16-MAR-2001     20-MAR-2001     3.00    .00
1               16-MAR-2001     03-APR-2001     3.00    1.00
2               28-AUG-2000     30-AUG-2000     1.00    .00
3               30-SEP-1999     12-OCT-1999     1.00    .00
3               30-SEP-1999     19-OCT-1999     1.00    1.00
3               30-SEP-1999     24-OCT-1999     1.00    1.00
4               29-APR-2000     06-MAY-2000     1.00    .00
4               06-JUN-2000     08-JUN-2000     2.00    .00
4               04-SEP-2000     13-SEP-2000     3.00    .00
4               04-SEP-2000     04-OCT-2000     3.00    1.00



> > I am using looking at clients  the number of and hospital admissions
> > they may have had.  Many of the clients have numerous hospital
> > admissions that may be either:

> >  An admission on it s own
> >  Overlapping admissions
> >  Concurrent admissions
> >  Admissions within admissions.

> > I have rolled up the admissions so that any that are overlapping,
> > concurrent or admissions within admissions are now identified and now
> > look like this:

> I am used to looking at data where one line represents
> one fact that I am able to count.
> If necessary, we have to invent new definitions so that
> one fact can fit into exactly one category - "hospital admissions"
> is a tricky thing here, too.  

> Our administrators had to be taught, about 15 years ago,
> that they *did*  need to create explicit definitions, in order
> to produce an unambiguous count -- one which wouldn't be
> at the mercy of some computer-programmer's  default
> assumptions.

> If you are going to use a computer to generate explicit
> counts, you want explicit categories.

> > Admdate            Sepdate          Flag1     Flag2
> > 30-JUN-1999   07-JUL-1999     1.00    .00
> > 14-FEB-2000   19-FEB-2000     2.00    .00
> > 16-MAR-2001   20-MAR-2001     3.00    .00
> > 16-MAR-2001   03-APR-2001     3.00    1.00
> > 28-AUG-2000   30-AUG-2000     1.00    .00
> > 30-SEP-1999   12-OCT-1999     1.00    .00
> > 30-SEP-1999   19-OCT-1999     1.00    1.00
> > 30-SEP-1999   24-OCT-1999     1.00    1.00
> > 29-APR-2000   06-MAY-2000     1.00    .00
> > 06-JUN-2000   08-JUN-2000     2.00    .00
> > 04-SEP-2000   13-SEP-2000     3.00    .00
> > 04-SEP-2000   04-OCT-2000     3.00    1.00

> > In Flag 1, I have added a mobidity sequence with the number repeated
> > if the admission date is the same.  Flag2 is whre I have tried to flag
> > the final record for the admission period so that I can capture the
> > whole period of time in one record.

> Does each line, above, represent (already) some
> sort of aggregation?

> I expect to see a line that has a Patient ID number,
> and an "event".   Further information might exist
> when the record is collected, but it is of a nature that
> it also can be confirmed by comparing what is
> generated from earlier data --
>   Admission.  (noting perhaps, if 'already admitted'?)
>   Separation. (noting perhaps, if 'still active for
> some admission'?)

> > What I can t seem to do (with my limited skills of syntax) select the
> > appropriate record that encompasses the time period (4th record) and
> > also select any that are admissions on their own (the 1st and
> > 2ndrecords)

> I can't tell what the above record is supposed to
> represent, but on the quickest look, the full set does not
> seem to be limited to one person.  But the context, above,
> emphasizes that there are multiple entries for each one.

> That makes the full set rather unintelligible, since each line
> does not identify *which* Person by means of an ID number.

> That's all I can make of it.

 
 
 

Syntax help needed

Post by Rich Ulric » Tue, 08 Jul 2003 06:02:15




Quote:> My apologies.  I completely ommitted the ID by error.  The revised
> data is as follows:
> ID         Admdate            Sepdate          Flag1     Flag2
> 1          30-JUN-1999     07-JUL-1999     1.00    .00
> 1          14-FEB-2000     19-FEB-2000     2.00    .00
> 1          16-MAR-2001     20-MAR-2001     3.00    .00
> 1          16-MAR-2001     03-APR-2001     3.00    1.00
> 2          28-AUG-2000     30-AUG-2000     1.00    .00
> 3          30-SEP-1999     12-OCT-1999     1.00    .00
> 3          30-SEP-1999     19-OCT-1999     1.00    1.00
> 3          30-SEP-1999     24-OCT-1999     1.00    1.00
> 4          29-APR-2000     06-MAY-2000     1.00    .00
> 4          06-JUN-2000     08-JUN-2000     2.00    .00
> 4          04-SEP-2000     13-SEP-2000     3.00    .00
> 4          04-SEP-2000     04-OCT-2000     3.00    1.00

> [ snip, pieces of my original reply ]

> > > I am using looking at clients  the number of and hospital admissions
> > > they may have had.  Many of the clients have numerous hospital
> > > admissions that may be either:

> > >  An admission on it s own
> > >  Overlapping admissions
> > >  Concurrent admissions
> > >  Admissions within admissions.

> > > I have rolled up the admissions so that any that are overlapping,
> > > concurrent or admissions within admissions are now identified and now
> > > look like this:

[ snip, including original data]

Quote:

> > > In Flag 1, I have added a mobidity sequence with the number repeated
> > > if the admission date is the same.  Flag2 is whre I have tried to flag
> > > the final record for the admission period so that I can capture the
> > > whole period of time in one record.
 [ snip ]

> > > What I can t seem to do (with my limited skills of syntax) select the
> > > appropriate record that encompasses the time period (4th record) and
> > > also select any that are admissions on their own (the 1st and
> > > 2ndrecords)

Okay, see if I have this right.  The counter in Flag1  will be
the same when the  admDate is the same.
You want to select  
(all the occurrences where the Flag1/date  is unique), plus
(all the final occurrences of a date -- or else where Flag2 is 1).

I still have a problem with ID 3, where there are two sepDates,
but Flag2  is 1  both times.   Flag2  is supposed to flag  
"the final record  ... [to] capture the whole period"  but it is 1
for both.  But I think I can show how to do it either way.
The secret is that useful qualifier    /first=  or /last= .

/*  if this is not the order of the file, sort it now - .
Sort cases      by ID AdmDate (and/or Flag1?) Flag2 .
match files     file= * /last=lastF2 .
select if       (last eq1) .
/*     or, if you want all the flag2=1  lines... .
select if       (last eq1) or (flag2 eq 1).

--

http://www.pitt.edu/~wpilib/index.html
"Taxes are the price we pay for civilization."  Justice Holmes.

 
 
 

Syntax help needed

Post by Mousi » Tue, 08 Jul 2003 11:06:38


Thanks - I'll see how it goes when I get back to work tomorrow. Much
appreciated :)




Quote:> My apologies.  I completely ommitted the ID by error.  The revised
> data is as follows:
> ID Admdate            Sepdate          Flag1     Flag2
> 1 30-JUN-1999 07-JUL-1999 1.00 .00
> 1 14-FEB-2000 19-FEB-2000 2.00 .00
> 1 16-MAR-2001 20-MAR-2001 3.00 .00
> 1 16-MAR-2001 03-APR-2001 3.00 1.00
> 2 28-AUG-2000 30-AUG-2000 1.00 .00
> 3 30-SEP-1999 12-OCT-1999 1.00 .00
> 3 30-SEP-1999 19-OCT-1999 1.00 1.00
> 3 30-SEP-1999 24-OCT-1999 1.00 1.00
> 4 29-APR-2000 06-MAY-2000 1.00 .00
> 4 06-JUN-2000 08-JUN-2000 2.00 .00
> 4 04-SEP-2000 13-SEP-2000 3.00 .00
> 4 04-SEP-2000 04-OCT-2000 3.00 1.00

> [ snip, pieces of my original reply ]

> > > I am using looking at clients  the number of and hospital admissions
> > > they may have had.  Many of the clients have numerous hospital
> > > admissions that may be either:

> > >  An admission on it s own
> > >  Overlapping admissions
> > >  Concurrent admissions
> > >  Admissions within admissions.

> > > I have rolled up the admissions so that any that are overlapping,
> > > concurrent or admissions within admissions are now identified and now
> > > look like this:

[ snip, including original data]

Quote:

> > > In Flag 1, I have added a mobidity sequence with the number repeated
> > > if the admission date is the same.  Flag2 is whre I have tried to flag
> > > the final record for the admission period so that I can capture the
> > > whole period of time in one record.
 [ snip ]

> > > What I can t seem to do (with my limited skills of syntax) select the
> > > appropriate record that encompasses the time period (4th record) and
> > > also select any that are admissions on their own (the 1st and
> > > 2ndrecords)

Okay, see if I have this right.  The counter in Flag1  will be
the same when the  admDate is the same.
You want to select
(all the occurrences where the Flag1/date  is unique), plus
(all the final occurrences of a date -- or else where Flag2 is 1).

I still have a problem with ID 3, where there are two sepDates,
but Flag2  is 1  both times.   Flag2  is supposed to flag
"the final record  ... [to] capture the whole period"  but it is 1
for both.  But I think I can show how to do it either way.
The secret is that useful qualifier    /first=  or /last= .

/*  if this is not the order of the file, sort it now - .
Sort cases by ID AdmDate (and/or Flag1?) Flag2 .
match files file= * /last=lastF2 .
select if (last eq1) .
/*     or, if you want all the flag2=1  lines... .
select if (last eq1) or (flag2 eq 1).

--

http://www.pitt.edu/~wpilib/index.html
"Taxes are the price we pay for civilization."  Justice Holmes.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.495 / Virus Database: 294 - Release Date: 30/06/2003

 
 
 

1. gvim perl syntax help needed

Hi,

I am using gvim on a windows xp box to write some perl stuff.  I like to
have the syntax on for the color code, but I would like to modify the
indentation.

For example, if I type:
for ( my $i = 0; $i < 10; $i++ ) {

The carriage return after '{' autoindents using tabs.  How do I modify
either the perl.vim syntax or indent files so that autoindenting uses 2
or 3 spaces instead of tabs?  I looked through the files, but either I
turned the syntax completely off or it used the tabs.

Can someone tell me where to change this in which file or if there is a
shortcut to permanently set this from the vim command line?

Thanks!
B

2. Putting file name in banner pages

3. SQL syntax help needed

4. File lock by VS.NET

5. SPSS Syntax Help- need just a bit

6. Constraint violation & repair

7. help Needed: Bartlett test syntax...

8. frontpage98

9. need help: vim syntax highlighting colors on pc

10. Need help turning off Vim HTML italic syntax style

11. Need Serious Help with Vim :syntax on

12. VIM 5.5: Need help with syntax highlighting file

13. OLE Send, need syntax help.