Skip to content

Commit

Permalink
Revert "POC-39:Separate CCC Number From Other Identifiers (#1223)"
Browse files Browse the repository at this point in the history
This reverts commit ae5949e.
  • Loading branch information
drizzentic committed Apr 12, 2023
1 parent 65679c6 commit 33811e0
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 315 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,30 +47,6 @@
"joinCondition": "t2.visit_id = t20.visit_id"
}
},
{
"table": "amrs.patient_identifier",
"alias": "upi",
"join": {
"type": "LEFT",
"joinCondition": "t2.person_id = upi.patient_id AND (upi.voided IS NULL || upi.voided = 0) AND upi.identifier_type = 45"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovcid",
"join": {
"type": "LEFT",
"joinCondition": "t2.person_id = ovcid.patient_id AND (ovcid.voided IS NULL || ovcid.voided = 0) AND ovcid.identifier_type = 43"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ccc",
"join": {
"type": "LEFT",
"joinCondition": "t2.person_id = ccc.patient_id AND (ccc.voided IS NULL || ccc.voided = 0) AND ccc.identifier_type = 28"
}
},
{
"table": "etl.program_visit_map",
"alias": "t21",
Expand Down Expand Up @@ -117,21 +93,6 @@
"alias": "d",
"column": "date_format(t2.scheduled_date,'%Y-%m-%d')"
},
{
"type": "simple_column",
"alias": "ccc_number",
"column": "ccc.identifier"
},
{
"type": "simple_column",
"alias": "ovcid_id",
"column": "ovcid.identifier"
},
{
"type": "simple_column",
"alias": "upi_number",
"column": "upi.identifier"
},
{
"type": "simple_column",
"alias": "med_pick_up_date",
Expand Down
39 changes: 0 additions & 39 deletions app/reporting-framework/json-reports/hiv-summary-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,6 @@
"type": "INNER",
"joinCondition": "fhs.person_id = p.person_id"
}
},
{
"table": "amrs.patient_identifier",
"alias": "upi",
"join": {
"type": "LEFT",
"joinCondition": "fhs.person_id = upi.patient_id AND (upi.voided IS NULL || upi.voided = 0) AND upi.identifier_type = 45"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovcid",
"join": {
"type": "LEFT",
"joinCondition": "fhs.person_id = ovcid.patient_id AND (ovcid.voided IS NULL || ovcid.voided = 0) AND ovcid.identifier_type = 43"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ccc",
"join": {
"type": "LEFT",
"joinCondition": "fhs.person_id = ccc.patient_id AND (ccc.voided IS NULL || ccc.voided = 0) AND ccc.identifier_type = 28"
}
}
],
"columns": [
Expand Down Expand Up @@ -80,21 +56,6 @@
"expression": "if(fhs.cur_arv_line=2,1,null)"
}
},
{
"type": "simple_column",
"alias": "ccc_number",
"column": "ccc.identifier"
},
{
"type": "simple_column",
"alias": "ovcid_id",
"column": "ovcid.identifier"
},
{
"type": "simple_column",
"alias": "upi_number",
"column": "upi.identifier"
},
{
"type": "derived_column",
"alias": "on_tdf_3tc_efv_400",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,6 @@
"type": "INNER",
"joinCondition": "l.location_id = hmsd.location_id"
}
},
{
"table": "amrs.patient_identifier",
"alias": "upi",
"join": {
"type": "LEFT",
"joinCondition": "hmsd.person_id = upi.patient_id AND (upi.voided IS NULL || upi.voided = 0) AND upi.identifier_type = 45"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovcid",
"join": {
"type": "LEFT",
"joinCondition": "hmsd.person_id = ovcid.patient_id AND (ovcid.voided IS NULL || ovcid.voided = 0) AND ovcid.identifier_type = 43"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ccc",
"join": {
"type": "LEFT",
"joinCondition": "hmsd.person_id = ccc.patient_id AND (ccc.voided IS NULL || ccc.voided = 0) AND ccc.identifier_type = 28"
}
}
],
"columns": [
Expand All @@ -58,21 +34,6 @@
"alias": "age",
"column": "hmsd.age"
},
{
"type": "simple_column",
"alias": "ccc_number",
"column": "ccc.identifier"
},
{
"type": "simple_column",
"alias": "ovcid_id",
"column": "ovcid.identifier"
},
{
"type": "simple_column",
"alias": "upi_number",
"column": "upi.identifier"
},
{
"type": "simple_column",
"alias": "person_id",
Expand Down
39 changes: 0 additions & 39 deletions app/reporting-framework/json-reports/main-dataset-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,6 @@
"type": "LEFT",
"joinCondition": "csm.person_id = hmsd.person_id AND csm.endDate = hmsd.endDate"
}
},
{
"table": "amrs.patient_identifier",
"alias": "upi",
"join": {
"type": "LEFT",
"joinCondition": "hmsd.person_id = upi.patient_id AND (upi.voided IS NULL || upi.voided = 0) AND upi.identifier_type = 45"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovcid",
"join": {
"type": "LEFT",
"joinCondition": "hmsd.person_id = ovcid.patient_id AND (ovcid.voided IS NULL || ovcid.voided = 0) AND ovcid.identifier_type = 43"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ccc",
"join": {
"type": "LEFT",
"joinCondition": "hmsd.person_id = ccc.patient_id AND (ccc.voided IS NULL || ccc.voided = 0) AND ccc.identifier_type = 28"
}
}
],
"columns": [
Expand All @@ -61,21 +37,6 @@
"alias": "birthdate",
"column": "hmsd.birthdate"
},
{
"type": "simple_column",
"alias": "ccc_number",
"column": "ccc.identifier"
},
{
"type": "simple_column",
"alias": "ovcid_id",
"column": "ovcid.identifier"
},
{
"type": "simple_column",
"alias": "upi_number",
"column": "upi.identifier"
},
{
"type": "simple_column",
"alias": "age",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,30 +56,6 @@
"joinCondition": "t1.person_id = pa.person_id"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovc_id",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = ovc_id.patient_id AND (ovc_id.voided IS NULL || ovc_id.voided = 0) AND ovc_id.identifier_type = 43"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ccc",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = ccc.patient_id AND (ccc.voided IS NULL || ccc.voided = 0) AND ccc.identifier_type = 28"
}
},
{
"table": "amrs.patient_identifier",
"alias": "upi",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = upi.patient_id AND (upi.voided IS NULL || upi.voided = 0) AND upi.identifier_type = 45"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovc_id",
Expand Down Expand Up @@ -108,16 +84,6 @@
"alias": "person_id",
"column": "t1.person_id"
},
{
"type": "simple_column",
"alias": "upi_number",
"column": "upi.identifier"
},
{
"type": "simple_column",
"alias": "ccc_number",
"column": "ccc.identifier"
},
{
"type": "derived_column",
"alias": "person_name",
Expand All @@ -139,11 +105,6 @@
"alias": "ovc_identifier",
"column": "ovc_id.identifier"
},
{
"type": "simple_column",
"alias": "ovcid_id",
"column": "ovc_id.identifier"
},
{
"type": "derived_column",
"alias": "phone_number",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,6 @@
"joinCondition": "t1.person_id = id.patient_id AND (id.voided IS NULL || id.voided = 0) AND id.identifier_type not in(28,43,45)"
}
},
{
"table": "amrs.patient_identifier",
"alias": "upi",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = upi.patient_id AND (upi.voided IS NULL || upi.voided = 0) AND upi.identifier_type = 45"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovcid",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = ovcid.patient_id AND (ovcid.voided IS NULL || ovcid.voided = 0) AND ovcid.identifier_type = 43"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ccc",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = ccc.patient_id AND (ccc.voided IS NULL || ccc.voided = 0) AND ccc.identifier_type = 28"
}
},
{
"table": "amrs.person_attribute",
"alias": "contacts",
Expand Down Expand Up @@ -119,21 +95,6 @@
"expression": "t1.uuid"
}
},
{
"type": "simple_column",
"alias": "ccc_number",
"column": "ccc.identifier"
},
{
"type": "simple_column",
"alias": "ovcid_id",
"column": "ovcid.identifier"
},
{
"type": "simple_column",
"alias": "upi_number",
"column": "upi.identifier"
},
{
"type": "simple_column",
"alias": "person_id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,10 @@
},
{
"table": "amrs.patient_identifier",
"alias": "ccc",
"alias": "id",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = ccc.patient_id AND (ccc.voided IS NULL || ccc.voided = 0) AND ccc.identifier_type = 28"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ovcid",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = ovcid.patient_id AND (ovcid.voided IS NULL || ovcid.voided = 0) AND ovcid.identifier_type = 43"
}
},
{
"table": "amrs.patient_identifier",
"alias": "upi",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = upi.patient_id AND (upi.voided IS NULL || upi.voided = 0) AND upi.identifier_type = 45"
}
},
{
"table": "amrs.patient_identifier",
"alias": "ids",
"join": {
"type": "LEFT",
"joinCondition": "t1.person_id = ids.patient_id AND (ids.voided IS NULL || ids.voided = 0) AND ids.identifier_type not in(28,43,45)"
"joinCondition": "t1.person_id = id.patient_id AND (id.voided IS NULL || id.voided = 0)"
}
},
{
Expand Down Expand Up @@ -166,29 +142,14 @@
"expression": " CONCAT(COALESCE(person_name.given_name, ''), ' ', COALESCE(person_name.middle_name, ''), ' ', COALESCE(person_name.family_name, ''))"
}
},
{
"type": "simple_column",
"alias": "ccc_number",
"column": "ccc.identifier"
},
{
"type": "simple_column",
"alias": "ovcid_id",
"column": "ovcid.identifier"
},
{
"type": "derived_column",
"alias": "identifiers",
"expressionType": "simple_expression",
"expressionOptions": {
"expression": "GROUP_CONCAT(DISTINCT ids.identifier SEPARATOR ', ')"
"expression": " GROUP_CONCAT(DISTINCT id.identifier SEPARATOR ', ')"
}
},
{
"type": "simple_column",
"alias": "upi_number",
"column": "upi.identifier"
},
{
"type": "derived_column",
"alias": "phone_number",
Expand Down
Loading

0 comments on commit 33811e0

Please sign in to comment.