Question Steven Henry Suhendra · Jan 13

Hy Friends,

I have a little problem, I need to diplay the data based on input status (first time and after)

this is the data:

and this what I need to display

the notes become new because it is the first time that the data has been inputed, and it will become old if we have the data before (2nd data, 3rd data  the notes will become old).

I've try to use SubQuery (with LAG Script also) but it doesn't works, because it will give a notes Old even it's a New Data

Does anyone could help me ?

Thank You

Best Regards,

Steven Henry

0
0 0
Question Steven Henry Suhendra · Dec 17, 2024

Hello my Friends,

I have a question, I have a data like this

And I want to create a display like this, which I can put a status column beside the Item Column

The status become new, if there's no previous item, and if there's a same item after the first one, the status become Old

Does anyone could help me ?

I need to display it without subquery if possible

Thank You

Best Regards,

Steven Henry

0
0 0
Question Steven Henry Suhendra · Dec 2, 2024

Hello My Friends,

I have a question how to use order by %DLIST, this is my code:

SELECT

$ListToString(%DLIST(DISTINCT MRDIA_ICDCode_DR->MRCID_Code),', ' ) ICDX,

$ListToString(%DLIST(DISTINCT (MRDIA_ICDCode_DR->MRCID_Desc || ' (' || MRDIA_DiagnosisType_DR->DTYP_Code || ')')),', ' ) Diagnose

FROM SQLUser.PA_Adm

LEFT JOIN SQLUser.PA_AdmInsurance ON (PAADM_RowID = INS_ParRef AND INS_Rank = 1)

LEFT JOIN SQLUser.PA_AdmPackage ON (PAADM_RowID = PACK_ParRef)

LEFT JOIN SQLUser.MR_Adm on MRADM_ADM_DR = PAADM_RowID

LEFT JOIN SQLUser.MR_Diagnos ON MRADM_RowId = MRDIA_MRADM_ParRef

0
0 0
Question Steven Henry Suhendra · Jun 5, 2024

Hy Friends,

I have a question, how to change multiple rows  into 1 row

This data already in the right order, but  I need to change the Diagnose into 1 column with this order 1,2,3,4

So it should be Acute...,Fever..., Dyspepsia, Dengue fever

Does anyone could help me ?

Thank You

Best Regards,

Steven Henry

0
0 0