Hello Friends,
I have a question how to 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