Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Date Comparison in qualification

8 posts in General Discussion Last posting was on 2009-07-02 14:01:38.0Z
Aftab Posted on 2009-06-29 19:24:52.0Z
Sender: 7b2a.4a44e001.1804289383@sybase.com
From: Aftab
Newsgroups: sybase.public.impact
Subject: Date Comparison in qualification
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a491504.5455.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 29 Jun 2009 12:24:52 -0700
X-Trace: forums-3-dub.sybase.com 1246303492 10.22.241.188 (29 Jun 2009 12:24:52 -0700)
X-Original-Trace: 29 Jun 2009 12:24:52 -0700, forums-3-dub.sybase.com
Lines: 11
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.impact:2196
Article PK: 230272

Hi,

I need help to put a qualification on output object. The
qualification criteria is that I want to compare if
admission date (from inbound) is greater than two year from
current system date. Does anyone have example/custom
function?

Thanks

Aftab


Josh Posted on 2009-06-29 20:45:00.0Z
Sender: 1a78.4a43b20a.1804289383@sybase.com
From: Josh
Newsgroups: sybase.public.impact
Subject: Re: Date Comparison in qualification
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a4927cc.6375.1681692777@sybase.com>
References: <4a491504.5455.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 29 Jun 2009 13:45:00 -0700
X-Trace: forums-3-dub.sybase.com 1246308300 10.22.241.188 (29 Jun 2009 13:45:00 -0700)
X-Original-Trace: 29 Jun 2009 13:45:00 -0700, forums-3-dub.sybase.com
Lines: 4
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.impact:2197
Article PK: 230273

blob bT = "20021030";
fmtAge(&bT , '2' , "%D");

bT now contains the age in days from Oct 30th 2002.


Aftab Posted on 2009-06-30 20:38:44.0Z
Sender: 7b2a.4a44e001.1804289383@sybase.com
From: Aftab
Newsgroups: sybase.public.impact
Subject: Re: Date Comparison in qualification
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a4a77d4.763c.1681692777@sybase.com>
References: <4a4927cc.6375.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 30 Jun 2009 13:38:44 -0700
X-Trace: forums-3-dub.sybase.com 1246394324 10.22.241.188 (30 Jun 2009 13:38:44 -0700)
X-Original-Trace: 30 Jun 2009 13:38:44 -0700, forums-3-dub.sybase.com
Lines: 25
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.impact:2199
Article PK: 230275

Thanks for the help.

I tried the code in qualification function and it works if
the comparsion operator is == it did not woth when
comparison operator is > (greater than). Here is code where
ADDT is datalinks

fmtAge(&ADDT , '2' , "%D");


if(ADDT>730)
{
return 1;
}
else
{
return 0;
}

Aftab

> blob bT = "20021030";
> fmtAge(&bT , '2' , "%D");
>
> bT now contains the age in days from Oct 30th 2002.


Josh Posted on 2009-07-01 13:59:12.0Z
Sender: 6512.4a4929b8.1804289383@sybase.com
From: Josh
Newsgroups: sybase.public.impact
Subject: Re: Date Comparison in qualification
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a4b6bb0.29f9.1681692777@sybase.com>
References: <4a4a77d4.763c.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 1 Jul 2009 06:59:12 -0700
X-Trace: forums-3-dub.sybase.com 1246456752 10.22.241.188 (1 Jul 2009 06:59:12 -0700)
X-Original-Trace: 1 Jul 2009 06:59:12 -0700, forums-3-dub.sybase.com
Lines: 28
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.impact:2201
Article PK: 230278

Convert the blob to an int then do the > comparison.

> Thanks for the help.
>
> I tried the code in qualification function and it works if
> the comparsion operator is == it did not woth when
> comparison operator is > (greater than). Here is code
> where ADDT is datalinks
>
> fmtAge(&ADDT , '2' , "%D");
>
>
> if(ADDT>730)
> {
> return 1;
> }
> else
> {
> return 0;
> }
>
> Aftab
>
> > blob bT = "20021030";
> > fmtAge(&bT , '2' , "%D");
> >
> > bT now contains the age in days from Oct 30th 2002.


Aftab Posted on 2009-07-02 00:24:36.0Z
Sender: 7b2a.4a44e001.1804289383@sybase.com
From: Aftab
Newsgroups: sybase.public.impact
Subject: Re: Date Comparison in qualification
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a4bfe44.19d1.1681692777@sybase.com>
References: <4a4b6bb0.29f9.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 1 Jul 2009 17:24:36 -0700
X-Trace: forums-3-dub.sybase.com 1246494276 10.22.241.188 (1 Jul 2009 17:24:36 -0700)
X-Original-Trace: 1 Jul 2009 17:24:36 -0700, forums-3-dub.sybase.com
Lines: 36
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.impact:2202
Article PK: 230279

Thanks Josh for the help.

It only calculate the days if the date is within two years.
If it is greater than two years it only returns the same
date.

Waht is '2' stand for in fmtAge function.

> Convert the blob to an int then do the > comparison.
>
>
> > Thanks for the help.
> >
> > I tried the code in qualification function and it works
> > if the comparsion operator is == it did not woth when
> > comparison operator is > (greater than). Here is code
> > where ADDT is datalinks
> >
> > fmtAge(&ADDT , '2' , "%D");
> >
> >
> > if(ADDT>730)
> > {
> > return 1;
> > }
> > else
> > {
> > return 0;
> > }
> >
> > Aftab
> >
> > > blob bT = "20021030";
> > > fmtAge(&bT , '2' , "%D");
> > >
> > > bT now contains the age in days from Oct 30th 2002.


Aftab Posted on 2009-07-02 14:01:38.0Z
Sender: 19fe.4a4bfe67.1804289383@sybase.com
From: Aftab
Newsgroups: sybase.public.impact
Subject: Re: Date Comparison in qualification
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a4cbdc2.3c0c.1681692777@sybase.com>
References: <4a4bfe44.19d1.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 2 Jul 2009 07:01:38 -0700
X-Trace: forums-3-dub.sybase.com 1246543298 10.22.241.188 (2 Jul 2009 07:01:38 -0700)
X-Original-Trace: 2 Jul 2009 07:01:38 -0700, forums-3-dub.sybase.com
Lines: 38
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.impact:2203
Article PK: 230281

Thanks Josh for the help.

It is working.

>
> It only calculate the days if the date is within two
> years. If it is greater than two years it only returns the
> same date.
>
> Waht is '2' stand for in fmtAge function.
>
> > Convert the blob to an int then do the > comparison.
> >
> >
> > > Thanks for the help.
> > >
> > > I tried the code in qualification function and it
> > > works if the comparsion operator is == it did not woth
> > > when comparison operator is > (greater than). Here is
> > > code where ADDT is datalinks
> > >
> > > fmtAge(&ADDT , '2' , "%D");
> > >
> > >
> > > if(ADDT>730)
> > > {
> > > return 1;
> > > }
> > > else
> > > {
> > > return 0;
> > > }
> > >
> > > Aftab
> > >
> > > > blob bT = "20021030";
> > > > fmtAge(&bT , '2' , "%D");
> > > >
> > > > bT now contains the age in days from Oct 30th 2002.


chris Posted on 2009-06-30 20:13:53.0Z
Sender: 49d8.4a37d09b.1804289383@sybase.com
From: Chris
Newsgroups: sybase.public.impact
Subject: Re: Date Comparison in qualification
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a4a7201.7213.1681692777@sybase.com>
References: <4a491504.5455.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 30 Jun 2009 13:13:53 -0700
X-Trace: forums-3-dub.sybase.com 1246392833 10.22.241.188 (30 Jun 2009 13:13:53 -0700)
X-Original-Trace: 30 Jun 2009 13:13:53 -0700, forums-3-dub.sybase.com
Lines: 39
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.impact:2198
Article PK: 230276

I need some more details

but, I think if you want the current system date ...
you can use something like:

fmtCurrDate(&blbTemp,'\000',"%H:%M:%S ");

this will put something like 12:31:12 in the blob "blbTemp"

you can use a different argument like "%Y" to get the year..
then store it in a string .. and compare that string (or
portion thereof) to the string that you want to check -
"admission date"


With HL7 sometimes the best way for date checking is to use
the date in the "MSH" to compare to the one in the "PV1"

that way the message will always work the same way - if
resent during another year...

I'm not quite sure what you are trying to do ..
is this a batch load of historic data?
otherwise transactions in realtime environments shouldn't
have old admission dates....

> Hi,
>
> I need help to put a qualification on output object. The
> qualification criteria is that I want to compare if
> admission date (from inbound) is greater than two year
> from current system date. Does anyone have example/custom
> function?
>
> Thanks
>
> Aftab


Aftab Posted on 2009-06-30 20:42:58.0Z
Sender: 7b2a.4a44e001.1804289383@sybase.com
From: Aftab
Newsgroups: sybase.public.impact
Subject: Re: Date Comparison in qualification
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a4a78d2.770b.1681692777@sybase.com>
References: <4a4a7201.7213.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 30 Jun 2009 13:42:58 -0700
X-Trace: forums-3-dub.sybase.com 1246394578 10.22.241.188 (30 Jun 2009 13:42:58 -0700)
X-Original-Trace: 30 Jun 2009 13:42:58 -0700, forums-3-dub.sybase.com
Lines: 51
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.impact:2200
Article PK: 230277

One of our application purge the visit which are older than
two years. User thinks that if they want an old visit they
will generate an update in ADT application and interface
engine will convert the transaction into admission otherwise
just treat as regular update.

Thanks

Aftab

> I need some more details
>
> but, I think if you want the current system date ...
> you can use something like:
>
> fmtCurrDate(&blbTemp,'\000',"%H:%M:%S ");
>
> this will put something like 12:31:12 in the blob
> "blbTemp"
>
> you can use a different argument like "%Y" to get the
> year.. then store it in a string .. and compare that
> string (or portion thereof) to the string that you want to
> check - "admission date"
>
>
> With HL7 sometimes the best way for date checking is to
> use the date in the "MSH" to compare to the one in the
> "PV1"
>
> that way the message will always work the same way - if
> resent during another year...
>
> I'm not quite sure what you are trying to do ..
> is this a batch load of historic data?
> otherwise transactions in realtime environments shouldn't
> have old admission dates....
>
>
>
> > Hi,
> >
> > I need help to put a qualification on output object. The
> > qualification criteria is that I want to compare if
> > admission date (from inbound) is greater than two year
> > from current system date. Does anyone have
> > example/custom function?
> >
> > Thanks
> >
> > Aftab