Skip to content

Latest commit

 

History

History
132 lines (84 loc) · 4.92 KB

copy-of-chart-pur-import-options.md

File metadata and controls

132 lines (84 loc) · 4.92 KB
id title date version lastAuthor mimeType links source wikigdrive
1443DXeg-pRblb0RQHKhKofLogIbHbo3ScCmCEQZN7ts
Copy of Chart PUR Import Options
2024-12-18T14:04:31.929Z
29
bhamm
text/x-markdown
../../functions/system-administration/data-migration/chart-data-csv-header-options.md
0008bcbb1563384efe0a28ada6f97e9432e65f10

Chart PUR Import Options

The following options are allowed. Any other options are unsupported and will be rejected.

Insert Options

  • REVISE
  • INSERT
  • DELETE_THEN_INSERT

Blank Options

  • DELETE_BLANK
  • IGNORE_BLANK

Distinct Options

DISTINCT is implied for all user patient records

Default Options

For user patient records, the default options are REVISE and DELETE_BLANK..

Examples

The following scenario provides examples of each type of processing possible for PUR import.

Initial Data

@patient_mrns.MR,patients.first_name,patients.last_name,patients.birth_date,patients.username,@pur.Supervisor.id,@pur.Supervisor.id_type,@pur.Administrative Assistant.id,@pur.Administrative Assistant.id_type,users.universal_id

1111,Test1,Employee,01/01/2001,user1,,,user8,id:username,11

2222,Test2,Employee,02#02#2002,user2,user1,id:username,user9,id:username,22

3333,Test3,Employee,03/03/2003,user3,user1,id:username,,,33

4444,Test4,Employee,04-04-2004,user4,user2,id:username,,,44

5555,Test5,Employee,05/05/2005,user5,user2,id:username,,,55

6666,Test6,Employee,06/06/2006,user6,user3,id:username,,,66

7777,Test7,Employee,07/07/2007,user7,user3,id:username,,,77

8888,Test8,Employee,08/08/2008,user8,user2,id:username,,,88

9999,Test9,Employee,09/09/2009,user9,user3,id:username,,,99

After this file is loaded:

  • user1 is the supervisor of user2 and user3
  • user2 is the supervisor of user4, user5, and user8
  • user3 is the supervisor of user6, user7, and user9
  • user8 is the administrative assistant of user1
  • user9 is the administrative assistant of user2

Import Updated Data

@patient_mrns.MR,patients.first_name,patients.last_name,patients.birth_date,patients.username,@pur.Supervisor.id,@pur.Supervisor.id_type,DELETE_THEN_INSERT @pur.Administrative Assistant.1.id,@pur.Administrative Assistant.1.id_type,INSERT IGNORE_BLANK @pur.Administrative Assistant.2.id,@pur.Administrative Assistant.2.id_type,users.universal_id

1111,Test1,Employee,01/01/2001,user1,,,,,,,11

2222,Test2,Employee,02#02#2002,user2,user3,id:username,user9,id:username,,,22

3333,Test3,Employee,03/03/2003,user3,,,user8,id:username,user4,id:username,33

4444,Test4,Employee,04-04-2004,user4,user3,id:username,,,,,44

5555,Test5,Employee,05/05/2005,user5,user2,id:username,,,,,55

6666,Test6,Employee,06/06/2006,user6,user4,id:username,,,,,66

7777,Test7,Employee,07/07/2007,user7,user4,id:username,,,,,77

8888,Test8,Employee,08/08/2008,user8,user2,id:username,,,,,88

9999,Test9,Employee,09/09/2009,user9,user2,id:username,,,,,99

Import Logic

The imported file is processed as follows:

Supervisor

No options are specified, so the default options of REVISE and DELETE_BLANK are used. Changes to the Supervisor role are as follows:

  • user1 is not a supervisor anymore
  • user2 is the supervisor for user5, user8, and user9
  • user3 is the supervisor for user2 and user4
  • user4 is the supervisor for user6 and user7

Administrative Assistant (1)

The DELETE_THEN_INSERT option is used. Changes to the the Administrative Assistant role are as follows:

  • user8 is the administrative assistant for user3
  • user9 is the administrative assistant for user2

Administrative Assistant (2)

The INSERT and IGNORE_BLANK options are used. Changes to the Administrative Assistant role are as follows:

  • user4 is also an administrative assistant for user3

Related Pages

Chart Data CSV Header Options