Skip to content

Instantly share code, notes, and snippets.

@adam704a
Created January 8, 2020 23:38
Show Gist options
  • Save adam704a/5f2d73cb802affc66429e95b5aaaf86c to your computer and use it in GitHub Desktop.
Save adam704a/5f2d73cb802affc66429e95b5aaaf86c to your computer and use it in GitHub Desktop.
Clean up programstagesection_dataelements and data elements for ReachHealth
-- SP: Post Partum Clients Served Oct
DELETE FROM "public"."programstagesection_dataelements" WHERE "dataelementid" in
('54251',
'54252',
'54253',
'54254',
'54255',
'54256',
'54257');
DELETE FROM "public"."dataelement" WHERE "dataelementid" in
('54251',
'54252',
'54253',
'54254',
'54255',
'54256',
'54257');
-- SP.1.A: Post Partum IUD Clients Served
DELETE FROM "public"."programstagesection_dataelements" WHERE "dataelementid" in
(
'53861',
'53863',
'53862',
'53864',
'53865'
);
DELETE FROM "public"."dataelement" WHERE "dataelementid" in
(
'53861',
'53863',
'53862',
'53864',
'53865');
-- SP.1.A: PSI Clients Served
DELETE FROM "public"."programstagesection_dataelements" WHERE "dataelementid" in
(
'54239',
'54240',
'54241',
'54242',
'54243',
'54244',
'54245'
);
DELETE FROM "public"."dataelement" WHERE "dataelementid" in
(
'54239',
'54240',
'54241',
'54242',
'54243',
'54244',
'54245'
);
-- SP.1.A: Interval IUD Clients Served
DELETE FROM "public"."programstagesection_dataelements" WHERE "dataelementid" in
(
'54263',
'54264',
'54265',
'54266',
'54267',
'54268',
'54269'
);
DELETE FROM "public"."dataelement" WHERE "dataelementid" in
(
'54263',
'54264',
'54265',
'54266',
'54267',
'54268',
'54269'
);
-- SP.1.A: NSV Clients Served
DELETE FROM "public"."programstagesection_dataelements" WHERE "dataelementid" in
(
'54275',
'54276',
'54277',
'54278',
'54279',
'54280',
'54281'
);
DELETE FROM "public"."dataelement" WHERE "dataelementid" in
(
'54275',
'54276',
'54277',
'54278',
'54279',
'54280',
'54281'
);
-- SP.1.A: Total PSI Clients Served
-- Total PPIUD Clients Served
-- SP.1.A: Total Interval IUD Clients Served
-- SP.1.A: Total Male Sterilization (NSV)
DELETE FROM "public"."programstagesection_dataelements" WHERE "dataelementid" in
(
'58366',
'58362',
'58363',
'58364',
'58365',
'58583',
'58584',
'58585',
'58586',
'58579',
'58582',
'58580',
'58581',
'58369',
'58368',
'58367'
);
DELETE FROM "public"."dataelement" WHERE "dataelementid" in
(
'58366',
'58362',
'58363',
'58364',
'58365',
'58583',
'58584',
'58585',
'58586',
'58579',
'58582',
'58580',
'58581',
'58369',
'58368',
'58367'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment