From 696357214c9139e39f534aa06351f0deb7c23293 Mon Sep 17 00:00:00 2001 From: Anton Ivanov Date: Mon, 2 Sep 2024 13:41:34 +0300 Subject: [PATCH 1/4] Update ProviderTests.R --- docs/IBM_CCAE_MDCR/Test Cases/R/ProviderTests.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/IBM_CCAE_MDCR/Test Cases/R/ProviderTests.R b/docs/IBM_CCAE_MDCR/Test Cases/R/ProviderTests.R index e9660484..fc811782 100644 --- a/docs/IBM_CCAE_MDCR/Test Cases/R/ProviderTests.R +++ b/docs/IBM_CCAE_MDCR/Test Cases/R/ProviderTests.R @@ -37,7 +37,7 @@ createProviderTests <- function () { declareTest(id = provider$provid, description = "Even when PROVID IS NULL create a PROVIDER (HIX-1404). Id is PROVIDER_SOURCE_VALUE") patient<-createPatient(); add_facility_header(enrolid=patient$enrolid, provid=NULL, stdprov="220") - expect_provider(provider_source_value ="", specialty_source_value="220") + expect_provider(provider_source_value =NULL, specialty_source_value="220") } if (tolower(frameworkType) == "mdcd") @@ -70,7 +70,7 @@ createProviderTests <- function () { declareTest(id = provider$provid, description = "Even when PROVID IS NULL create a PROVIDER (HIX-1404)") patient<-createPatient(); add_facility_header(enrolid=patient$enrolid, prov_id=NULL, stdprov="220") - expect_provider( provider_source_value = '', specialty_source_value="220") + expect_provider( provider_source_value = NULL, specialty_source_value="220") } } From 984711b2f1ec583604e5e4a64f26a784b5ea00a5 Mon Sep 17 00:00:00 2001 From: Anton Ivanov Date: Tue, 3 Sep 2024 11:54:05 +0300 Subject: [PATCH 2/4] race/ethnicity fix --- .../Test Cases/R/PersonTests.R | 90 +++++++++++-------- 1 file changed, 52 insertions(+), 38 deletions(-) diff --git a/docs/Optum Clinformatics/Test Cases/R/PersonTests.R b/docs/Optum Clinformatics/Test Cases/R/PersonTests.R index 1c95068b..6596aeff 100644 --- a/docs/Optum Clinformatics/Test Cases/R/PersonTests.R +++ b/docs/Optum Clinformatics/Test Cases/R/PersonTests.R @@ -97,43 +97,57 @@ createPersonTests <- function() add_member_enrollment(patid = patient$patid, eligeff = '2010-03-01', eligend = '2012-12-31') expect_person(person_id = patient$person_id, day_of_birth = NULL) - patient <- createPatient() - declareTest("PERSON - Person who has Asian race", id = patient$person_id) - add_member_continuous_enrollment(eligeff = '2000-05-01', eligend = '2000-12-31', - gdr_cd = 'M', patid = patient$patid, yrdob = 1987) - add_member_enrollment(patid = patient$patid, eligeff = '2000-05-01', eligend = '2000-12-31', race = 'A') - expect_person(person_id = patient$person_id, ethnicity_concept_id = 38003564, race_concept_id = 8515) - - - patient <- createPatient() - declareTest("PERSON - Person who has Black race", id = patient$person_id) - add_member_continuous_enrollment(eligeff = '2000-05-01', eligend = '2000-12-31', - gdr_cd = 'M', patid = patient$patid, yrdob = 1987) - add_member_enrollment(patid = patient$patid, eligeff = '2000-05-01', eligend = '2000-12-31', race = 'B') - expect_person(person_id = patient$person_id, ethnicity_concept_id = 38003564, race_concept_id = 8516) - - - patient <- createPatient() - declareTest("PERSON - Person who has White race", id = patient$person_id) - add_member_continuous_enrollment(eligeff = '2000-05-01', eligend = '2000-12-31', - gdr_cd = 'M', patid = patient$patid, yrdob = 1987) - add_member_enrollment(patid = patient$patid, eligeff = '2000-05-01', eligend = '2000-12-31', race = 'W') - expect_person(person_id = patient$person_id, ethnicity_concept_id = 38003564, race_concept_id = 8527) - - - patient <- createPatient() - declareTest("PERSON - Person who has Unknown race", id = patient$person_id) - add_member_continuous_enrollment(eligeff = '2000-05-01', eligend = '2000-12-31', - gdr_cd = 'M', patid = patient$patid, yrdob = 1987) - add_member_enrollment(patid = patient$patid, eligeff = '2000-05-01', eligend = '2000-12-31', race = 'U') - expect_person(person_id = patient$person_id, ethnicity_concept_id = 0, race_concept_id = 0) - - - patient <- createPatient() - declareTest("PERSON - Person who has Hispanic ethnicity", id = patient$person_id) - add_member_continuous_enrollment(eligeff = '2000-05-01', eligend = '2000-12-31', - gdr_cd = 'M', patid = patient$patid, yrdob = 1987) - add_member_enrollment(patid = patient$patid, eligeff = '2000-05-01', eligend = '2000-12-31', race = 'H') - expect_person(person_id = patient$person_id, ethnicity_concept_id = 38003563, race_concept_id = 0) + patient <- createPatient() + declareTest("PERSON - Person who has Asian race", id = patient$person_id) + add_member_continuous_enrollment(eligeff = '2000-05-01', eligend = '2000-12-31', + gdr_cd = 'M', patid = patient$patid, yrdob = 1987) + add_member_enrollment(patid = patient$patid, eligeff = '2000-05-01', eligend = '2000-12-31', race = 'A') + expect_person(person_id = patient$person_id, race_concept_id = 8515) + + + patient <- createPatient() + declareTest("PERSON - Person who has Black race", id = patient$person_id) + add_member_continuous_enrollment(eligeff = '2000-05-01', eligend = '2000-12-31', + gdr_cd = 'M', patid = patient$patid, yrdob = 1987) + add_member_enrollment(patid = patient$patid, eligeff = '2000-05-01', eligend = '2000-12-31', race = 'B') + expect_person(person_id = patient$person_id, race_concept_id = 8516) + + + patient <- createPatient() + declareTest("PERSON - Person who has White race", id = patient$person_id) + add_member_continuous_enrollment(eligeff = '2000-05-01', eligend = '2000-12-31', + gdr_cd = 'M', patid = patient$patid, yrdob = 1987) + add_member_enrollment(patid = patient$patid, eligeff = '2000-05-01', eligend = '2000-12-31', race = 'W') + expect_person(person_id = patient$person_id, race_concept_id = 8527) + + + patient <- createPatient() + declareTest("PERSON - Person who has Unknown race", id = patient$person_id) + add_member_continuous_enrollment(eligeff = '2000-05-01', eligend = '2000-12-31', + gdr_cd = 'M', patid = patient$patid, yrdob = 1987) + add_member_enrollment(patid = patient$patid, eligeff = '2000-05-01', eligend = '2000-12-31', race = 'U') + expect_person(person_id = patient$person_id, ethnicity_concept_id = 0, race_concept_id = 0) + + + patient <- createPatient() + declareTest("PERSON - Person who has Hispanic ethnicity", id = patient$person_id) + add_member_continuous_enrollment(eligeff = '2000-05-01', eligend = '2000-12-31', + gdr_cd = 'M', patid = patient$patid, yrdob = 1987) + add_member_enrollment(patid = patient$patid, eligeff = '2000-05-01', eligend = '2000-12-31', ethnicity = 'H') + expect_person(person_id = patient$person_id, ethnicity_concept_id = 38003563) + + patient <- createPatient() + declareTest("PERSON - Person who has Not Hispanic ethnicity", id = patient$person_id) + add_member_continuous_enrollment(eligeff = '2000-05-01', eligend = '2000-12-31', + gdr_cd = 'M', patid = patient$patid, yrdob = 1987) + add_member_enrollment(patid = patient$patid, eligeff = '2000-05-01', eligend = '2000-12-31', ethnicity = 'N') + expect_person(person_id = patient$person_id, ethnicity_concept_id = 38003564) + + patient <- createPatient() + declareTest("PERSON - Person who has Not Unknown ethnicity", id = patient$person_id) + add_member_continuous_enrollment(eligeff = '2000-05-01', eligend = '2000-12-31', + gdr_cd = 'M', patid = patient$patid, yrdob = 1987) + add_member_enrollment(patid = patient$patid, eligeff = '2000-05-01', eligend = '2000-12-31', ethnicity = 'U') + expect_person(person_id = patient$person_id, ethnicity_concept_id = 0) } \ No newline at end of file From 0a5b0b0f0aaa9c97d9e463488d45c597bcb8d294 Mon Sep 17 00:00:00 2001 From: Anton Ivanov Date: Tue, 3 Sep 2024 12:40:37 +0300 Subject: [PATCH 3/4] jmdc condition_source_value fix --- docs/JMDC/Test Cases/R/ConditionOccurrence.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/JMDC/Test Cases/R/ConditionOccurrence.R b/docs/JMDC/Test Cases/R/ConditionOccurrence.R index 7dc24082..07bedb2d 100644 --- a/docs/JMDC/Test Cases/R/ConditionOccurrence.R +++ b/docs/JMDC/Test Cases/R/ConditionOccurrence.R @@ -46,9 +46,9 @@ createConditionOccurrenceTests <- function () { declareTest(707, "Condition concept ID and source values") add_enrollment(member_id = "M000000707") add_claim(member_id = "M000000707", claim_id = "C000000000709") - add_diagnosis(member_id = "M000000707", claim_id = "C000000000709", standard_disease_code = 1) - add_diagnosis_master(standard_disease_code = 1, icd10_level4_code = "I10-") - expect_condition_occurrence(person_id = 707, visit_occurrence_id = 709, condition_concept_id = 320128, condition_source_value = "I10-", condition_source_concept_id = 45591453) + add_diagnosis(member_id = "M000000707", claim_id = "C000000000709", standard_disease_code = 8842488, standard_disease_name = "hypertensive urgency") + add_diagnosis_master(standard_disease_code = 8842488, icd10_level4_code = "I10-") + expect_condition_occurrence(person_id = 707, visit_occurrence_id = 709, condition_concept_id = 320128, condition_source_value = "8842488|hypertensive urgency", condition_source_concept_id = 45591453) # declareTest(708, "Condition occurrence that are era-like") # add_enrollment(member_id = "M000000708", observation_start = "201001", observation_end = "201212") From 4f13b0f1f8658d3f202566d008856d5ce372b667 Mon Sep 17 00:00:00 2001 From: Anton Ivanov Date: Tue, 3 Sep 2024 18:30:31 +0300 Subject: [PATCH 4/4] Update ConditionOccurrenceTests.R --- docs/IBM_CCAE_MDCR/Test Cases/R/ConditionOccurrenceTests.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/IBM_CCAE_MDCR/Test Cases/R/ConditionOccurrenceTests.R b/docs/IBM_CCAE_MDCR/Test Cases/R/ConditionOccurrenceTests.R index 4207dfd8..1e9ffbb5 100644 --- a/docs/IBM_CCAE_MDCR/Test Cases/R/ConditionOccurrenceTests.R +++ b/docs/IBM_CCAE_MDCR/Test Cases/R/ConditionOccurrenceTests.R @@ -149,7 +149,7 @@ createConditionOccurrenceTests <- function () { declareTest(id = patient$person_id, "Patient has diagnosis in dx1 in ltc. Id is PERSON_ID") add_enrollment_detail(enrolid=patient$enrolid, dtend = '2012-12-31', dtstart = '2012-01-01') add_long_term_care(enrolid = patient$enrolid, dx1 = 'v9001', dxver = '9', svcdate = '2012-11-05', tsvcdat = '2012-11-10') - expect_condition_occurrence(person_id = patient$person_id, condition_concept_id = '46270117', condition_type_concept_id = '38004277') + expect_condition_occurrence(person_id = patient$person_id, condition_concept_id = '46270117', condition_type_concept_id = '32844') } if (tolower(frameworkType) == "ccae")