Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Create a Status Column

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Create a Status Column
 Login/Join
 
Master
posted
I have modified a fex that creates a column (VNT_EVNT) to indicate whether
a patient has been off a ventilator long enough to qualify as a separate ventilation
event. Basically, if a patient is off the Vent GE 48 hours then they are on a NEW
event. Otherwise, the patient is on the same event.

I am having a problem assigning a status of FINL to a patient who has come off
the ventilator for reasons other than being an ORGAN DONOR. Re: A patient
may also end ventilation because of mortality.

Below is the code and a sample of my output:
CODE:
[
DEFINE FILE HSPAT_ENC_HSP
LRCDTIME/HYYMDS = LAST RECORDED_TIME;
TST_LRCDTM/A20 = HCNVRT(LRCDTIME, '(HYYMDS)', 20, 'A20');
TST_RCDTM1/A20 = HCNVRT(RECORDED_TIME, '(HYYMDS)', 20, 'A20');
RCD_TIME_DIFF/D12.2 = HDIFF(RECORDED_TIME,LRCDTIME,'MINUTE','D12.2');
RCD_TIME_HRS/D12.2 = RCD_TIME_DIFF/60;
VENT_FLAG/A1 = IF PAT_ID EQ LAST PAT_ID
AND MEAS_VALUE EQ 'COMPLETED'
AND FLO_DIS_NAME EQ 'EXTUBATION' THEN '1' ELSE '0';
-*
DONR_FLAG/A1 = IF PAT_ID EQ LAST PAT_ID
AND MEAS_VALUE EQ 'Withdraw-WithdrawnOrgDonor-Organ Donor'
AND FLO_DIS_NAME EQ 'Reason Vent Discontinued' THEN '1' ELSE '0';
-*
VENT_EVNT/A4 = IF VENT_FLAG EQ '1' AND RCD_TIME_HRS GE 48 THEN 'NEW '
ELSE IF PAT_ID NE LAST PAT_ID THEN 'NEW*'
ELSE IF DONR_FLAG EQ '1' THEN 'FINL'
ELSE IF PAT_ID EQ LAST PAT_ID AND VENT_FLAG EQ '1'

THEN 'FINL'
ELSE 'SAME';
END
-*
TABLE FILE HSPAT_ENC_HSP
HEADING CENTER
"Test Report"
"Patients Intubated"
"in MICU"
PRINT
BILL_NUM AS 'EDP#'
PAT_NAME AS 'PAT NAME'
ADMISSION_PROV_ID AS 'ADMIT,DR. '
MEAS_VALUE AS 'MEAS ,VALUE'
FLO_DIS_NAME AS 'FS ENTRY'
RECORDED_TIME AS 'RECORD_TIME'
RCD_TIME_HRS AS 'REC,TIME,HRS'
VENT_FLAG AS 'VNT,FLAG'
VENT_EVNT AS 'VNT,EVNT'
BY PAT_ID SKIP-LINE AS 'MRNO'
BY BILL_NUM NOPRINT
BY RECORDED_TIME NOPRINT
WHERE FLO_MEAS_ID EQ '380343' OR '380353' OR '380512'
OR '380166' OR '380508' OR '380276'
OR '380277' ;
WHERE DEPARTMENT_NAME EQ 'MICU';
WHERE ENTRY_TIME FROM DT(&BEG1 00:00:00) TO DT(&END1 23:59:59);
WHERE HOSP_ADMSN_TIME LE DT(&BEG1 00:00:00);
ON TABLE PCHOLD FORMAT EXL2K
END
-RUN
-EXIT
]

OUTPUT:
[
MRNO PAT NAME MEAS VALUE FS ENTRY Recorded Time VFLG VNT EVNT
123456 Smith,Carly A Weaned Reason Vent Disc 2007/10/01 18:05:00 0 Same
123456 Smith,Carly A Completed $ Extubation 2007/10/10 18:08:00 0 Same
123456 Smith,Carly A On $ Vent Daily Charge 2007/10/11 00:14:00 0 Same
123456 Smith,Carly A On $ Vent Daily Charge 2007/10/11 05:09:00 0 Same
123456 Smith,Carly A On $ Vent Daily Charge 2007/10/11 08:52:00 0 Same
123456 Smith,Carly A On $ Vent Daily Charge 2007/10/12 08:07:00 0 Same
123456 Smith,Carly A Completed $ Extubation 2007/10/01 08:37:00 0 Same
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
654321 Taylor,Annette S Weaned Reason Vent Disc 2007/10/01 18:05:00 0 Same
654321 Taylor,Annette S Completed $ Extubation 2007/10/10 18:08:00 0 Same
654321 Taylor,Annette S On $ Vent Dly Chrge 2007/10/11 00:14:00 0 Same
654321 Taylor,Annette S On $ Vent Dly Chrge 2007/10/11 05:09:00 0 Same
654321 Taylor,Annette S On $ Vent Dly Chrge 2007/10/11 08:52:00 0 Same
654321 Taylor,Annette S On $ Vent Daily Charge 2007/10/12 08:07:00 0 Same
654321 Taylor,Annette S Completed $ Extubation 2007/10/01 08:37:00 0 Same
654321 Taylor,Annette S Withdraw-WithdrawnOrgDonor 2007/10/12 08:07:00 0 Same
654321 Taylor,Annette S On $ Vent Daily Charge 2007/10/11 08:52:00 0 FINL
]

Can anyone help me see the error of my ways?

Thanks!
Red Face


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Virtuoso
posted Hide Post
hard to read -- use the < / > to add CODE tags, so as to display code and output in fixed font.

Your code tests for
MEAS_VALUE EQ 'COMPLETED'

while your data (in Smith's last row) shows a value of
Completed

Case is significant when testing strings for equality.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
You are correct, the data is actually stored in mixed case.
Therefore, COMPLETED is actually Completed,
EXTUBATION is actually Extubation, etc.

Below is the code and a sample of my output:
CODE:
<
DEFINE FILE HSPAT_ENC_HSP
LRCDTIME/HYYMDS = LAST RECORDED_TIME;
TST_LRCDTM/A20 = HCNVRT(LRCDTIME, '(HYYMDS)', 20, 'A20');
TST_RCDTM1/A20 = HCNVRT(RECORDED_TIME, '(HYYMDS)', 20, 'A20');
RCD_TIME_DIFF/D12.2 = HDIFF(RECORDED_TIME,LRCDTIME,'MINUTE','D12.2');
RCD_TIME_HRS/D12.2 = RCD_TIME_DIFF/60;
VENT_FLAG/A1 = IF PAT_ID EQ LAST PAT_ID
AND MEAS_VALUE EQ 'Completed'
AND FLO_DIS_NAME EQ 'Extubation' THEN '1' ELSE '0';
-*
DONR_FLAG/A1 = IF PAT_ID EQ LAST PAT_ID
AND MEAS_VALUE EQ 'Withdraw-WithdrawnOrgDonor-Organ Donor'
AND FLO_DIS_NAME EQ 'Reason Vent Discontinued' THEN '1' ELSE '0';
-*
VENT_EVNT/A4 = IF VENT_FLAG EQ '1' AND RCD_TIME_HRS GE 48 THEN 'NEW '
ELSE IF PAT_ID NE LAST PAT_ID THEN 'NEW*'
ELSE IF DONR_FLAG EQ '1' THEN 'FINL'
ELSE IF PAT_ID EQ LAST PAT_ID AND VENT_FLAG EQ '1'

THEN 'FINL'
ELSE 'SAME';
END
-*
TABLE FILE HSPAT_ENC_HSP
HEADING CENTER
"Test Report"
"Patients Intubated"
"in MICU"
PRINT
BILL_NUM AS 'EDP#'
PAT_NAME AS 'PAT NAME'
ADMISSION_PROV_ID AS 'ADMIT,DR. '
MEAS_VALUE AS 'MEAS ,VALUE'
FLO_DIS_NAME AS 'FS ENTRY'
RECORDED_TIME AS 'RECORD_TIME'
RCD_TIME_HRS AS 'REC,TIME,HRS'
VENT_FLAG AS 'VNT,FLAG'
VENT_EVNT AS 'VNT,EVNT'
BY PAT_ID SKIP-LINE AS 'MRNO'
BY BILL_NUM NOPRINT
BY RECORDED_TIME NOPRINT
WHERE FLO_MEAS_ID EQ '380343' OR '380353' OR '380512'
OR '380166' OR '380508' OR '380276'
OR '380277' ;
WHERE DEPARTMENT_NAME EQ 'MICU';
WHERE ENTRY_TIME FROM DT(&BEG1 00:00:00) TO DT(&END1 23:59:59);
WHERE HOSP_ADMSN_TIME LE DT(&BEG1 00:00:00);
ON TABLE PCHOLD FORMAT EXL2K
END
-RUN
-EXIT
>

OUTPUT:
<
MRNO PAT NAME MEAS VALUE FS ENTRY Recorded Time VFLG VNT EVNT
123456 Smith,Carly A Weaned Reason Vent Disc 2007/10/01 18:05:00 0 Same
123456 Smith,Carly A Completed $ Extubation 2007/10/10 18:08:00 0 Same
123456 Smith,Carly A On $ Vent Daily Charge 2007/10/11 00:14:00 0 Same
123456 Smith,Carly A On $ Vent Daily Charge 2007/10/11 05:09:00 0 Same
123456 Smith,Carly A On $ Vent Daily Charge 2007/10/11 08:52:00 0 Same
123456 Smith,Carly A On $ Vent Daily Charge 2007/10/12 08:07:00 0 Same
123456 Smith,Carly A Completed $ Extubation 2007/10/01 08:37:00 0 Same
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
654321 Taylor,Annette S Weaned Reason Vent Disc 2007/10/01 18:05:00 0 Same
654321 Taylor,Annette S Completed $ Extubation 2007/10/10 18:08:00 0 Same
654321 Taylor,Annette S On $ Vent Dly Chrge 2007/10/11 00:14:00 0 Same
654321 Taylor,Annette S On $ Vent Dly Chrge 2007/10/11 05:09:00 0 Same
654321 Taylor,Annette S On $ Vent Dly Chrge 2007/10/11 08:52:00 0 Same
654321 Taylor,Annette S On $ Vent Daily Charge 2007/10/12 08:07:00 0 Same
654321 Taylor,Annette S Completed $ Extubation 2007/10/01 08:37:00 0 Same
654321 Taylor,Annette S Withdraw-WithdrawnOrgDonor 2007/10/12 08:07:00 0 Same
654321 Taylor,Annette S On $ Vent Daily Charge 2007/10/11 08:52:00 0 FINL
>

Thanks!


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
<JG>
posted
123456 Smith,Carly A On $ Vent Daily Charge 2007/10/12 08:07:00 0 Same
123456 Smith,Carly A Completed $ Extubation 2007/10/01 08:37:00 0 Same


Not being able to see the input data it's very difficult to say
however based on the output your data is not sorted correctly.
 
Report This Post
Expert
posted Hide Post
Tom,

You're really not helping us to help you! You say that the lower portion of your post is your "ouptut" but your table request has an "ADMIT,DR." column which doesn't appear in your "output".

Also, take note of what Jack has mentioned, put your code between [ code] and [/code] tags or use the icon marked </> so that your spacing is retained - particularly in your "output".

Also the sample input with an MFD would help as the "output" doesn't give much in the way of being able to discern the input and it's formatting!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Master
posted Hide Post
For reasons of convenience for the reader and confidentiality of
my employer, the fex code posted earlier included several fields
EDP#
ADMIT DR.
REC TIME HRS
which did not display in the output sample. I have elminated those
fields from the code posted below.

Code:
-SET &ECHO=ALL;
-*
-MRNOEDIT -INCLUDE APPDEF
-RUN
-*
-SET &BEG1 = '20071001';
-SET &END1 = '20080930';
-*
DEFINE FILE HSPAT_ENC_HSP
LRCDTIME/HYYMDS = LAST RECORDED_TIME;
TST_LRCDTM/A20  = HCNVRT(LRCDTIME, '(HYYMDS)', 20, 'A20');
TST_RCDTM1/A20  = HCNVRT(RECORDED_TIME, '(HYYMDS)', 20, 'A20');
RCD_TIME_DIFF/D12.2 = HDIFF(RECORDED_TIME,LRCDTIME,'MINUTE','D12.2');
RCD_TIME_HRS/D12.2 = RCD_TIME_DIFF/60;
VENT_FLAG/A1 = IF PAT_ID EQ LAST PAT_ID 
                 AND MEAS_VALUE EQ 'COMPLETED' 
                 AND FLO_DIS_NAME EQ 'EXTUBATION' THEN '1' ELSE '0';
-*
DONR_FLAG/A1 = IF PAT_ID EQ LAST PAT_ID 
                 AND MEAS_VALUE EQ 'Withdraw-WithdrawnOrgDonor-Organ Donor' 
                 AND FLO_DIS_NAME EQ 'Reason Vent Discontinued' THEN '1' ELSE '0';
-*
VENT_EVNT/A4 = IF VENT_FLAG EQ '1' AND RCD_TIME_HRS GE 48 THEN 'NEW ' 
                 ELSE IF PAT_ID NE LAST PAT_ID THEN 'NEW*' 
				 ELSE IF DONR_FLAG EQ '1' THEN 'FINL' 
				 ELSE IF PAT_ID EQ LAST PAT_ID AND VENT_FLAG EQ '1' 

 				 THEN 'FINL'
				 ELSE 'SAME';
END
-*
TABLE FILE HSPAT_ENC_HSP
HEADING CENTER
"Test Report"
"Patients Intubated"
"in MICU"
PRINT
PAT_NAME          AS 'PAT NAME'
MEAS_VALUE        AS 'MEAS ,VALUE'
FLO_DIS_NAME      AS 'FS ENTRY'
RECORDED_TIME     AS 'RECORD_TIME'
VENT_FLAG         AS 'VNT,FLAG'
VENT_EVNT         AS 'VNT,EVNT'
BY PAT_ID SKIP-LINE AS 'MRNO'
BY BILL_NUM NOPRINT
BY RECORDED_TIME NOPRINT
WHERE FLO_MEAS_ID EQ '380343' OR '380353' OR '380512'
                                          OR '380166' OR '380508' OR '380276'
                                          OR '380277' ;
WHERE DEPARTMENT_NAME EQ 'MICU';
WHERE ENTRY_TIME FROM DT(&BEG1 00:00:00) TO DT(&END1 23:59:59);
WHERE HOSP_ADMSN_TIME LE DT(&BEG1 00:00:00);
ON TABLE PCHOLD FORMAT EXL2K
END
-RUN
-EXIT 


NOTE: There are mulitple records for each patient because their time on the ventilator
is monitored for health status and billing purposes (per the RECORDED_TIME field).

Output:
123456 Smith,Carly A   Weaned        Reason Vent Disc          2007/10/01 18:05:00 0 Same
123456 Smith,Carly A Completed            $ Extubation            2007/10/10 18:08:00 0 Same
123456 Smith,Carly A       On           $ Vent Daily Charge       2007/10/11 00:14:00 0 Same
123456 Smith,Carly A       On           $ Vent Daily Charge       2007/10/11 05:09:00 0 Same
123456 Smith,Carly A       On           $ Vent Daily Charge       2007/10/11 08:52:00 0 Same
123456 Smith,Carly A       On           $ Vent Daily Charge       2007/10/12 08:07:00 0 Same
123456 Smith,Carly A Completed          $ Extubation              2007/10/01 08:37:00 0 Same
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
654321 Taylor,Annette S   Weaned    Reason Vent Disc          2007/10/01 18:05:00 0 Same
654321 Taylor,Annette S Completed      $ Extubation              2007/10/10 18:08:00 0 Same
654321 Taylor,Annette S    On           $ Vent Dly Chrge          2007/10/11 00:14:00 0 Same
654321 Taylor,Annette S    On           $ Vent Dly Chrge          2007/10/11 05:09:00 0 Same
654321 Taylor,Annette S    On           $ Vent Dly Chrge          2007/10/11 08:52:00 0 Same
654321 Taylor,Annette S    On           $ Vent Daily Charge      2007/10/12 08:07:00 0 Same
654321 Taylor,Annette S Completed     $ Extubation               2007/10/01 08:37:00 0 Same
654321 Taylor,Annette S Withdraw-WithdrawnOrgDonor       2007/10/12 08:07:00 0 Same
654321 Taylor,Annette S   On           $ Vent Daily Charge       2007/10/12 08:52:00 0 FINL  


Thanks! Big Grin


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Master
posted Hide Post
I have repaired some of the 'Glaring' errors that I did not see earlier this week

DEFINE FILE HSPAT_ENC_HSP
LRCDTIME/HYYMDS = LAST RECORDED_TIME;
TST_LRCDTM/A20 = HCNVRT(LRCDTIME, '(HYYMDS)', 20, 'A20');
TST_RCDTM1/A20 = HCNVRT(RECORDED_TIME, '(HYYMDS)', 20, 'A20');
RCD_TIME_DIFF/D12.2 = HDIFF(RECORDED_TIME,LRCDTIME,'MINUTE','D12.2');
RCD_TIME_HRS/D12.2 = RCD_TIME_DIFF/60;

VENT_FLAG/A1 = IF PAT_ID EQ LAST PAT_ID
AND MEAS_VALUE EQ 'Completed'
AND LAST MEAS_VALUE EQ 'Weaned'
AND FLO_DIS_NAME EQ '$ Extubation'
AND LAST FLO_DIS_NAME EQ 'Reason Vent Discontinued' THEN '1'
ELSE IF PAT_ID EQ LAST PAT_ID
AND MEAS_VALUE EQ 'Completed'
AND LAST MEAS_VALUE EQ 'On'
AND FLO_DIS_NAME EQ '$ Extubation'
AND LAST FLO_DIS_NAME EQ '$ Vent Daily Charge' THEN '2'
ELSE IF PAT_ID EQ LAST PAT_ID
AND MEAS_VALUE EQ 'Completed'
AND LAST MEAS_VALUE EQ 'D/Cd'
AND FLO_DIS_NAME EQ '$ Extubation'
AND LAST FLO_DIS_NAME EQ '$ Vent Daily Charge' THEN '3'
ELSE ' ';
DONR_FLAG/A1 = IF PAT_ID EQ LAST PAT_ID
AND MEAS_VALUE EQ 'Withdraw-WithdrawnOrgDonor-Organ Donor'
AND LAST MEAS_VALUE EQ 'Completed'
AND FLO_DIS_NAME EQ 'Reason Vent Discontinued'
AND LAST FLO_DIS_NAME EQ '$ Extubation'
THEN '1' ELSE '0';
VENT_EVNT/A4 = IF VENT_FLAG EQ '1' AND RCD_TIME_HRS GE 48 THEN 'NEW '
ELSE IF PAT_ID NE LAST PAT_ID THEN 'NEW*'
ELSE IF DONR_FLAG EQ '1' AND LAST VENT_FLAG EQ '3' THEN 'FINL'
ELSE IF DONR_FLAG EQ '1' AND LAST VENT_FLAG EQ '2' THEN 'FINL'
ELSE IF VENT_FLAG EQ '2' AND DONR_FLAG EQ '0' THEN 'FINL'
ELSE '';
END
-*

TABLE FILE HSPAT_ENC_HSP
HEADING CENTER
"Test Report"
"Patients Intubated"
"in MICU"
-*
PRINT
BILL_NUM
PAT_NAME
ADMISSION_PROV_ID
MEAS_VALUE
FLO_DIS_NAME
RECORDED_TIME
RCD_TIME_HRS
VENT_FLAG
DONR_FLAG
VENT_EVNT
BY PAT_ID
BY BILL_NUM NOPRINT
BY RECORDED_TIME NOPRINT
-* PAT_ID SUBHEAD
-*WHERE FLO_MEAS_ID EQ '380343' OR '380353' OR '380512'
OR '380166' OR '380508' OR '380276'
OR '380277' ;
WHERE DEPARTMENT_NAME EQ 'MICU';
WHERE ENTRY_TIME FROM DT(&BEG1 00:00:00) TO DT(&END1 23:59:59);
WHERE HOSP_ADMSN_TIME LE DT(&BEG1 00:00:00);
ON TABLE HOLD AS TUBES
END


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Virtuoso
posted Hide Post
Tomsweb

use your code tags for better readability...




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
Tom,

Again, you'r enot really helping us to help you. There are still columns in your report that do not exist in your output, meaning that we have no hope of discerning your input. If you want us to help you then we need sample input. We are not asking for confidential or sensitive data - any old data will do providing it follows the format of your input so that we can try and identify a possible way forward for you.

For instance, supply some sample code that allows us to build your sample input data such as this -
EX -LINES 9 EDAPUT MASTER,HSPAT_ENC_HSP,CF,MEM,FILENAME=HSPAT_ENC_HSP, SUFFIX=FOC,$
SEGNAME=ONE, SEGTYPE=S1 ,$
  FIELD=MRNO           ,PAT_ID       ,A6     ,A6     ,FIELDTYPE=I, $
  FIELD=PAT_NAME       ,             ,A30    ,A30    ,$
  FIELD=MEAS_VALUE     ,             ,A60    ,A60    ,$
  FIELD=FS_ENTRY       ,FLO_DIS_NAME ,A60    ,A60    ,$
  FIELD=RECORDED_TIME  ,             ,HYYMDS ,HYYMDS ,$
  FIELD=VFLG           ,             ,A30    ,A30    ,$
  FIELD=VNT_EVNT       ,             ,A30    ,A30    ,$
-RUN

CREATE FILE HSPAT_ENC_HSP
MODIFY FILE HSPAT_ENC_HSP
FREEFORM MRNO PAT_NAME MEAS_VALUE FS_ENTRY RECORDED_TIME VFLG VNT_EVNT
DATA
123456,Smith Carly A,Weaned,Reason Vent Discontinued,2007/10/01 18:05:00,0,Same,$
123456,Smith Carly A,Completed, Extubation,2007/10/10 18:08:00,0,Same,$
123456,Smith Carly A,On, Vent Daily Charge,2007/10/11 00:14:00,0,Same,$
123456,Smith Carly A,On, Vent Daily Charge,2007/10/11 05:09:00,0,Same,$
123456,Smith Carly A,On, Vent Daily Charge,2007/10/11 08:52:00,0,Same,$
123456,Smith Carly A,On, Vent Daily Charge,2007/10/12 08:07:00,0,Same,$
123456,Smith Carly A,Completed, Extubation,2007/10/01 08:37:00,0,Same,$
654321,Taylor Annette S,Weaned,Reason Vent Discontinued,2007/10/01 18:05:00,0,Same,$
654321,Taylor Annette S,Completed, Extubation,2007/10/10 18:08:00,0,Same,$
654321,Taylor Annette S,On, Vent Dly Chrge,2007/10/11 00:14:00,0,Same,$
654321,Taylor Annette S,On, Vent Dly Chrge,2007/10/11 05:09:00,0,Same,$
654321,Taylor Annette S,On, Vent Dly Chrge,2007/10/11 08:52:00,0,Same,$
654321,Taylor Annette S,On, Vent Daily Charge,2007/10/12 08:07:00,0,Same,$
654321,Taylor Annette S,Completed, Extubation,2007/10/01 08:37:00,0,Same,$
654321,Taylor Annette S,Withdraw,WithdrawnOrgDonor,2007/10/12 08:07:00,0,Same,$
654321,Taylor Annette S,On, Vent Daily Charge,2007/10/11 08:52:00,0,FINL,$
END
-RUN
Note that the intermediate dollar signs have been removed from your data as it would prematurely end the data input for the FREEFORM read.

If you want to move forward, then I would suggest that sample input data and MFD (.mas) is the bare minimum that we would require to help you.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Master
posted Hide Post
 
With all the holiday work gatherings, I am sorry
I have not been able to get to this posting. 

Below I have posted the data (VERY generic sample) I am working with:

REC #1 
3567 Jane   1C1  1C2    1C3   1C4   1DATE
                   1C21 1C22 1C32 1C42 1DATE2
                   1C31 1C32 1C33 1C33 1DATE3
                   1C41 1C42 1C43 1C44 1DATE4

REC #2 
8876 Mark  2C1   2C2   2C3   2C4   2DATE
                   2C11 2C12 2C32 2C42 2DATE1
                   2C31 2C32 2C33 2C43 2DATE2
                   2C41 2C42 2C43 2C44 2DATE3

REC #2 
8876 Ralph 3C1    3C2   3C3  3C4   3DATE
                   3C21 3C22 3C32 3C24 3DATE1
                   3C31 3C32 3C33 3C34 3DATE2
                   3C41 3C42 3C43 3C44 3DATE3
                   3C51 3C52 3C53 3C54 3DATE4

Bascially, I am struggling to create a report
which will print all the first and last rows of the data

I am trying to create a report like this

3567 Jane   X X X X  1DATE  1DATE4
8876 Mark Y Y Y Y  2DATE  2DATE4
5751 Ralph Z Z Z Z    3DATE  3DATE4

Thanks!
 


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Virtuoso
posted Hide Post
Tom

Is this a new issue?

What is the structure of you Database?
Can you post the MFD of this?

And I would suggest to post your questions and comment with the normal character set and the examples and codes between the
[code]codetags
[/code]




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Master
posted Hide Post
Frank and all,

I am sorry that I not getting this tag thing
as instructed... Sweating
When the Reply To: box opens, at the top right
corner there is a button with the icon.

When I made my last post with the '3567 Jane'
data, I put the entire text into these tags.

Is there something I should be doing differently?

And the most recent post has to do with getting
the start date of a data record and the last date
of a data group.

In reality, there are 8 joins done in the fex
prior to the table request to report on the start
and end date of a data group.

Thanks! Wink


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Virtuoso
posted Hide Post
Tom

It's rather easy. You want the first (fst) and last (lst) form a set. If your database is in the correct sequence you can say that....

TABLE FILE XXX
SUM 
FST.FIELDX AS 'first' 
LST.FIELDX AS 'last'
BY USERID
BY USERNAME
END


I hope this will help you...




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Create a Status Column

Copyright © 1996-2020 Information Builders