Hi Arnaud,

Thanks for your suggestion.

I have a great number of records so i have used this solution:

        ALL RECORDS([PATIENT])
        ORDER BY([PATIENT];[PATIENT]Surname;[PATIENT]Name;[PATIENT]BirthDate;[PATIENT]Sex)
        $R:=Records in selection([PATIENT])
        CREATE EMPTY SET([PATIENT];"DOUBLE")
        For ($I;1;$R)
            If (([PATIENT]Surname+[PATIENT]Name+String([PATIENT]BirthDate)+[PATIENT]Sex)=$vKey)
                ADD TO SET([PATIENT];"DOUBLE")
                PREVIOUS RECORD([PATIENT])
                ADD TO SET([PATIENT];"DOUBLE")
                NEXT RECORD([PATIENT])
            Else
$vKey:=[PATIENT]Surname+[PATIENT]Name+String([PATIENT]BirthDate)+[PATIENT]Sex
            End if
            NEXT RECORD([PATIENT])

        End for


Il 22/10/2022 21:00, 4d_tech-requ...@lists.4d.com ha scritto:
Message: 2
Date: Sat, 22 Oct 2022 12:59:30 +0200
From: Arnaud de Montard<arn...@init5.fr>
To: 4D iNug Technical<4d_tech@lists.4d.com>
Subject: Re: Double patient cards
Message-ID:<396f31fb-1af2-43b0-91dc-4c3f87e90...@init5.fr>
Content-Type: text/plain;       charset=utf-8

Hi Ferdinando,
schematicaly:

selection to arrays (ID, name, surname, date of birth, sex)
for($i;size of array;1;-1)
   if (values $i # values $i-1)
     remove from arrays
   end if
end for

query with array (arrayIDs)

and you have the duplicates

-- Arnaud
Le 22 oct. 2022 à 12:04, stardata.info via 4D_Tech<4d_tech@lists.4d.com>  a 
écrit :

Hi All,

I use 4D V16, and in one application i need to find all patient that have the 
same name, surname, date of birth, sex.

Someone have already do this feature?

Thanks

Ferdinando
**********************************************************************
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to