diff --git a/data-ingestion-service/src/main/java/gov/cdc/dataingestion/rawmessage/dto/RawERLDto.java b/data-ingestion-service/src/main/java/gov/cdc/dataingestion/rawmessage/dto/RawERLDto.java index 4d8d16a12..8da34bfde 100644 --- a/data-ingestion-service/src/main/java/gov/cdc/dataingestion/rawmessage/dto/RawERLDto.java +++ b/data-ingestion-service/src/main/java/gov/cdc/dataingestion/rawmessage/dto/RawERLDto.java @@ -1,8 +1,11 @@ package gov.cdc.dataingestion.rawmessage.dto; import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter public class RawERLDto { private String id; diff --git a/data-processing-service/build.gradle b/data-processing-service/build.gradle index 823e8e81e..01e005db9 100644 --- a/data-processing-service/build.gradle +++ b/data-processing-service/build.gradle @@ -61,15 +61,35 @@ jacoco { test { finalizedBy jacocoTestReport // report is always generated after tests run } + jacocoTestReport { reports { xml.required = true csv.required = false html.outputLocation = layout.buildDirectory.dir('jacocoHtml') } - getExecutionData().setFrom(fileTree(buildDir).include("/jacoco/*.exec")) + + getExecutionData().setFrom(fileTree(buildDir).include("**/jacoco/*.exec")) + + afterEvaluate { + classDirectories.setFrom(files(classDirectories.files.collect { + fileTree(dir: it, + excludes: [ + '**/config/NbsDataSourceConfig.java', + '**/config/OdseDataSourceConfig.java', + '**/config/SrteDataSourceConfig.java', + '**/model/dsma_algorithm/**', + '**/model/phdc/**', + '**/security/config/**', + '**/ServiceApplication.java', + '**/DsmLabMatchHelper.java', + ] + ) + })) + } } + task integration(type: Test) { useJUnitPlatform() } @@ -205,12 +225,23 @@ sonarqube { property "sonar.projectKey", "CDCgov_NEDSS-DataIngestion" property "sonar.organization", "cdcgov" property "sonar.host.url", "https://sonarcloud.io" - property "sonar.exclusions", "**/config/**, **/constant/**, **/exception/**, **/model/container/**, **/model/dsma_algorithm/**, **/model/dto/**, **/model/phdc/**, " + - " **/repository/nbs/msgoute/model/**, **/repository/nbs/odse/model/**, **/repository/nbs/srte/model/**, **/security/config/**, **/ServiceApplication.java, " + - " **/service/model/**, **/DynamicBeanBinding.java, **/RulesEngineUtil.java, **/utilities/model/**," + - " **/controller/**, **/kafka/consumer/**, **kafka/producer/**, **/WdsObjectChecker.java," + - " **/AdvancedCriteria.java, **/cache/OdseCache.java, **/cache/PropertyUtilCache.java, " + - " **/cache/SrteCache.java, **/StringUtils.java, **/TimeStampUtil.java, **/AuthUtil.java" - + property "sonar.exclusions", [ + "**/config/NbsDataSourceConfig.java", + "**/config/OdseDataSourceConfig.java", + "**/config/SrteDataSourceConfig.java", + "**/model/dsma_algorithm/**", + "**/model/phdc/**", + "**/security/config/**", + "**/ServiceApplication.java", + "**/DsmLabMatchHelper.java", + "**/InvestigationService.java", + "**/ObservationRequestHandler.java", + "**/InvestigationNotificationService.java", + "**/ObservationMatchingService.java", + "**/ContactSummaryService.java", + "**/RetrieveSummaryService.java", + "**/ManagerCacheService.java", + "**/NBSObjectConverter.java" + ].join(",") } -} \ No newline at end of file +} diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/ServiceApplication.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/ServiceApplication.java index 62578bc1c..e880b85e5 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/ServiceApplication.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/ServiceApplication.java @@ -6,7 +6,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; /** - * Report service application. + * Report service application. */ @SpringBootApplication @EnableCaching @@ -14,6 +14,7 @@ public class ServiceApplication { /** * Main method for spring boot application. + * * @param args */ public static void main(final String[] args) { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/cache/OdseCache.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/cache/OdseCache.java index 907417128..d3fef11c6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/cache/OdseCache.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/cache/OdseCache.java @@ -4,10 +4,10 @@ import java.util.TreeMap; public class OdseCache { - public static Map fromPrePopFormMapping = new TreeMap(); - public static Map toPrePopFormMapping = new TreeMap(); - public static Map dmbMap = new TreeMap(); - public static Map map = new TreeMap(); + public static Map fromPrePopFormMapping = new TreeMap(); + public static Map toPrePopFormMapping = new TreeMap(); + public static Map dmbMap = new TreeMap(); + public static Map map = new TreeMap(); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/CacheConfig.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/CacheConfig.java index 1a7e2c405..f6310683d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/CacheConfig.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/CacheConfig.java @@ -8,6 +8,7 @@ import org.springframework.context.annotation.Configuration; import java.util.Arrays; +import java.util.List; import java.util.concurrent.TimeUnit; @Configuration @@ -17,12 +18,12 @@ public class CacheConfig { @Bean public CacheManager cacheManager() { CaffeineCacheManager cacheManager = new CaffeineCacheManager(); - cacheManager.setCacheNames(Arrays.asList("srte")); // Add your cache names here + cacheManager.setCacheNames(List.of("srte")); // Add your cache names here cacheManager.setCaffeine(caffeineConfig()); return cacheManager; } - private Caffeine caffeineConfig() { + protected Caffeine caffeineConfig() { return Caffeine.newBuilder() // .maximumSize(500) .expireAfterAccess(60, TimeUnit.MINUTES); // Adjust expiration settings as needed diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/KafkaConsumerConfig.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/KafkaConsumerConfig.java index c36c16c26..abd586b50 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/KafkaConsumerConfig.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/KafkaConsumerConfig.java @@ -19,15 +19,15 @@ @Configuration public class KafkaConsumerConfig { @Value("${spring.kafka.group-id}") - private String groupId = ""; + protected String groupId = ""; @Value("${spring.kafka.bootstrap-servers}") - private String bootstrapServers = ""; + protected String bootstrapServers = ""; // Higher value for more intensive operation, also increase latency // default is 30000, equivalent to 5 min @Value("${spring.kafka.consumer.maxPollIntervalMs}") - private String maxPollInterval = ""; + protected String maxPollInterval = ""; @Bean public ConsumerFactory consumerFactory() { @@ -48,6 +48,6 @@ public ConsumerFactory consumerFactory() { ConcurrentKafkaListenerContainerFactory factory = new ConcurrentKafkaListenerContainerFactory<>(); factory.setConsumerFactory(consumerFactory()); - return factory; + return factory; } } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/KafkaProducerConfig.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/KafkaProducerConfig.java index aa9368119..2a2fc6023 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/KafkaProducerConfig.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/KafkaProducerConfig.java @@ -15,7 +15,7 @@ @Configuration public class KafkaProducerConfig { @Value("${spring.kafka.bootstrap-servers}") - private String bootstrapServers = ""; + protected String bootstrapServers = ""; @Bean public ProducerFactory producerFactory() { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/NbsDataSourceConfig.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/NbsDataSourceConfig.java index 76fdf874b..904eaf207 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/NbsDataSourceConfig.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/NbsDataSourceConfig.java @@ -28,16 +28,16 @@ ) public class NbsDataSourceConfig { @Value("${spring.datasource.driverClassName}") - private String driverClassName; + protected String driverClassName; @Value("${spring.datasource.nbs.url}") - private String dbUrl; + protected String dbUrl; @Value("${spring.datasource.username}") - private String dbUserName; + protected String dbUserName; @Value("${spring.datasource.password}") - private String dbUserPassword; + protected String dbUserPassword; @Bean(name = "nbsDataSource") public DataSource nbsDataSource() { @@ -59,7 +59,7 @@ public EntityManagerFactoryBuilder nbsEntityManagerFactoryBuilder() { @Bean(name = "nbsEntityManagerFactory") public LocalContainerEntityManagerFactoryBean nbsEntityManagerFactory( EntityManagerFactoryBuilder nbsEntityManagerFactoryBuilder, - @Qualifier("nbsDataSource") DataSource nbsDataSource ) { + @Qualifier("nbsDataSource") DataSource nbsDataSource) { return nbsEntityManagerFactoryBuilder .dataSource(nbsDataSource) .packages("gov.cdc.dataprocessing.repository.nbs.msgoute.model") @@ -69,7 +69,7 @@ public LocalContainerEntityManagerFactoryBean nbsEntityManagerFactory( @Bean(name = "nbsTransactionManager") public PlatformTransactionManager nbsTransactionManager( - @Qualifier("nbsEntityManagerFactory") EntityManagerFactory nbsEntityManagerFactory ) { + @Qualifier("nbsEntityManagerFactory") EntityManagerFactory nbsEntityManagerFactory) { return new JpaTransactionManager(nbsEntityManagerFactory); } } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/OdseDataSourceConfig.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/OdseDataSourceConfig.java index ea9b26fe6..c843ace25 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/OdseDataSourceConfig.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/OdseDataSourceConfig.java @@ -61,7 +61,7 @@ public EntityManagerFactoryBuilder odseEntityManagerFactoryBuilder() { @Bean(name = "odseEntityManagerFactory") public LocalContainerEntityManagerFactoryBean odseEntityManagerFactory( EntityManagerFactoryBuilder odseEntityManagerFactoryBuilder, - @Qualifier("odseDataSource") DataSource odseDataSource ) { + @Qualifier("odseDataSource") DataSource odseDataSource) { return odseEntityManagerFactoryBuilder .dataSource(odseDataSource) .packages("gov.cdc.dataprocessing.repository.nbs.odse.model") @@ -72,7 +72,7 @@ public LocalContainerEntityManagerFactoryBean odseEntityManagerFactory( @Primary @Bean(name = "odseTransactionManager") public PlatformTransactionManager odseTransactionManager( - @Qualifier("odseEntityManagerFactory") EntityManagerFactory odseEntityManagerFactory ) { + @Qualifier("odseEntityManagerFactory") EntityManagerFactory odseEntityManagerFactory) { return new JpaTransactionManager(odseEntityManagerFactory); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/SrteDataSourceConfig.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/SrteDataSourceConfig.java index d22d290ad..64ceaa82e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/SrteDataSourceConfig.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/config/SrteDataSourceConfig.java @@ -18,7 +18,6 @@ import java.util.HashMap; - @Configuration @EnableTransactionManagement @EnableJpaRepositories( @@ -61,7 +60,7 @@ public EntityManagerFactoryBuilder srteEntityManagerFactoryBuilder() { @Bean(name = "srteEntityManagerFactory") public LocalContainerEntityManagerFactoryBean srteEntityManagerFactory( EntityManagerFactoryBuilder srteEntityManagerFactoryBuilder, - @Qualifier("srteDataSource") DataSource srteDataSource ) { + @Qualifier("srteDataSource") DataSource srteDataSource) { return srteEntityManagerFactoryBuilder .dataSource(srteDataSource) .packages("gov.cdc.dataprocessing.repository.nbs.srte.model") @@ -71,7 +70,7 @@ public LocalContainerEntityManagerFactoryBean srteEntityManagerFactory( @Bean(name = "srteTransactionManager") public PlatformTransactionManager srteTransactionManager( - @Qualifier("srteEntityManagerFactory") EntityManagerFactory srteEntityManagerFactory ) { + @Qualifier("srteEntityManagerFactory") EntityManagerFactory srteEntityManagerFactory) { return new JpaTransactionManager(srteEntityManagerFactory); } } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/CTConstants.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/CTConstants.java index 6afa12a68..1bbfe6f15 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/CTConstants.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/CTConstants.java @@ -31,7 +31,7 @@ public class CTConstants { public static final String SignsSymptomsNotes = "CON130"; public static final String RiskFactorsForIllness = "CON131"; public static final String RiskFactorNotes = "CON132"; - public static final String TestingEvaluationCompleted = "CON117"; + public static final String TestingEvaluationCompleted = "CON117"; public static final String DateOfEvaluation = "CON118"; public static final String EvaluationFindings = "CON119"; public static final String WasTreatmentInitiatedForIllness = "CON120"; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/ComplexQueries.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/ComplexQueries.java index 19d55747c..99ebaa128 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/ComplexQueries.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/ComplexQueries.java @@ -59,8 +59,7 @@ public class ComplexQueries { + "order by NBS_UI_METADATA.investigation_form_cd, NBS_UI_METADATA.order_nbr "; - - public static final String GENERIC_QUESTION_OID_METADATA_SQL ="SELECT " + + public static final String GENERIC_QUESTION_OID_METADATA_SQL = "SELECT " + "wa_question.wa_question_uid, " + "wa_question.question_unit_identifier, " + "wa_question.add_time, " + @@ -68,7 +67,7 @@ public class ComplexQueries { "wa_question.code_set_group_id, " + "wa_question.data_type, " + "wa_question.mask, " + - "'CORE_INV_FORM' \"investigationFormCd\", "+ + "'CORE_INV_FORM' \"investigationFormCd\", " + "wa_question.last_chg_time, " + "wa_question.last_chg_user_id, " + "wa_question.question_nm, " + @@ -91,20 +90,20 @@ public class ComplexQueries { "wa_question.standard_nnd_ind_cd, " + "wa_question.question_group_seq_nbr " + "FROM " + - "wa_question "+ - "INNER JOIN NBS_UI_Component ON wa_question.nbs_ui_component_uid = NBS_UI_Component.nbs_ui_component_uid "+ - "LEFT OUTER JOIN "+ - "NBS_SRTE..CODESET "+ - "ON CODESET.code_set_group_id = wa_question.code_set_group_id "+ - " WHERE(UPPER( wa_question.data_location ) LIKE UPPER( 'public_health_case%' ) "+ + "wa_question " + + "INNER JOIN NBS_UI_Component ON wa_question.nbs_ui_component_uid = NBS_UI_Component.nbs_ui_component_uid " + + "LEFT OUTER JOIN " + + "NBS_SRTE..CODESET " + + "ON CODESET.code_set_group_id = wa_question.code_set_group_id " + + " WHERE(UPPER( wa_question.data_location ) LIKE UPPER( 'public_health_case%' ) " + " OR UPPER( wa_question.data_location ) LIKE UPPER( 'confirmation_method%' )) " + " AND (wa_question.code_set_group_id IS NULL " + - " OR wa_question.code_set_group_id IN "+ - " ( "+ + " OR wa_question.code_set_group_id IN " + + " ( " + " SELECT code_set_group_id " + - " FROM nbs_srte..codeset "+ - " WHERE UPPER( class_cd )= UPPER('code_value_general') "+ - " ))" ; + " FROM nbs_srte..codeset " + + " WHERE UPPER( class_cd )= UPPER('code_value_general') " + + " ))"; public static final String PAM_QUESTION_OID_METADATA_SQL = "SELECT " @@ -199,115 +198,115 @@ public class ComplexQueries { " order by obs.observation_uid, ar2.source_act_uid "; - public static final String SELECT_PHCPAT_NAMED_BY_PATIENT_COLLECTION1="select subject.cd \"subjectPhcCd\", " - +" ct_contact.subject_entity_phc_uid \"subjectEntityPhcUid\", subject.local_id \"subjectPhcLocalId\"," - +" ct_contact.named_On_Date \"namedOnDate\", ct_contact.CT_Contact_uid \"ctContactUid\",ct_contact.local_Id \"localId\", " - +" ct_contact.subject_Entity_Uid \"subjectEntityUid\", ct_contact.contact_Entity_Uid \"contactEntityUid\", CT_CONTACT.priority_cd \"priorityCd\", ct_contact.disposition_cd \"dispositionCd\", " - +" ct_contact.prog_area_cd \"progAreaCd\", ct_contact.named_during_interview_uid \"namedDuringInterviewUid\", cm.fld_foll_up_dispo \"invDispositionCd\", ct_contact.contact_referral_basis_cd \"contactReferralBasisCd\", " - +" ct_contact.third_party_entity_uid \"thirdPartyEntityUid\", ct_contact.third_party_entity_phc_uid \"thirdPartyEntityPhcUid\", ct_contact.processing_decision_cd \"contactProcessingDecisionCd\", " - +" subjectCM.FLD_FOLL_UP_DISPO \"sourceDispositionCd\", subject.cd \"sourceConditionCd\", subjectperson.curr_sex_cd \"sourceCurrentSexCd\", subjectCM.PAT_INTV_STATUS_CD \"sourceInterviewStatusCd\"," - +" contact.public_health_case_uid \"contactEntityPhcUid\", contact.local_id \"contactPhcLocalId\", person.person_parent_uid \"subjectMprUid\" , ixs.interview_date \"interviewDate\", ct_contact.add_time \"createDate\", personcontact.person_parent_uid \"contactMprUid\" " - +" from ct_contact with (nolock) " - +" left outer join public_health_case subject with (nolock) on (ct_contact.SUBJECT_ENTITY_PHC_UID=subject.public_health_case_uid) " - +" left outer join case_management cm with (nolock) on (ct_contact.CONTACT_ENTITY_PHC_UID=cm.public_health_case_uid)" - +" left outer join case_management subjectCM with (nolock) on (ct_contact.SUBJECT_ENTITY_PHC_UID=subjectCM.public_health_case_uid) " - +" left outer join interview ixs with (nolock) on ct_contact.named_during_interview_uid=ixs.interview_uid " - +" left outer join public_health_case contact with (nolock) on (ct_contact.CONTACT_ENTITY_PHC_UID=contact.PUBLIC_HEALTH_CASE_UID "; - public static final String SELECT_PHCPAT_NAMED_BY_PATIENT_COLLECTION3= " ) inner join person with (nolock) on ct_contact.SUBJECT_ENTITY_UID=person.person_uid " - +" inner join person subjectperson with (nolock) on ct_contact.SUBJECT_ENTITY_UID=subjectperson.person_uid " - +" inner join person personcontact with (nolock) on ct_contact.CONTACT_ENTITY_UID=personcontact.person_uid " - +" where ct_contact.record_status_cd='ACTIVE' and Subject_Entity_Phc_Uid ="; - - public static final String SELECT_PHCPAT_NAMED_BY_CONTACT_COLLECTION= + public static final String SELECT_PHCPAT_NAMED_BY_PATIENT_COLLECTION1 = "select subject.cd \"subjectPhcCd\", " + + " ct_contact.subject_entity_phc_uid \"subjectEntityPhcUid\", subject.local_id \"subjectPhcLocalId\"," + + " ct_contact.named_On_Date \"namedOnDate\", ct_contact.CT_Contact_uid \"ctContactUid\",ct_contact.local_Id \"localId\", " + + " ct_contact.subject_Entity_Uid \"subjectEntityUid\", ct_contact.contact_Entity_Uid \"contactEntityUid\", CT_CONTACT.priority_cd \"priorityCd\", ct_contact.disposition_cd \"dispositionCd\", " + + " ct_contact.prog_area_cd \"progAreaCd\", ct_contact.named_during_interview_uid \"namedDuringInterviewUid\", cm.fld_foll_up_dispo \"invDispositionCd\", ct_contact.contact_referral_basis_cd \"contactReferralBasisCd\", " + + " ct_contact.third_party_entity_uid \"thirdPartyEntityUid\", ct_contact.third_party_entity_phc_uid \"thirdPartyEntityPhcUid\", ct_contact.processing_decision_cd \"contactProcessingDecisionCd\", " + + " subjectCM.FLD_FOLL_UP_DISPO \"sourceDispositionCd\", subject.cd \"sourceConditionCd\", subjectperson.curr_sex_cd \"sourceCurrentSexCd\", subjectCM.PAT_INTV_STATUS_CD \"sourceInterviewStatusCd\"," + + " contact.public_health_case_uid \"contactEntityPhcUid\", contact.local_id \"contactPhcLocalId\", person.person_parent_uid \"subjectMprUid\" , ixs.interview_date \"interviewDate\", ct_contact.add_time \"createDate\", personcontact.person_parent_uid \"contactMprUid\" " + + " from ct_contact with (nolock) " + + " left outer join public_health_case subject with (nolock) on (ct_contact.SUBJECT_ENTITY_PHC_UID=subject.public_health_case_uid) " + + " left outer join case_management cm with (nolock) on (ct_contact.CONTACT_ENTITY_PHC_UID=cm.public_health_case_uid)" + + " left outer join case_management subjectCM with (nolock) on (ct_contact.SUBJECT_ENTITY_PHC_UID=subjectCM.public_health_case_uid) " + + " left outer join interview ixs with (nolock) on ct_contact.named_during_interview_uid=ixs.interview_uid " + + " left outer join public_health_case contact with (nolock) on (ct_contact.CONTACT_ENTITY_PHC_UID=contact.PUBLIC_HEALTH_CASE_UID "; + public static final String SELECT_PHCPAT_NAMED_BY_PATIENT_COLLECTION3 = " ) inner join person with (nolock) on ct_contact.SUBJECT_ENTITY_UID=person.person_uid " + + " inner join person subjectperson with (nolock) on ct_contact.SUBJECT_ENTITY_UID=subjectperson.person_uid " + + " inner join person personcontact with (nolock) on ct_contact.CONTACT_ENTITY_UID=personcontact.person_uid " + + " where ct_contact.record_status_cd='ACTIVE' and Subject_Entity_Phc_Uid ="; + + public static final String SELECT_PHCPAT_NAMED_BY_CONTACT_COLLECTION = "select ct_contact.named_On_Date \"namedOnDate\", " + - "ct_contact.CT_Contact_uid \"ctContactUid\", " + - "ct_contact.local_Id \"localId\", " - +" ct_contact.subject_Entity_Uid \"subjectEntityUid\", " + - "ct_contact.contact_Entity_Uid \"contactEntityUid\", " + - "CT_CONTACT.priority_cd \"priorityCd\", " + - "ct_contact.disposition_cd \"dispositionCd\", " - +" ct_contact.prog_area_cd \"progAreaCd\", " + - "ct_contact.named_during_interview_uid \"namedDuringInterviewUid\", " + - "ct_contact.contact_referral_basis_cd \"contactReferralBasisCd\", " - +" ct_contact.third_party_entity_uid \"thirdPartyEntityUid\"," + - " ct_contact.third_party_entity_phc_uid \"thirdPartyEntityPhcUid\", " + - "ct_contact.processing_decision_cd \"contactProcessingDecisionCd\", " - +" subjectCM.FLD_FOLL_UP_DISPO \"sourceDispositionCd\", " + - "subject.cd \"sourceConditionCd\", " + - "subjectperson.curr_sex_cd \"sourceCurrentSexCd\", " + - "subjectCM.PAT_INTV_STATUS_CD \"sourceInterviewStatusCd\"," - +" ct_contact.SUBJECT_ENTITY_PHC_UID \"subjectEntityPhcUid\"," + - " ixs.interview_date \"interviewDate\", " + - " ct_contact.add_time \"createDate\", " + - "subject.local_id \"subjectPhcLocalId\", " + - "person.person_parent_uid \"contactMprUid\" ," + - " subject.cd \"subjectPhcCd\", " + - "subjectperson.person_parent_uid \"subjectMprUid\" " - +" from ct_contact with (nolock) " - +" left outer join public_health_case subject with (nolock) on (ct_contact.SUBJECT_ENTITY_PHC_UID=subject.public_health_case_uid) " - +" left outer join case_management cm with (nolock) on (ct_contact.CONTACT_ENTITY_PHC_UID=cm.public_health_case_uid) " - +" left outer join case_management subjectCM with (nolock) on (ct_contact.SUBJECT_ENTITY_PHC_UID=subjectCM.public_health_case_uid) " - +" left outer join interview ixs with (nolock) on ct_contact.named_during_interview_uid=ixs.interview_uid " - +" inner join person with (nolock) on ct_contact.CONTACT_ENTITY_UID=person.person_uid " - +" inner join person subjectperson with (nolock) on ct_contact.SUBJECT_ENTITY_UID=subjectperson.person_uid " - +" where ct_contact.record_status_cd='ACTIVE' and CONTACT_ENTITY_PHC_UID ="; - - public static final String SELECT_PHCPAT_OTHER_NAMED_BY_CONTACT_COLLECTION="select" + + "ct_contact.CT_Contact_uid \"ctContactUid\", " + + "ct_contact.local_Id \"localId\", " + + " ct_contact.subject_Entity_Uid \"subjectEntityUid\", " + + "ct_contact.contact_Entity_Uid \"contactEntityUid\", " + + "CT_CONTACT.priority_cd \"priorityCd\", " + + "ct_contact.disposition_cd \"dispositionCd\", " + + " ct_contact.prog_area_cd \"progAreaCd\", " + + "ct_contact.named_during_interview_uid \"namedDuringInterviewUid\", " + + "ct_contact.contact_referral_basis_cd \"contactReferralBasisCd\", " + + " ct_contact.third_party_entity_uid \"thirdPartyEntityUid\"," + + " ct_contact.third_party_entity_phc_uid \"thirdPartyEntityPhcUid\", " + + "ct_contact.processing_decision_cd \"contactProcessingDecisionCd\", " + + " subjectCM.FLD_FOLL_UP_DISPO \"sourceDispositionCd\", " + + "subject.cd \"sourceConditionCd\", " + + "subjectperson.curr_sex_cd \"sourceCurrentSexCd\", " + + "subjectCM.PAT_INTV_STATUS_CD \"sourceInterviewStatusCd\"," + + " ct_contact.SUBJECT_ENTITY_PHC_UID \"subjectEntityPhcUid\"," + + " ixs.interview_date \"interviewDate\", " + + " ct_contact.add_time \"createDate\", " + + "subject.local_id \"subjectPhcLocalId\", " + + "person.person_parent_uid \"contactMprUid\" ," + + " subject.cd \"subjectPhcCd\", " + + "subjectperson.person_parent_uid \"subjectMprUid\" " + + " from ct_contact with (nolock) " + + " left outer join public_health_case subject with (nolock) on (ct_contact.SUBJECT_ENTITY_PHC_UID=subject.public_health_case_uid) " + + " left outer join case_management cm with (nolock) on (ct_contact.CONTACT_ENTITY_PHC_UID=cm.public_health_case_uid) " + + " left outer join case_management subjectCM with (nolock) on (ct_contact.SUBJECT_ENTITY_PHC_UID=subjectCM.public_health_case_uid) " + + " left outer join interview ixs with (nolock) on ct_contact.named_during_interview_uid=ixs.interview_uid " + + " inner join person with (nolock) on ct_contact.CONTACT_ENTITY_UID=person.person_uid " + + " inner join person subjectperson with (nolock) on ct_contact.SUBJECT_ENTITY_UID=subjectperson.person_uid " + + " where ct_contact.record_status_cd='ACTIVE' and CONTACT_ENTITY_PHC_UID ="; + + public static final String SELECT_PHCPAT_OTHER_NAMED_BY_CONTACT_COLLECTION = "select" + " ct_contact.named_On_Date \"namedOnDate\"," + " ct_contact.CT_Contact_uid \"ctContactUid\", " + "ct_contact.local_Id \"localId\", " - +" ct_contact.subject_Entity_Uid \"subjectEntityUid\"," + + + " ct_contact.subject_Entity_Uid \"subjectEntityUid\"," + " ct_contact.contact_Entity_Uid \"contactEntityUid\"," + " CT_CONTACT.priority_cd \"priorityCd\", " + "ct_contact.disposition_cd \"dispositionCd\", " - +" ct_contact.prog_area_cd \"progAreaCd\"," + + + " ct_contact.prog_area_cd \"progAreaCd\"," + " ct_contact.named_during_interview_uid \"namedDuringInterviewUid\"," + " ct_contact.contact_referral_basis_cd \"contactReferralBasisCd\", " - +" ct_contact.third_party_entity_uid \"thirdPartyEntityUid\"," + + " ct_contact.third_party_entity_uid \"thirdPartyEntityUid\"," + " ct_contact.third_party_entity_phc_uid \"thirdPartyEntityPhcUid\"," + " ct_contact.processing_decision_cd \"contactProcessingDecisionCd\", " - +" subjectCM.FLD_FOLL_UP_DISPO \"sourceDispositionCd\", " + + + " subjectCM.FLD_FOLL_UP_DISPO \"sourceDispositionCd\", " + "subject.cd \"sourceConditionCd\"," + " subjectperson.curr_sex_cd \"sourceCurrentSexCd\"," + " subjectCM.PAT_INTV_STATUS_CD \"sourceInterviewStatusCd\"," - +" ct_contact.SUBJECT_ENTITY_PHC_UID \"subjectEntityPhcUid\", " + + + " ct_contact.SUBJECT_ENTITY_PHC_UID \"subjectEntityPhcUid\", " + " ixs.interview_date \"interviewDate\", " + " ct_contact.add_time \"createDate\"," + " subject.local_id \"subjectPhcLocalId\"," + " person.person_parent_uid \"contactMprUid\" , " + "subject.cd \"subjectPhcCd\"," + " subjectperson.person_parent_uid \"subjectMprUid\" " - +" from ct_contact with (nolock) " - +" left outer join public_health_case subject with (nolock) on (ct_contact.SUBJECT_ENTITY_PHC_UID=subject.public_health_case_uid) " - +" left outer join case_management cm with (nolock) on (ct_contact.THIRD_PARTY_ENTITY_PHC_UID=cm.public_health_case_uid) " - +" left outer join case_management subjectCM with (nolock) on (ct_contact.SUBJECT_ENTITY_PHC_UID=subjectCM.public_health_case_uid) " - +" left outer join interview ixs with (nolock) on ct_contact.named_during_interview_uid=ixs.interview_uid " - +" inner join person with (nolock) on ct_contact.THIRD_PARTY_ENTITY_UID=person.person_uid " - +" inner join person subjectperson with (nolock) on ct_contact.SUBJECT_ENTITY_UID=subjectperson.person_uid " - +" where ct_contact.record_status_cd='ACTIVE' and THIRD_PARTY_ENTITY_PHC_UID ="; + + " from ct_contact with (nolock) " + + " left outer join public_health_case subject with (nolock) on (ct_contact.SUBJECT_ENTITY_PHC_UID=subject.public_health_case_uid) " + + " left outer join case_management cm with (nolock) on (ct_contact.THIRD_PARTY_ENTITY_PHC_UID=cm.public_health_case_uid) " + + " left outer join case_management subjectCM with (nolock) on (ct_contact.SUBJECT_ENTITY_PHC_UID=subjectCM.public_health_case_uid) " + + " left outer join interview ixs with (nolock) on ct_contact.named_during_interview_uid=ixs.interview_uid " + + " inner join person with (nolock) on ct_contact.THIRD_PARTY_ENTITY_UID=person.person_uid " + + " inner join person subjectperson with (nolock) on ct_contact.SUBJECT_ENTITY_UID=subjectperson.person_uid " + + " where ct_contact.record_status_cd='ACTIVE' and THIRD_PARTY_ENTITY_PHC_UID ="; public static final String SELECT_LABRESULTED_REFLEXTEST_SUMMARY_FORWORKUP_SQL = "SELECT distinct " + - " obs.observation_uid \"observationUid\" , "+ + " obs.observation_uid \"observationUid\" , " + " obs1.ctrl_Cd_User_Defined_1 \"ctrlCdUserDefined1\", " + " act.source_act_uid \"sourceActUid\", " + " obs1.local_id \"localId\"," + - " obs1.cd_desc_txt \"resultedTest\", "+ + " obs1.cd_desc_txt \"resultedTest\", " + " obs1.cd \"resultedTestCd\", " + - " obs1.cd_system_cd \"cdSystemCd\", "+ - " obs1.status_cd \"resultedTestStatusCd\", "+ // Added this line for ER16368 + " obs1.cd_system_cd \"cdSystemCd\", " + + " obs1.status_cd \"resultedTestStatusCd\", " + // Added this line for ER16368 " obsvaluecoded.code \"codedResultValue\", " + " obsvaluecoded.display_name \"organismName\", " + " obsvaluecoded.code_system_cd \"organismCodeSystemCd\", " + - " obsnumeric.high_range \"highRange\","+ - " obsnumeric.low_range \"lowRange\","+ - " obsnumeric.comparator_cd_1 \"numericResultCompare\","+ + " obsnumeric.high_range \"highRange\"," + + " obsnumeric.low_range \"lowRange\"," + + " obsnumeric.comparator_cd_1 \"numericResultCompare\"," + " obsnumeric.separator_cd \"numericResultSeperator\", " + - " obsnumeric.numeric_value_1 \"numericResultValue1\","+ + " obsnumeric.numeric_value_1 \"numericResultValue1\"," + " obsnumeric.numeric_value_2 \"numericResultValue2\", " + " obsnumeric.numeric_scale_1 \"numericScale1\"," + " obsnumeric.numeric_scale_2 \"numericScale2\", " + - " obsnumeric.numeric_unit_cd \"numericResultUnits\", "+ + " obsnumeric.numeric_unit_cd \"numericResultUnits\", " + " obsvaluetext.value_txt \"textResultValue\" " + "FROM observation obs " + " inner JOIN act_relationship act ON act.target_act_uid = obs.observation_uid " + @@ -316,7 +315,7 @@ public class ComplexQueries { " AND (act.source_class_cd = 'OBS') " + " AND (act.record_status_cd = 'ACTIVE') " + " inner JOIN observation obs1 ON act.source_act_uid = obs1.observation_uid " + - " and (obs1.obs_domain_cd_st_1 = 'Result')" + + " and (obs1.obs_domain_cd_st_1 = 'Result')" + " LEFT OUTER JOIN obs_value_numeric obsnumeric on obsnumeric.observation_uid= obs1.observation_uid " + " LEFT OUTER JOIN obs_value_coded obsvaluecoded on obsvaluecoded.observation_uid = obs1.observation_uid " + " LEFT OUTER JOIN obs_value_txt obsvaluetext on obsvaluetext.observation_uid = obs1.observation_uid " + @@ -389,7 +388,7 @@ public class ComplexQueries { "Treatment.cd_desc_txt \"customTreatmentNameCode\", " + "Treatment.activity_from_time \"activityFromTime\", " + - "FROM " + "Public_Health_Case" + " phc with (nolock) , " + + "FROM " + "Public_Health_Case" + " phc with (nolock) , " + "Act_Relationship" + " ar with (nolock) , " + "treatment" + " Treatment with (nolock) , " + "Participation" + " par with (nolock) " + @@ -404,10 +403,10 @@ public class ComplexQueries { "AND par.record_status_cd = 'ACTIVE' " + "AND phc.public_health_case_uid = :PhcUid "; - public static final String DOCUMENT_FOR_A_PHC ="SELECT " + + public static final String DOCUMENT_FOR_A_PHC = "SELECT " + "phc.public_health_case_uid \"phcUid\"," + "Document.nbs_document_uid \"nbsDocumentUid\"," + - "Document.doc_type_cd \"docType\", "+ + "Document.doc_type_cd \"docType\", " + "Document.cd_desc_txt \"cdDescTxt\", " + "Document.add_time \"addTime\", " + "Document.local_id \"localId\"," + @@ -445,18 +444,18 @@ public class ComplexQueries { "Notification.rpt_sent_time RptSentTime, " + "Notification.record_status_time RecordStatusTime, " + " Notification.case_condition_cd Cd, " + - " Notification.jurisdiction_cd jurisdictionCd , "+ - " Notification.program_jurisdiction_oid programJurisdictionOid , "+ + " Notification.jurisdiction_cd jurisdictionCd , " + + " Notification.program_jurisdiction_oid programJurisdictionOid , " + " Public_health_case.case_class_cd ," + - " Notification.auto_resend_ind AutoResendInd, "+ - " Notification.case_class_cd CaseClassCd, "+ + " Notification.auto_resend_ind AutoResendInd, " + + " Notification.case_class_cd CaseClassCd, " + " Notification.local_id LocalId, " + - "Notification.txt Txt, "+ + "Notification.txt Txt, " + " Notification.record_status_cd RecordStatusCd, " + "'F' isHistory ," + " cc.nnd_ind \"nndInd\" , " + "exportReceiving.receiving_system_nm recipient " + - " from Public_health_case Public_health_case with (nolock) , act_relationship ar with (nolock) , nbs_srte..condition_code cc with (nolock) , "+ + " from Public_health_case Public_health_case with (nolock) , act_relationship ar with (nolock) , nbs_srte..condition_code cc with (nolock) , " + " notification Notification with (nolock) " + "LEFT JOIN Export_receiving_facility exportReceiving with (nolock) " + " ON exportReceiving.export_receiving_facility_uid = Notification.export_receiving_facility_uid " + @@ -473,23 +472,23 @@ public class ComplexQueries { public static final String SELECT_NOTIFICATION_HIST_FOR_INVESTIGATION_SQL = "select notHist.notification_uid NotificationUid, " + - " Notification.cd cdNotif,"+ + " Notification.cd cdNotif," + " notHist.add_time AddTime," + " notHist.rpt_sent_time RptSentTime, " + " notHist.record_status_time RecordStatusTime, " + - " notHist.jurisdiction_cd jurisdictionCd, "+ - " notHist.program_jurisdiction_oid programJurisdictionOid, "+ + " notHist.jurisdiction_cd jurisdictionCd, " + + " notHist.program_jurisdiction_oid programJurisdictionOid, " + " notHist.case_condition_cd Cd, " + - "notHist.version_ctrl_nbr VersionCtrlNbr,"+ + "notHist.version_ctrl_nbr VersionCtrlNbr," + " Public_health_case.case_class_cd ," + - " notHist.case_class_cd CaseClassCd, "+ + " notHist.case_class_cd CaseClassCd, " + " notHist.local_id LocalId," + - " notHist.txt Txt, "+ + " notHist.txt Txt, " + " notHist.record_status_cd RecordStatusCd," + " 'T' isHistory ," + " cc.nnd_ind \"nndInd\" , " + " exportReceiving.receiving_system_nm recipient " + - " from Public_health_case Public_health_case with (nolock) , act_relationship ar with (nolock) , nbs_srte..condition_code cc with (nolock) , "+ + " from Public_health_case Public_health_case with (nolock) , act_relationship ar with (nolock) , nbs_srte..condition_code cc with (nolock) , " + " notification Notification with (nolock) , notification_hist notHist with (nolock) " + "LEFT JOIN Export_receiving_facility exportReceiving with (nolock) " + " ON exportReceiving.export_receiving_facility_uid = notHist.export_receiving_facility_uid " + @@ -507,21 +506,21 @@ public class ComplexQueries { public static final String SELECT_NOTIFICATION_FOR_INVESTIGATION_SQL1 = - " select Notification.notification_uid NotificationUid, Notification.cd cdNotif,"+ + " select Notification.notification_uid NotificationUid, Notification.cd cdNotif," + " Notification.add_time AddTime, " + " Notification.rpt_sent_time RptSentTime, " + " Notification.record_status_time \"recordStatusTime\", " + " Public_health_case.case_class_cd, " + - " Notification.case_condition_cd \"Cd\", "+ - " Notification.jurisdiction_cd \"jurisdictionCd\" , "+ - " Notification.program_jurisdiction_oid \"programJurisdictionOid\" , "+ - " Notification.auto_resend_ind AutoResendInd, "+ - " Notification.case_class_cd CaseClassCd, "+ - " Notification.local_id LocalId, Notification.txt Txt, "+ + " Notification.case_condition_cd \"Cd\", " + + " Notification.jurisdiction_cd \"jurisdictionCd\" , " + + " Notification.program_jurisdiction_oid \"programJurisdictionOid\" , " + + " Notification.auto_resend_ind AutoResendInd, " + + " Notification.case_class_cd CaseClassCd, " + + " Notification.local_id LocalId, Notification.txt Txt, " + " Notification.record_status_cd RecordStatusCd, 'F' isHistory ," + " cc.nnd_ind \"nndInd\" , " + " exportReceiving.receiving_system_nm recipient " + - " from Public_health_case Public_health_case with (nolock) "+ + " from Public_health_case Public_health_case with (nolock) " + " inner join act_relationship ar with (nolock) on " + " Public_health_case.Public_health_case_uid = ar.target_act_uid " + " and ar.type_cd = '" + NEDSSConstant.ACT106_TYP_CD + "'" + @@ -537,7 +536,6 @@ public class ComplexQueries { " and Public_health_case.public_health_case_uid = :PhcUid"; - public static final String SELECT_NOTIFICATION_HIST_FOR_INVESTIGATION_SQL1 = " select notHist.notification_uid NotificationUid, " + " notHist.cd cdNotif, " + @@ -546,15 +544,15 @@ public class ComplexQueries { " notHist.record_status_time \"recordStatusTime\", " + " Public_health_case.case_class_cd, " + " notHist.case_condition_cd \"Cd\", " + - " notHist.jurisdiction_cd \"jurisdictionCd\" , "+ - " notHist.program_jurisdiction_oid \"programJurisdictionOid\" , "+ - " notHist.case_class_cd CaseClassCd, "+ - " notHist.version_ctrl_nbr VersionCtrlNbr, "+ - " notHist.local_id LocalId, notHist.txt Txt, "+ + " notHist.jurisdiction_cd \"jurisdictionCd\" , " + + " notHist.program_jurisdiction_oid \"programJurisdictionOid\" , " + + " notHist.case_class_cd CaseClassCd, " + + " notHist.version_ctrl_nbr VersionCtrlNbr, " + + " notHist.local_id LocalId, notHist.txt Txt, " + " notHist.record_status_cd RecordStatusCd, 'T' isHistory ," + " cc.nnd_ind \"nndInd\" , " + " exportReceiving.receiving_system_nm recipient " + - " from Public_health_case Public_health_case with (nolock) "+ + " from Public_health_case Public_health_case with (nolock) " + " inner join act_relationship ar with (nolock) on " + " Public_health_case.Public_health_case_uid = ar.target_act_uid " + " and ar.type_cd = '" + NEDSSConstant.ACT106_TYP_CD + "'" + @@ -570,22 +568,6 @@ public class ComplexQueries { " where Public_health_case.record_status_cd <> '" + NEDSSConstant.RECORD_STATUS_LOGICAL_DELETE + "'" + " and Public_health_case.public_health_case_uid = :PhcUid"; - - - public static String SELECT_LDF = "SELECT "+ - " sf.ldf_uid \"ldfUid\", "+ - " sf.business_object_nm \"businessObjNm\", "+ - " sf.add_time \"addTime\", "+ - " sf.business_object_uid \"businessObjUid\", "+ - " sf.last_chg_time \"lastChgTime\", "+ - " sf.ldf_value \"ldfValue\", "+ - " sf.version_ctrl_nbr \"versionCtrlNbr\" "+ - " from State_defined_field_data sf, "+ - " state_defined_field_metadata sdfmd "+ - " where sf.ldf_uid = sdfmd.ldf_uid "+ - " and sf.business_object_uid = :businessObjUid "; - - public static final String GET_NBS_DOCUMENT = " SELECT" + " nbsdoc.nbs_document_uid \"nbsDocumentUid\", " + " nbsdoc.local_id \"localId\"," @@ -626,7 +608,7 @@ public class ComplexQueries { + " particip.act_uid = nbsdoc.nbs_document_uid " + " inner join person per on " + " particip.subject_entity_uid = per.person_uid " - + " and particip.type_cd='"+NEDSSConstant.SUBJECT_OF_DOC+ "' " + + " and particip.type_cd='" + NEDSSConstant.SUBJECT_OF_DOC + "' " + " inner join person_name pername on " + " per.person_uid = pername.person_uid " + " left outer join edx_event_process eep on " @@ -634,21 +616,30 @@ public class ComplexQueries { + " and eep.doc_event_type_cd in('CASE','LabReport','MorbReport','CT') " + " and eep.parsed_ind = 'N' " + " WHERE nbsdoc.nbs_document_uid = :NbsUid"; - - - public static final String COINFECTION_INV_LIST_FOR_GIVEN_COINFECTION_ID_SQL = "select distinct " + "phc.public_health_case_uid \"publicHealthCaseUid\"," + " phc.cd \"conditionCd\" " + "from " - + "Public_health_case phc, person, Participation " - + "where phc.investigation_status_cd='O' and phc.record_status_cd !='LOG_DEL' " - + "and phc.public_health_case_uid=participation.act_uid " - + "and participation.type_cd ='SubjOfPHC' " - + "and participation.subject_entity_uid =person.person_uid " - + "and coinfection_id= :CoInfect " - + "and person.person_parent_uid = :PersonUid "; + + "Public_health_case phc, person, Participation " + + "where phc.investigation_status_cd='O' and phc.record_status_cd !='LOG_DEL' " + + "and phc.public_health_case_uid=participation.act_uid " + + "and participation.type_cd ='SubjOfPHC' " + + "and participation.subject_entity_uid =person.person_uid " + + "and coinfection_id= :CoInfect " + + "and person.person_parent_uid = :PersonUid "; + public static String SELECT_LDF = "SELECT " + + " sf.ldf_uid \"ldfUid\", " + + " sf.business_object_nm \"businessObjNm\", " + + " sf.add_time \"addTime\", " + + " sf.business_object_uid \"businessObjUid\", " + + " sf.last_chg_time \"lastChgTime\", " + + " sf.ldf_value \"ldfValue\", " + + " sf.version_ctrl_nbr \"versionCtrlNbr\" " + + " from State_defined_field_data sf, " + + " state_defined_field_metadata sdfmd " + + " where sf.ldf_uid = sdfmd.ldf_uid " + + " and sf.business_object_uid = :businessObjUid "; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/DecisionSupportConstants.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/DecisionSupportConstants.java index 803db2559..08776d460 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/DecisionSupportConstants.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/DecisionSupportConstants.java @@ -1,6 +1,6 @@ package gov.cdc.dataprocessing.constant; -public class DecisionSupportConstants { +public class DecisionSupportConstants { //Basic Criteria constants public static final String ALGORITHM_NM = "AlgorithmName"; @@ -29,9 +29,9 @@ public class DecisionSupportConstants { public static final String NBS_EVENT_DATE_SELECTED = "NbsEventDateSelected"; public static final String TIMEFRAME_OPERATOR_SELECTED = "TimeFrameOperatorSelected"; public static final String TIMEFRAME_DAYS = "TimeframeDays"; - public static final String CURRENT_SELECT_DATE_LOGIC="CurrentSelectDateLogic"; - public static final String CURRENT_CURRENT_SELECT_DATE_LOGIC="CURRENT"; - public static final String SELECT_CURRENT_SELECT_DATE_LOGIC="SELECT"; + public static final String CURRENT_SELECT_DATE_LOGIC = "CurrentSelectDateLogic"; + public static final String CURRENT_CURRENT_SELECT_DATE_LOGIC = "CURRENT"; + public static final String SELECT_CURRENT_SELECT_DATE_LOGIC = "SELECT"; //public static final String CREATE_ALERT = "CREATE_ALERT"; public static final String BEHAVIOR = "DefaultBehavior"; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/DpConstant.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/DpConstant.java index 380d4c97b..747ce6b9a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/DpConstant.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/DpConstant.java @@ -1,9 +1,6 @@ package gov.cdc.dataprocessing.constant; public class DpConstant { - private DpConstant(){ - - } public static final String DP_QUEUED = "RTI_QUEUED"; public static final String DP_SUCCESS_STEP_1 = "RTI_SUCCESS_STEP_1"; public static final String DP_FAILURE_STEP_1 = "RTI_FAILURE_STEP_1"; @@ -12,5 +9,8 @@ private DpConstant(){ public static final String DP_SUCCESS_STEP_3 = "RTI_SUCCESS_STEP_3"; public static final String DP_FAILURE_STEP_3 = "RTI_FAILURE_STEP_3"; public static final String DP_COMPLETED_STEP_1 = "RTI_COMPLETED_WITHOUT_WDS"; + private DpConstant() { + + } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/EdxPHCRConstants.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/EdxPHCRConstants.java index 65f251981..a7391205d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/EdxPHCRConstants.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/EdxPHCRConstants.java @@ -33,7 +33,7 @@ public class EdxPHCRConstants { public static final String DET_MSG_NO_CONDITION = " is not a condition in NBS. Program Area cannot be derived."; public static final String DET_MSG_NOT_AUTH_1 = "User "; public static final String DET_MSG_NOT_AUTH_2 = " is not authorized to autocreate "; - public static final String DET_MSG_UPDATE_DOCUMENT= " marked as an Update to "; + public static final String DET_MSG_UPDATE_DOCUMENT = " marked as an Update to "; public static final String SUM_MSG_INVESTIGATION_CREATE_FAIL_1 = "At least one existing investigation for "; public static final String SUM_MSG_INVESTIGATION_OPEN = "At least one existing open investigation for "; public static final String SUM_MSG_INVESTIGATION_CLOSED = "At least one existing closed investigation for "; @@ -43,20 +43,20 @@ public class EdxPHCRConstants { public static final String SUM_MSG_INVESTIGATION_CREATE_FAIL_2 = " was found. Document logged in Documents Requiring Review queue."; public static final String SUM_MSG_INVESTIGATION_UPDATE_2 = " was found. Updated the most recent investigation "; public static final String SUM_MSG_INVESTIGATION_UPDATE_3 = " was found. Document marked as reviewed "; - public static final String EXISTING_INV_FOUND="At least one existing Investigation(s) found for "; + public static final String EXISTING_INV_FOUND = "At least one existing Investigation(s) found for "; public static final String DET_MSG_INTERVIEW_SUCCESS = "Interview created "; public static final String DET_MSG_INTERVIEW_FAIL = "Failed to create interview"; public static final String DET_MSG_CONTACT_RECORD_SUCCESS = "Contact Record created "; public static final String DET_MSG_CONTACT_RECORD_FAIL = "Failed to create contact record"; - public static final String INV_STR = "Investigation"; public static final String NOT_STR = "Notification"; public static final int MAX_DETAIL_COMMENT_LEN = 1997; public enum MSG_TYPE { - Investigation, Document, Patient, Notification, Jurisdiction, Algorithm, NBS_System, Provider, Organization, Interview, ContactRecord,Place, - }; + Investigation, Document, Patient, Notification, Jurisdiction, Algorithm, NBS_System, Provider, Organization, Interview, ContactRecord, Place, + } + } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/MessageConstants.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/MessageConstants.java index 5a9c493cd..ae99a3f11 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/MessageConstants.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/MessageConstants.java @@ -1,51 +1,51 @@ package gov.cdc.dataprocessing.constant; public class MessageConstants { - public static final String New="New"; - public static final String Read="Read"; + public static final String New = "New"; + public static final String Read = "Read"; public static final String N = "N"; public static final String R = "R"; - public static final String UPDATED="UPDATED"; + public static final String UPDATED = "UPDATED"; - public static final String Delete ="Delete"; + public static final String Delete = "Delete"; - public static final String NEW_PROVIDER ="New Provider"; - public static final String NEW_ASSIGNMENT="New assignment"; - public static final String LAB_REPORT ="Lab Report"; - public static final String NEW_CLUSTER_TO_YOUR_CASE ="New Cluster to your case"; - public static final String NEW_CLUSTER_TO_YOUR_CASE_KEY ="NEW_CLUSTER"; - public static final String INVESTIGATION_REOPENED ="Investigation Reopened"; - public static final String NEW_SECONDARY_ADDED ="New Secondary Added"; - public static final String NEW_SECONDARY_ADDED_KEY ="NEW_SECONDARY"; - public static final String UPDATED_AWAITING_LAB_RESULTS="Updated Awaiting Lab Results"; - public static final String REVIEW_NOTES_UPDATED ="Review Notes Updated"; - public static final String LAB_MORB_MESSAGE_QUEUE_TEXT="New Provider/Lab Report "; + public static final String NEW_PROVIDER = "New Provider"; + public static final String NEW_ASSIGNMENT = "New assignment"; + public static final String LAB_REPORT = "Lab Report"; + public static final String NEW_CLUSTER_TO_YOUR_CASE = "New Cluster to your case"; + public static final String NEW_CLUSTER_TO_YOUR_CASE_KEY = "NEW_CLUSTER"; + public static final String INVESTIGATION_REOPENED = "Investigation Reopened"; + public static final String NEW_SECONDARY_ADDED = "New Secondary Added"; + public static final String NEW_SECONDARY_ADDED_KEY = "NEW_SECONDARY"; + public static final String UPDATED_AWAITING_LAB_RESULTS = "Updated Awaiting Lab Results"; + public static final String REVIEW_NOTES_UPDATED = "Review Notes Updated"; + public static final String LAB_MORB_MESSAGE_QUEUE_TEXT = "New Provider/Lab Report "; /** * Question identifiers for Message Queue */ //public static final String SUPERVISOR_REVIEW_QUESTION_IDENTIFIER="NBS268"; - public static final String CASE_SUPERVISOR_REVIEW_COMMENTS_QUESTION_IDENTIFIER="NBS200"; - public static final String FIELD_SUPERVISOR_REVIEW_COMMENTS_QUESTION_IDENTIFIER="NBS268"; + public static final String CASE_SUPERVISOR_REVIEW_COMMENTS_QUESTION_IDENTIFIER = "NBS200"; + public static final String FIELD_SUPERVISOR_REVIEW_COMMENTS_QUESTION_IDENTIFIER = "NBS268"; /** - *Log Message for the queue + * Log Message for the queue */ - public static final String FIELD_SUPERVISOR_REVIEW_COMMENT_MODIFIED="Field Supervisory Review/Comments Modified"; - public static final String PENDING_LAB_RESULT_UPDATED="Updated Pending Lab Result"; - public static final String NEW_PROVIDER_LAB_REPORT="New provider/lab report"; - public static final String CASE_SUPERVISORY_REVIEW_COMMENT_MODIFIED="Case Supervisory Review/Comments Modified"; + public static final String FIELD_SUPERVISOR_REVIEW_COMMENT_MODIFIED = "Field Supervisory Review/Comments Modified"; + public static final String PENDING_LAB_RESULT_UPDATED = "Updated Pending Lab Result"; + public static final String NEW_PROVIDER_LAB_REPORT = "New provider/lab report"; + public static final String CASE_SUPERVISORY_REVIEW_COMMENT_MODIFIED = "Case Supervisory Review/Comments Modified"; /** * Constant for Lab */ - public static final String RESULT_PENDING_CD="P"; + public static final String RESULT_PENDING_CD = "P"; /** * Constants for LAB and Morb */ - public static final String REFERRAL_CODE_FOR_LAB="T1"; - public static final String REFERRAL_CODE_FOR_MORB="T2"; + public static final String REFERRAL_CODE_FOR_LAB = "T1"; + public static final String REFERRAL_CODE_FOR_MORB = "T2"; public static final String DISPOSITION_SPECIFIED = "Disposition specified for all Contacts"; - public static final String DISPOSITION_SPECIFIED_KEY ="DISPOSITION_SPECIFIED"; + public static final String DISPOSITION_SPECIFIED_KEY = "DISPOSITION_SPECIFIED"; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/NBSConstantUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/NBSConstantUtil.java index 433aec110..c9d27a620 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/NBSConstantUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/NBSConstantUtil.java @@ -248,9 +248,9 @@ public class NBSConstantUtil { public static final String DSSummaryReportInfo = "DSSummaryReportInfo"; //public static final String DSPublicHealthCaseVO = "DSPublicHealthCaseVO"; - public static final String DSRejectedDeleteString = "DSRejectedDeleteString"; - public static final String DSInvestigationFormCd = "DSInvestigationFormCd"; - public static final String DSDocumentUID ="DSDocumentUID"; + public static final String DSRejectedDeleteString = "DSRejectedDeleteString"; + public static final String DSInvestigationFormCd = "DSInvestigationFormCd"; + public static final String DSDocumentUID = "DSDocumentUID"; public static final String DSDocConditionCD = "DSDocConditionCD"; public static final String VaccinationIDFromInv = "VaccinationIDFromInv"; public static final String ViewObservationLab = "ViewObservationLab"; @@ -277,17 +277,17 @@ public class NBSConstantUtil { public static final String DSObservationList = "DSObservationList"; public static final String DSFilePath = "DSFilePath"; public static final String CONTACT_REC = "CONTACT_REC"; - public static final String DSContextVO="DSContextVO"; + public static final String DSContextVO = "DSContextVO"; public static final String DSPatientMPRUID = "DSPatientPersonUID"; - public static final String ContactTracing="ContactTracing"; + public static final String ContactTracing = "ContactTracing"; public static final String DSPatientMap = "DSPatientMap"; public static final String DSInvestigatorUid = "DSInvestigatorUid"; - public static final String DSContactColl="DSContactColl"; - public static final String DSInterviewList="DSInterviewList"; - public static final String DSSharedInd="DSSharedInd"; - public static final String DSConditionCdDescTxt="DSConditionCdDescTxt"; - public static final String ContactRecordFormPrefix="CT"; - public static final String InvestigationFormPrefix="PG"; + public static final String DSContactColl = "DSContactColl"; + public static final String DSInterviewList = "DSInterviewList"; + public static final String DSSharedInd = "DSSharedInd"; + public static final String DSConditionCdDescTxt = "DSConditionCdDescTxt"; + public static final String ContactRecordFormPrefix = "CT"; + public static final String InvestigationFormPrefix = "PG"; public static final String DSCoinfectionInvSummVO = "DSCoinfectionInvSummVO"; public static final String DSStdDispositionCd = "DSStdDispositionCd"; public static final String DSSourceConditionCd = "DSSourceConditionCd"; @@ -297,6 +297,6 @@ public class NBSConstantUtil { public static final String DSRecordSearchClosureInvSummVO = "DSRecordSearchClosureInvSummVO"; public static final String DSSecondaryReferralInvSummVO = "DSSecondaryReferralInvSummVO"; public static final String DSSearchCriteriaMap = "DSSearchCriteriaMap"; - public static final String ViewElectronicDoc="viewELRDoc"; + public static final String ViewElectronicDoc = "viewELRDoc"; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/RenderConstant.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/RenderConstant.java index 910233f25..7c3e07a91 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/RenderConstant.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/RenderConstant.java @@ -31,24 +31,24 @@ public class RenderConstant { public static final String NBS_CASE_ANSWER_PARTICIPANT = "NBS_CASE_ANSWER_PARTICIPANT"; public static final String REPEATING_NBS_CASE_ANSWER = "REPEATING_NBS_CASE_ANSWER"; public static final String OBSERVATION_DB = "OBSERVATION."; - public static final String OBS_VALUE_CODED_DB="OBS_VALUE_CODED."; - public static final String OBS_VALUE_DATE_DB="OBS_VALUE_DATE."; - public static final String OBS_VALUE_NUMERIC_DB="OBS_VALUE_NUMERIC."; - public static final String OBS_VALUE_TXT_DB="OBS_VALUE_TXT."; - public static final String OBSERVATION_INTERP_DB="OBSERVATION_INTERP."; - public static final String OBSERVATION_REASON_DB="OBSERVATION_REASON."; - public static final String OBS_VALUE_CODED_MOD_DB="OBS_VALUE_CODED_MOD."; + public static final String OBS_VALUE_CODED_DB = "OBS_VALUE_CODED."; + public static final String OBS_VALUE_DATE_DB = "OBS_VALUE_DATE."; + public static final String OBS_VALUE_NUMERIC_DB = "OBS_VALUE_NUMERIC."; + public static final String OBS_VALUE_TXT_DB = "OBS_VALUE_TXT."; + public static final String OBSERVATION_INTERP_DB = "OBSERVATION_INTERP."; + public static final String OBSERVATION_REASON_DB = "OBSERVATION_REASON."; + public static final String OBS_VALUE_CODED_MOD_DB = "OBS_VALUE_CODED_MOD."; public static final String OBSERVATION = "OBSERVATION"; - public static final String OBS_VALUE_CODED="OBS_VALUE_CODED"; - public static final String OBS_VALUE_DATE="OBS_VALUE_DATE"; - public static final String OBS_VALUE_NUMERIC="OBS_VALUE_NUMERIC"; - public static final String OBS_VALUE_TXT="OBS_VALUE_TXT"; - public static final String OBSERVATION_INTERP="OBSERVATION_INTERP"; - public static final String OBSERVATION_REASON="OBSERVATION_REASON"; - public static final String OBS_VALUE_CODED_MOD="OBS_VALUE_CODED_MOD"; - public static final String MATERIAL="MATERIAL"; - public static final String MATERIAL_CD="MATERIAL.CD"; + public static final String OBS_VALUE_CODED = "OBS_VALUE_CODED"; + public static final String OBS_VALUE_DATE = "OBS_VALUE_DATE"; + public static final String OBS_VALUE_NUMERIC = "OBS_VALUE_NUMERIC"; + public static final String OBS_VALUE_TXT = "OBS_VALUE_TXT"; + public static final String OBSERVATION_INTERP = "OBSERVATION_INTERP"; + public static final String OBSERVATION_REASON = "OBSERVATION_REASON"; + public static final String OBS_VALUE_CODED_MOD = "OBS_VALUE_CODED_MOD"; + public static final String MATERIAL = "MATERIAL"; + public static final String MATERIAL_CD = "MATERIAL.CD"; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/elr/EdxELRConstant.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/elr/EdxELRConstant.java index 7c9298786..41e4fc51d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/elr/EdxELRConstant.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/elr/EdxELRConstant.java @@ -3,143 +3,131 @@ import gov.cdc.dataprocessing.constant.enums.NbsInterfaceStatus; public class EdxELRConstant { - public static String PATIENT_LDF = "PAT"; - public static final String ELECTRONIC_IND_ELR = "Y"; //Entity ID specific mappings - public static final String ELR_PERSON_CD="PSN"; - public static final String ELR_PATIENT_CD="PAT"; - public static final String ELR_PATIENT="PATIENT"; - public static final String ELR_NOK_DESC="Observation Participant"; - public static final String ELR_PERSON_TYPE="PN"; - public static final String ELR_PERSON_TYPE_DESC="Person Number"; - public static final String ELR_PATIENT_ALTERNATE_IND="ELR_PATIENT_ALTERNATE_IND"; - public static final String ELR_PATIENT_ALTERNATE_TYPE="APT"; - public static final String EI_TYPE="EI_TYPE"; - public static final String ELR_LAB_CD="LAB214"; - - - public static final String ELR_PATIENT_ALTERNATE_DESC="Alternate Person Number�"; - public static final String ELR_CLIA_DESC="Clinical Laboratory Improvement Amendment"; - public static final String ELR_CLIA_CD="CLIA"; + public static final String ELR_PERSON_CD = "PSN"; + public static final String ELR_PATIENT_CD = "PAT"; + public static final String ELR_PATIENT = "PATIENT"; + public static final String ELR_NOK_DESC = "Observation Participant"; + public static final String ELR_PERSON_TYPE = "PN"; + public static final String ELR_PERSON_TYPE_DESC = "Person Number"; + public static final String ELR_PATIENT_ALTERNATE_IND = "ELR_PATIENT_ALTERNATE_IND"; + public static final String ELR_PATIENT_ALTERNATE_TYPE = "APT"; + public static final String EI_TYPE = "EI_TYPE"; + public static final String ELR_LAB_CD = "LAB214"; + public static final String ELR_PATIENT_ALTERNATE_DESC = "Alternate Person Number�"; + public static final String ELR_CLIA_DESC = "Clinical Laboratory Improvement Amendment"; + public static final String ELR_CLIA_CD = "CLIA"; public static final String ELR_LAB_COMMENT = "LabComment"; public static final String ELR_AR_LAB_COMMENT = "APND"; - public static final String ADD_REASON_CD="Add"; - public static final String ELR_DEFAULT_CLIA="DEFAULT"; - + public static final String ADD_REASON_CD = "Add"; + public static final String ELR_DEFAULT_CLIA = "DEFAULT"; public static final String ELR_OBS_STATUS_CD_COMPLETED = "D"; public static final String ELR_OBS_STATUS_CD_SUPERCEDED = "T"; public static final String ELR_OBS_STATUS_CD_NEW = "N"; - - public static final String ELR_SENDING_FACILITY_CD="SF"; - public static final String ELR_SENDING_FACILITY_DESC="Sending Facility"; - public static final String ELR_SENDING_HCFAC="HCFAC"; - public static final String ELR_OBS="OBS"; - public static final String ELR_AUTHOR_CD="AUT"; - public static final String ELR_AUTHOR_DESC="Author"; - public static final String ELR_STANDARD_INDUSTRY_CLASS_CD ="621511"; - public static final String ELR_STANDARD_INDUSTRY_DESC_TXT ="Medical Laboratory"; - public static final String ELR_LABORATORY_DESC="Laboratory"; - public static final String ELR_SENDING_LAB_CD="LAB"; - public static final String ELR_ELECTRONIC_IND="Y"; - public static final String ELR_LEGAL_NAME="L"; - public static final String ELR_ALIAS_NAME="AL"; - public static final String ELR_MOTHER_IDENTIFIER="MO"; - public static final String ELR_ACCOUNT_IDENTIFIER="AN"; - public static final String ELR_ACCOUNT_DESC="Account number"; - public static final String ELR_ALTERNAT_EPERSON_IDENTIFIER="APT"; - public static final String ELR_SS_TYPE="SS"; - public static final String ELR_SS_AUTHO_TYPE="SSA"; - public static final String ELR_SS_DESC_TYPE="Social Security"; - public static final String ELR_ACTIVE="ACTIVE"; - public static final String ELR_ACTIVE_CD="A"; - public static final String ELR_FACILITY_CD="FI"; - public static final String ELR_FACILITY_DESC="Facility Identifier"; - public static final String ELR_DRIVER_LIC_CD="DL"; - public static final String ELR_DRIVER_LIC_DESC="Driver's license number"; - - public static final String ELR_RECEIVING_FACILITY_CD="RF"; - public static final String ELR_RECEIVING_FACILITY_DESC="Receiving Facility"; - public static final String ELR_RECEIVING_ROLE_CLASS_CD= "PHO"; - public static final String ELR_RECEIVING_ORG_CLASS_CD= "DOH"; - public static final String ELR_RECEIVING_ORG_CLASS_DESC= "Department of Health"; + public static final String ELR_SENDING_FACILITY_CD = "SF"; + public static final String ELR_SENDING_FACILITY_DESC = "Sending Facility"; + public static final String ELR_SENDING_HCFAC = "HCFAC"; + public static final String ELR_OBS = "OBS"; + public static final String ELR_AUTHOR_CD = "AUT"; + public static final String ELR_AUTHOR_DESC = "Author"; + public static final String ELR_STANDARD_INDUSTRY_CLASS_CD = "621511"; + public static final String ELR_STANDARD_INDUSTRY_DESC_TXT = "Medical Laboratory"; + public static final String ELR_LABORATORY_DESC = "Laboratory"; + public static final String ELR_SENDING_LAB_CD = "LAB"; + public static final String ELR_ELECTRONIC_IND = "Y"; + public static final String ELR_LEGAL_NAME = "L"; + public static final String ELR_ALIAS_NAME = "AL"; + public static final String ELR_MOTHER_IDENTIFIER = "MO"; + public static final String ELR_ACCOUNT_IDENTIFIER = "AN"; + public static final String ELR_ACCOUNT_DESC = "Account number"; + public static final String ELR_ALTERNAT_EPERSON_IDENTIFIER = "APT"; + public static final String ELR_SS_TYPE = "SS"; + public static final String ELR_SS_AUTHO_TYPE = "SSA"; + public static final String ELR_SS_DESC_TYPE = "Social Security"; + public static final String ELR_ACTIVE = "ACTIVE"; + public static final String ELR_ACTIVE_CD = "A"; + public static final String ELR_FACILITY_CD = "FI"; + public static final String ELR_FACILITY_DESC = "Facility Identifier"; + public static final String ELR_DRIVER_LIC_CD = "DL"; + public static final String ELR_DRIVER_LIC_DESC = "Driver's license number"; + public static final String ELR_RECEIVING_FACILITY_CD = "RF"; + public static final String ELR_RECEIVING_FACILITY_DESC = "Receiving Facility"; + public static final String ELR_RECEIVING_ROLE_CLASS_CD = "PHO"; + public static final String ELR_RECEIVING_ORG_CLASS_CD = "DOH"; + public static final String ELR_RECEIVING_ORG_CLASS_DESC = "Department of Health"; public static final String ELR_RECEIVING_STANDARD_INDUSTRY_CLASS_CD = "621399"; public static final String ELR_PERFORMING_STANDARD_INDUSTRY_CLASS_CD = "621511"; public static final String ELR_RECEIVING_STANDARD_INDUSTRY_CLASS_DESC = "Offices of Misc. Health Providers"; public static final String ELR_ORG = "ORG"; - public static final String ELR_MESSAGE_CTRL_CD="MCID"; - public static final String ELR_MESSAGE_CTRL_DESC="Message Control ID"; - public static final String ELR_NEXT_OF_KIN="NOK"; - public static final String ELR_NEXT_OF_KIN_RL_CLASS="RL_CLASS"; + public static final String ELR_MESSAGE_CTRL_CD = "MCID"; + public static final String ELR_MESSAGE_CTRL_DESC = "Message Control ID"; + public static final String ELR_NEXT_OF_KIN = "NOK"; + public static final String ELR_NEXT_OF_KIN_RL_CLASS = "RL_CLASS"; public static final String ELR_CON = "CON"; - public static final String ELR_POSTAL_CD="PST"; - public static final String ELR_USE_EMERGENCY_CONTACT_CD="EC"; - public static final String ELR_HOUSE_DESC="House"; - public static final String ELR_HOUSE_CD="H"; - public static final String ELR_TELE_CD="TELE"; - public static final String ELR_PHONE_CD="PH"; - public static final String ELR_PHONE_DESC="PHONE"; - public static final String ELR_OP_CD="OP"; - public static final String ELR_OP_DESC="Order Provider"; - public static final String ELR_ROLE_REASON="because"; - public static final String ELR_OTHER_CD="OTH"; - public static final String ELR_OTHER_DESC="Other"; - public static final String ELR_ORDERER_CD="ORD"; - public static final String ELR_ORDERER_DESC="Orderer"; - public static final String ELR_OFFICE_DESC="Office"; - public static final String ELR_OFFICE_CD="O"; - public static final String ELR_WORKPLACE_CD="WP"; - public static final String ELR_WORKPLACE_DESC="Workplace"; - public static final String CTRL_CD_DISPLAY_FORM="LabReport"; - public static final String ELR_PATIENT_SUBJECT_CD="PATSBJ"; - public static final String ELR_PATIENT_SUBJECT_DESC="Patient Subject"; - public static final String ELR_FILLER_NUMBER_CD="FN"; - public static final String ELR_FILLER_NUMBER_DESC="Filler Number"; - public static final String ELR_EQUIPMENT_INSTANCE_CD="EII"; - public static final String ELR_EQUIPMENT_INSTANCE_DESC="Equipment Instance Identifier"; - public static final String ELR_LOINC_CD="LN"; - public static final String ELR_LOINC_DESC="LOINC"; - public static final String ELR_LOCAL_DESC="LOCAL"; - public static final String ELR_LOCAL_CD="L"; - public static final String ELR_SPECIMEN_PROCURER_CD="SPP"; - public static final String ELR_SPECIMEN_PROCURER_DESC="Specimen Procurer"; - - public static final String ELR_PROV_CD="PROV"; - public static final String ELR_PROVIDER_CD="PRV"; - public static final String ELR_PROVIDER_DESC="Provider"; - public static final String ELR_EMP_IDENT_CD="EI"; - public static final String ELR_EMP_IDENT_DESC="Employee Identifier"; - public static final String ELR_SPECIMEN_CD="SPC"; - public static final String ELR_SPECIMEN_DESC="Specimen"; - public static final String ELR_NO_INFO_CD="NI"; - public static final String ELR_NO_INFO_DESC="No Information Given"; - public static final String ELR_MAT_CD="MAT"; - public static final String ELR_MAT_DESC="MATERIAL"; - public static final String ELR_PROVIDER_REG_NUM_CD="PRN"; - public static final String ELR_PROVIDER_REG_NUM_DESC="Provider Registration Number"; - public static final String ELR_LAB_PROVIDER_CD="LABP"; - public static final String ELR_LAB_PROVIDER_DESC="Laboratory Provider"; - public static final String ELR_LAB_VERIFIER_CD="VRF"; - public static final String ELR_LAB_VERIFIER_DESC="Verifier"; - public static final String ELR_LAB_ASSISTANT_CD="ASS"; - public static final String ELR_LAB_ASSISTANT_DESC="Assistant"; - public static final String ELR_LAB_PERFORMER_CD="PRF"; - public static final String ELR_LAB_PERFORMER_DESC="Performer"; - public static final String ELR_LAB_ENTERER_CD="ENT"; - public static final String ELR_LAB_ENTERER_DESC="Enterer"; - - public static final String ELR_COMP_CD="COMP"; - public static final String ELR_COMP_DESC="Has Component"; - public static final String ELR_SNOMED_CD="SNM"; - public static final String ELR_SNOMED_DESC="SNOMED"; - - public static final String ELR_REPORTING_ENTITY_CD="RE"; - public static final String ELR_REPORTING_ENTITY_DESC="Reporting Entity"; - - - public static final String ELR_PATIENT_ROLE_CD="PAT"; - public static final String ELR_NEXT_F_KIN_ROLE_CD="NOK"; - public static final String ELR_NEXT_F_KIN_ROLE_DESC="Next of Kin"; + public static final String ELR_POSTAL_CD = "PST"; + public static final String ELR_USE_EMERGENCY_CONTACT_CD = "EC"; + public static final String ELR_HOUSE_DESC = "House"; + public static final String ELR_HOUSE_CD = "H"; + public static final String ELR_TELE_CD = "TELE"; + public static final String ELR_PHONE_CD = "PH"; + public static final String ELR_PHONE_DESC = "PHONE"; + public static final String ELR_OP_CD = "OP"; + public static final String ELR_OP_DESC = "Order Provider"; + public static final String ELR_ROLE_REASON = "because"; + public static final String ELR_OTHER_CD = "OTH"; + public static final String ELR_OTHER_DESC = "Other"; + public static final String ELR_ORDERER_CD = "ORD"; + public static final String ELR_ORDERER_DESC = "Orderer"; + public static final String ELR_OFFICE_DESC = "Office"; + public static final String ELR_OFFICE_CD = "O"; + public static final String ELR_WORKPLACE_CD = "WP"; + public static final String ELR_WORKPLACE_DESC = "Workplace"; + public static final String CTRL_CD_DISPLAY_FORM = "LabReport"; + public static final String ELR_PATIENT_SUBJECT_CD = "PATSBJ"; + public static final String ELR_PATIENT_SUBJECT_DESC = "Patient Subject"; + public static final String ELR_FILLER_NUMBER_CD = "FN"; + public static final String ELR_FILLER_NUMBER_DESC = "Filler Number"; + public static final String ELR_EQUIPMENT_INSTANCE_CD = "EII"; + public static final String ELR_EQUIPMENT_INSTANCE_DESC = "Equipment Instance Identifier"; + public static final String ELR_LOINC_CD = "LN"; + public static final String ELR_LOINC_DESC = "LOINC"; + public static final String ELR_LOCAL_DESC = "LOCAL"; + public static final String ELR_LOCAL_CD = "L"; + public static final String ELR_SPECIMEN_PROCURER_CD = "SPP"; + public static final String ELR_SPECIMEN_PROCURER_DESC = "Specimen Procurer"; + public static final String ELR_PROV_CD = "PROV"; + public static final String ELR_PROVIDER_CD = "PRV"; + public static final String ELR_PROVIDER_DESC = "Provider"; + public static final String ELR_EMP_IDENT_CD = "EI"; + public static final String ELR_EMP_IDENT_DESC = "Employee Identifier"; + public static final String ELR_SPECIMEN_CD = "SPC"; + public static final String ELR_SPECIMEN_DESC = "Specimen"; + public static final String ELR_NO_INFO_CD = "NI"; + public static final String ELR_NO_INFO_DESC = "No Information Given"; + public static final String ELR_MAT_CD = "MAT"; + public static final String ELR_MAT_DESC = "MATERIAL"; + public static final String ELR_PROVIDER_REG_NUM_CD = "PRN"; + public static final String ELR_PROVIDER_REG_NUM_DESC = "Provider Registration Number"; + public static final String ELR_LAB_PROVIDER_CD = "LABP"; + public static final String ELR_LAB_PROVIDER_DESC = "Laboratory Provider"; + public static final String ELR_LAB_VERIFIER_CD = "VRF"; + public static final String ELR_LAB_VERIFIER_DESC = "Verifier"; + public static final String ELR_LAB_ASSISTANT_CD = "ASS"; + public static final String ELR_LAB_ASSISTANT_DESC = "Assistant"; + public static final String ELR_LAB_PERFORMER_CD = "PRF"; + public static final String ELR_LAB_PERFORMER_DESC = "Performer"; + public static final String ELR_LAB_ENTERER_CD = "ENT"; + public static final String ELR_LAB_ENTERER_DESC = "Enterer"; + public static final String ELR_COMP_CD = "COMP"; + public static final String ELR_COMP_DESC = "Has Component"; + public static final String ELR_SNOMED_CD = "SNM"; + public static final String ELR_SNOMED_DESC = "SNOMED"; + public static final String ELR_REPORTING_ENTITY_CD = "RE"; + public static final String ELR_REPORTING_ENTITY_DESC = "Reporting Entity"; + public static final String ELR_PATIENT_ROLE_CD = "PAT"; + public static final String ELR_NEXT_F_KIN_ROLE_CD = "NOK"; + public static final String ELR_NEXT_F_KIN_ROLE_DESC = "Next of Kin"; public static final String ELR_DOC_TYPE_CD = "11648804"; public static final String ELR_REFER_CD = "REFR"; public static final String ELR_REFER_DESC = "Refers"; @@ -149,82 +137,71 @@ public class EdxELRConstant { public static final String ELR_RESULT_CD = "Result"; public static final String ELR_ORDER_CD = "Order"; public static final String ELR_REF_ORDER_CD = "R_Order"; - public static final String ELR_REF_RESULT_CD ="R_Result"; - public static final String ELR_YES_CD ="Y"; - public static final String ELR_PATIENT_DESC="Observation Subject"; - public static final String ELR_ADD_REASON_CD="because"; - public static final String ELR_OBS_STATUS_CD="D"; - public static final String ELR_TRACER_CD="TRC"; - public static final String ELR_TRACER_DESC="Tracker"; - public static final String TYPE_CD_SSN ="SS"; - public static final String ASSIGNING_AUTH_CD_SSN ="SSN"; - public static final Long ELR_NBS_DOC_META_UID= 1005L; - public static final String ELR_STUCTURED_NUMERIC_CD="SN"; - public static final String ELR_NUMERIC_CD="NM"; - public static final String ELR_CODED_EXEC_CD="CE"; - public static final String ELR_CODED_WITH_EXC_CD="CWE"; - public static final String ELR_STRING_CD="ST"; - public static final String ELR_TEXT_CD="TX"; - public static final String ELR_TEXT_TS="TS"; - public static final String ELR_TEXT_DT="DT"; - public static final String ELR_COPY_TO_DESC="Copy To"; - public static final String ELR_COPY_TO_CD="CT"; - public static final String ELR_OBX_COMMENT_TYPE="N"; - - public static final String ELR_USA_DESC="USA"; - public static final String ELR_USA_CD="840"; - public static final String ELR_CODED_TYPE="C"; - public static final String ELR_STRING_TYPE="ST"; - public static final String ELR_NUMERIC_TYPE="N"; - public static final String ELR_STUCTURED_NUMERIC_TYPE="SN"; - public static final String ELR_CONFIRMED_CD="C"; - public static final String ELR_OPEN_CD="O"; + public static final String ELR_REF_RESULT_CD = "R_Result"; + public static final String ELR_YES_CD = "Y"; + public static final String ELR_PATIENT_DESC = "Observation Subject"; + public static final String ELR_ADD_REASON_CD = "because"; + public static final String ELR_OBS_STATUS_CD = "D"; + public static final String ELR_TRACER_CD = "TRC"; + public static final String ELR_TRACER_DESC = "Tracker"; + public static final String TYPE_CD_SSN = "SS"; + public static final String ASSIGNING_AUTH_CD_SSN = "SSN"; + public static final Long ELR_NBS_DOC_META_UID = 1005L; + public static final String ELR_STUCTURED_NUMERIC_CD = "SN"; + public static final String ELR_NUMERIC_CD = "NM"; + public static final String ELR_CODED_EXEC_CD = "CE"; + public static final String ELR_CODED_WITH_EXC_CD = "CWE"; + public static final String ELR_STRING_CD = "ST"; + public static final String ELR_TEXT_CD = "TX"; + public static final String ELR_TEXT_TS = "TS"; + public static final String ELR_TEXT_DT = "DT"; + public static final String ELR_COPY_TO_DESC = "Copy To"; + public static final String ELR_COPY_TO_CD = "CT"; + public static final String ELR_OBX_COMMENT_TYPE = "N"; + public static final String ELR_USA_DESC = "USA"; + public static final String ELR_USA_CD = "840"; + public static final String ELR_CODED_TYPE = "C"; + public static final String ELR_STRING_TYPE = "ST"; + public static final String ELR_NUMERIC_TYPE = "N"; + public static final String ELR_STUCTURED_NUMERIC_TYPE = "SN"; + public static final String ELR_CONFIRMED_CD = "C"; + public static final String ELR_OPEN_CD = "O"; public static final String ELR_INDIVIDUAL = "I"; // Activity Log public static final String ELR_RECORD_NM = "ELR_IMPORT"; public static final String ELR_RECORD_TP = "Electronic Lab Report"; + // Summary messages and related Status values + public static final NbsInterfaceStatus SUM_MSG_JURISDICTION_FAIL_STS = NbsInterfaceStatus.Success; // Activity Log Messages // --------------------- - - // Summary messages and related Status values - public static final NbsInterfaceStatus SUM_MSG_JURISDICTION_FAIL_STS = NbsInterfaceStatus.Success; public static final String SUM_MSG_JURISDICTION_FAIL = "Jurisdiction and/or Program Area could not be derived. " + "The Lab Report is logged in Documents Requiring Security Assignment queue."; - public static final NbsInterfaceStatus SUM_MSG_ALGORITHM_FAIL_STS = NbsInterfaceStatus.Success; public static final String SUM_MSG_ALGORITHM_FAIL = "A matching algorithm was not found. The Lab Report is logged in Documents Requiring Review queue."; - public static final NbsInterfaceStatus SUM_MSG_INVESTIGATION_FAIL_STS = NbsInterfaceStatus.Failure; public static final String SUM_MSG_INVESTIGATION_FAIL = "Error creating investigation. See Activity Details."; - public static final NbsInterfaceStatus SUM_MSG_MISSING_INVESTIGATION_FLDS_STS = NbsInterfaceStatus.Failure; public static final String SUM_MSG_MISSING_INVESTIGATION_FLDS = "Missing fields required to create investigation"; - public static final NbsInterfaceStatus SUM_MSG_NOTIFICATION_FAIL_STS = NbsInterfaceStatus.Failure; public static final String SUM_MSG_NOTIFICATION_FAIL = "Error creating notification. See Activity Details."; - public static final NbsInterfaceStatus SUM_MSG_MISSING_NOTIFICATION_FLDS_STS = NbsInterfaceStatus.Failure; public static final String SUM_MSG_MISSING_NOTIFICATION_FLDS = "Missing fields required to create notification"; - public static final NbsInterfaceStatus SUM_MSG_ERROR_LAB_REVIEWED_STS = NbsInterfaceStatus.Failure; public static final String SUM_MSG_ERROR_LAB_REVIEWED = "Error marking lab as reviewed. See Activity Details."; - public static final NbsInterfaceStatus SUM_MSG_CREATING_LAB_STS = NbsInterfaceStatus.Failure; public static final String SUM_MSG_CREATING_LAB = "Error creating lab. See Activity Details."; - public static final NbsInterfaceStatus SUM_MSG_UPDATING_LAB_STS = NbsInterfaceStatus.Failure; public static final String SUM_MSG_UPDATING_LAB = "Error updating Lab. See Activity Details."; - // Detail messages public static final String DET_MSG_PATIENT_FOUND = "Patient match found: %1, %2 (UID: %3)."; @@ -284,7 +261,6 @@ public class EdxELRConstant { "An invalid SSN is in the message."; public static final String NULL_CLIA = "The Reporting Facility did not have a CLIA number."; - public static final String WDS_REPORT = "WDS Algorithm had been applied on "; public static final String FILLER_FAIL = "The Filler Order Number is missing."; @@ -328,110 +304,95 @@ public class EdxELRConstant { "The Ordering Facility is missing."; public static final String TRANSLATE_OBS_STATUS = "Observation Status not found in SRT."; - public static final String LAB_UPDATE_SUCCESS_DRRQ = + public static final String LAB_UPDATE_SUCCESS_DRRQ = "Lab %1 updated and logged in Documents Requiring Review queue."; - public static final String LAB_UPDATE_SUCCESS_DRSA = + public static final String LAB_UPDATE_SUCCESS_DRSA = "Lab %1 updated and logged in Documents Requiring Security Assignment queue."; public static final String SUBJECT_MATCH_FOUND = "Patient match found. (UID: %1, PUID: %2)."; public static final String NO_REASON_FOR_STUDY = "The code for Reason For Study is missing."; public static final String MULTIPLE_OBR = "The ELR includes Multiple Ordered Tests (OBRs). Child OBR(s) are missing Parent Result (OBR-26) and/or Parent (OBR-29) values."; - - public static final String INV_SUCCESS_CREATED="Investigation created (UID: %1)."; - + public static final String INV_SUCCESS_CREATED = "Investigation created (UID: %1)."; public static final String LAB_ASSOCIATED_TO_INV = "Lab associated to Investigation (UID: %1)."; - - public static final String NOT_SUCCESS_CREATED="Notification created (UID: %1)."; - - public static final String INVALID_XML="The XML does not include information required to process the ELR into NBS."; - - public static final String MISSING_ORD_PROV_AND_ORD_FAC="The Ordering Provider and the Ordering Facility are missing."; - - public static final String MULTIPLE_SUBJECT="Multiple Patients were included in the ELR."; - public static final String NO_SUBJECT="The Patient segment is missing from the ELR."; - public static final String ORDER_OBR_WITH_PARENT="The Parent Ordered Test (OBR) includes a Parent Result (OBR 26) and/or Parent (OBR 29) values."; - public static final String CHILD_OBR_WITHOUT_PARENT="The ELR includes Multiple Ordered Tests (OBRs). Child OBR(s) are missing Parent Result (OBR 26) and/or Parent (OBR 29) values."; - - public static final String OFCI="Successfully retain event record."; - public static final String OFCN="Successfully retain investigation and event record."; - + public static final String NOT_SUCCESS_CREATED = "Notification created (UID: %1)."; + public static final String INVALID_XML = "The XML does not include information required to process the ELR into NBS."; + public static final String MISSING_ORD_PROV_AND_ORD_FAC = "The Ordering Provider and the Ordering Facility are missing."; + public static final String MULTIPLE_SUBJECT = "Multiple Patients were included in the ELR."; + public static final String NO_SUBJECT = "The Patient segment is missing from the ELR."; + public static final String ORDER_OBR_WITH_PARENT = "The Parent Ordered Test (OBR) includes a Parent Result (OBR 26) and/or Parent (OBR 29) values."; + public static final String CHILD_OBR_WITHOUT_PARENT = "The ELR includes Multiple Ordered Tests (OBRs). Child OBR(s) are missing Parent Result (OBR 26) and/or Parent (OBR 29) values."; + public static final String OFCI = "Successfully retain event record."; + public static final String OFCN = "Successfully retain investigation and event record."; public static final String UNEXPECTED_RESULT_TYPE = "The ELR includes an unexpected result Data Type (OBX-2). NBS expects ST, TX, CE, DT, TS or SN."; public static final String CHILD_SUSC_WITH_NO_PARENT_RESULT = "The ELR includes Multiple Ordered Tests (OBRs). Child OBR(s) do not have the same Parent Result (OBR-26) and/or Parent (OBR-29) values as the Parent OBR."; - - public static final String ELR_MASTER_LOG_ID_1="1";//"Jurisdiction and/or Program Area could not be derived. The Lab Report is logged in Documents Requiring Security Assignment queue."; - public static final String ELR_MASTER_LOG_ID_2="2";// "A matching algorithm was not found. The Lab Report is logged in Documents Requiring Review queue."; - public static final String ELR_MASTER_LOG_ID_3="3";// "Successfully Create Investigation"; - public static final String ELR_MASTER_LOG_ID_4="4";//"Error creating investigation. See Activity Details."; - public static final String ELR_MASTER_LOG_ID_5="5";//"Missing fields required to create investigation."; - public static final String ELR_MASTER_LOG_ID_6="6";//"Successfully Create Notification"; - public static final String ELR_MASTER_LOG_ID_7="7";//"Error creating notification. See Activity Details."; - public static final String ELR_MASTER_LOG_ID_8="8";//"Missing fields required to create notification."; - public static final String ELR_MASTER_LOG_ID_9="9";//"Error creating investigation. See Activity Details."; - public static final String ELR_MASTER_LOG_ID_10="10";//"Error creating notification. See Activity Details."; - public static final String ELR_MASTER_LOG_ID_11="11";//"Successfully Mark Lab as Reviewed"; - public static final String ELR_MASTER_LOG_ID_12="12";//"Error marking lab as reviewed. See Activity Details."; - public static final String ELR_MASTER_LOG_ID_13="13";//"Error creating lab. See Activity Details."; - public static final String ELR_MASTER_LOG_ID_14="14";//"Error updating Lab. See Activity Details."; - public static final String ELR_MASTER_LOG_ID_15="15";//"Lab updated successfully and logged in Documents Requiring Review queue"; - public static final String ELR_MASTER_LOG_ID_16="16";//"Unexpected exception."; - public static final String ELR_MASTER_LOG_ID_17="17";//"Error creating lab. See Activity Details."; - public static final String ELR_MASTER_LOG_ID_18="18";//"String or binary data would be truncated."; - public static final String ELR_MASTER_LOG_ID_19="19";//"Create Lab Blank Identifier"; - public static final String ELR_MASTER_LOG_ID_20="20";//"Invalid date. See Activity Details."; - public static final String ELR_MASTER_LOG_ID_21="21";//"Successfully Mark Lab as Reviewed and associated to existing investigation"; - public static final String ELR_MASTER_LOG_ID_22="22";//"Lab updated successfully and logged in Documents Requiring Security Assignment queue"; - - public static final String ELR_MASTER_MSG_ID_1="Jurisdiction and/or Program Area could not be derived. The Lab Report is logged in Documents Requiring Security Assignment queue."; - public static final String ELR_MASTER_MSG_ID_2= "A matching algorithm was not found. The Lab Report is logged in Documents Requiring Review queue."; - public static final String ELR_MASTER_MSG_ID_3= "Successfully Create Investigation"; - public static final String ELR_MASTER_MSG_ID_4="Error creating investigation. See Activity Details."; - public static final String ELR_MASTER_MSG_ID_5="Missing fields required to create investigation."; - public static final String ELR_MASTER_MSG_ID_6="Successfully Create Notification"; - public static final String ELR_MASTER_MSG_ID_7="Error creating notification. See Activity Details."; - public static final String ELR_MASTER_MSG_ID_8="Missing fields required to create notification."; - public static final String ELR_MASTER_MSG_ID_9="Error creating investigation. See Activity Details."; - public static final String ELR_MASTER_MSG_ID_10="Error creating notification. See Activity Details."; - public static final String ELR_MASTER_MSG_ID_11="Successfully Mark Lab as Reviewed"; - public static final String ELR_MASTER_MSG_ID_12="Error marking lab as reviewed. See Activity Details."; - public static final String ELR_MASTER_MSG_ID_13="Error creating lab. See Activity Details."; - public static final String ELR_MASTER_MSG_ID_14="Error updating Lab. See Activity Details."; - public static final String ELR_MASTER_MSG_ID_15="Lab updated successfully and logged in Documents Requiring Review queue."; - public static final String ELR_MASTER_MSG_ID_16="Error creating Lab. See Activity Details."; //in case of "Unexpected exception." it displays this message; - public static final String ELR_MASTER_MSG_ID_17="Error creating lab. See Activity Details."; - public static final String ELR_MASTER_MSG_ID_18="Error creating lab. Input message length exceeds the field length in NBS, resulting in a truncation error. See Activity Details."; - public static final String ELR_MASTER_MSG_ID_19="Error creating lab. Blank identifiers in CE or CWE segments 1 or 4. See Activity Details."; - public static final String ELR_MASTER_MSG_ID_20="Error creating lab. Invalid Date encountered. See Activity Details."; - public static final String ELR_MASTER_MSG_ID_21="Successfully Mark Lab as Reviewed and associated to existing investigation."; - public static final String ELR_MASTER_MSG_ID_22="Lab updated successfully and logged in Documents Requiring Security Assignment queue."; - public static final String ELR_MASTER_MSG_ID_23=""; - - - public static final String SQL_FIELD_TRUNCATION_ERROR_MSG="String or binary data would be truncated"; - public static final String ORACLE_FIELD_TRUNCATION_ERROR_MSG="value too large for column"; - - public static final String DATE_VALIDATION="Invalid date in message at: "; - public static final String DATE_VALIDATION_END_DELIMITER1="--> "; - public static final String DATE_VALIDATION_PID_PATIENT_BIRTH_DATE_AND_TIME_MSG=DATE_VALIDATION+"PID-7 Patient Birth Date/Time "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_PID_PATIENT_BIRTH_DATE_NO_TIME_MSG=DATE_VALIDATION+"PID-7 Patient Birth Date "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_PERSON_NAME_FROM_TIME_MSG=DATE_VALIDATION+"Person Name From Date "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_PERSON_NAME_TO_TIME_MSG=DATE_VALIDATION+"Person Name To Date "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_OBR_SPECIMEN_RECEIVED_TIME_MSG=DATE_VALIDATION+"OBR-14 Specimen Received Date/Time "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_ORC_ORDER_EFFECTIVE_TIME_MSG=DATE_VALIDATION+"ORC-15 Order Effective Date/Time "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_OBR_RESULTS_RPT_STATUS_CHNG_TO_TIME_MSG=DATE_VALIDATION+"OBR-22 Results Rpt/Status Chng - Date/Time "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_OBR_OBSERVATION_DATE_MSG = DATE_VALIDATION+"OBR-7.0 or SPM-17.1 Observation Starting Date/Time "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_OBR_OBSERVATION_END_DATE_MSG = DATE_VALIDATION+"OBR-8.0 or SPM-17.2 Observation Ending Date/Time "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_OBX_LAB_PERFORMED_DATE_MSG = DATE_VALIDATION+"OBX-14 Analysis Date/Time "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_SPM_SPECIMEN_COLLECTION_DATE_MSG = DATE_VALIDATION+"SPM-17 Specimen Collection Date/Time "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_PATIENT_DEATH_DATE_AND_TIME_MSG= DATE_VALIDATION+"PID-29 Patient Death Date "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_PID_PATIENT_IDENTIFIER_EFFECTIVE_DATE_TIME_MSG=DATE_VALIDATION+"PID-3 Patient Identifier Effective Date "+DATE_VALIDATION_END_DELIMITER1; - public static final String DATE_VALIDATION_PID_PATIENT_IDENTIFIER_EXPIRATION_DATE_TIME_MSG=DATE_VALIDATION+"PID-3 Patient Identifier Expiration Date "+DATE_VALIDATION_END_DELIMITER1; - - public static final String DATE_INVALID_FOR_DATABASE=" is before or after the date allowed by the database."; - + public static final String ELR_MASTER_LOG_ID_1 = "1";//"Jurisdiction and/or Program Area could not be derived. The Lab Report is logged in Documents Requiring Security Assignment queue."; + public static final String ELR_MASTER_LOG_ID_2 = "2";// "A matching algorithm was not found. The Lab Report is logged in Documents Requiring Review queue."; + public static final String ELR_MASTER_LOG_ID_3 = "3";// "Successfully Create Investigation"; + public static final String ELR_MASTER_LOG_ID_4 = "4";//"Error creating investigation. See Activity Details."; + public static final String ELR_MASTER_LOG_ID_5 = "5";//"Missing fields required to create investigation."; + public static final String ELR_MASTER_LOG_ID_6 = "6";//"Successfully Create Notification"; + public static final String ELR_MASTER_LOG_ID_7 = "7";//"Error creating notification. See Activity Details."; + public static final String ELR_MASTER_LOG_ID_8 = "8";//"Missing fields required to create notification."; + public static final String ELR_MASTER_LOG_ID_9 = "9";//"Error creating investigation. See Activity Details."; + public static final String ELR_MASTER_LOG_ID_10 = "10";//"Error creating notification. See Activity Details."; + public static final String ELR_MASTER_LOG_ID_11 = "11";//"Successfully Mark Lab as Reviewed"; + public static final String ELR_MASTER_LOG_ID_12 = "12";//"Error marking lab as reviewed. See Activity Details."; + public static final String ELR_MASTER_LOG_ID_13 = "13";//"Error creating lab. See Activity Details."; + public static final String ELR_MASTER_LOG_ID_14 = "14";//"Error updating Lab. See Activity Details."; + public static final String ELR_MASTER_LOG_ID_15 = "15";//"Lab updated successfully and logged in Documents Requiring Review queue"; + public static final String ELR_MASTER_LOG_ID_16 = "16";//"Unexpected exception."; + public static final String ELR_MASTER_LOG_ID_17 = "17";//"Error creating lab. See Activity Details."; + public static final String ELR_MASTER_LOG_ID_18 = "18";//"String or binary data would be truncated."; + public static final String ELR_MASTER_LOG_ID_19 = "19";//"Create Lab Blank Identifier"; + public static final String ELR_MASTER_LOG_ID_20 = "20";//"Invalid date. See Activity Details."; + public static final String ELR_MASTER_LOG_ID_21 = "21";//"Successfully Mark Lab as Reviewed and associated to existing investigation"; + public static final String ELR_MASTER_LOG_ID_22 = "22";//"Lab updated successfully and logged in Documents Requiring Security Assignment queue"; + public static final String ELR_MASTER_MSG_ID_1 = "Jurisdiction and/or Program Area could not be derived. The Lab Report is logged in Documents Requiring Security Assignment queue."; + public static final String ELR_MASTER_MSG_ID_2 = "A matching algorithm was not found. The Lab Report is logged in Documents Requiring Review queue."; + public static final String ELR_MASTER_MSG_ID_3 = "Successfully Create Investigation"; + public static final String ELR_MASTER_MSG_ID_4 = "Error creating investigation. See Activity Details."; + public static final String ELR_MASTER_MSG_ID_5 = "Missing fields required to create investigation."; + public static final String ELR_MASTER_MSG_ID_6 = "Successfully Create Notification"; + public static final String ELR_MASTER_MSG_ID_7 = "Error creating notification. See Activity Details."; + public static final String ELR_MASTER_MSG_ID_8 = "Missing fields required to create notification."; + public static final String ELR_MASTER_MSG_ID_9 = "Error creating investigation. See Activity Details."; + public static final String ELR_MASTER_MSG_ID_10 = "Error creating notification. See Activity Details."; + public static final String ELR_MASTER_MSG_ID_11 = "Successfully Mark Lab as Reviewed"; + public static final String ELR_MASTER_MSG_ID_12 = "Error marking lab as reviewed. See Activity Details."; + public static final String ELR_MASTER_MSG_ID_13 = "Error creating lab. See Activity Details."; + public static final String ELR_MASTER_MSG_ID_14 = "Error updating Lab. See Activity Details."; + public static final String ELR_MASTER_MSG_ID_15 = "Lab updated successfully and logged in Documents Requiring Review queue."; + public static final String ELR_MASTER_MSG_ID_16 = "Error creating Lab. See Activity Details."; //in case of "Unexpected exception." it displays this message; + public static final String ELR_MASTER_MSG_ID_17 = "Error creating lab. See Activity Details."; + public static final String ELR_MASTER_MSG_ID_18 = "Error creating lab. Input message length exceeds the field length in NBS, resulting in a truncation error. See Activity Details."; + public static final String ELR_MASTER_MSG_ID_19 = "Error creating lab. Blank identifiers in CE or CWE segments 1 or 4. See Activity Details."; + public static final String ELR_MASTER_MSG_ID_20 = "Error creating lab. Invalid Date encountered. See Activity Details."; + public static final String ELR_MASTER_MSG_ID_21 = "Successfully Mark Lab as Reviewed and associated to existing investigation."; + public static final String ELR_MASTER_MSG_ID_22 = "Lab updated successfully and logged in Documents Requiring Security Assignment queue."; + public static final String ELR_MASTER_MSG_ID_23 = ""; + public static final String SQL_FIELD_TRUNCATION_ERROR_MSG = "String or binary data would be truncated"; + public static final String ORACLE_FIELD_TRUNCATION_ERROR_MSG = "value too large for column"; + public static final String DATE_VALIDATION = "Invalid date in message at: "; + public static final String DATE_VALIDATION_END_DELIMITER1 = "--> "; + public static final String DATE_VALIDATION_PID_PATIENT_BIRTH_DATE_AND_TIME_MSG = DATE_VALIDATION + "PID-7 Patient Birth Date/Time " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_PID_PATIENT_BIRTH_DATE_NO_TIME_MSG = DATE_VALIDATION + "PID-7 Patient Birth Date " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_PERSON_NAME_FROM_TIME_MSG = DATE_VALIDATION + "Person Name From Date " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_PERSON_NAME_TO_TIME_MSG = DATE_VALIDATION + "Person Name To Date " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_OBR_SPECIMEN_RECEIVED_TIME_MSG = DATE_VALIDATION + "OBR-14 Specimen Received Date/Time " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_ORC_ORDER_EFFECTIVE_TIME_MSG = DATE_VALIDATION + "ORC-15 Order Effective Date/Time " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_OBR_RESULTS_RPT_STATUS_CHNG_TO_TIME_MSG = DATE_VALIDATION + "OBR-22 Results Rpt/Status Chng - Date/Time " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_OBR_OBSERVATION_DATE_MSG = DATE_VALIDATION + "OBR-7.0 or SPM-17.1 Observation Starting Date/Time " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_OBR_OBSERVATION_END_DATE_MSG = DATE_VALIDATION + "OBR-8.0 or SPM-17.2 Observation Ending Date/Time " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_OBX_LAB_PERFORMED_DATE_MSG = DATE_VALIDATION + "OBX-14 Analysis Date/Time " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_SPM_SPECIMEN_COLLECTION_DATE_MSG = DATE_VALIDATION + "SPM-17 Specimen Collection Date/Time " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_PATIENT_DEATH_DATE_AND_TIME_MSG = DATE_VALIDATION + "PID-29 Patient Death Date " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_PID_PATIENT_IDENTIFIER_EFFECTIVE_DATE_TIME_MSG = DATE_VALIDATION + "PID-3 Patient Identifier Effective Date " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_VALIDATION_PID_PATIENT_IDENTIFIER_EXPIRATION_DATE_TIME_MSG = DATE_VALIDATION + "PID-3 Patient Identifier Expiration Date " + DATE_VALIDATION_END_DELIMITER1; + public static final String DATE_INVALID_FOR_DATABASE = " is before or after the date allowed by the database."; public static final String MISSING_NOTF_REQ_FIELDS = "The following required Notification field(s) is(are) missing: "; - - public static final int UPDATED_LAT_LIST=100; - public static final String DEBUG="debug"; + public static final int UPDATED_LAT_LIST = 100; + public static final String DEBUG = "debug"; + public static String PATIENT_LDF = "PAT"; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/elr/NBSBOLookup.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/elr/NBSBOLookup.java index 26053def3..fb0d2f963 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/elr/NBSBOLookup.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/elr/NBSBOLookup.java @@ -4,7 +4,7 @@ public class NBSBOLookup { public static final String ASSOCIATEINTERVENTIONVACCINERECORDS = "ASSOCIATEINTERVENTIONVACCINERECORDS"; public static final String ORGANIZATION = "ORGANIZATION"; public static final String PATIENT = "PATIENT"; - public static final String OBSERVATIONGENERICOBSERVATION = "OBSERVATIONGENERICOBSERVATION"; + public static final String OBSERVATIONGENERICOBSERVATION = "OBSERVATIONGENERICOBSERVATION"; public static final String OBSERVATIONMORBIDITYREPORT = "OBSERVATIONMORBIDITYREPORT"; public static final String OBSERVATIONLABREPORT = "OBSERVATIONLABREPORT"; public static final String OBSERVATIONMORBREPORT = "OBSERVATIONMORBREPORT"; @@ -20,11 +20,11 @@ public class NBSBOLookup { public static final String SRT = "SRT"; public static final String PROVIDER = "PROVIDER"; public static final String TREATMENT = "TREATMENT"; - public static final String CT_CONTACT= "CT_CONTACT"; - public static final String QUEUES= "QUEUES"; - public static final String PUBLICQUEUES= "PUBLICQUEUES"; + public static final String CT_CONTACT = "CT_CONTACT"; + public static final String QUEUES = "QUEUES"; + public static final String PUBLICQUEUES = "PUBLICQUEUES"; - public static final String GLOBAL= "GLOBAL"; - public static final String PLACE= "PLACE"; - public static final String INTERVIEW= "INTERVIEW"; + public static final String GLOBAL = "GLOBAL"; + public static final String PLACE = "PLACE"; + public static final String INTERVIEW = "INTERVIEW"; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/elr/NEDSSConstant.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/elr/NEDSSConstant.java index 37dbaedb9..9c5c0a572 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/elr/NEDSSConstant.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/elr/NEDSSConstant.java @@ -31,16 +31,24 @@ public class NEDSSConstant { * The section below is no longer valid for NEDSS project */ - /** OBJECT Constants start with this value and increments one by one */ + /** + * OBJECT Constants start with this value and increments one by one + */ public static final int LOWER_BOUND_COMMAND = 0; - /** Unknown Command */ + /** + * Unknown Command + */ public static final int UNKNOWN_COMMAND = LOWER_BOUND_COMMAND; - /** Report Command */ + /** + * Report Command + */ public static final int REPORT = LOWER_BOUND_COMMAND + 7; - /** TaskList Command */ + /** + * TaskList Command + */ public static final int TASKLIST = LOWER_BOUND_COMMAND + 10; public static final String SEARCH = "search"; @@ -59,7 +67,9 @@ public class NEDSSConstant { public static final String SORT_NOTIFICATION = "sortNotification"; - /** command processor classes */ + /** + * command processor classes + */ public static final String[] commandProcessor = { "gov.cdc.nedss.webapp.nbs.action.report.ReportWebProcessor", // UNKNOWN_COMMAND "gov.cdc.nedss.webapp.nbs.action.report.ReportWebProcessor", // LOGON_COMMAND @@ -71,29 +81,43 @@ public class NEDSSConstant { "gov.cdc.nedss.webapp.nbs.action.report.ReportWebProcessor", //REPORT "gov.cdc.nedss.wum.commands.NotificationWebProcessor", //NOTIFICATION_WEB_PROCESSOR "gov.cdc.nedss.wum.commands.WorkupWebProcessor", // WORKUP_COMMAND - "gov.cdc.nedss.webapp.nbs.action.report.ReportWebProcessor" }; + "gov.cdc.nedss.webapp.nbs.action.report.ReportWebProcessor"}; /** Operation Types (Actually, these are subcommands for each type of Command. */ - /** OBJECT Constants start with this value and increments one by one */ + /** + * OBJECT Constants start with this value and increments one by one + */ public static final int LOWER_BOUND_OPERATION = 100; - /** Unknown Operation on Person Command */ + /** + * Unknown Operation on Person Command + */ public static final int UNKNOWN_OPERATION = LOWER_BOUND_OPERATION; - /** Person Find Screen on Person Command */ + /** + * Person Find Screen on Person Command + */ public static final int FIND_SCREEN = LOWER_BOUND_OPERATION + 1; - /** Person Find Search on Person Command */ + /** + * Person Find Search on Person Command + */ public static final int FIND = LOWER_BOUND_OPERATION + 2; - /** Person Add on Person Command */ + /** + * Person Add on Person Command + */ public static final int PERSON_ADD = LOWER_BOUND_OPERATION + 3; - /** Person Edit on Person Command */ + /** + * Person Edit on Person Command + */ public static final int PERSON_EDIT = LOWER_BOUND_OPERATION + 4; - /** Person Compare on Person Command */ + /** + * Person Compare on Person Command + */ public static final int PERSON_VIEW = LOWER_BOUND_OPERATION + 5; public static final int PERSON_SORT = LOWER_BOUND_OPERATION + 6; @@ -102,74 +126,118 @@ public class NEDSSConstant { public static final int PERSON_DELETE = LOWER_BOUND_OPERATION + 8; - /** Core demographic add */ + /** + * Core demographic add + */ public static final int CORE_DEMOGRAPHIC_ADD = LOWER_BOUND_OPERATION + 9; - /** INVESTIGATION_CHOOSE */ + /** + * INVESTIGATION_CHOOSE + */ public static final int INVESTIGATION_CHOOSE = LOWER_BOUND_OPERATION + 11; - /** INVESTIGATION_CREATE */ + /** + * INVESTIGATION_CREATE + */ public static final int INVESTIGATION_SORT = LOWER_BOUND_OPERATION + 12; - /** INVESTIGATION_CREATE */ + /** + * INVESTIGATION_CREATE + */ public static final int INVESTIGATION_DELETE = LOWER_BOUND_OPERATION + 13; - /** INVESTIGATION_VIEW */ + /** + * INVESTIGATION_VIEW + */ public static final int INVESTIGATION_VIEW = LOWER_BOUND_OPERATION + 14; - /** INVESTIGATION_EDIT */ + /** + * INVESTIGATION_EDIT + */ public static final int INVESTIGATION_EDIT = LOWER_BOUND_OPERATION + 15; /** Reporting constants .... */ - /** LIST */ + /** + * LIST + */ public static final int REPORT_LIST = LOWER_BOUND_OPERATION + 16; - /** REPORT_BASIC */ + /** + * REPORT_BASIC + */ public static final int REPORT_BASIC = LOWER_BOUND_OPERATION + 17; - /** REPORT_ADVANCED */ + /** + * REPORT_ADVANCED + */ public static final int REPORT_ADVANCED = LOWER_BOUND_OPERATION + 18; - /** REPORT_COLUMN */ + /** + * REPORT_COLUMN + */ public static final int REPORT_COLUMN = LOWER_BOUND_OPERATION + 19; - /** REPORT_RUN */ + /** + * REPORT_RUN + */ public static final int REPORT_RUN = LOWER_BOUND_OPERATION + 20; - /** REPORT_DELETE */ + /** + * REPORT_DELETE + */ public static final int REPORT_DELETE = LOWER_BOUND_OPERATION + 21; - /** UPDATE_REPORT */ + /** + * UPDATE_REPORT + */ public static final int UPDATE_REPORT = LOWER_BOUND_OPERATION + 22; - /** SAVE_AS_NEW_REPORT */ + /** + * SAVE_AS_NEW_REPORT + */ public static final int SAVE_AS_NEW_REPORT = LOWER_BOUND_OPERATION + 23; - /** EXPORT_REPORT */ + /** + * EXPORT_REPORT + */ public static final int EXPORT_REPORT = LOWER_BOUND_OPERATION + 24; - /** NOTIFICATION_CREATE */ + /** + * NOTIFICATION_CREATE + */ public static final int NOTIFICATION_CREATE = LOWER_BOUND_OPERATION + 25; - /** ADD */ + /** + * ADD + */ public static final int ADD = LOWER_BOUND_OPERATION + 26; //public static final int CREATE = LOWER_BOUND_OPERATION + 27; //public static final int VIEW = LOWER_BOUND_OPERATION + 28; //public static final int EDIT = LOWER_BOUND_OPERATION + 29; - /** SORT */ + /** + * SORT + */ public static final int SORT = LOWER_BOUND_OPERATION + 30; - /** DELETE */ + /** + * DELETE + */ public static final int DELETE = LOWER_BOUND_OPERATION + 31; - /** CHOOSE */ + /** + * CHOOSE + */ public static final int CHOOSE = LOWER_BOUND_OPERATION + 32; - /** MANAGE */ + /** + * MANAGE + */ public static final int MANAGE = LOWER_BOUND_OPERATION + 33; - /** REVIEW */ + /** + * REVIEW + */ public static final int REVIEW = LOWER_BOUND_OPERATION + 34; public static final int SORT_INVESTIGATION_SUMMARY = LOWER_BOUND_OPERATION + 35; @@ -177,25 +245,39 @@ public class NEDSSConstant { public static final int VIEW_WORKUP = LOWER_BOUND_OPERATION + 36; /** other REPORT constants */ - /** RUN_REPORT: Use this to run the report in a new window. */ + /** + * RUN_REPORT: Use this to run the report in a new window. + */ public static final int RUN_REPORT = LOWER_BOUND_OPERATION + 37; - /** RUN_PAGE: Use this to take the user to the Run Page. */ + /** + * RUN_PAGE: Use this to take the user to the Run Page. + */ public static final int RUN_PAGE = LOWER_BOUND_OPERATION + 38; - /** OWNER: true or false */ + /** + * OWNER: true or false + */ public static final int OWNER = LOWER_BOUND_OPERATION + 39; - /** GET_COUNTIES: Use this to get Counties for States selected */ + /** + * GET_COUNTIES: Use this to get Counties for States selected + */ public static final int GET_COUNTIES = LOWER_BOUND_OPERATION + 40; - /** GET_CODEDVALUES: Use this to load coded values used to populate Advance Filter Values**/ + /** + * GET_CODEDVALUES: Use this to load coded values used to populate Advance Filter Values + **/ public static final int GET_CODEDVALUES = LOWER_BOUND_OPERATION + 53; - /** SAVE_PAGE */ + /** + * SAVE_PAGE + */ public static final int SAVE_PAGE = LOWER_BOUND_OPERATION + 41; - /** dynamically generate list of counties based on state */ + /** + * dynamically generate list of counties based on state + */ public static final int PERSON_LOAD_COUNTY_CREATE = LOWER_BOUND_OPERATION + 42; public static final int PERSON_LOAD_COUNTY_EDIT = LOWER_BOUND_OPERATION + 43; @@ -267,7 +349,7 @@ public class NEDSSConstant { public static final String INVESTIGATION_STATUS_CODE_CLOSED = "C"; - public static final String PHC_IN_STS="PHC_IN_STS"; + public static final String PHC_IN_STS = "PHC_IN_STS"; /*Participation type codes*/ @@ -336,9 +418,9 @@ public class NEDSSConstant { /* Constants related to Investigation mainly used in InvestigationAction class */ public static final String ROLE_INVESTIGATOR = "PHCINV"; - public static final String PHC_FIELD_FOLLO_UP_SUPVSR="FldFupSupervisorOfPHC"; + public static final String PHC_FIELD_FOLLO_UP_SUPVSR = "FldFupSupervisorOfPHC"; - public static final String PHC_CASE_SUPRVSR="CASupervisorOfPHC"; + public static final String PHC_CASE_SUPRVSR = "CASupervisorOfPHC"; /* Constants related to Investigation mainly used in InvestigationAction class */ public static final String PHC_INVESTIGATOR = "InvestgrOfPHC"; @@ -359,8 +441,8 @@ public class NEDSSConstant { public static final String PHC_REPORTING_SOURCE = "OrgAsReporterOfPHC"; - public static final String INERVIEWER_OF_PHC= "InterviewerOfPHC"; - public static final String INIT_INERVIEWER_OF_PHC="InitInterviewerOfPHC"; + public static final String INERVIEWER_OF_PHC = "InterviewerOfPHC"; + public static final String INIT_INERVIEWER_OF_PHC = "InitInterviewerOfPHC"; public static final String LEGAL_NAME = "L"; public static final String ALIAS_NAME = "AL"; @@ -570,7 +652,7 @@ public class NEDSSConstant { public static final String BATCH_END_CHILD = "]"; - public static final String STR_TOKEN = "\'"; + public static final String STR_TOKEN = "'"; public static final String STR_COMMA = ","; @@ -602,7 +684,9 @@ public class NEDSSConstant { // public static final String VACCINE_ACT_DESC_TXT = "Vaccination Age"; public static final String SORT_VACCINE = "sortVaccinations"; - /** Constants for treatment */ + /** + * Constants for treatment + */ public static final String SUBJECT_OF_TREATMENT = "SubjOfTrmt"; public static final String PROVIDER_OF_TREATMENT = "ProviderOfTrmt"; @@ -615,12 +699,16 @@ public class NEDSSConstant { public static final String TRT_TO_MORB = "TreatmentToMorb"; - /** Constants for ctrlCdDisplayForm */ + /** + * Constants for ctrlCdDisplayForm + */ public static final String GENERIC_OBSERVATION_CD_DISPLAY = "GNRC"; public static final String LAB_GENERAL_OBSERVATION_CD_DISPLAY = "GNRL"; - /** Act relationship type codes */ + /** + * Act relationship type codes + */ public static final String GENERIC_OBSERVATION_TYPE = "GenericObs"; public static final String LAB_GENERAL_OBSERVATION_TYPE = "LabGenObs"; @@ -729,9 +817,9 @@ public class NEDSSConstant { public static final String CD_DESC_TXT = "Observation participant"; - public static final String NBS_LAB_REW_PROC_DEC="NBS_LAB_REW_PROC_DEC"; + public static final String NBS_LAB_REW_PROC_DEC = "NBS_LAB_REW_PROC_DEC"; - public static final String CM_PROCESS_STAGE="CM_PROCESS_STAGE"; + public static final String CM_PROCESS_STAGE = "CM_PROCESS_STAGE"; // Table Name constants used by SecurityObj getDataAccessWhereClause public static final String OBSERVATION_LAB_REPORT_TABLE = "obs"; @@ -840,7 +928,7 @@ public class NEDSSConstant { public static final String SUMMARY_REPORT_VIEW = "VIEW"; public static final String INV_SUMMARY_EDIT = "INV_SUMMARY_EDIT"; - public static final String INV_SUMMARY_DEL ="INV_SUMMARY_DEL"; + public static final String INV_SUMMARY_DEL = "INV_SUMMARY_DEL"; public static final String TABLE_NAME = "PUBLIC_HEALTH_CASE"; @@ -966,7 +1054,7 @@ public class NEDSSConstant { public static final String EDX_IND = "Y"; - public static final String EHARS_ID="EHARS ID"; + public static final String EHARS_ID = "EHARS ID"; public static final String ELECTRONIC_IND_VACCINATION = "Y"; @@ -974,394 +1062,159 @@ public class NEDSSConstant { * Originally from EntityCodes.java * Description: CMD Entity Codes */ - - /** - * Material Entity Code - */ - public static String MATERIAL = "MAT"; - - /** - * Organization Entity Code - */ - public static String ORGANIZATION = "ORG"; - - /** - * Person Entity Code - */ - public static String PERSON = "PSN"; - - /** - * Provider Entity Code - */ - public static String PROVIDER = "PROV"; - - /** - * Place Entity Code - */ - public static String PLACE = "PLC"; - - public static String NOTIFICATION = "NOT";//This has been defined in WumConstants.java - - /** - * EntityGroup code - */ - public static String ENTITYGROUP = "GRP"; - - /** - * Non_Person_Living_Subject entity code - */ - public static String NONPERSONLIVINGSUBJECT = "NLIV"; - - /** - * DATASOURCECOLUMN code - */ - public static String DATASOURCECOLUMN = "DSC"; - - /** - * DATASOURCE code - */ - public static String DATASOURCE = "DSO"; - - /** - * DISPLAYCOLUMN code - */ - public static String DISPLAYCOLUMN = "DIC"; - - /** - * SORTCOLUMN code - */ - public static String SORTCOLUMN = "SOC"; - - /** - * FILTERCODE code - */ - public static String FILTERCODE = "FIC"; - - /** - * FILTERVALUE code - */ - public static String FILTERVALUE = "RFV"; - - /* Business object type codes for LDF*/ - public static String INVESTIGATION_LDF = "PHC"; - - public static String INVESTIGATION_HEP_LDF = "HEP"; - - public static String INVESTIGATION_BMD_LDF = "BMD"; - - public static String INVESTIGATION_NIP_LDF = "NIP"; - - public static String ORGANIZATION_LDF = "ORG"; - - public static String PROVIDER_LDF = "PRV"; - - public static String LABREPORT_LDF = "LAB"; - - public static String MORBREPORT_LDF = "MORB"; - - public static String PATIENT_LDF = "PAT"; - - public static String PATIENT_EXTENDED_LDF = "PAT-EXT"; - - public static String VACCINATION_LDF = "INT_VAC"; - - public static String TREATMENT_LDF = "TRT"; - - public static String HOME_PAGE_LDF = "HOME"; - - public static String ACTIVE_TRUE_LDF = "Y"; - - public static String ACTIVE_FALSE_LDF = "N"; - - public static String BLANK_XSPTAG_LDF = ""; - - public static String BLANK_SPECIALCHARACTER_LDF = "$$$$"; - - /** - * REPORT code - */ - public static String SPECIAL_CHARACTER_OPENING = ""; - - // public static String REPORT = "REP"; - - /** - * REPORTFILTER code - */ - public static String REPORTFILTER = "RPF"; - public static String REPORTFILTER_VALIDATION = "RPFV"; - /** * Originally from CdmConstantUtil.java * Description: Constants for CDM module */ public static final String NEDSS_FRONT_CONTROLLER_SESSION_BIND = "NFC"; - //Constants use by locator DAOs public static final String LOCATOR_UID = "LOCATOR_UID"; - public static final String POSTAL = "PST"; - public static final String TELE = "TELE"; - public static final String PHYSICAL = "PHYS"; - public static final String CURRENTADDRESS = "C"; - public static final String HOME = "H"; - public static final String BIRTH = "BIR"; - public static final String DEATH = "DTH"; - public static final String BIRTHCD = "F"; - public static final String WORK_PHONE = "WP"; - public static final String WORK_PLACE = "WP"; - public static final String PHONE = "PH"; - public static final String MOBILE = "MC"; - public static final String CELL = "CP"; - public static final String NET = "NET"; - public static final String BP = "BP"; - public static final String FAX = "FX"; - public static final String LEGAL = "L"; - public static final String CURRENT = "C"; - public static final String PATIENT = "PERSON"; - public static final String INTERNET = "Internet"; - public static final String OFFICE_CD = "O"; - public static final String PRIMARY_BUSINESS = "PB"; - //added by venu //Constants from PersonListServlet.java file public static final String GET_PERSON_ID = "getPersonId"; - public static final String CSORT_METHOD = "csortmethod"; - public static final String FIRST_NAME = "firstName"; - // public static final String PERSON = "Person"; public static final String APIBEAN = "apibean"; - public static final String PERSON_LIST = "PersonList"; - public static final String ORG_PRIV = "org_access_priv"; - public static final String PROG_AREA_PRIV = "prog_area_access_priv"; - public static final String ORACLE_ID = "ORACLE"; public static final String SQL_SERVER_ID = "SQL SERVER"; + // public static String REPORT = "REP"; //Constants from NedssAuthenticateServlet.java file public static final String UNAME = "uname"; - public static final String UPASSWORD = "upassword"; - public static final String USERNAME = "Username"; - public static final String PASSWORD = "Password"; - public static final String ROLE2_ID = "ROLE2"; - public static final String ROLE1_ID = "ROLE1"; - public static final String ROLE4_ID = "ROLE4"; - public static final String ROLENAME = "rolename"; - public static final String ROLE = "role"; - - //Constants from person.xsp.xsl and PersonRecordSearch.xsp.xsl files - public final static String RESULT_SET = "ResultSet"; - public final static String GET_PERSON_SESSION = "GetPersonSession"; - public final static String PERSON_SEARCHER = "EJBPersonSearcher"; - // Morbidity public static final String DISPLAY_FORM = "MorbReport"; - public static final String LAB_DISPALY_FORM = "LabReport"; - public static final String LAB_REPORT_MORB = "LabReportMorb"; - public static final String CONTACT_AND_CASE = "CONTACT_AND_CASE"; public static final String CASE = "CASE"; public static final String PRINT_CDC_CASE = "PRINT_CDC_CASE"; - public static final String CASE_LITE = "CASE_LITE"; - public static final String PRINT = "print"; - public static final String OBS = "OBS"; - // public static final String ACTIVE="ACTIVE"; - a duplicate constant found in this class public static final String A = "A"; - public static final String OBSERVATION = "OBSERVATION"; - public static final String OBS_ADD_REASON_CD = "ADD LAB REPORT"; - public static final String MORB_ADD_REASON_CD = "ADD MORB REPORT"; - // public static final String BASE="BASE"; - a duplicate constant found in this class public static final String OBSERVATIONLABREPORT = "OBSERVATIONLABREPORT"; - // public static final String OBS_MORB_DIS_ASC_LAST="OBS_MORB_DIS_ASC_LAST"; public static final String OBS_LAB_ASC = "OBS_LAB_ASC"; - public static final String OBSERVATIONMORBIDITYREPORT = "OBSERVATIONMORBIDITYREPORT"; - public static final String OBS_MORB_ASC = "OBS_MORB_ASC"; - public static final String INACTIVE = "INACTIVE"; - public static final String I = "I"; - public static final String CA = "CA"; - public static final String OBS_LAB_DIS_ASC = "OBS_LAB_DIS_ASC"; - public static final String OBS_LAB_DISASSOCIATE = "OBS_LAB_DISASSOCIATE"; - //public static final String OBS_LAB_DIS_ASC_LAST ="OBS_LAB_DIS_ASC_LAST"; public static final String OBS_MORB_DIS_ASC = "OBS_MORB_DIS_ASC"; - //public static final String OBS_MORB_DIS_ASC_LAS="OBS_MORB_DIS_ASC_LAS"; public static final String TYPE_CD = "1180"; - - //public static final String OBS="OBS"; - // Constant are set for race public static final String RACE_CODESET = "P_RACE_CAT"; - public static final String UNKNOWN = "U"; - public static final String AMERICAN_INDIAN_OR_ALASKAN_NATIVE = "1002-5"; - public static final String ASIAN = "2028-9"; - public static final String AFRICAN_AMERICAN = "2054-5"; - public static final String NATIVE_HAWAIIAN_OR_PACIFIC_ISLANDER = "2076-8"; - public static final String WHITE = "2106-3"; - public static final String OTHER_RACE = "2131-1"; - public static final String REFUSED_TO_ANSWER="PHC1175"; - + //Constants from person.xsp.xsl and PersonRecordSearch.xsp.xsl files + public static final String REFUSED_TO_ANSWER = "PHC1175"; public static final String NOT_ASKED = "NASK"; - // Constants for Merge Person public static final String MERGE_PERSON_1_SELECTED = "MergePerson1Selected"; - public static final String MERGE_PERSON_2_SELECTED = "MergePerson2Selected"; - public static final String ZIPFORJURISDICTION = "Z"; - public static final String CITYFORJURISDICTION = "C"; - public static final String BIRTHPLACE = "BIR"; - public static final String BIRTHDELIVERYADDRESS = "BDL"; - public static final String MERGE_CANDIDATE_DEFAULT_SURVIVOR_OLDEST = "OLDEST"; public static final String MERGE_CANDIDATE_DEFAULT_SURVIVOR_NEWEST = "NEWEST"; public static final String SAS_VERSION = "SAS_VERSION"; public static final String SAS_VERSION9_3 = "9.3"; - public static final String SAS_VERSION9_4 ="9.4"; - - - /** - * Originally from WumConstants.java - * Description: Constants for WUM module - */ - + public static final String SAS_VERSION9_4 = "9.4"; /** * Activity class codes, classCd */ public static final String OBSERVATION_CLASS_CODE = "OBS"; - public static final String WORKUP_CLASS_CODE = "WKUP"; - public static final String PUBLIC_HEALTH_CASE_CLASS_CODE = "CASE"; - public static final String NOTIFICATION_CLASS_CODE = "NOTF"; - public static final String INTERVENTION_CLASS_CODE = "INTV"; - public static final String REFERRAL_CLASS_CODE = "REFR"; - public static final String PATIENT_ENCOUNTER_CLASS_CODE = "ENC"; - public static final String CLINICAL_DOCUMENT_CLASS_CODE = "DOCCLIN"; - public final static String MATERIAL_CLASS_CODE = "MAT"; - public final static String PERSON_CLASS_CODE = "PSN"; - public final static String ORGANIZATION_CLASS_CODE = "ORG"; - public final static String TREATMENT_CLASS_CODE = "TRMT"; - public static final String PLACE_CLASS_CODE = "PLC"; - /** * Activity mood code, moodCd */ public static final String EVENT_MOOD_CODE = "EVN";//Represents most what NEDSS captures + //public static final String OBS="OBS"; public static final String DEFINITION_MOOD_CODE = "DEF"; - public static final String INTENT_MOOD_CODE = "INT"; - public static final String ORDER_MOOD_CODE = "ORD"; - public static final String APPOINTMENT_MOOD_CODE = "APT"; - public static final String APPOINTMENT_REQUEST_MOOD_CODE = "ARQ"; - public static final String PROPOSED_MOOD_CODE = "PRP"; - public static final String RECOMMENDED_MOOD_CODE = "RMD"; - /** * Notification approved codes */ public static final String NOTIFICATION_REJECTED_CODE = "REJECTED";//rejected - public static final String NOTIFICATION_APPROVED_CODE = "APPROVED";//approved code - public static final String NOTIFICATION_PENDING_CODE = "PEND_APPR";//pending - public static final String NOTIFICATION_COMPLETED = "COMPLETED";//completed - public static final String NOTIFICATION_MESSAGE_FAILED = "MSG_FAIL";//message failed - public static final String NOTIFICATION_PEND_DEL = "PEND_DEL"; - public static final String NOTIFICATION_PEND_DEL_IN_BATCH_PROCESS = "PEND_DEL_IN_BATCH_PR"; - public static final String NOTIFICATION_MSG_FAIL_PEND_DEL = "MSG_FAIL_PEND_DEL"; - public static final String NOTIFICATION_IN_BATCH_PROCESS = "IN_BATCH_PROCESS"; - /** * EDX_activity_log */ @@ -1370,318 +1223,191 @@ public class NEDSSConstant { public static final String EDX_NOTIFICATION_SOURCE_CODE = "NOT"; public static final String EDX_IMPORT_CODE = "I"; public static final String EDX_EXPORT_CODE = "E"; + + + /** + * Originally from WumConstants.java + * Description: Constants for WUM module + */ public static final String EDX_PHDC_DOC_TYPE = "PHDC"; public static final String EDX_PHCR_DOC_TYPE = "PHCR"; public static final String EDX_INTERFACE_TABLE_CODE = "INT"; public static final String PAYLOAD_VIEW_IND_CD_PHDC = "P"; public static final String EDX_TYPE_ENTITY = "Y"; - - /** * Stuff for getVaccinationProxy */ public static final String SRT_VACCINE_SUBJECT = "SubOfVacc"; - public static final String SRT_VACCINE_SUBJECT_ADMIN = "PerformerOfVacc"; - public static final String SRT_VACCINE_ORGANIZATION_ADMIN = "PerformerOfVacc"; - public static final String SRT_VACCINE_MATERIAL_ADMINISTERED = "VaccGiven"; - public static final String SRT_VACCINE_ORGANIZATION_MANUFACTURER = "MfgdVaccine"; - public static final String SRT_VACCINE_OBSERVATION_CORE220 = "CORE220"; - public static final String SRT_VACCINE_OBSERVATION_CORE231 = "CORE231"; - public static final String SRT_VACCINE_OBSERVATION_VAC105 = "VAC105"; - /** * Request Attribute for observations in View Workup */ public static final String OBSERVATION_LIST = "observationList"; - /** * Stuff for deleteObservationProxy */ public static final String GENERIC_OBS = "GenericObs"; - public static final String LAB_RESULT_OBS = "LabGenObs"; - public static final String LAB_MICRO_OBS = "LabMicroObs"; - - // public static final String STATUS_ACTIVE = "ACTIVE"; - /** * AR type code for Manage Vaccination */ public static final String AR_TYPE_CODE = "1180"; - - /** - * Originally from WumConstantUtil.java - * Description: Constants for WUM module - */ - - //Constants use by locator DAOs /** * Laboratory Results new Participation codes as of 04/13/02 */ public static final String PARTICIPATION_TYPE = "PAR_TYPE"; - public static final String PART_ACT_CLASS_CD = "OBS"; - public static final String ACTRELATION_CLASS_CD = "OBS"; - public static final String PAR101_SUB_CD = "PSN"; - public static final String PAR101_TYP_CD = "ORD"; - public static final String PAR102_SUB_CD = "ORG"; - public static final String PAR102_TYP_CD = "ORD"; - public static final String PAR104_SUB_CD = "MAT"; - public static final String PAR104_TYP_CD = "SPC"; - public static final String PAR110_SUB_CD = "PSN"; - public static final String PAR110_TYP_CD = "PATSBJ"; - public static final String PAR111_SUB_CD = "ORG"; - public static final String PAR111_TYP_CD = "AUT"; - public static final String PAR122_SUB_CD = "ORG"; - public static final String PAR122_TYP_CD = "PRF"; public static final String Surveillance_Investigator_OF_PHC = "SurvInvestgrOfPHC"; - public static final String AUT = "AUT"; - public static final String ORD = "ORD"; - - // public static final String STATUS_ACTIVE = "A"; - a duplicate constant found in this class - // public static final String RECORD_STATUS_ACTIVE = "ACTIVE"; - a duplicate constant found in this class - /** * Laboratory Results new ActRelationship codes as of 04/13/02 */ public static final String ACT106_SRC_CLASS_CD = "NOTF"; - public static final String ACT106_TAR_CLASS_CD = "CASE"; - public static final String ACT106_TYP_CD = "Notification"; - public static final String ACT108_TYP_CD = "COMP"; - public static final String ACT114_TYP_CD = "LAB180"; - public static final String ACT109_TYP_CD = "REFR"; - public static final String ACT110_TYP_CD = "COMP"; - public static final String ACT128_TYP_CD = "SummaryNotification"; - public static final String ORDERED_TEST_OBS_DOMAIN_CD = "Order"; - public static final String RESULTED_TEST_OBS_DOMAIN_CD = "Result"; public static final String PATIENT_STATUS_OBS_DOMAIN_CD = "Order_rslt"; - public static final String C_ORDER = "C_Order"; - public static final String C_RESULT = "C_Result"; - public static final String LABCOMMENT = "LabComment"; - public static final String R_ORDER = "R_Order"; - public static final String R_RESULT = "R_Result"; + // public static final String STATUS_ACTIVE = "ACTIVE"; public static final String ISOLATE_OBS_DOMAIN_CD = "Isolate"; - public static final String HAS_COMPONENT = "Has Component"; + /** + * Originally from WumConstantUtil.java + * Description: Constants for WUM module + */ + //Constants use by locator DAOs + public static final String HAS_COMPONENT = "Has Component"; public static final String LAB_REPORT_DESC_TXT = "Laboratory Report"; - public static final String TRMT_TO_MORB_RPT_TXT = "Treatment To Morbidity Report"; - public static final String CAUS = "CAUS"; - public static final String COMP = "COMP"; - public static final String APND = "APND"; - public static final String APPENDS = "Appends"; - public static final String IS_CAUSE_FOR = "Is Cause For"; - public static final String ACT_TYPE_PROCESSING_DECISION = "TBD"; - /* note: since obs_domain_cd_st_1 column in Observation table has only length 10, declared SUSCEPTIBILITY_OBS_DOMAIN_CD as "Susceptibi", if length is increased then modify SUSCEPTIBILITY_OBS_DOMAIN_CD to "Susceptibility" */ public static final String SUSCEPTIBILITY_OBS_DOMAIN_CD = "Susceptibi"; - public static final String OBS_PROCESSED = "PROCESSED"; - public static final String OBS_UNPROCESSED = "UNPROCESSED"; - public static final String PAR_RECORD_STATUS_CD = "ACTIVE"; - public static final String PAR_SUB_CLASS_CD = "PSN"; - //General constants public final static String OBSERVATION_CODE = "ocd"; - public final static String LABRESULT_CODE = "LabReport"; - public final static String MORBIDITY_CODE = "MorbReport"; - public final static String MORBIDITY_REPORT = "MorbReport"; + // public static final String STATUS_ACTIVE = "A"; - a duplicate constant found in this class + // public static final String RECORD_STATUS_ACTIVE = "ACTIVE"; - a duplicate constant found in this class public final static String CREATE_GEN_OBS = "general"; - public final static String MORBIDITY_FORM_Q = "MorbFrmQ"; - public static final String ACT_ID_CITY_TYPE_CD = "CITY"; - public static final String ACT_ID_STATE_TYPE_CD = "STATE"; - public static final String ACT_ID_LEGACY_TYPE_CD = "LEGACY"; - public static final String ABCS = "ABCS"; - public static final String INIT_LOAD = "initLoad"; - public static final String CONTEXT_ACTION = "ContextAction"; - public static final String QUEUE_SIZE = "queueSize"; - public static final String QUEUE_COUNT = "queueCount"; - //created on 04-30-2002 public final static String INIT_PARAMETER = "reports"; - public final static String SECURITY_OBJECT = "SecurityObject"; - public final static String NBS_SECURITY_OBJECT = "NBSSecurityObject"; - public final static String OBJECT_TYPE = "ObjectType"; - public final static String OPERATION_TYPE = "OperationType"; - public final static String OBSERVATION_UID = "observationUID"; - public final static String PERSON_FORM = "personForm"; - public final static String PERSON_UID = "personUID"; - public final static String PERSON_LOCALUID = "personLocalId"; - public final static String PERSON_DOB = "patientDateOfBirth"; - public final static String PERSON_SEX = "patientCurrentSex"; - public final static String VIEW_LABRESULT = "view"; - public final static String CREATE_LABRESULT = "create"; - public final static String EDIT_LABRESULT = "edit"; - public final static String ERROR_PAGE = "error"; - public final static String LOGIN_PAGE = "login"; - public final static String XSP_PAGE = "XSP"; - public final static String DELETE_PAGE = "viewDelete"; - public final static String DELETE_DENIED_PAGE = "deleteDenied"; - public final static String NEXT_PAGE = "next"; - public final static String POST_EDIT_VIEW = "viewLabResult"; - public final static String DS_PERSON_INFO = "DSPersonInfo"; - public final static String DS_PERSON_SUMMARY = "DSPersonSummary"; - public final static String DS_PERSON_MERGE_VO1 = "DSPersonMergeVO1"; - public final static String DS_PERSON_MERGE_VO2 = "DSPersonMergeVO2"; - public final static String DS_PERSON_MERGE_SURVIVING_VO = "DSPersonMergeSurvivingVO"; - public final static String DS_PERSON_MERGE_SUPERCEDED_VO = "DSPersonMergeSupercededVO"; - //ObservationProxy.setLabResultProxy Return constants public final static String SETLAB_RETURN_OBS_UID = "ObservationUid"; - public final static String SETLAB_RETURN_MPR_UID = "MPRUid"; - public final static String SETLAB_RETURN_OBS_LOCAL = "ObservationLocalId"; public final static String SETLAB_RETURN_OBSDT = "ObservationDto"; - public final static String SETLAB_RETURN_MPR_LOCAL = "MPRLocalId"; - public final static String SETLAB_RETURN_JURISDICTION_ERRORS = "JurisdictionErrorCollection"; - public final static String SETLAB_RETURN_PROGRAM_AREA_ERRORS = "ProgramAreaErrorCollection"; - //program Area Code public final static String PROGRAM_AREA_CD = "S_PROGRA_C"; - public final static String ALLOWED_PROGRAM_AREAS = "AllowedProgramAreas"; - public final static String ALLOWED_JURISDICTIONS = "AllowedJurisdictions"; - public final static String ALLOWED_OBSERVATIONS = "AllowedObservations"; - public final static String LAB_TEST = "LAB_TEST"; - public final static String OBS_CTRL_FORM = "OBS_CTRL_FORM"; - //Obs ctrlCdDisplayForm public final static String LAB_CTRLCD_DISPLAY = "LabReport"; - public final static String MOB_CTRLCD_DISPLAY = "MorbReport"; - public final static String MOB_VACCINE_CONTAIN_ROW = "VaccinationContainRo"; - public final static String MOB_ITEM_TO_ROW = "ItemToRow"; - public final static String TREATMENT_TO_MORB_TYPE = "TreatmentToMorb"; - // morb participation constants public final static String MOB_SUBJECT_OF_MORB_REPORT = "SubjOfMorbReport"; - public final static String MOB_REPORTER_OF_MORB_REPORT = "ReporterOfMorbReport"; - public final static String MOB_PHYSICIAN_OF_MORB_REPORT = "PhysicianOfMorb"; - public final static String MOB_HOSP_OF_MORB_REPORT = "HospOfMorbObs"; - //LabReports Interpretation values public final static String QUALITATIVERESULTS = "QualitativeResults"; - public final static String INTERPRETATION = "Interpretation"; - - //constants as part of ErrorLog -// public static final String NBS_ERRORLOG = PropertyUtil.propertiesDir +"NBSErrorMap.xml"; - public static final String ERROR_MESSAGES = "ErrorMessages"; - /* code added to support LDFs */ public static final String LDF_DROP_DOWN = "Dropdown"; - public static final String LDF_VALIDATION_TYPE = "LDF_VALIDATION_TYPE"; - public static final String LDF_DATA_TYPE = "LDF_DATA_TYPE"; - public static final String LDF_SOURCE = "LDF_SOURCE"; - //NBS_Question Data Types public static final String NBS_QUESTION_DATATYPE_CODED_VALUE = "Coded"; public static final String NBS_QUESTION_DATATYPE_DATE = "Date"; @@ -1702,32 +1428,24 @@ public class NEDSSConstant { public static final String NBS_QUESTION_DATATYPE_PARTICIPATION_PLACE = "PartPlc"; public static final String NBS_QUESTION_MASK_NUMERIC = "NUM"; public static final String NBS_QUESTION_MASK_NUMERIC_YEAR = "NUM_YYYY"; - //LDF Legacy Data Types public static final String LDF_DATATYPE_CODED_VALUE = "CV"; public static final String LDF_DATATYPE_STRING = "ST"; public static final String LDF_DATATYPE_LIST_STRING = "LIST_ST"; public static final String LDF_DATATYPE_SUBHEADING = "SUB"; - // Flag indicating whether filed is added by state or CDC public static final String ADMINFLAGCDC = "CDC"; - public static final String ADMINFLAGSTATE = "STATE"; - public static final String ERROR = "ERROR"; - public static final String REPORTING_LAB_CLIA_NULL = "reportingLabCLIA is null"; - public static final String PROGRAM_AREA_ASSIGNMENT_ERROR = "Error in assigning program area"; - - //constants for MPRUpdateEngine -// public static final String NEDSSVO_CONFIG = PropertyUtil.propertiesDir + "NEDSSVO_Config.xml"; - //constants for DeDuplication... public static final String OVERRIDE = "override"; - //constants for NND public static final String NND_FINAL_MESSAGE = "F"; + + //constants as part of ErrorLog +// public static final String NBS_ERRORLOG = PropertyUtil.propertiesDir +"NBSErrorMap.xml"; public static final String NND_CORRECTED_MESSAGE = "C"; public static final String NND_DELETED_MESSAGE = "X"; public static final String NND_UNPROCESSED_MESSAGE = "UNPROCESSED"; @@ -1735,20 +1453,15 @@ public class NEDSSConstant { public static final String NND_OPTIONAL_FIELD = "O"; public static final String NND_PREFERRED_FIELD = "P"; public static final String NND_LOCALLY_CODED = "L"; - public static final String MESSAGE_OUTPUT_FILE = "FILE"; - public static final String MESSAGE_OUTPUT_TABLE = "TABLE"; - public static final String MESSAGE_OUTPUT_BOTH = "BOTH"; - + public static final String MESSAGE_OUTPUT_FILE = "FILE"; + public static final String MESSAGE_OUTPUT_TABLE = "TABLE"; + public static final String MESSAGE_OUTPUT_BOTH = "BOTH"; public static final String NOTIFICATION_AUTO_RESEND_ON = "T"; public static final String NOTIFICATION_AUTO_RESEND_OFF = "F"; - public static final String TRUE = "T"; public static final String FALSE = "F"; - public static final String OPTIONAL = "O"; public static final String REQUIRED = "R"; - - //constants for NND HL7 Data types public static final String NND_HL7_DATATYPE_CWE = "CWE"; public static final String NND_HL7_DATATYPE_CE = "CE"; @@ -1766,10 +1479,11 @@ public class NEDSSConstant { public static final String NND_HL7_DATATYPE_XPN = "XPN"; public static final String NND_HL7_DATATYPE_XTN = "XTN"; public static final String NND_HL7_DATATYPE_DT = "DT"; - //Not an actual HL7 datatype: public static final String NND_HL7_DATATYPE_SN_WITH_UNIT = "SN_WITH_UNIT"; + //constants for MPRUpdateEngine +// public static final String NEDSSVO_CONFIG = PropertyUtil.propertiesDir + "NEDSSVO_Config.xml"; //constants for NND HL7 Segments public static final String NND_HL7_SEGMENT_MSH_10 = "MSH-10.0"; public static final String NND_HL7_SEGMENT_MSH_21 = "MSH-21.0"; @@ -1777,270 +1491,153 @@ public class NEDSSConstant { public static final String NND_HL7_SEGMENT_OBR_7 = "OBR-7.0"; public static final String NND_HL7_SEGMENT_OBR_22 = "OBR-22.0"; public static final String NND_HL7_SEGMENT_OBR_25 = "OBR-25.0"; - //CDA (Clinical Document Architecture) Constants public static final String CDA_PHDC_CODE = "55751-2"; public static final String CDA_PHDC_TYPE = "CDA-PHDC"; public static final String CDA_TYPE = "CDA"; - - public static final String PHCR_LOCAL_REGISTRY_ID = "LR"; - //constants for Notification forms public static final String NOTF_CR_FORM = "CR_FORM"; public static final String FLU_SUM_FORM = "SUM_FORM_FLU"; - //constants for Security User types public static final String SEC_USERTYPE_EXTERNAL = "externalUser"; - public static final String SEC_USERTYPE_INTERNAL = "internalUser"; - public static final String EXTERNAL_USER_IND = "E"; public static final String INTERNAL_USER_IND = "N"; - - public static final String SEC_MSA = "msa"; - public static final String SEC_PAA = "paa"; - //constant to be used as a dummy value for ReportingFacilityUID in LDAP when //one isn't selected in security admin. public static final String SEC_NO_REPORTING_FACILITY = "No Reporting Facility"; - //constants for Test types public static final String TEST_TYPE_LOINC = "LOINC"; - - public static final String RESULT_TYPE_SNOMED= "SNOMEDRESULT"; - + public static final String RESULT_TYPE_SNOMED = "SNOMEDRESULT"; public static final String TEST_TYPE_LOCAL = "LOCAL"; - public static final String RESULT_TYPE_LOCAL = "LOCALRESULT"; - //Reporting lab public static final String REPORTING_LAB_CLIA = "CLIA"; - public static final String REPORTING_LAB_FI_TYPE = "FI"; - - //treatment - - public static final String RESULT_TREATMENT= "TREATMENT"; - - - // constants for transport -// public static final String NEDSS_TRANSPORT_CONFIG_FILENAME = PropertyUtil.propertiesDir + "NedssTransportConfig.xml"; - + public static final String RESULT_TREATMENT = "TREATMENT"; public static final String NEDSS_JMS_QUEUE_TRANSPORT_MANAGER = "nbs-jms-queue-transport-manager"; - public static final String NEDSS_JMS_TOPIC_TRANSPORT_MANAGER = "nbs-jms-topic-transport-manager"; - public static final String NND_AUTO_RESEND_QUEUE = "queue/NNDAutoResendJMSQueue"; - public static final String PDP_NOTIFICATION_QUEUE = "PDPNotificationQueue"; - public static final String PROGRAM_AREA_PROCESS_CD = "ProcessCd"; - /* added to make notification_manage.xsp compile. If not required should be removed */ public static final String INVESTIGATION = "Investigation"; - /*added for lab*/ public static final String LOAD_ON_STARTUP = "YES"; - /*Constants to be used for lab caching mechanism*/ public static final String ORDERED_TEST_DBVALUE = "O"; - public static final String RESULTED_TEST_DBVALUE = "R"; - public static final String ORDERED_TEST = "OT"; - public static final String RESULTED_TEST = "RT"; - public static final String DEFAULT = "DEFAULT"; - public static final String PROGRAM_AREA_NONE = "NONE"; - public static final String JURISDICTION_NONE = "NONE"; - public static final String ORDERED_TEST_LOOKUP = "OrderedTest"; - public static final String RESULTED_TEST_LOOKUP = "ResultedTest"; - public static final String SPECIMEN_SOURCE_LOOKUP = "SpecimentSourceLookup"; - public static final String SPECIMEN_SITE_LOOKUP = "SpecmentSiteLookup"; - public static final String NUMERIC_RESULT_LOOKUP = "NumericResultLookup"; - public static final String CODED_RESULT_LOOKUP = "CodedResultLookup"; - public static final String ORGANISM_LOOKUP = "OrganismLookup"; - public static final String DRUG_LOOKUP = "DrugLookup"; - public static final String TREATMENTS_LOOKUP = "TreatmentsLookup"; - public static final String TREATMENT_DRUGS_LOOKUP = "TreatmentDrugsLookup"; - public static final String NBS_ELEMENTSUID_LOOKUP = "NbsElementsUidLookup"; - public static final String UNITS_LOOKUP = "UnitsLookup"; - public static final String INVESTIGATION_REPORTING_LOOKUP = "InvReportingSourceLookup"; - public static final String HAS_HIV_PERMISSIONS = "hasHIVPermissions"; - public static final String LAB_TESTCODE_NI = "NI"; - public static final String LAB_TYPE_CLIA = "CLIA"; - public static final String LAB_TYPE_FI = "FI"; - public static final String CACHED_TESTNAME_DELIMITER = "--"; - public static final int CACHED_DROPDOWN_BEGINING_SIZE = 0; - public static final int CACHED_DROPDOWN_END_SIZE500 = 501; + //treatment public static final String LAB_REPORT_DESC = "Lab Report"; - public static final String MORB_REPORT_DESC = "Morbidity Report"; + // constants for transport +// public static final String NEDSS_TRANSPORT_CONFIG_FILENAME = PropertyUtil.propertiesDir + "NedssTransportConfig.xml"; + public static final String MORB_REPORT_DESC = "Morbidity Report"; public static final String KEY_CODINGSYSTEMCD = "KEY_CODING_SYSTEM_CD"; - public static final String KEY_CODESYSTEMDESCTXT = "KEY_CODE_SYSTEM_DESC_TXT"; - //Data migration status public static final String DM_RECORD_PASS = "Passed"; - public static final String DM_RECORD_FAIL = "Failed"; - public static final String LDF_METADATA_RECORD_STATUS_CD = "LDF_PROCESSED"; - public static final String LDF_CREATE_RECORD_STATUS_CD = "LDF_CREATE"; - public static final String LDF_UPDATE_RECORD_STATUS_CD = "LDF_UPDATE"; - public static final String SUBFORM_CREATE_RECORD_STATUS_CD = "SUBFORM_CREATE"; - public static final String SUBFORM_UPDATE_RECORD_STATUS_CD = "SUBFORM_UPDATE"; - public static final String DF_DATA_TYPE = "CustomDefinedField"; - public static final String SF_DATA_TYPE = "CustomSubform"; - //SRTFiltering 1.1.3 Mapping Flags. Set to Y or N is NEDSS.properties public static final String LABTEST_SITE_MAPPING = "LABTEST_SITE_MAPPING"; - public static final String LABTEST_SPECIMEN_MAPPING = "LABTEST_SPECIMEN_MAPPING"; - public static final String LABTEST_UNIT_MAPPING = "LABTEST_UNIT_MAPPING"; - public static final String LABTEST_DISPLAY_MAPPING = "LABTEST_DISPLAY_MAPPING"; - public static final String CONDITION_REPORTING_SOURCE = "CONDITION_REPORTING_SOURCE"; - public static final String LABTEST_PROGAREA_MAPPING = "LABTEST_PROGAREA_MAPPING"; - public static final String LABTEST_LABRESULT_MAPPING = "LABTEST_LABRESULT_MAPPING"; - public static final String LABTEST_RELATIONSHIP = "LABTEST_RELATIONSHIP"; - public static final String TREATMENT_CONDITION = "TREATMENT_CONDITION"; - public static final String LOINC_SITE_MAPPING = "LOINC_SITE_MAPPING"; - public static final String LOINC_SPECIMEN_MAPPING = "LOINC_SPECIMEN_MAPPING"; - public static final String LOINC_UNIT_MAPPING = "LOINC_UNIT_MAPPING"; - public static final String LOINC_DISPLAY_MAPPING = "LOINC_DISPLAY_MAPPING"; - //SRTFiltering for ReportingSource public static final String REPORTING_SOURCE_CREATE = "CREATE"; - public static final String REPORTING_SOURCE_EDIT = "EDIT"; - public static final String REPORTING_SOURCE_VIEW = "VIEW"; - //SRTFiltering for Treatment public static final String TREATMENT_SRT_CREATE = "CREATE"; - public static final String TREATMENT_SRT_EDIT = "EDIT"; - public static final String TREATMENT_SRT_VIEW = "VIEW"; - public static final String TREATMENT_SRT_DRUGS = "TREATMENT_DRUGS"; - public static final String TREATMENT_SRT_VALUES = "TREATMENTS"; - - //display Elements for Lab - public static final String LAB121 = "LAB121"; - public static final String LAB278 = "LAB278"; - public static final String LAB113To115_UNITS = "LAB113To115_UNITS"; - public static final String LAB113To115_VALUE = "LAB113To115_VALUE"; - public static final String LAB208 = "LAB208"; - public static final String LAB119_120 = "LAB119_120"; - public static final String LAB222 = "LAB222"; - public static final String LAB105 = "LAB105"; - public static final String LAB110 = "LAB110"; - public static final String LAB118 = "LAB118"; - public static final String LAB113 = "LAB113"; - public static final String LAB114 = "LAB114"; - public static final String LAB115 = "LAB115"; - public static final String LAB116 = "LAB116"; - public static final String LAB117 = "LAB117"; - public static final String LAB119 = "LAB119"; - public static final String LAB120 = "LAB120"; - public static final String OFFICE = "Office"; - public static final String HOUSE = "House"; - public static final String CODE_O = "O"; - /* event tab order */ public static final String EVENT_TAB_PATIENT_NAME = "PATIENT"; - public static final int EVENT_TAB_PATIENT_ORDER = 1; - public static final String EVENT_TAB_EVENT_NAME = "EVENT"; - public static final int EVENT_TAB_EVENT_ORDER = 2; - - // Constants needed by JMSManager public static final int JMS_BROADCAST_SUBJECT = 1; - public static final int JMS_SEND_ONCE_SUBJECT = 2; - public static final String QUEUE_CONN_FACT_TAG = "JMS Queue Connection Factory"; - public static final String TOPIC_CONN_FACT_TAG = "JMS Topic Connection Factory"; - public static final String PROV_URL_TAG = "JMS URL"; - public static final String INIT_CON_FACT_TAG = "JMS Initial Context Factory"; public static final String I_ORDER = "I_Order"; public static final String I_RESULT = "I_Result"; public static final String LAB_329 = "LAB329"; public static final String LAB_329A = "LAB329a"; public static final String LAB_330 = "LAB330"; + + //display Elements for Lab public static final String NBS_LAB330 = "NBS_LAB330"; public static final String NBS_LAB266 = "NBS_LAB266"; public static final String LAB_331 = "LAB331"; @@ -2077,593 +1674,278 @@ public class NEDSSConstant { public static final String LAB_362 = "LAB362"; public static final String LAB_330_CD_DESC_TXT = "Patient Status at Specimen Collection"; public static final String LAB_363 = "LAB363"; - public static final String LAB_235 = "LAB235"; - public static final String MORB_235 = "MRB235"; - - public static final String LAB329CD_DESC_TXT="Isolate Tracking"; - public static final String STATUS_CD_D="D"; - + public static final String LAB329CD_DESC_TXT = "Isolate Tracking"; + public static final String STATUS_CD_D = "D"; /* * ACT RELATIONSHIP specific constants */ public static final String TYPE_CD_115 = "SPRT"; - public static final String TYPE_DESC_TXT_115= "Has Support"; - public static final String TYPE_CD_110= "COMP"; - public static final String TYPE_DESC_TXT_110="Has Component"; - public static final String TYPE_DESC_TXT_109= "Refers to"; - - - public static final String CD_SYSTEM_CD_NBS = "2.16.840.1.114222.4.5.1"; - public static final String CODED_CD_SYSTEM_CD_HL7 = "2.16.840.1.113883.12.136"; - public static final String CODED_CD_SYSTEM_CD = "2.16.840.1.114222.4.5.131"; - public static final String CODED_CD_SYSTEM_CD_LAB347 = "2.16.840.1.114222.4.5.190"; - public static final String CODED_CD_SYSTEM_CD_LAB352_YN = "2.16.840.1.113833.12.136"; - public static final String CODED_CD_SYSTEM_CD_LAB352_ELSE = "2.16.840.1.114222.5.192"; - public static final String CODED_CD_SYSTEM_CD_LAB359_LAB353 = "2.16.840.1.114222.5.131"; - public static final String CODED_CD_SYSTEM_CD_LAB355 = "2.16.840.1.114222.4.5.182"; - - public static final String CODED_SYSTEM_DESC_TXT="HL7 Table 0136"; - public static final String FILLER_NUMBER_FOR_ACCESSION_NUMBER="FN"; - public static final String MESSAGE_CTRL_ID_CODE="MCID"; - public static final String HIV_SRT_CODE ="19030005"; - public static final String AIDS_SRT_CODE ="62479008"; - public static final String NO_FIRST_NAME_INVESTIGATOR ="No First"; - public static final String NO_LAST_NAME_INVESTIGATOR ="No Last"; - public static final String NO_INVESTIGATOR_ASSIGNED ="No Investigator Assigned"; - + public static final String TYPE_DESC_TXT_115 = "Has Support"; + public static final String TYPE_CD_110 = "COMP"; + public static final String TYPE_DESC_TXT_110 = "Has Component"; + public static final String TYPE_DESC_TXT_109 = "Refers to"; + public static final String CD_SYSTEM_CD_NBS = "2.16.840.1.114222.4.5.1"; + public static final String CODED_CD_SYSTEM_CD_HL7 = "2.16.840.1.113883.12.136"; + public static final String CODED_CD_SYSTEM_CD = "2.16.840.1.114222.4.5.131"; + public static final String CODED_CD_SYSTEM_CD_LAB347 = "2.16.840.1.114222.4.5.190"; + public static final String CODED_CD_SYSTEM_CD_LAB352_YN = "2.16.840.1.113833.12.136"; + public static final String CODED_CD_SYSTEM_CD_LAB352_ELSE = "2.16.840.1.114222.5.192"; + public static final String CODED_CD_SYSTEM_CD_LAB359_LAB353 = "2.16.840.1.114222.5.131"; + public static final String CODED_CD_SYSTEM_CD_LAB355 = "2.16.840.1.114222.4.5.182"; + public static final String CODED_SYSTEM_DESC_TXT = "HL7 Table 0136"; + public static final String FILLER_NUMBER_FOR_ACCESSION_NUMBER = "FN"; + public static final String MESSAGE_CTRL_ID_CODE = "MCID"; + public static final String HIV_SRT_CODE = "19030005"; + public static final String AIDS_SRT_CODE = "62479008"; + public static final String NO_FIRST_NAME_INVESTIGATOR = "No First"; + public static final String NO_LAST_NAME_INVESTIGATOR = "No Last"; + public static final String NO_INVESTIGATOR_ASSIGNED = "No Investigator Assigned"; public static final String NND_REJECTED_NOTIFICATIONS_FOR_APPROVAL = "Rejected Notifications Queue"; public static final String NON_CASCADING = "NON_CASCADING"; public static final String CASCADING = "CASCADING"; - public static final String SECURITY_FAIL = "FAIL"; - - public static final String CONDITION_CD= "CONDITION_CD"; - public static final String CONDITION= "Condition"; + public static final String CONDITION_CD = "CONDITION_CD"; + public static final String CONDITION = "Condition"; public static final String PROG_AREA_CD = "PROG_AREA_CD"; public static final String JURIS_CD = "JURIS_CD"; + public static final String MY_PROGRAM_AREAS_INVESTIGATIONS_QUEUE_SIZE = "MY_PROGRAM_AREAS_INVESTIGATIONS_QUEUE_SIZE"; + public static final String PAGE_MANAGEMENT_CONDITION_LIBRARY_QUEUE_SIZE = "PAGE_MANAGEMENT_CONDITION_LIBRARY_QUEUE_SIZE"; + public static final String PAGE_MANAGEMENT_VALUE_SET_LIBRARY_QUEUE_SIZE = "PAGE_MANAGEMENT_VALUE_SET_LIBRARY_QUEUE_SIZE"; + public static final String PAGE_MANAGEMENT_QUESTION_LIBRARY_QUEUE_SIZE = "PAGE_MANAGEMENT_QUESTION_LIBRARY_QUEUE_SIZE"; + public static final String PAGE_MANAGEMENT_PAGE_LIBRARY_QUEUE_SIZE = "PAGE_MANAGEMENT_PAGE_LIBRARY_QUEUE_SIZE"; + public static final String PAGE_MANAGEMENT_TEMPLATE_LIBRARY_QUEUE_SIZE = "PAGE_MANAGEMENT_TEMPLATE_LIBRARY_QUEUE_SIZE"; + public static final String MY_PROGRAM_AREAS_QUEUE_SORTBY_NEWEST_INV_STARTDATE = "MY_PROGRAM_AREAS_QUEUE_SORTBY_NEWEST_INV_STARTDATE"; + public static final String APPR_QUEUE_FOR_NOTIF_DISP_SIZE = "APPR_QUEUE_FOR_NOTIF_DISP_SIZE"; + public static final String OBSERVATIONS_NEEDING_ASSIGNMENT_QUEUE_SIZE = "OBSERVATIONS_NEEDING_ASSIGNMENT_QUEUE_SIZE"; + public static final String OBSERVATIONS_NEEDING_REVIEW_QUEUE_SIZE = "OBSERVATIONS_NEEDING_REVIEW_QUEUE_SIZE"; + public static final String REJECTED_NOTIF_QUEUE_DISP_SIZE = "REJECTED_NOTIF_QUEUE_DISP_SIZE"; + public static final String UPD_QUEUE_FOR_NOTIF_DISP_SIZE = "UPD_QUEUE_FOR_NOTIF_DISP_SIZE"; + public static final String APPROVAL_NOTIFICATION_QUEUE_SIZE = "APPROVAL_NOTIFICATION_QUEUE_SIZE"; + public static final String REJECTED_NOTIFICATION_QUEUE_SIZE = "REJECTED_NOTIFICATION_QUEUE_SIZE"; + public static final String MANAGE_CONTACT_ASSOCIATIONS_QUEUE_SIZE = "MANAGE_CONTACT_ASSOCIATIONS_QUEUE_SIZE"; + public static final String MANAGE_COINFECTIONS_ASSOCIATIONS_QUEUE_SIZE = "MANAGE_COINFECTIONS_ASSOCIATIONS_QUEUE_SIZE"; + public static final String PAGE_MANAGEMENT_IMPORTEXPORT_LIBRARY_QUEUE_SIZE = "PAGE_MANAGEMENT_IMPORTEXPORT_LIBRARY_QUEUE_SIZE"; + public static final String MESSAGING_MANAGEMENT_ACTIVITYLOG_LIBRARY_QUEUE_SIZE = "MESSAGING_MANAGEMENT_ACTIVITYLOG_LIBRARY_QUEUE_SIZE"; + public static final String EPILINK_MANAGEMENT_ACTIVITYLOG_LIBRARY_QUEUE_SIZE = "EPILINK_MANAGEMENT_ACTIVITYLOG_LIBRARY_QUEUE_SIZE"; + public static final String ASSOCIATE_INVESTIGATIONS_QUEUE_SIZE = "ASSOCIATE_INVESTIGATIONS_QUEUE_SIZE"; + public static final String MESSAGE_QUEUE_SIZE = "MESSAGE_QUEUE_SIZE"; + public static final String PAGE_MANAGEMENT_PORT_PAGE_LIBRARY_QUEUE_SIZE = "PAGE_MANAGEMENT_PORT_PAGE_LIBRARY_QUEUE_SIZE"; + public static final String MANAGE_TRIGGERCODES_QUEUE_SIZE = "MANAGE_TRIGGERCODES_QUEUE_SIZE"; + public static final String IIS_PATIENT_SEARCH_RESULT_QUEUE_SIZE = "IIS_PATIENT_SEARCH_RESULT_QUEUE_SIZE"; + public static final String IIS_VACCINATION_SEARCH_RESULT_QUEUE_SIZE = "IIS_VACCINATION_SEARCH_RESULT_QUEUE_SIZE"; + // Initial Value for the Version Control Number + public static final int INITIAL_VERSION_CONTROL_NUMBER = 1; + // Observation Needing Review Queue + public static final String OBSERVATION_TYPE_COUNT = "ObservationTypeCount"; + public static final String JURISDICTIONS_COUNT = "JurisdictionsCount"; + public static final String RESULTEDTEST_COUNT = "ResultedTestCount"; + public static final String RESULTEDDES_COUNT = "ResultedDesCount"; + public static final String DATE_FILTER_COUNT = "dateFilterListCount"; + public static final String DATE_PRGAREA_COUNT = "dateProgramAreaCount"; + // Updated Notification Queue Filter counts + public static final String CASE_STATUS_FILTER_ITEMS_COUNT = "CaseStatusFilterItemsCount"; + public static final String SUBMITTED_BY_FILTER_ITEMS_COUNT = "SubmittedByFilterItemsCount"; + public static final String NOTIFICATION_CODE_FILTER_ITEMS_COUNT = "NotificationCodeFilterItemsCount"; /* * Queue Sizes properties. */ - - public static final String MY_PROGRAM_AREAS_INVESTIGATIONS_QUEUE_SIZE="MY_PROGRAM_AREAS_INVESTIGATIONS_QUEUE_SIZE"; - public static final String PAGE_MANAGEMENT_CONDITION_LIBRARY_QUEUE_SIZE="PAGE_MANAGEMENT_CONDITION_LIBRARY_QUEUE_SIZE"; - public static final String PAGE_MANAGEMENT_VALUE_SET_LIBRARY_QUEUE_SIZE="PAGE_MANAGEMENT_VALUE_SET_LIBRARY_QUEUE_SIZE"; - public static final String PAGE_MANAGEMENT_QUESTION_LIBRARY_QUEUE_SIZE="PAGE_MANAGEMENT_QUESTION_LIBRARY_QUEUE_SIZE"; - public static final String PAGE_MANAGEMENT_PAGE_LIBRARY_QUEUE_SIZE="PAGE_MANAGEMENT_PAGE_LIBRARY_QUEUE_SIZE"; - public static final String PAGE_MANAGEMENT_TEMPLATE_LIBRARY_QUEUE_SIZE="PAGE_MANAGEMENT_TEMPLATE_LIBRARY_QUEUE_SIZE"; - public static final String MY_PROGRAM_AREAS_QUEUE_SORTBY_NEWEST_INV_STARTDATE="MY_PROGRAM_AREAS_QUEUE_SORTBY_NEWEST_INV_STARTDATE"; - public static final String APPR_QUEUE_FOR_NOTIF_DISP_SIZE="APPR_QUEUE_FOR_NOTIF_DISP_SIZE"; - public static final String OBSERVATIONS_NEEDING_ASSIGNMENT_QUEUE_SIZE="OBSERVATIONS_NEEDING_ASSIGNMENT_QUEUE_SIZE"; - public static final String OBSERVATIONS_NEEDING_REVIEW_QUEUE_SIZE="OBSERVATIONS_NEEDING_REVIEW_QUEUE_SIZE"; - public static final String REJECTED_NOTIF_QUEUE_DISP_SIZE="REJECTED_NOTIF_QUEUE_DISP_SIZE"; - public static final String UPD_QUEUE_FOR_NOTIF_DISP_SIZE="UPD_QUEUE_FOR_NOTIF_DISP_SIZE"; - public static final String APPROVAL_NOTIFICATION_QUEUE_SIZE="APPROVAL_NOTIFICATION_QUEUE_SIZE"; - public static final String REJECTED_NOTIFICATION_QUEUE_SIZE="REJECTED_NOTIFICATION_QUEUE_SIZE"; - public static final String MANAGE_CONTACT_ASSOCIATIONS_QUEUE_SIZE="MANAGE_CONTACT_ASSOCIATIONS_QUEUE_SIZE"; - public static final String MANAGE_COINFECTIONS_ASSOCIATIONS_QUEUE_SIZE="MANAGE_COINFECTIONS_ASSOCIATIONS_QUEUE_SIZE"; - public static final String PAGE_MANAGEMENT_IMPORTEXPORT_LIBRARY_QUEUE_SIZE="PAGE_MANAGEMENT_IMPORTEXPORT_LIBRARY_QUEUE_SIZE"; - public static final String MESSAGING_MANAGEMENT_ACTIVITYLOG_LIBRARY_QUEUE_SIZE="MESSAGING_MANAGEMENT_ACTIVITYLOG_LIBRARY_QUEUE_SIZE"; - public static final String EPILINK_MANAGEMENT_ACTIVITYLOG_LIBRARY_QUEUE_SIZE ="EPILINK_MANAGEMENT_ACTIVITYLOG_LIBRARY_QUEUE_SIZE"; - public static final String ASSOCIATE_INVESTIGATIONS_QUEUE_SIZE="ASSOCIATE_INVESTIGATIONS_QUEUE_SIZE"; - public static final String MESSAGE_QUEUE_SIZE="MESSAGE_QUEUE_SIZE"; - public static final String PAGE_MANAGEMENT_PORT_PAGE_LIBRARY_QUEUE_SIZE="PAGE_MANAGEMENT_PORT_PAGE_LIBRARY_QUEUE_SIZE"; - public static final String MANAGE_TRIGGERCODES_QUEUE_SIZE="MANAGE_TRIGGERCODES_QUEUE_SIZE"; - public static final String IIS_PATIENT_SEARCH_RESULT_QUEUE_SIZE="IIS_PATIENT_SEARCH_RESULT_QUEUE_SIZE"; - public static final String IIS_VACCINATION_SEARCH_RESULT_QUEUE_SIZE="IIS_VACCINATION_SEARCH_RESULT_QUEUE_SIZE"; - - public static String COUNTRY_LIST = "COUNTRY_LIST"; - public static String ISO_COUNTRY_LIST = "ISO_COUNTRY_LIST"; - public static String STATE_LIST = "STATE_LIST"; - public static String JURIS_LIST = "JURIS_LIST"; - public static String EXPORT_JURIS_LIST = "EXPORT_JURIS_LIST"; - public static String CONDITION_FAMILY_LIST = "CONDITION_FAMILY_LIST"; - public static String EXPORT_RECEIVING_LIST = "EXPORT_RECEIVING_LIST"; - public static String JURIS_ALERT_LIST = "JURIS_ALERT_LIST"; - - public static String TREAT_COMPOSITE = "TREAT_COMPOSITE"; - public static String PROG_AREA= "PROG_AREA"; - public static String Nedss_Entry_Id="Users_Email_EntryId"; - public static String Users_With_Valid_Email="Users_With_Valid_Email"; - public static String Users_With_Active_Alert="Users_With_Active_Alert"; - public static String PSL_CNTRY = "PSL_CNTRY_FOR_JSP"; - public static String P_LANG = "P_LANG_FOR_JSP"; - public static String O_NAICS = "O_NAICS_JSP"; - public static String PARTICIPATION_TYPE_LIST = "PARTICIPATION_TYPE_LIST"; - public static String AOE_LOINC_LIST = "AOE_LOINC_LIST"; - - public static String CASE_VERIFICATION= "CASE_VERIFICATION"; - /** - * Constants for the Rules Engine - */ - public static String ENABLE = "enable"; - public static String FILTER = "filter"; - public static String DATE_RANGE = "dateRange"; - public static String FILTER_REMOVE = "R"; - public static String FILTER_ADD = "A"; - public static String DATE = "Date"; - public static String MMWR = "MMWR"; - public static String DATE_COMPARE="dateCompare"; - public static String ON_SUBMIT = "S"; - public static String ON_CHANGE = "C"; - public static String ON_CREATE_SUBMIT = "D"; - public static String MATCH_VALUE = "matchValue"; - public static String REQUIRED_IF = "requiredIf"; - public static String DISABLE = "disable"; - public static String YEAR_RANGE = "yearRange"; - public static String VALID_LENGTH = "validLength"; - public static String VALID_VALUE = "validValue"; - public static String DATE_COMPARE_LIMIT = "dateCompareLimit"; - public static String YEAR_RANGE_EQUAL = "yearRangeEqual"; - public static String UNIQUE_CASE_NUMBER = "uniqueCaseNumber"; - public static String SINGLE_SRC_SAME_TARGET_FILTER = "singleSrcSameTargetFilter"; - public static String CASCADING_ENABLE_ON_FILTER_TARGET = "cascadingEnableOnFilterTarget"; - - public static String EIGHTEEN_SEVENTYFIVE = "1875"; - - - - /* - * dataTypes - */ - public static String DATATYPE_CODED = "Coded"; - public static String DATATYPE_TEXT = "Text"; - public static String DATATYPE_DATE = "Date"; - public static String DATATYPE_NUMERIC = "Numeric"; - - /* - * Operators for Rules Engine. - */ - public static String LESS_THAN = "<"; - public static String LESS_THAN_EQUAL = "<="; - public static String Equal = "="; - public static String Not_Equal = "!="; - - public static String INV_FORM_RVCT = "INV_FORM_RVCT"; - public static String INV_FORM_VAR = "INV_FORM_VAR"; - - public static String EDIT_SUBMIT_ACTION = "EDIT_SUBMIT"; - public static String CREATE_SUBMIT_ACTION = "CREATE_SUBMIT"; - public static String VIEW_LOAD_ACTION = "View"; - //public static String VIEW_SUBFORM_LOAD_ACTION = "ViewSubForm"; - //public static String EDIT_SUBFORM_SUBMIT_ACTION = "EditSubForm"; - - - public static String CREATE_LOAD_ACTION = "Create"; - public static String EDIT_LOAD_ACTION = "Edit"; - public static String PREVIEW_ACTION = "Preview"; - public static String RESULT_LOAD_ACTION = "ResultLoad"; - //Added for Export case Notification - public static String ADD_TRIGGER_ACTION = "AddTrigger"; - public static String CLONE_LOAD_ACTION = "Clone"; - public static String CLONE_SUBMIT_ACTION = "ClONE_SUBMIT"; - public static String CREATE_EXTEND_ACTION = "CREATE_EXTEND"; - public static String PORT_LOAD_ACTION = "Port"; - - //SRT Admin - public static String LABORATORY_IDS = "LABORATORY_IDS"; - public static String LAB_TEST_TYPES = "LAB_TEST_TYPES"; - public static String CODE_SET_NMS = "CODE_SET_NMS"; - public static String CODE_SYSTEM_CD_DESCS = "CODE_SYSTEM_CD_DESCS"; - public static String NBS_UNITS_TYPE = "NBS_UNITS_TYPE"; - - /* - * Unique keys for SRT Admin - */ - public static String CODE = "Code"; - public static String LABID = "Lab ID"; - public static String LABTESTCD = "Lab Test Code"; - public static String LABTESTCD_LOINCCD = "Lab Test Code or Loinc Code"; - public static String LABRESULTCD = "Lab Result Code"; - public static String LABRESULTCD_SNOMEDCD = "Lab Result Code or Snomed Code"; - public static String LOINCCD = "Loinc Code"; - public static String LOINCCD_CONDITIONCD = "Loinc Code or Condition Code"; - public static String SNOMEDCD = "Snomed Code"; - public static String SNOMEDCD_CONDITIONCD = "Snomed Code or Condition Code"; - public static String LOINC_CD = "LOINC Code"; - public static String SNOMED_CD = "SNOMED Code"; - public static String CODE_SET = "Value Set Code"; - public static String CONDITIONCD = "Condition Code"; - public static String LOINC_CODE = "LN"; - public static String SNOMED_CODE = "SNM"; - - //Unique keys for Import and Export Admin - public static String REC_SYS_NM = "System Name"; - public static String REC_SYS_SHORT_NM = "System short Name"; - public static String REC_SYS_OID = "System Oid"; - - - // Initial Value for the Version Control Number - public static final int INITIAL_VERSION_CONTROL_NUMBER = 1; + public static final String RECIPIENT_FILTER_ITEMS_COUNT = "RecipientFilterItemsCount"; + public static final String UPDATE_DATE_FILTER_ITEMS_COUNT = "UpdateDateFilterItemsCount"; + public static final String LOCAl_DESC = "Local"; + // Manage Associate Obs to one or more Investigations Queue + public static final String RETURN_TO_ASSOCIATE_TO_INVESTIGATIONS = "Return to Associate to Investigations"; + //Document related Constants + public static final String DOC_PROCESS = "DOC_PROCESS"; + public static final String PHC_236 = "PHC236"; + public static final String LAB_11648804 = "11648804"; + public static final String JURIS_NO_EXPORT_LIST = "JURIS_NO_EXPORT_LIST"; + public static final String SEX = "SEX"; + public static final String APPROVED_SHARED_NOTIFICATION_UID_LIST = "APPROVED_SHARED_NOTIFICATION_UID_LIST"; + public static final String APPROVED_TRANFERRED_NOTIFICATION_UID_LIST = "APPROVED_TRANFERRED_NOTIFICATION_UID_LIST"; + public static final String APPROVED_NND_NOTIFICATION_UID_LIST = "APPROVED_NND_NOTIFICATION_UID_LIST"; + //Aggregate Summary Constants + public static final String AGG_SUM_CONDITION_CD = "AGG_SUM_CONDITION_CD"; + public static final String NOVEL_INFLUENZA_FLU = "11063"; + public static final String AGG_SUM_COUNT_INTERVAL_CD = "14497002"; //(Weekly) + //Redesign manage obs/ vaccination/ treatment + public static final String INVESTIGATION_CASE_STATUS = "Null"; + public static final String ManageEvents = "ManageEvents"; + /* Constants related to Contact*/ + public static final String CONTACT_PROVIDER = "InvestgrOfContact"; + public static final String CONTACT_DISPOSITIONED_BY = "DispoInvestgrOfConRec"; + public static final String CONTACT_OTHER_INFECTED_PATIENT = "OthInfPatOfConRec"; + public static final String CONTACT_ORGANIZATION = "SiteOfExposure"; + public static final String CONTACT_FORMCODE = "CONTACT_REC"; + public static final String CONTACT_PRIORITY = "NBS_PRIORITY"; + public static final String CONTACT_STATUS = "PHC_IN_STS"; + public static final String CONTACT_DISPOSITION = "NBS_DISPO"; + /* access modifiers*/ + public static final String PUBLIC = "public"; + public static final String PRIVATE = "private"; + public static final String CONTACT_TRACING_ENABLE_IND = "Y"; + /* Constants related to PAGE MANAGEMENT*/ + public static final String[] PAGE_GROUP_EXC = {"GROUP_DEM", "GROUP_MSG", "GROUP_NOT"}; + public static final String PAGE_GROUP = "NBS_QUES_GROUP"; + public static final String PAGE_SUBGROUP = "NBS_QUES_SUBGROUP"; + public static final String PAGE_SUBGROUP_IXS = "NBS_QUES_SUBGROUP_IXS"; + public static final String PAGE_DATATYPE = "NBS_DATA_TYPE"; + public static final String PAGE_VALSET = "NBS_DATA_TYPE"; + public static final String PAGE_MASK = "NBS_MASK_TYPE"; + public static final String PAGE_HL7_DATATYPE = "NBS_HL7_DATA_TYPE"; + public static final String PAGE_NBS_STATUS_CD = "NBS_STATUS_CD"; + public static final String PAGE_NBS_REC_STATUS_CD = "NBS_REC_STATUS_CD"; + public static final String PAGE_HL7_SEGMENT = "NBS_HL7_SEGMENT"; + public static final String DELETECONTEXT = "deleteContext"; + public static final String PUBWITHDRAFT = "PWD"; + public static final String PUBLISHED = "Published"; + public static final String CREATEDRAFTIND = "createDraftInd"; + public static final String CREATEDRAFTINDPUB = "PUB"; + public static final String CREATEDRAFTINDDRT = "DRT"; + public static final String NONE = "none"; + // Data Location + public static final String DATA_LOCATION_CASE_ANSWER_TEXT = "NBS_CASE_ANSWER.ANSWER_TXT"; + public static final String DATE_DATATYPE = "DATE"; + public static final String DATETIME_DATATYPE = "DATETIME"; + public static final String NUMERIC_DATATYPE = "NUMERIC"; + public static final String NUMERIC_CODE = "NUM"; + public static final String TEXT_DATATYPE = "TEXT"; + public static final String PART_DATATYPE = "PART"; + public static final String CODED = "CODED"; + public static final String LITERAL = "LITERAL"; + public static final String CODED_DATA = "coded_data"; + public static final String TEXT_DATA = "text_data"; + public static final String PARTICIPATION_DATA = "participation_data"; + // + public static final String PHIN_DEFINED_QUESTIONTYPE = "PHIN Standard Question"; + public static final String STATE_DEFINED_QUESTIONTYPE = "Locally Defined Question"; + // Page element types (Used in the Page Builder module) + public static final String PAGE_ELEMENT_TYPE_PAGE = "Page"; + public static final String PAGE_ELEMENT_TYPE_TAB = "Tab"; + public static final String PAGE_ELEMENT_TYPE_SECTION = "Section"; + public static final String PAGE_ELEMENT_TYPE_SUBSECTION = "Subsection"; + public static final String PAGE_ELEMENT_TYPE_QUESTION = "Question"; + public static final String PAGE_ELEMENT_TYPE_HYPERLINK = "Hyperlink"; + public static final String PAGE_ELEMENT_TYPE_COMMENT = "Comment"; + public static final String PAGE_ELEMENT_TYPE_LINE_SEPARATOR = "Line Separator"; + public static final String PAGE_ELEMENT_TYPE_PARTICIPANT_LIST = "Participant List"; + public static final String PAGE_ELEMENT_TYPE_PATIENT_SEARCH = "Patient Search"; + public static final String PAGE_ELEMENT_TYPE_ACTION_BUTTON = "Action Button"; + public static final String PAGE_ELEMENT_TYPE_SET_VALUES_BUTTON = "Set Values Button"; + public static final String PAGE_ELEMENT_TYPE_ORIG_DOC_LIST = "Original Electronic Document List"; + public static final String PHIN_QUESTIONTYPE_CODE = "PHIN"; + public static final String STATE_QUESTIONTYPE_CODE = "LOCAL"; + public static final String NBS_QUESTION_TYPE = "NBS_QUESTION_TYPE"; + public static final String ORDER_GRP_ID = "2"; + public static final String VALUE_SET_TYPE_NO_SYSTEM_STAD = "VALUE_SET_TYPE_NO_SYSTEM_STAD"; + public static final String NBS_PH_DOMAINS = "NBS_PH_DOMAINS"; + public static final String DRAFT = "Draft"; + //public static String VIEW_SUBFORM_LOAD_ACTION = "ViewSubForm"; + //public static String EDIT_SUBFORM_SUBMIT_ACTION = "EditSubForm"; + public static final String TEMPLATE = "TEMPLATE"; + public static final String MULTISELECT_COMPONENT = "1013"; + public static final String MULTISELECT_COMPONENT_READONLY_SAVE = "1025"; + public static final String NBS_CASE_ANSWER_ANSWER_TXT = "NBS_CASE_ANSWER.ANSWER_TXT"; + public static final String NBS_ANSWER_ANSWER_TXT = "NBS_ANSWER.ANSWER_TXT"; + public static final String ANSWER_TXT = "ANSWER_TXT"; + public static final String CT_CONTACT_ANSWER_ANSWER_TXT = "CT_CONTACT_ANSWER.ANSWER_TXT"; + public static final String INV = "INV"; + public static final String INVESTIGATION_CAP = "INVESTIGATION"; + public static final String FROM_CONTEXT = "fromWhere"; + public static final String PREVIEW = "preview"; + public static final String PUBLISH = "publish"; + public static final String IMPORT_CD = "I"; + public static final String EXPORT_CD = "E"; + public static final String IMPORT_DESC = "Import"; + public static final String EXPORT_DESC = "Export"; + public static final String INVESTIGATION_CD = "424352007"; + public static final String MORBIDITY_REPORT_CD = "OBS"; + public static final String REPEATING_QUESTION = "REPEATING_QUESTION"; + public static final String NON_REPEATING_QUESTION = "NON_REPEATING_QUESTION"; + public static final String TEMPLATE_SUMMARIES = "TEMPLATE_SUMMARIES"; + public static final String PAGE_COND_MAPPING_SUMMARIES = "PAGE_COND_MAPPING_SUMMARIES"; + public static final String TEMPLATE_NM = "TEMPLATE_NM"; + public static final String RELATED_CONDITIONS = "RELATED_CONDITIONS"; + public static final String TEMPLATE_DESCR = "TEMPLATE_DESCR"; + // Question Filter + public static final String UNIQUE_ID = "UNIQUE_ID"; + public static final String UNIQUE_NAME = "UNIQUE_NAME"; + public static final String LABEL = "LABEL"; + public static final String DATA_TYPE = "DATA_TYPE"; + public static final String CODE_SET_NM = "CODE_SET_NM"; + //To Question Filter for Mapping Page and Answer Page + public static final String TO_UNIQUE_ID = "TO_ID"; + public static final String TO_LABEL = "TO_LABEL"; + public static final String TO_DATA_TYPE = "TO_DATA_TYPE"; + public static final String TO_CODE_SET_NM = "TO_CODE_SET_NM"; //Investigation Transfer OwnerShip contextAction constants - - public static String FileSummary = "FileSummary"; - public static String ReturnToFileEvents = "ReturnToFileEvents"; - public static String ReturnToFileSummary = "ReturnToFileSummary"; - - //LocalFields - public static String LDF_HTML_TYPES = "LDF_HTML_TYPES"; - public static String NBS_EVENT_SEARCH_DATES = "NBS_EVENT_SEARCH_DATES"; - public static String PHVS_EVN_SEARCH_ABC = "PHVS_EVN_SEARCH_ABC"; - public static String INVESTIGATOR = "INVESTIGATOR"; - public static String FILTERBYINVESTIGATOR = "Investigator equal to: "; - public static String FILTERBYJURISDICTION = "Jurisdiction equal to: "; - public static String FILTERBYCONDITION = "Condition equal to: "; - public static String FILTERBYSUPERVISOR = "Supervisor equal to: "; - public static String FILTERBYREFERRALBASIS = "Referral Basis equal to: "; - public static String FILTERBYDESCRIPTION = "Description equal to: "; - public static String FILTERBYEVENTID = "Event ID equal to: "; - public static String FILTERBYSTATUS = "Case Status equal to: "; - public static String FILTERBYDATE = "Start Date equal to: "; - public static String FILTERBYREPORTTYPE = "Report Type equal to: "; - public static String FILTERBYNOTIF = "Notification equal to: "; - public static String FILTERBYOBSERVATIONTYPE = "ObservationType equal to: "; - public static String FILTERBYEVENTTYPE = "Event Type equal to: "; - public static String FILTERBYDSMSTATUS = "Status equal to: "; - public static String FILTERBYLASTUPDATED = "Last Updated equal to: "; - public static String FILTERBYDSMACTION = "Action equal to: "; - public static String DATE_NON_BLANK_KEY = "!0"; - public static String DATE_BLANK_KEY = "0"; - public static String BLANK_KEY = "BLNK"; - public static String BLANK_VALUE = "(Blanks)"; - public static String NON_BLANK_VALUE = "(Non-Blank)"; - public static String BLANK_INVESTIGATOR_VALUE = "(Blanks)"; - public static String FILTERBYMESSAGEID = "Message ID equal to: "; - public static String FILTERBYSOURCENAME = "Reporting Facility equal to: "; - public static String FILTERBYPATIENTNAME = "Patient Name equal to: "; - public static String FILTERBYACCESSIONNO = "Accession# equal to: "; - public static String FILTERBYOBSERVATIONID = "Observation ID equal to: "; - - public static String GETINVESTIGATORFULLNAME ="getInvestigatorFullName"; - public static String RETURN_TO_OPEN_INVESTIGATIONS = "Return to Open Investigations"; - public static String RETURN_TO_MESSAGE_QUEUE= "Return to Messages Queue"; - public static String RETURN_TO_SUPERVISOR_REVIEW_QUEUE = "Return to Supervisor Review Queue"; - - //Manage Code to Condition Library - - public static String FILTERBYCODE = "Code equal to: "; - public static String FILTERBYDISPLAYNAME = "Display Name equal to: "; - public static String FILTERBYPROGRAMAREA = "Program Area equal to: "; - public static String FILTERBYCONDITION2 = "Condition equal to: "; - public static String FILTERBYCODINGSYSTEM= "Coding System equal to: "; - public static String FILTERBYSTATUS2= "Status equal to: "; - - - - - // Observation Needing Review Queue - public static final String OBSERVATION_TYPE_COUNT = "ObservationTypeCount"; - public static final String JURISDICTIONS_COUNT = "JurisdictionsCount"; - public static final String RESULTEDTEST_COUNT = "ResultedTestCount"; - public static final String RESULTEDDES_COUNT = "ResultedDesCount"; - public static final String DATE_FILTER_COUNT = "dateFilterListCount"; - public static final String DATE_PRGAREA_COUNT = "dateProgramAreaCount"; - - - // Updated Notification Queue Filter counts - public static final String CASE_STATUS_FILTER_ITEMS_COUNT = "CaseStatusFilterItemsCount"; - public static final String SUBMITTED_BY_FILTER_ITEMS_COUNT = "SubmittedByFilterItemsCount"; - public static final String NOTIFICATION_CODE_FILTER_ITEMS_COUNT = "NotificationCodeFilterItemsCount"; - public static final String RECIPIENT_FILTER_ITEMS_COUNT = "RecipientFilterItemsCount"; - public static final String UPDATE_DATE_FILTER_ITEMS_COUNT = "UpdateDateFilterItemsCount"; - - // Approval Notification Queue - public static String FILTERBYSUBMITTEDBY = "Submitted By equal to: "; - public static String FILTERBYRECIPIENT = "Recipient equal to: "; - public static String FILTERBYTYPE = "Type equal to: "; - public static String FILTERBYUPDATEDATE = "Update Date equal to: "; - - // Manage Template Queue - public static String FILTERBYRECORDSTATUS = "Status equal to: "; - public static String FILTERBYSOURCE = "Source equal to: "; - public static String FILTERBYLASTUPDATEBY = "Last Updated By equal to: "; - public static String FILTERBYLASTUPDATEDATE = "Last Update Date equal to: "; - public static String FILTERBYTEMPLATEDESCRIPTION = "Template Description equal to: "; - - //Rejected Notification Queue - public static String FILTERBYREJECTEDBY = "Rejected By equal to: "; - public static String SUBJECT_OF_DOC="SubjOfDoc"; - public static String SUBJECT_OF_DOC_DESC="Patient Subject of Public Health Document"; - public static String ACT_CLASS_CD_FOR_DOC="DOC"; - public static String DocToPHC= "DocToPHC"; - public static String DocToCON= "DocToCON"; - public static final String LOCAl_DESC = "Local"; - - // Manage ImpExpActivityLog Queue - defined the additional ones only - - public static String FILTERBYPROCESSEDTIME = "Processed Time equal to: "; - public static String FILTERBYTEMPLATENAME = "Template Name equal to: "; - - // Manage Associate Obs to one or more Investigations Queue - public static final String RETURN_TO_ASSOCIATE_TO_INVESTIGATIONS = "Return to Associate to Investigations"; - - // Manage ImpExpActivityLog Queue - public static String DSMLOGACTIVITY_FILTERBYPROCESSEDTIME = "Processed Time equal to: "; - public static String DSMLOGACTIVITY_FILTERBYEVENTID = "Event ID equal to: "; - public static String DSMLOGACTIVITY_FILTERBYACTION = "Action equal to: "; - public static String DSMLOGACTIVITY_FILTERBYALGORITHMNAME = "Algorithm Name equal to: "; - public static String DSMLOGACTIVITY_FILTERBYSTATUS = "Status equal to: "; - public static String DSMLOGACTIVITY_FILTERBYEXCEPTIONTEXT = "Exception Text equal to: "; - - - // Manage EpilinkActivityLog Queue - public static String EPILINKLOGACTIVITY_FILTERBYPROCESSEDDATE = "Processed DATE equal to: "; - public static String EPILINKLOGACTIVITY_FILTERBYOLDEPILINK = "Old Epilink ID equal to: "; - public static String EPILINKLOGACTIVITY_FILTERBYNEWEPILINK = "New Epilink ID equal to: "; - public static String EPILINKLOGACTIVITY_FILTERBYUSERNAME = "User Name equal to: "; - - - public static String FILTERBYUSERNAME = "User Name equal to: "; - - //Document related Constants - public static final String DOC_PROCESS = "DOC_PROCESS"; - public static final String PHC_236 = "PHC236"; - public static final String LAB_11648804 = "11648804"; - public static final String JURIS_NO_EXPORT_LIST = "JURIS_NO_EXPORT_LIST"; - public static final String SEX = "SEX"; - public static final String APPROVED_SHARED_NOTIFICATION_UID_LIST= "APPROVED_SHARED_NOTIFICATION_UID_LIST"; - public static final String APPROVED_TRANFERRED_NOTIFICATION_UID_LIST= "APPROVED_TRANFERRED_NOTIFICATION_UID_LIST"; - public static final String APPROVED_NND_NOTIFICATION_UID_LIST= "APPROVED_NND_NOTIFICATION_UID_LIST"; - - //Aggregate Summary Constants - public static final String AGG_SUM_CONDITION_CD= "AGG_SUM_CONDITION_CD"; - public static final String NOVEL_INFLUENZA_FLU = "11063"; - public static final String AGG_SUM_COUNT_INTERVAL_CD = "14497002"; //(Weekly) - - //Redesign manage obs/ vaccination/ treatment - public static final String INVESTIGATION_CASE_STATUS = "Null"; - - public static final String ManageEvents="ManageEvents"; - - /* Constants related to Contact*/ - public static final String CONTACT_PROVIDER = "InvestgrOfContact"; - public static final String CONTACT_DISPOSITIONED_BY = "DispoInvestgrOfConRec"; - public static final String CONTACT_OTHER_INFECTED_PATIENT = "OthInfPatOfConRec"; - - public static final String CONTACT_ORGANIZATION = "SiteOfExposure"; - public static final String CONTACT_FORMCODE = "CONTACT_REC"; - public static final String CONTACT_PRIORITY = "NBS_PRIORITY"; - public static final String CONTACT_STATUS = "PHC_IN_STS"; - public static final String CONTACT_DISPOSITION = "NBS_DISPO"; - - /* access modifiers*/ - public static final String PUBLIC = "public"; - public static final String PRIVATE = "private"; - public static final String CONTACT_TRACING_ENABLE_IND = "Y"; - - /* Constants related to PAGE MANAGEMENT*/ - public static final String[] PAGE_GROUP_EXC={"GROUP_DEM", "GROUP_MSG", "GROUP_NOT"}; - public static final String PAGE_GROUP = "NBS_QUES_GROUP"; - public static final String PAGE_SUBGROUP = "NBS_QUES_SUBGROUP"; - public static final String PAGE_SUBGROUP_IXS = "NBS_QUES_SUBGROUP_IXS"; - public static final String PAGE_DATATYPE = "NBS_DATA_TYPE"; - public static final String PAGE_VALSET = "NBS_DATA_TYPE"; - public static final String PAGE_MASK = "NBS_MASK_TYPE"; - public static final String PAGE_HL7_DATATYPE= "NBS_HL7_DATA_TYPE"; - public static final String PAGE_NBS_STATUS_CD= "NBS_STATUS_CD"; - public static final String PAGE_NBS_REC_STATUS_CD= "NBS_REC_STATUS_CD"; - public static final String PAGE_HL7_SEGMENT= "NBS_HL7_SEGMENT"; - - public static final String DELETECONTEXT = "deleteContext"; - public static final String PUBWITHDRAFT = "PWD"; - public static final String PUBLISHED = "Published"; - public static final String CREATEDRAFTIND = "createDraftInd"; - public static final String CREATEDRAFTINDPUB = "PUB"; - public static final String CREATEDRAFTINDDRT = "DRT"; - public static final String NONE = "none"; - - - /** - * Question Groups Classifications - */ - public static enum QuestionGroupCodes { - GROUP_NOT, GROUP_MSG, GROUP_INV, GROUP_DEM - } - - /** - * Question Entry Method - Denotes whether a question - * in the question library is created by the user using the - * 'Add Question' user interface or predefined in the - * system. - */ - public static enum QuestionEntryMethod { - USER, // entered by the user - SYSTEM // predefined in the system - } - - // Data Location - public static final String DATA_LOCATION_CASE_ANSWER_TEXT = "NBS_CASE_ANSWER.ANSWER_TXT"; - - public static final String DATE_DATATYPE = "DATE"; - public static final String DATETIME_DATATYPE = "DATETIME"; - public static final String NUMERIC_DATATYPE = "NUMERIC"; - public static final String NUMERIC_CODE = "NUM"; - public static final String TEXT_DATATYPE = "TEXT"; - public static final String PART_DATATYPE = "PART"; - - public static final String CODED = "CODED"; - public static final String LITERAL = "LITERAL"; - public static final String CODED_DATA = "coded_data"; - public static final String TEXT_DATA = "text_data"; - public static final String PARTICIPATION_DATA = "participation_data"; - // - public static final String PHIN_DEFINED_QUESTIONTYPE = "PHIN Standard Question"; - public static final String STATE_DEFINED_QUESTIONTYPE = "Locally Defined Question"; - - // Page element types (Used in the Page Builder module) - public static final String PAGE_ELEMENT_TYPE_PAGE = "Page"; - public static final String PAGE_ELEMENT_TYPE_TAB = "Tab"; - public static final String PAGE_ELEMENT_TYPE_SECTION = "Section"; - public static final String PAGE_ELEMENT_TYPE_SUBSECTION = "Subsection"; - public static final String PAGE_ELEMENT_TYPE_QUESTION = "Question"; - public static final String PAGE_ELEMENT_TYPE_HYPERLINK = "Hyperlink"; - public static final String PAGE_ELEMENT_TYPE_COMMENT = "Comment"; - public static final String PAGE_ELEMENT_TYPE_LINE_SEPARATOR = "Line Separator"; - public static final String PAGE_ELEMENT_TYPE_PARTICIPANT_LIST = "Participant List"; - public static final String PAGE_ELEMENT_TYPE_PATIENT_SEARCH = "Patient Search"; - public static final String PAGE_ELEMENT_TYPE_ACTION_BUTTON = "Action Button"; - public static final String PAGE_ELEMENT_TYPE_SET_VALUES_BUTTON = "Set Values Button"; - public static final String PAGE_ELEMENT_TYPE_ORIG_DOC_LIST = "Original Electronic Document List"; - - public static final String PHIN_QUESTIONTYPE_CODE = "PHIN"; - public static final String STATE_QUESTIONTYPE_CODE = "LOCAL"; - public static final String NBS_QUESTION_TYPE = "NBS_QUESTION_TYPE"; - public static final String ORDER_GRP_ID = "2"; - - public static final String VALUE_SET_TYPE_NO_SYSTEM_STAD = "VALUE_SET_TYPE_NO_SYSTEM_STAD"; - - public static final String NBS_PH_DOMAINS = "NBS_PH_DOMAINS"; - - public static final String DRAFT = "Draft"; - public static final String TEMPLATE = "TEMPLATE"; - public static final String MULTISELECT_COMPONENT = "1013"; - public static final String MULTISELECT_COMPONENT_READONLY_SAVE = "1025"; - - public static final String NBS_CASE_ANSWER_ANSWER_TXT = "NBS_CASE_ANSWER.ANSWER_TXT"; - public static final String NBS_ANSWER_ANSWER_TXT = "NBS_ANSWER.ANSWER_TXT"; - public static final String ANSWER_TXT = "ANSWER_TXT"; - public static final String CT_CONTACT_ANSWER_ANSWER_TXT = "CT_CONTACT_ANSWER.ANSWER_TXT"; - - public static final String INV = "INV"; - public static final String INVESTIGATION_CAP = "INVESTIGATION"; - public static final String FROM_CONTEXT = "fromWhere"; - public static final String PREVIEW = "preview"; - public static final String PUBLISH = "publish"; - public static final String IMPORT_CD = "I"; - public static final String EXPORT_CD = "E"; - public static final String IMPORT_DESC = "Import"; - public static final String EXPORT_DESC = "Export"; - - public static final String INVESTIGATION_CD = "424352007"; - public static final String MORBIDITY_REPORT_CD = "OBS"; - - - public static final String REPEATING_QUESTION="REPEATING_QUESTION"; - public static final String NON_REPEATING_QUESTION="NON_REPEATING_QUESTION"; - - public static final String TEMPLATE_SUMMARIES = "TEMPLATE_SUMMARIES"; - public static final String PAGE_COND_MAPPING_SUMMARIES = "PAGE_COND_MAPPING_SUMMARIES"; - - public static final String TEMPLATE_NM = "TEMPLATE_NM"; - public static final String RELATED_CONDITIONS = "RELATED_CONDITIONS"; - public static final String TEMPLATE_DESCR = "TEMPLATE_DESCR"; - // Question Filter - public static final String UNIQUE_ID = "UNIQUE_ID"; - public static final String UNIQUE_NAME = "UNIQUE_NAME"; - public static final String LABEL = "LABEL"; - public static final String DATA_TYPE="DATA_TYPE"; - public static final String CODE_SET_NM="CODE_SET_NM"; - //To Question Filter for Mapping Page and Answer Page - public static final String TO_UNIQUE_ID="TO_ID"; - public static final String TO_LABEL="TO_LABEL"; - public static final String TO_DATA_TYPE="TO_DATA_TYPE"; - public static final String TO_CODE_SET_NM="TO_CODE_SET_NM"; - - public static final String FROM_CODE="FROM_CODE"; - public static final String FROM_CODE_DESC="FROM_CODE_DESC"; - public static final String TO_CODE="TO_CODE"; - public static final String TO_CODE_DESC="TO_CODE_DESC"; + public static final String FROM_CODE = "FROM_CODE"; + public static final String FROM_CODE_DESC = "FROM_CODE_DESC"; + public static final String TO_CODE = "TO_CODE"; + public static final String TO_CODE_DESC = "TO_CODE_DESC"; //Filter for Port Page Management(Port Page Library) - public static final String MAP_NAME="MAP_NAME"; - public static final String FROM_PAGE_NM="FROM_PAGE_NM"; - public static final String TO_PAGE_NM="TO_PAGE_NM"; - + public static final String MAP_NAME = "MAP_NAME"; + public static final String FROM_PAGE_NM = "FROM_PAGE_NM"; + public static final String TO_PAGE_NM = "TO_PAGE_NM"; public static final String INV_PATIENT = "PATIENT"; public static final String INV_COMMENT = "COMMENT"; public static final String INV_LOCAL_ID = "LOCALID"; public static final String INV_PROVIDER = "PROVIDER"; - - - public static String PEND_APPR="PEND_APPR"; - public static String COMPLETED = "COMPLETED"; - public static String MSG_FAIL = "MSG_FAIL"; - public static String REJECTED = "REJECTED"; - public static String APPROVED = "APPROVED"; - public static String EVENT = "EVENT"; - public static String ADDMORB = "addMorb"; - public static String ADDLAB = "addObs"; - public static String ADDVACCINE = "addVaccine"; - public static String ADDINVS = "addInves"; - public static String EDITBUTTON = "editButton"; - public static String DELETEBUTTON = "deleteButton"; - public static String RECORDSTATUSCD = "recordStatusCd"; - public static String EVENTCOUNT = "EventCount"; - public static String MERGEINVS = "mergeInves"; - - public static String PROPERTY_FILE ="NEDSS.properties"; public static final String DELETED = "DELETED"; public static final String TABLE_NOT_MAPPED = "TABLE NOT MAPPED"; - //DSM constants - public static final String CONDITIONS_PORT_REQ_IND_FALSE ="CONDITIONS_PORT_REQ_IND_FALSE"; - public static final String SENDING_SYSTEM_LIST ="SENDING_SYSTEM_LIST"; - public static final String INVESTIGATION_TYPE_RELATED_PAGE ="INVESTIGATION_TYPE_RELATED_PAGE"; - public static final String CONDITION_LIST ="CONDITION_LIST"; - public static final String TEMPLATE_CONDITION_LIST ="TEMPLATE_CONDITION_LIST"; - public static final String PUBLISHED_CONDITION_LIST ="PUBLISHED_CONDITION_LIST"; - public static final String USE_CURRENT_DATE="Current Date"; - + public static final String CONDITIONS_PORT_REQ_IND_FALSE = "CONDITIONS_PORT_REQ_IND_FALSE"; + public static final String SENDING_SYSTEM_LIST = "SENDING_SYSTEM_LIST"; + public static final String INVESTIGATION_TYPE_RELATED_PAGE = "INVESTIGATION_TYPE_RELATED_PAGE"; + public static final String CONDITION_LIST = "CONDITION_LIST"; + public static final String TEMPLATE_CONDITION_LIST = "TEMPLATE_CONDITION_LIST"; + public static final String PUBLISHED_CONDITION_LIST = "PUBLISHED_CONDITION_LIST"; + public static final String USE_CURRENT_DATE = "Current Date"; // code set names public static final String CODE_SET_JURISDICTION = "S_JURDIC_C"; public static final String CODE_SET_COUNTY_CCD = "COUNTY_CCD"; public static final String LEGACY_MASTER_MSG = "LGCY_MSTR_MSG"; - - public static enum CANADA {CAN, CA, PHVS_STATEPROVINCEOFEXPOSURE_CDC_CAN} - public static String CANADA_124 = "124"; - public static enum USA {USA, US, PHVS_STATEPROVINCEOFEXPOSURE_CDC_US} - public static String USA_840 = "840"; - public static enum MEXICO {MEX, MX, PHVS_STATEPROVINCEOFEXPOSURE_CDC_MEX} - public static String MX_484 = "484"; - public static String PHVS_STATEPROVINCEOFEXPOSURE_CDC = "PHVS_STATEPROVINCEOFEXPOSURE_CDC"; - public static final String VARICELLA_VALUE = "Varicella"; public static final String VARICELLA_KEY = "10030"; public static final String TUBERCULOSIS_VALUE = "Tuberculosis"; public static final String TUBERCULOSIS_KEY = "10220"; - - public static final String EI_AUTH_ORG ="EI_AUTH_ORG"; - - public static final String EI_AUTH_PRV ="EI_AUTH_PRV"; - + public static final String EI_AUTH_ORG = "EI_AUTH_ORG"; + public static final String EI_AUTH_PRV = "EI_AUTH_PRV"; public static final String EI_AUTH = "EI_AUTH"; - public static final String ADMIN_ALERT_LAB="11648804"; + public static final String ADMIN_ALERT_LAB = "11648804"; public static final String LAB_TYPE_CD = "11648804"; - public static final String ISDBSECURITY= "ISDBSECURITY"; - public static final String SECURE_KEY_NOT_DEFINED= "SECURE_KEY_NOT_DEFINED"; - public static final String SECURE_VAL_NOT_DEFINED= "SECURE_VAL_NOT_DEFINED"; - public static final String SECURE_PROP_DEFINED= "SECURE_PROP_DEFINED"; - - //Coinfection - + public static final String ISDBSECURITY = "ISDBSECURITY"; + public static final String SECURE_KEY_NOT_DEFINED = "SECURE_KEY_NOT_DEFINED"; + public static final String SECURE_VAL_NOT_DEFINED = "SECURE_VAL_NOT_DEFINED"; + public static final String SECURE_PROP_DEFINED = "SECURE_PROP_DEFINED"; public static final String COINFECTION_LOGIC = "COINFECTION_LOGIC"; public static final String INVESTIGATION_EXISTS = "INVESTIGATION_EXISTS"; + + //Manage Code to Condition Library public static final String COINFECTION_INV = "COINFECTION_INV"; public static final String COINFECTION_INV_EXISTS = "COINFECTION_INV_EXISTS"; public static final String INV_EDIT_PERM = "INV_EDIT_PERM"; public static final String LAB_REPORT_ASSOC_PERM = "LAB_REPORT_ASSOC_PERM"; public static final String MORB_REPORT_ASSOC_PERM = "MORB_REPORT_ASSOC_PERM"; public static final String INTERVIEW_CLASS_CODE = "IXS"; - //processing decision code set for mark as reviewed for lab and morb - public static final String STD_PROCESSING_DECISION_LIST_LAB_SYPHILIS= "STD_LAB_SYPHILIS_PROC_DECISION"; - public static final String STD_PROCESSING_DECISION_LIST_MORB_SYPHILIS= "STD_MORB_SYPHILIS_PROC_DECISION"; - public static final String STD_PROCESSING_DECISION_LIST_NON_SYPHILIS= "STD_NONSYPHILIS_PROC_DECISION"; - public static final String STD_PROCESSING_DECISION_LIST_SYPHILIS_AND_NONSYPHILIS= "STD_UNKCOND_PROC_DECISION"; - public static final String NBS_NO_ACTION_RSN= "NBS_NO_ACTION_RSN"; - + public static final String STD_PROCESSING_DECISION_LIST_LAB_SYPHILIS = "STD_LAB_SYPHILIS_PROC_DECISION"; + public static final String STD_PROCESSING_DECISION_LIST_MORB_SYPHILIS = "STD_MORB_SYPHILIS_PROC_DECISION"; + public static final String STD_PROCESSING_DECISION_LIST_NON_SYPHILIS = "STD_NONSYPHILIS_PROC_DECISION"; + public static final String STD_PROCESSING_DECISION_LIST_SYPHILIS_AND_NONSYPHILIS = "STD_UNKCOND_PROC_DECISION"; + public static final String NBS_NO_ACTION_RSN = "NBS_NO_ACTION_RSN"; //processing decision code set for create investigation from lab and morb - public static final String STD_CREATE_INV_LAB_UNKCOND_PROC_DECISION= "STD_CREATE_INV_LAB_UNKCOND_PROC_DECISION"; - public static final String STD_CREATE_INV_LABMORB_NONSYPHILIS_PROC_DECISION= "STD_CREATE_INV_LABMORB_NONSYPHILIS_PROC_DECISION"; - public static final String STD_CREATE_INV_LABMORB_SYPHILIS_PROC_DECISION= "STD_CREATE_INV_LABMORB_SYPHILIS_PROC_DECISION"; - public static final String STD_CREATE_INV_LAB_SYPHILIS_PROC_DECISION= "STD_CREATE_INV_LAB_SYPHILIS_PROC_DECISION"; - public static final String STD_CREATE_INV_MORB_SYPHILIS_PROC_DECISION= "STD_CREATE_INV_MORB_SYPHILIS_PROC_DECISION"; + public static final String STD_CREATE_INV_LAB_UNKCOND_PROC_DECISION = "STD_CREATE_INV_LAB_UNKCOND_PROC_DECISION"; + public static final String STD_CREATE_INV_LABMORB_NONSYPHILIS_PROC_DECISION = "STD_CREATE_INV_LABMORB_NONSYPHILIS_PROC_DECISION"; + public static final String STD_CREATE_INV_LABMORB_SYPHILIS_PROC_DECISION = "STD_CREATE_INV_LABMORB_SYPHILIS_PROC_DECISION"; + public static final String STD_CREATE_INV_LAB_SYPHILIS_PROC_DECISION = "STD_CREATE_INV_LAB_SYPHILIS_PROC_DECISION"; + public static final String STD_CREATE_INV_MORB_SYPHILIS_PROC_DECISION = "STD_CREATE_INV_MORB_SYPHILIS_PROC_DECISION"; public static final String STD_NONSYPHILIS_PROC_DECISION = "STD_NONSYPHILIS_PROC_DECISION"; public static final String STD_CONTACT_RCD_PROCESSING_DECISION = "STD_CONTACT_RCD_PROCESSING_DECISION"; public static final String STD_CR_PROC_DECISION_NOINV = "STD_CR_PROC_DECISION_NOINV"; - //Constants related to STD Disposition public static final String STD_PROCESSING_DECISION_NOT_APPLICABLE = "NA"; public static final String STD_PROGRAM_AREA = "STD"; @@ -2671,7 +1953,6 @@ public static enum MEXICO {MEX, MX, PHVS_STATEPROVINCEOFEXPOSURE_CDC_MEX} public static final String GROUP_CON = "GROUP_CON"; public static final String GROUP_IXS = "GROUP_IXS"; public static final String VACCINATION_CLASS_CODE = "VAC"; - public static final String STD_PA_LIST = "STD_PA_LIST"; public static final String PROCESSING_DECISION = "ProcessingDecision"; public static final String INVESTIGATION_TYPE = "investigationType"; @@ -2679,12 +1960,12 @@ public static enum MEXICO {MEX, MX, PHVS_STATEPROVINCEOFEXPOSURE_CDC_MEX} public static final String INVESTIGATION_TYPE_NEW = "New"; public static final String PREGNANT_IND_CD = "pregnantIndCd"; public static final String PREGNANT_WEEKS = "pregnantWeek"; - public static final String REFERRAL_BASIS = "NBS110"; + + // Manage ImpExpActivityLog Queue - defined the additional ones only public static final String REFERRAL_BASIS_OOJ = "NBS270"; public static final String REFERRAL_BASIS_LAB = "T1"; public static final String REFERRAL_BASIS_MORB = "T2"; - public static final String CURRENT_INVESTIGATOR = "INV180"; public static final String PHYSICIAN_OF_PHC = "INV182"; public static final String INITIAL_INVESTIGATOR = "NBS139"; @@ -2697,7 +1978,6 @@ public static enum MEXICO {MEX, MX, PHVS_STATEPROVINCEOFEXPOSURE_CDC_MEX} public static final String INITIAL_INTERVIEW_INVESTIGATOR = "NBS188"; public static final String INITIAL_INTERVIEW_INVESTIGATOR_ASSIGN_DATE = "NBS189"; public static final String MESSAGE_QUEUE = "Messages Queue"; - public static final String DISABLED = "DISABLED"; //Constants used in Interview public static final String PRESUMPTIVE_INTERVIEW_TYPE = "PRESMPTV"; @@ -2705,216 +1985,473 @@ public static enum MEXICO {MEX, MX, PHVS_STATEPROVINCEOFEXPOSURE_CDC_MEX} public static final String REINTERVIEW_INTERVIEW_TYPE = "REINTVW"; public static final String COINFECTION_FOR_INTERVIEW_EXISTS = "IXS190"; public static final String INTERVIEW_COINFECTION_LIST = "IXS191"; - //Constants used in Page Management Rules public static final String ANY_SOURCE_VALUE = "Any Source Value"; public static final String ANY_SOURCE_VALUE_COMPARATER = "="; - public static final String SUPERVISOR_REVIEW_QUEUE_SIZE = "SUPERVISOR_REVIEW_QUEUE_SIZE"; public static final String SUPERVISOR_REVIEW_QUEUE = "Supervisor Review Queue"; - public static final String PAGE_TITLE = "PageTitle"; - - public static final String ACCEPT = "Accept"; public static final String REJECT = "Reject"; public static final String CASE_CLOSURE = "Case Closure"; public static final String FR_CLOSURE = "FR Closure"; public static final String OOJ_XFER = "OOJ Xfer"; public static final String FLD_DISPO_OOJ = "K"; - public static final String HIV_SUB_GROUP = "HIV"; - public static final String XSS_FILTER_PATTERN = "XSS_FILTER_PATTERN"; + //Page Business Object Types + public static final String CONTACT_BUSINESS_OBJECT_TYPE = "CON"; + public static final String INTERVIEW_BUSINESS_OBJECT_TYPE = "IXS"; + public static final String ISOLATE_BUSINESS_OBJECT_TYPE = "ISO"; + public static final String ISO_BUSINESS_OBJECT_TYPE_DESC = "Isolate Tracking"; + public static final String SUSCEPTIBILITY_BUSINESS_OBJECT_TYPE = "SUS"; + public static final String SUSCEPTIBILITY_BUSINESS_OBJECT_TYPE_DESC = "Susceptibility"; + public static final String INTERVIEW_BUSINESS_OBJECT_DESC = "Interview"; + public static final String INVESTIGATION_BUSINESS_OBJECT_TYPE = "INV"; + public static final String VACCINATION_BUSINESS_OBJECT_TYPE = "VAC"; + public static final String VACCINATION_BUSINESS_OBJECT_DESC = "Vaccination"; + public static final String LAB_BUSINESS_OBJECT_TYPE = "LAB"; + public static final String MORB_BUSINESS_OBJECT_TYPE = "MORB"; + public static final String TRMT_BUSINESS_OBJECT_TYPE = "TRMT"; + public static final String TRMT_BUSINESS_OBJECT_TYPE_DESC = "Treatment"; + public static final String LAB_BUSINESS_OBJECT_TYPE_DESC = "Lab Report"; + public static final String MORB_BUSINESS_OBJECT_TYPE_DESC = "Morbidity Report"; + public static final String GENERIC_NO_POPUP_BUSINESS_OBJECT_TYPE = "GENERIC_NO_POPUP_BUSINESS_OBJECT_TYPE"; + public static final String CURRENT_KEY = "NBS459"; + public static final String CURRENT_BATCH_ENTRY_MODE = "modeBatchEntry"; + public static final String SUS_LAB_SUSCEPTIBILITIES = "SUS_LAB_SUSCEPTIBILITIES"; + public static final String ISO_LAB_TRACK_ISOLATES = "ISO_LAB_TRACK_ISOLATES"; + public static final String SUBFORM_HASHMAP = "subFormHashMap"; + public static final String CDC_PROVIDER_FORM = "CDCProviderForm"; + public static final String CDC_FIELD_RECORD_FORM = "CDCFieldRecordForm"; + public static final String CDC_INTERVIEW_RECORD_FORM = "InterviewRecordForm"; + // public static final String CDC_PROVIDER_BLANK_FORM ="CDCProviderBlankForm"; +// public static final String CDC_FIELD_RECORD_BLANK_FORM="CDCFieldRecordBlankForm"; +// public static final String CDC_INTERVIEW_RECORD_BLANK_FORM ="InterviewRecordBlankForm"; + public static final String CDC_PROVIDER_FORM_PDF = "CDCProviderFormV10_PSF_6_0.pdf"; + public static final String CDC_FIELD_RECORD_FORM_PDF = "CDCFieldRecordForm.pdf"; + public static final String CDC_INTERVIEW_RECORD_PDF = "InterviewRecordForm.pdf"; + //For fixing error when printing field follow-up form. If the param is "Filled" is shows Error page. If we change the value to "NoBlank" we need to show on the frontend the value Filled for making this change transparently to the user + public static final String CDC_FILLED = "NoBlank"; + public static final String CDC_FILLED_JSP = "Filled"; + public static final String CDC_BLANK = "Blank"; + public static final String IXS_SOURCE_CD = "IXS"; + public static final String IXS_TARGET_CD = "CASE"; + public static final String IXS_TYPE_CD = "Interview"; + public static final String IXS_ADD_REASON_CD = "because"; + //For Act_relationship(Between Contact Record and Interview): + //Source_class_cd = �IXS� + //Target_class_cd = �CON� + //Type_cd=�Interview� + public static final String Target_class_cd = "CON"; + public static final String COINFCTION_GROUP_ID_NEW_CODE = "GENERATE_NEW_ID"; + public static final String NO_BATCH_ENTRY = "NO_BATCH_ENTRY"; + public static final String BATCH_ENTRY = "BATCH_ENTRY"; + public static final String USER_VIEW = "USER_VIEW"; + public static final String FF = "FF"; + //Disposition code for special processing + public static final String FROM1_A_PREVENTATIVE_TREATMENT = "A"; + public static final String TO1_Z_PREVIOUS_PREVENTATIVE_TREATMENT = "Z"; + public static final String FROM2_C_INFECTED_BROUGHT_TO_TREATMENT = "C"; + public static final String TO2_E_PREVIOUSLY_TREATED_FOR_THIS_INFECTION = "E"; + //Comparators and Separators + public static final String LESS_THAN_LOGIC = "<"; + public static final String LESS_THAN_OR_EQUAL_LOGIC = "<="; + public static final String GREATER_THAN_LOGIC = ">"; + public static final String GREATER_THAN_OR_EQUAL_LOGIC = ">="; + public static final String EQUAL_LOGIC = "="; + public static final String NOT_EQUAL_LOGIC = "!="; + public static final String NOT_EQUAL_LOGIC2 = "<>"; + public static final String BETWEEN_LOGIC = "BET"; + public static final String CONTAINS_LOGIC = "CT"; + public static final String STARTS_WITH_LOGIC = "SW"; + public static final String ISNULL_LOGIC = "ISNULL"; + public static final String NOTNULL_LOGIC = "NOTNULL"; + public static final String COLON = ":"; + public static final String NON_LR_ENTITY_IDS = "NON_LR_ENTITY_IDS"; + public static final Long MULTI_LINE_NOTES_W_USER_DATE_STAMP_CD = 1019L; + public static final Long MULTI_SELECT_CD = 1013L; + public static final Long PARTICIPANT_CD = 1017L; + public static final String NOT_APPLICABLE = "NA"; + public static final String XML_SCHEMA = "XML_SCHEMA"; + public static final String XML_PAYLOAD = "XML_PAYLOAD"; + public static final String ONGOING_CASE_FALSE = "false"; + public static final String CODE_VALUE_GENERAL = "CODE_VALUE_GENERAL"; + public static final String PART_CACHED_MAP_KEY_SEPARATOR = "|"; + public static final String ORIG_XML_QUEUED = "ORIG_QUEUED"; + public static final String QUEUED = "QUEUED"; + public static final String MSG_RHAP_PROCESSING = "MSG_RHAP_PROCESSING"; + public static final String ADD_TIME_FOR_SRT_FILTERING = "addTime"; + public static final String DATA_SOURCE_NOT_AVAILABLE = "The report or data source you are trying to access is not valid, because the data mart that feeds this report or data source is not currently available in the reporting database. Please contact your system administrator."; + public static final String NULL_FLAVOUR_OID = "2.16.840.1.113883.5.1008"; + public static final String PARTNER_SERVICES_ID = "PSID"; + public static final String RESULTED_TEST_LAB220 = "NBS_LAB220"; + public static final String ORGANISM_LAB278 = "NBS_LAB280"; + public static final String ORDERED_TEST_LAB112 = "NBS_LAB112"; + public static final String DRUGD_TEST_LAB110 = "NBS_LAB110"; + public static final String TREATMENT_NBS481 = "NBS481"; + public static final String ANY = "ANY"; + public static final String SUBFORM_PUBLISH = "SUBFORM_PUBLISH"; + public static final String ALREADY_PUBLISHED = "ALREADY_PUBLISHED"; + public static final String ERR109_PART1 = "The record you are editing has been edited by "; + public static final String ERR109_PART2 = " since you have opened it. The system is unable to save your changes at this time. Please Cancel from this Edit and try again."; + public static final String ANSWER_COUNT_DIFF_FOR_ROLLBACK = "ANSWER_COUNT_DIFF_FOR_ROLLBACK"; + public static final String DISABLE_SUBMIT_BEFORE_PAGE_LOAD = "DISABLE_SUBMIT_BEFORE_PAGE_LOAD"; + public static final String FILE_COMPONENTS_HASHMAP = "FILE_COMPONENTS_HASHMAP"; + public static final String ANSWER_MAP = "AnswerMap"; + public static final String ANSWER_ARRAY_MAP = "AnswerArrayMap"; + public static final String BATCH_MAP = "BatchMap"; + public static final String MORB_FORM_CD = "MorbFormCd"; + public static final String OLD_CLIENT_VO = "OldClientVO"; + /*COVID Related Constants*/ + public static final String COVID_CR_UPDATE = "COVID_CR_UPDATE"; + public static final String COVID_CR_UPDATE_SENDING_SYSTEM = "COVID_CR_UPDATE_SENDING_SYSTEM"; + public static final String COVID_CR_UPDATE_IGNORE = "COVID_CR_UPDATE_IGNORE"; + public static final String COVID_CR_UPDATE_TIMEFRAME = "COVID_CR_UPDATE_TIMEFRAME"; + public static final String COVID_CR_UPDATE_CLOSED = "COVID_CR_UPDATE_CLOSED"; + public static final String COVID_CR_UPDATE_MULTI_CLOSED = "COVID_CR_UPDATE_MULTI_CLOSED"; + public static final String COVID_CR_UPDATE_MULTI_OPEN = "COVID_CR_UPDATE_MULTI_OPEN"; + public static final String SINGLE_CLOSED = "SINGLE_CLOSED"; + public static final String SINGLE_OPEN = "SINGLE_OPEN"; + public static final String MULTI_CLOSED = "MULTI_CLOSED"; + public static final String MULTI_OPEN = "MULTI_OPEN"; + public static final String GOBACK_YEARS_ELR_MATCHING = "GOBACK_YEARS_ELR_MATCHING"; + public static final String CARET = "^"; + public static final String SOCIAL_SECURITY = "SS"; + public static final String SOCIAL_SECURITY_ADMINISTRATION = "SSA"; + public static final String X_FORWARDED_FOR = "X-FORWARDED-FOR"; + public static final String AOE_OBS = "AOE"; + public static final String LAB_FORM_CD = "Lab_Report"; + public static final String LAB_REPORT_EVENT_ID = "LR"; + public static final String INVESTIGATION_EVENT_ID = "I"; + public static final String LAB_MOR_CASE_REPORT = "LMC"; + public static final String NAICS_INDUSTRY_CODES_LIST = "NAICS_INDUSTRY_CODES_LIST"; + public static final String ADV_SEARCH_EVENT_TIME_LAST_SIX_MONTHS = "6M"; + public static final String ADV_SEARCH_EVENT_TIME_LAST_THIRTY_DAYS = "30D"; + public static final String ADV_SEARCH_EVENT_TIME_LAST_SEVEN_DAYS = "7D"; + /** + * Material Entity Code + */ + public static String MATERIAL = "MAT"; + /** + * Organization Entity Code + */ + public static String ORGANIZATION = "ORG"; + /** + * Person Entity Code + */ + public static String PERSON = "PSN"; + /** + * Provider Entity Code + */ + public static String PROVIDER = "PROV"; + /** + * Place Entity Code + */ + public static String PLACE = "PLC"; + public static String NOTIFICATION = "NOT";//This has been defined in WumConstants.java + /** + * EntityGroup code + */ + public static String ENTITYGROUP = "GRP"; + /** + * Non_Person_Living_Subject entity code + */ + public static String NONPERSONLIVINGSUBJECT = "NLIV"; + /** + * DATASOURCECOLUMN code + */ + public static String DATASOURCECOLUMN = "DSC"; + /** + * DATASOURCE code + */ + public static String DATASOURCE = "DSO"; + /** + * DISPLAYCOLUMN code + */ + public static String DISPLAYCOLUMN = "DIC"; + /** + * SORTCOLUMN code + */ + public static String SORTCOLUMN = "SOC"; + /** + * FILTERCODE code + */ + public static String FILTERCODE = "FIC"; + /** + * FILTERVALUE code + */ + public static String FILTERVALUE = "RFV"; + /* Business object type codes for LDF*/ + public static String INVESTIGATION_LDF = "PHC"; + public static String INVESTIGATION_HEP_LDF = "HEP"; + public static String INVESTIGATION_BMD_LDF = "BMD"; + public static String INVESTIGATION_NIP_LDF = "NIP"; + public static String ORGANIZATION_LDF = "ORG"; + public static String PROVIDER_LDF = "PRV"; + public static String LABREPORT_LDF = "LAB"; + public static String MORBREPORT_LDF = "MORB"; + public static String PATIENT_LDF = "PAT"; + public static String PATIENT_EXTENDED_LDF = "PAT-EXT"; + public static String VACCINATION_LDF = "INT_VAC"; + public static String TREATMENT_LDF = "TRT"; + public static String HOME_PAGE_LDF = "HOME"; + public static String ACTIVE_TRUE_LDF = "Y"; + public static String ACTIVE_FALSE_LDF = "N"; + public static String BLANK_XSPTAG_LDF = ""; + public static String BLANK_SPECIALCHARACTER_LDF = "$$$$"; + /** + * REPORT code + */ + public static String SPECIAL_CHARACTER_OPENING = ""; - public static enum CLOSURE_INVESTGR {ClosureInvestgrOfPHC, NBS197}; + //Coinfection + /** + * REPORTFILTER code + */ + public static String REPORTFILTER = "RPF"; + public static String REPORTFILTER_VALIDATION = "RPFV"; + public static String COUNTRY_LIST = "COUNTRY_LIST"; + public static String ISO_COUNTRY_LIST = "ISO_COUNTRY_LIST"; + public static String STATE_LIST = "STATE_LIST"; + public static String JURIS_LIST = "JURIS_LIST"; + public static String EXPORT_JURIS_LIST = "EXPORT_JURIS_LIST"; + public static String CONDITION_FAMILY_LIST = "CONDITION_FAMILY_LIST"; + public static String EXPORT_RECEIVING_LIST = "EXPORT_RECEIVING_LIST"; + public static String JURIS_ALERT_LIST = "JURIS_ALERT_LIST"; + public static String TREAT_COMPOSITE = "TREAT_COMPOSITE"; + public static String PROG_AREA = "PROG_AREA"; + public static String Nedss_Entry_Id = "Users_Email_EntryId"; + public static String Users_With_Valid_Email = "Users_With_Valid_Email"; + public static String Users_With_Active_Alert = "Users_With_Active_Alert"; + public static String PSL_CNTRY = "PSL_CNTRY_FOR_JSP"; + public static String P_LANG = "P_LANG_FOR_JSP"; + public static String O_NAICS = "O_NAICS_JSP"; + public static String PARTICIPATION_TYPE_LIST = "PARTICIPATION_TYPE_LIST"; + public static String AOE_LOINC_LIST = "AOE_LOINC_LIST"; + public static String CASE_VERIFICATION = "CASE_VERIFICATION"; + /** + * Constants for the Rules Engine + */ + public static String ENABLE = "enable"; + public static String FILTER = "filter"; + public static String DATE_RANGE = "dateRange"; + public static String FILTER_REMOVE = "R"; + public static String FILTER_ADD = "A"; + public static String DATE = "Date"; + public static String MMWR = "MMWR"; + public static String DATE_COMPARE = "dateCompare"; + public static String ON_SUBMIT = "S"; + public static String ON_CHANGE = "C"; + public static String ON_CREATE_SUBMIT = "D"; + public static String MATCH_VALUE = "matchValue"; + public static String REQUIRED_IF = "requiredIf"; + public static String DISABLE = "disable"; + public static String YEAR_RANGE = "yearRange"; + public static String VALID_LENGTH = "validLength"; + public static String VALID_VALUE = "validValue"; + public static String DATE_COMPARE_LIMIT = "dateCompareLimit"; + public static String YEAR_RANGE_EQUAL = "yearRangeEqual"; + public static String UNIQUE_CASE_NUMBER = "uniqueCaseNumber"; + public static String SINGLE_SRC_SAME_TARGET_FILTER = "singleSrcSameTargetFilter"; + public static String CASCADING_ENABLE_ON_FILTER_TARGET = "cascadingEnableOnFilterTarget"; + public static String EIGHTEEN_SEVENTYFIVE = "1875"; + /* + * dataTypes + */ + public static String DATATYPE_CODED = "Coded"; + public static String DATATYPE_TEXT = "Text"; + public static String DATATYPE_DATE = "Date"; + public static String DATATYPE_NUMERIC = "Numeric"; + /* + * Operators for Rules Engine. + */ + public static String LESS_THAN = "<"; + public static String LESS_THAN_EQUAL = "<="; + public static String Equal = "="; + public static String Not_Equal = "!="; + public static String INV_FORM_RVCT = "INV_FORM_RVCT"; + public static String INV_FORM_VAR = "INV_FORM_VAR"; + public static String EDIT_SUBMIT_ACTION = "EDIT_SUBMIT"; + public static String CREATE_SUBMIT_ACTION = "CREATE_SUBMIT"; + public static String VIEW_LOAD_ACTION = "View"; + public static String CREATE_LOAD_ACTION = "Create"; + public static String EDIT_LOAD_ACTION = "Edit"; + public static String PREVIEW_ACTION = "Preview"; + public static String RESULT_LOAD_ACTION = "ResultLoad"; + //Added for Export case Notification + public static String ADD_TRIGGER_ACTION = "AddTrigger"; + public static String CLONE_LOAD_ACTION = "Clone"; + public static String CLONE_SUBMIT_ACTION = "ClONE_SUBMIT"; + public static String CREATE_EXTEND_ACTION = "CREATE_EXTEND"; + public static String PORT_LOAD_ACTION = "Port"; + //SRT Admin + public static String LABORATORY_IDS = "LABORATORY_IDS"; + public static String LAB_TEST_TYPES = "LAB_TEST_TYPES"; + public static String CODE_SET_NMS = "CODE_SET_NMS"; + public static String CODE_SYSTEM_CD_DESCS = "CODE_SYSTEM_CD_DESCS"; - public static enum CURRENT_INVESTGR {InvestgrOfPHC, INV180}; + public static String NBS_UNITS_TYPE = "NBS_UNITS_TYPE"; - //Page Business Object Types - public static final String CONTACT_BUSINESS_OBJECT_TYPE = "CON"; - public static final String INTERVIEW_BUSINESS_OBJECT_TYPE = "IXS"; - public static final String ISOLATE_BUSINESS_OBJECT_TYPE = "ISO"; - public static final String ISO_BUSINESS_OBJECT_TYPE_DESC = "Isolate Tracking"; - public static final String SUSCEPTIBILITY_BUSINESS_OBJECT_TYPE = "SUS"; - public static final String SUSCEPTIBILITY_BUSINESS_OBJECT_TYPE_DESC = "Susceptibility"; - public static final String INTERVIEW_BUSINESS_OBJECT_DESC = "Interview"; - public static final String INVESTIGATION_BUSINESS_OBJECT_TYPE = "INV"; - public static final String VACCINATION_BUSINESS_OBJECT_TYPE = "VAC"; - public static final String VACCINATION_BUSINESS_OBJECT_DESC = "Vaccination"; - public static final String LAB_BUSINESS_OBJECT_TYPE = "LAB"; - public static final String MORB_BUSINESS_OBJECT_TYPE = "MORB"; - public static final String TRMT_BUSINESS_OBJECT_TYPE = "TRMT"; - public static final String TRMT_BUSINESS_OBJECT_TYPE_DESC = "Treatment"; - public static final String LAB_BUSINESS_OBJECT_TYPE_DESC = "Lab Report"; - public static final String MORB_BUSINESS_OBJECT_TYPE_DESC = "Morbidity Report"; - public static final String GENERIC_NO_POPUP_BUSINESS_OBJECT_TYPE = "GENERIC_NO_POPUP_BUSINESS_OBJECT_TYPE"; + /* + * Unique keys for SRT Admin + */ + public static String CODE = "Code"; + public static String LABID = "Lab ID"; + public static String LABTESTCD = "Lab Test Code"; + public static String LABTESTCD_LOINCCD = "Lab Test Code or Loinc Code"; + public static String LABRESULTCD = "Lab Result Code"; + public static String LABRESULTCD_SNOMEDCD = "Lab Result Code or Snomed Code"; + public static String LOINCCD = "Loinc Code"; + public static String LOINCCD_CONDITIONCD = "Loinc Code or Condition Code"; + public static String SNOMEDCD = "Snomed Code"; + public static String SNOMEDCD_CONDITIONCD = "Snomed Code or Condition Code"; + public static String LOINC_CD = "LOINC Code"; + public static String SNOMED_CD = "SNOMED Code"; + public static String CODE_SET = "Value Set Code"; + public static String CONDITIONCD = "Condition Code"; + public static String LOINC_CODE = "LN"; + public static String SNOMED_CODE = "SNM"; + //Unique keys for Import and Export Admin + public static String REC_SYS_NM = "System Name"; //Constants used in SubForms - - public static final String CURRENT_KEY = "NBS459"; - public static final String CURRENT_BATCH_ENTRY_MODE = "modeBatchEntry"; - public static final String SUS_LAB_SUSCEPTIBILITIES = "SUS_LAB_SUSCEPTIBILITIES"; - public static final String ISO_LAB_TRACK_ISOLATES = "ISO_LAB_TRACK_ISOLATES"; - - public static final String SUBFORM_HASHMAP = "subFormHashMap"; + public static String REC_SYS_SHORT_NM = "System short Name"; + public static String REC_SYS_OID = "System Oid"; + public static String FileSummary = "FileSummary"; + public static String ReturnToFileEvents = "ReturnToFileEvents"; + public static String ReturnToFileSummary = "ReturnToFileSummary"; // public static final String CDC_PROVIDER_FORM ="CDCProviderForm"; // public static final String CDC_FIELD_RECORD_FORM ="CDCFieldRecordForm"; - - public static final String CDC_PROVIDER_FORM ="CDCProviderForm"; - public static final String CDC_FIELD_RECORD_FORM="CDCFieldRecordForm"; - public static final String CDC_INTERVIEW_RECORD_FORM ="InterviewRecordForm"; - // public static final String CDC_PROVIDER_BLANK_FORM ="CDCProviderBlankForm"; -// public static final String CDC_FIELD_RECORD_BLANK_FORM="CDCFieldRecordBlankForm"; -// public static final String CDC_INTERVIEW_RECORD_BLANK_FORM ="InterviewRecordBlankForm"; - public static final String CDC_PROVIDER_FORM_PDF ="CDCProviderFormV10_PSF_6_0.pdf"; - public static final String CDC_FIELD_RECORD_FORM_PDF ="CDCFieldRecordForm.pdf"; - public static final String CDC_INTERVIEW_RECORD_PDF ="InterviewRecordForm.pdf"; - - //For fixing error when printing field follow-up form. If the param is "Filled" is shows Error page. If we change the value to "NoBlank" we need to show on the frontend the value Filled for making this change transparently to the user - public static final String CDC_FILLED ="NoBlank"; - public static final String CDC_FILLED_JSP ="Filled"; - public static final String CDC_BLANK = "Blank"; + //LocalFields + public static String LDF_HTML_TYPES = "LDF_HTML_TYPES"; + public static String NBS_EVENT_SEARCH_DATES = "NBS_EVENT_SEARCH_DATES"; + public static String PHVS_EVN_SEARCH_ABC = "PHVS_EVN_SEARCH_ABC"; + public static String INVESTIGATOR = "INVESTIGATOR"; + public static String FILTERBYINVESTIGATOR = "Investigator equal to: "; + public static String FILTERBYJURISDICTION = "Jurisdiction equal to: "; + public static String FILTERBYCONDITION = "Condition equal to: "; + public static String FILTERBYSUPERVISOR = "Supervisor equal to: "; + public static String FILTERBYREFERRALBASIS = "Referral Basis equal to: "; //For Act_relationship(Between Case and Interview): //Source_class_cd = �IXS� //Target_class_cd = �CASE� //Type_cd=�Interview� + public static String FILTERBYDESCRIPTION = "Description equal to: "; + public static String FILTERBYEVENTID = "Event ID equal to: "; + public static String FILTERBYSTATUS = "Case Status equal to: "; + public static String FILTERBYDATE = "Start Date equal to: "; + public static String FILTERBYREPORTTYPE = "Report Type equal to: "; + public static String FILTERBYNOTIF = "Notification equal to: "; + public static String FILTERBYOBSERVATIONTYPE = "ObservationType equal to: "; + public static String FILTERBYEVENTTYPE = "Event Type equal to: "; + public static String FILTERBYDSMSTATUS = "Status equal to: "; + public static String FILTERBYLASTUPDATED = "Last Updated equal to: "; + public static String FILTERBYDSMACTION = "Action equal to: "; + public static String DATE_NON_BLANK_KEY = "!0"; + public static String DATE_BLANK_KEY = "0"; + public static String BLANK_KEY = "BLNK"; + public static String BLANK_VALUE = "(Blanks)"; + public static String NON_BLANK_VALUE = "(Non-Blank)"; + public static String BLANK_INVESTIGATOR_VALUE = "(Blanks)"; + public static String FILTERBYMESSAGEID = "Message ID equal to: "; + public static String FILTERBYSOURCENAME = "Reporting Facility equal to: "; + public static String FILTERBYPATIENTNAME = "Patient Name equal to: "; + public static String FILTERBYACCESSIONNO = "Accession# equal to: "; + public static String FILTERBYOBSERVATIONID = "Observation ID equal to: "; + public static String GETINVESTIGATORFULLNAME = "getInvestigatorFullName"; + public static String RETURN_TO_OPEN_INVESTIGATIONS = "Return to Open Investigations"; + public static String RETURN_TO_MESSAGE_QUEUE = "Return to Messages Queue"; + public static String RETURN_TO_SUPERVISOR_REVIEW_QUEUE = "Return to Supervisor Review Queue"; + public static String FILTERBYCODE = "Code equal to: "; + public static String FILTERBYDISPLAYNAME = "Display Name equal to: "; + public static String FILTERBYPROGRAMAREA = "Program Area equal to: "; + public static String FILTERBYCONDITION2 = "Condition equal to: "; + public static String FILTERBYCODINGSYSTEM = "Coding System equal to: "; + public static String FILTERBYSTATUS2 = "Status equal to: "; + // Approval Notification Queue + public static String FILTERBYSUBMITTEDBY = "Submitted By equal to: "; + public static String FILTERBYRECIPIENT = "Recipient equal to: "; + public static String FILTERBYTYPE = "Type equal to: "; + public static String FILTERBYUPDATEDATE = "Update Date equal to: "; + // Manage Template Queue + public static String FILTERBYRECORDSTATUS = "Status equal to: "; + public static String FILTERBYSOURCE = "Source equal to: "; + public static String FILTERBYLASTUPDATEBY = "Last Updated By equal to: "; + public static String FILTERBYLASTUPDATEDATE = "Last Update Date equal to: "; + public static String FILTERBYTEMPLATEDESCRIPTION = "Template Description equal to: "; + //Rejected Notification Queue + public static String FILTERBYREJECTEDBY = "Rejected By equal to: "; + public static String SUBJECT_OF_DOC = "SubjOfDoc"; + public static String SUBJECT_OF_DOC_DESC = "Patient Subject of Public Health Document"; + public static String ACT_CLASS_CD_FOR_DOC = "DOC"; + public static String DocToPHC = "DocToPHC"; + public static String DocToCON = "DocToCON"; + public static String FILTERBYPROCESSEDTIME = "Processed Time equal to: "; + public static String FILTERBYTEMPLATENAME = "Template Name equal to: "; + // Manage ImpExpActivityLog Queue + public static String DSMLOGACTIVITY_FILTERBYPROCESSEDTIME = "Processed Time equal to: "; + public static String DSMLOGACTIVITY_FILTERBYEVENTID = "Event ID equal to: "; + public static String DSMLOGACTIVITY_FILTERBYACTION = "Action equal to: "; + public static String DSMLOGACTIVITY_FILTERBYALGORITHMNAME = "Algorithm Name equal to: "; + public static String DSMLOGACTIVITY_FILTERBYSTATUS = "Status equal to: "; + public static String DSMLOGACTIVITY_FILTERBYEXCEPTIONTEXT = "Exception Text equal to: "; + // Manage EpilinkActivityLog Queue + public static String EPILINKLOGACTIVITY_FILTERBYPROCESSEDDATE = "Processed DATE equal to: "; + public static String EPILINKLOGACTIVITY_FILTERBYOLDEPILINK = "Old Epilink ID equal to: "; + public static String EPILINKLOGACTIVITY_FILTERBYNEWEPILINK = "New Epilink ID equal to: "; + public static String EPILINKLOGACTIVITY_FILTERBYUSERNAME = "User Name equal to: "; + public static String FILTERBYUSERNAME = "User Name equal to: "; + public static String PEND_APPR = "PEND_APPR"; + public static String COMPLETED = "COMPLETED"; + public static String MSG_FAIL = "MSG_FAIL"; + public static String REJECTED = "REJECTED"; + public static String APPROVED = "APPROVED"; + public static String EVENT = "EVENT"; + public static String ADDMORB = "addMorb"; + public static String ADDLAB = "addObs"; + public static String ADDVACCINE = "addVaccine"; + public static String ADDINVS = "addInves"; + public static String EDITBUTTON = "editButton"; + public static String DELETEBUTTON = "deleteButton"; + public static String RECORDSTATUSCD = "recordStatusCd"; + public static String EVENTCOUNT = "EventCount"; + public static String MERGEINVS = "mergeInves"; + public static String PROPERTY_FILE = "NEDSS.properties"; + public static String CANADA_124 = "124"; + public static String USA_840 = "840"; + public static String MX_484 = "484"; + public static String PHVS_STATEPROVINCEOFEXPOSURE_CDC = "PHVS_STATEPROVINCEOFEXPOSURE_CDC"; + /** + * Question Groups Classifications + */ + public enum QuestionGroupCodes { + GROUP_NOT, GROUP_MSG, GROUP_INV, GROUP_DEM + } + /** + * Question Entry Method - Denotes whether a question + * in the question library is created by the user using the + * 'Add Question' user interface or predefined in the + * system. + */ + public enum QuestionEntryMethod { + USER, // entered by the user + SYSTEM // predefined in the system + } + public enum CANADA {CAN, CA, PHVS_STATEPROVINCEOFEXPOSURE_CDC_CAN} + public enum USA {USA, US, PHVS_STATEPROVINCEOFEXPOSURE_CDC_US} - public static final String IXS_SOURCE_CD = "IXS"; - public static final String IXS_TARGET_CD = "CASE"; - public static final String IXS_TYPE_CD ="Interview"; - public static final String IXS_ADD_REASON_CD = "because"; - - //For Act_relationship(Between Contact Record and Interview): - //Source_class_cd = �IXS� - //Target_class_cd = �CON� - //Type_cd=�Interview� - public static final String Target_class_cd = "CON"; - - - public static final String COINFCTION_GROUP_ID_NEW_CODE = "GENERATE_NEW_ID"; - public static final String NO_BATCH_ENTRY = "NO_BATCH_ENTRY"; - public static final String BATCH_ENTRY = "BATCH_ENTRY"; - public static final String USER_VIEW = "USER_VIEW"; - - - public static final String FF = "FF"; - - //Disposition code for special processing - public static final String FROM1_A_PREVENTATIVE_TREATMENT="A"; - public static final String TO1_Z_PREVIOUS_PREVENTATIVE_TREATMENT="Z"; - public static final String FROM2_C_INFECTED_BROUGHT_TO_TREATMENT="C"; - public static final String TO2_E_PREVIOUSLY_TREATED_FOR_THIS_INFECTION="E"; - - //Comparators and Separators - public static final String LESS_THAN_LOGIC="<"; - public static final String LESS_THAN_OR_EQUAL_LOGIC="<="; - public static final String GREATER_THAN_LOGIC=">"; - public static final String GREATER_THAN_OR_EQUAL_LOGIC=">="; - public static final String EQUAL_LOGIC="="; - public static final String NOT_EQUAL_LOGIC="!="; - public static final String NOT_EQUAL_LOGIC2="<>"; - public static final String BETWEEN_LOGIC="BET"; - public static final String CONTAINS_LOGIC="CT"; - public static final String STARTS_WITH_LOGIC="SW"; - public static final String ISNULL_LOGIC="ISNULL"; - public static final String NOTNULL_LOGIC="NOTNULL"; - public static final String COLON = ":"; - - - public static final String NON_LR_ENTITY_IDS = "NON_LR_ENTITY_IDS"; - - public static final Long MULTI_LINE_NOTES_W_USER_DATE_STAMP_CD = 1019L; - public static final Long MULTI_SELECT_CD = 1013L; - public static final Long PARTICIPANT_CD = 1017L; - - public static final String NOT_APPLICABLE = "NA"; + public enum MEXICO {MEX, MX, PHVS_STATEPROVINCEOFEXPOSURE_CDC_MEX} - public static enum ContainerType { + public enum CLOSURE_INVESTGR {ClosureInvestgrOfPHC, NBS197} + public enum CURRENT_INVESTGR {InvestgrOfPHC, INV180} + public enum ContainerType { Case, LabReport, Contac, GROUP_DEM } - public static final String XML_SCHEMA = "XML_SCHEMA"; - public static final String XML_PAYLOAD = "XML_PAYLOAD"; - - public static final String ONGOING_CASE_FALSE="false"; - - public static final String CODE_VALUE_GENERAL="CODE_VALUE_GENERAL"; - - public static final String PART_CACHED_MAP_KEY_SEPARATOR="|"; - - public static final String ORIG_XML_QUEUED = "ORIG_QUEUED"; - - public static final String QUEUED = "QUEUED"; - - public static final String MSG_RHAP_PROCESSING = "MSG_RHAP_PROCESSING"; - public static final String ADD_TIME_FOR_SRT_FILTERING="addTime"; - public static final String DATA_SOURCE_NOT_AVAILABLE = "The report or data source you are trying to access is not valid, because the data mart that feeds this report or data source is not currently available in the reporting database. Please contact your system administrator."; - public static final String NULL_FLAVOUR_OID = "2.16.840.1.113883.5.1008"; - public static final String PARTNER_SERVICES_ID = "PSID"; - public static final String RESULTED_TEST_LAB220 = "NBS_LAB220"; - public static final String ORGANISM_LAB278 = "NBS_LAB280"; - public static final String ORDERED_TEST_LAB112 = "NBS_LAB112"; - public static final String DRUGD_TEST_LAB110 = "NBS_LAB110"; - - - public static final String TREATMENT_NBS481 = "NBS481"; - - - public static final String ANY = "ANY"; - - public static final String SUBFORM_PUBLISH = "SUBFORM_PUBLISH"; - public static final String ALREADY_PUBLISHED = "ALREADY_PUBLISHED"; - - public static final String ERR109_PART1="The record you are editing has been edited by "; - public static final String ERR109_PART2=" since you have opened it. The system is unable to save your changes at this time. Please Cancel from this Edit and try again."; - - public static final String ANSWER_COUNT_DIFF_FOR_ROLLBACK = "ANSWER_COUNT_DIFF_FOR_ROLLBACK"; - - public static final String DISABLE_SUBMIT_BEFORE_PAGE_LOAD = "DISABLE_SUBMIT_BEFORE_PAGE_LOAD"; - public static final String FILE_COMPONENTS_HASHMAP = "FILE_COMPONENTS_HASHMAP"; - - public static final String ANSWER_MAP = "AnswerMap"; - public static final String ANSWER_ARRAY_MAP = "AnswerArrayMap"; - public static final String BATCH_MAP = "BatchMap"; - public static final String MORB_FORM_CD = "MorbFormCd"; - public static final String OLD_CLIENT_VO = "OldClientVO"; - - /*COVID Related Constants*/ - public static final String COVID_CR_UPDATE = "COVID_CR_UPDATE"; - public static final String COVID_CR_UPDATE_SENDING_SYSTEM = "COVID_CR_UPDATE_SENDING_SYSTEM"; - public static final String COVID_CR_UPDATE_IGNORE = "COVID_CR_UPDATE_IGNORE"; - public static final String COVID_CR_UPDATE_TIMEFRAME = "COVID_CR_UPDATE_TIMEFRAME"; - public static final String COVID_CR_UPDATE_CLOSED = "COVID_CR_UPDATE_CLOSED"; - public static final String COVID_CR_UPDATE_MULTI_CLOSED = "COVID_CR_UPDATE_MULTI_CLOSED"; - public static final String COVID_CR_UPDATE_MULTI_OPEN = "COVID_CR_UPDATE_MULTI_OPEN"; - public static final String SINGLE_CLOSED = "SINGLE_CLOSED"; - public static final String SINGLE_OPEN = "SINGLE_OPEN"; - public static final String MULTI_CLOSED = "MULTI_CLOSED"; - public static final String MULTI_OPEN = "MULTI_OPEN"; - public static final String GOBACK_YEARS_ELR_MATCHING = "GOBACK_YEARS_ELR_MATCHING"; - - - public static final String CARET = "^"; - public static final String SOCIAL_SECURITY = "SS"; - public static final String SOCIAL_SECURITY_ADMINISTRATION = "SSA"; - - - public static final String X_FORWARDED_FOR = "X-FORWARDED-FOR"; - public static final String AOE_OBS = "AOE"; - public static final String LAB_FORM_CD = "Lab_Report"; - public static final String LAB_REPORT_EVENT_ID = "LR"; - public static final String INVESTIGATION_EVENT_ID = "I"; - public static final String LAB_MOR_CASE_REPORT = "LMC"; - - public static final String NAICS_INDUSTRY_CODES_LIST="NAICS_INDUSTRY_CODES_LIST"; - - public static final String ADV_SEARCH_EVENT_TIME_LAST_SIX_MONTHS="6M"; - public static final String ADV_SEARCH_EVENT_TIME_LAST_THIRTY_DAYS="30D"; - public static final String ADV_SEARCH_EVENT_TIME_LAST_SEVEN_DAYS="7D"; - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/enums/MsgType.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/enums/MsgType.java index 1227e4999..0ec77ce03 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/enums/MsgType.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/constant/enums/MsgType.java @@ -1,6 +1,6 @@ package gov.cdc.dataprocessing.constant.enums; public enum MsgType { - Investigation, Document, Patient, Notification, Jurisdiction, Algorithm, NBS_System, Provider, Organization, Interview, ContactRecord,Place, + Investigation, Document, Patient, Notification, Jurisdiction, Algorithm, NBS_System, Provider, Organization, Interview, ContactRecord, Place, } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/controller/Controller.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/controller/Controller.java index f8e95a6eb..27d4c3d16 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/controller/Controller.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/controller/Controller.java @@ -1,6 +1,5 @@ package gov.cdc.dataprocessing.controller; -import gov.cdc.dataprocessing.exception.DataProcessingException; import gov.cdc.dataprocessing.service.implementation.manager.ManagerService; import gov.cdc.dataprocessing.service.interfaces.manager.IManagerService; import lombok.RequiredArgsConstructor; @@ -9,34 +8,21 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/data-processing-svc/rti") -@RequiredArgsConstructor @Slf4j public class Controller { - private final IManagerService managerService; - @Autowired - public Controller(ManagerService managerService) { - this.managerService = managerService; - } - @GetMapping(path = "/{id}") - public ResponseEntity test(@PathVariable String id) throws Exception { - try { - managerService.processDistribution("ELR",id); + @Autowired + public Controller() { - } catch (Exception e) { - throw new DataProcessingException(e.getMessage()); - } - return ResponseEntity.ok("OK"); } + @GetMapping("/status") public ResponseEntity getDataPipelineStatusHealth() { - log.info("Data Processing Service Status OK"); return ResponseEntity.status(HttpStatus.OK).body("Data Processing Service Status OK"); } } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/controller/LocalUidController.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/controller/LocalUidController.java index d1279f60d..5f9ff76a9 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/controller/LocalUidController.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/controller/LocalUidController.java @@ -3,10 +3,8 @@ import gov.cdc.dataprocessing.constant.enums.LocalIdClass; import gov.cdc.dataprocessing.exception.DataProcessingException; import gov.cdc.dataprocessing.repository.nbs.odse.model.generic_helper.LocalUidGenerator; -import gov.cdc.dataprocessing.service.implementation.uid_generator.OdseIdGeneratorService; import gov.cdc.dataprocessing.service.interfaces.uid_generator.IOdseIdGeneratorService; import jakarta.transaction.Transactional; -import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; @@ -16,11 +14,11 @@ @RestController @RequestMapping("/api/odse/") -@RequiredArgsConstructor public class LocalUidController { private final IOdseIdGeneratorService odseIdGeneratorService; + @Autowired - public LocalUidController(OdseIdGeneratorService odseIdGeneratorService) { + public LocalUidController(IOdseIdGeneratorService odseIdGeneratorService) { this.odseIdGeneratorService = odseIdGeneratorService; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/exception/DataProcessingConsumerException.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/exception/DataProcessingConsumerException.java index 098f93aa8..e395b4cf2 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/exception/DataProcessingConsumerException.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/exception/DataProcessingConsumerException.java @@ -3,14 +3,8 @@ import lombok.Getter; @Getter -public class DataProcessingConsumerException extends Exception{ - private Object result; - public DataProcessingConsumerException(String message, Object result) { - super(message); - this.result = result; - } - +public class DataProcessingConsumerException extends Exception { public DataProcessingConsumerException(String message) { super(message); } -} +} \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/exception/DataProcessingException.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/exception/DataProcessingException.java index be81caa07..669f3c1f4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/exception/DataProcessingException.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/exception/DataProcessingException.java @@ -1,6 +1,6 @@ package gov.cdc.dataprocessing.exception; -public class DataProcessingException extends Exception{ +public class DataProcessingException extends Exception { public DataProcessingException(String message) { super(message); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/exception/EdxLogException.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/exception/EdxLogException.java index 4141c82c0..271b99e4b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/exception/EdxLogException.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/exception/EdxLogException.java @@ -1,9 +1,12 @@ package gov.cdc.dataprocessing.exception; -public class EdxLogException extends Exception{ +public class EdxLogException extends Exception { private final Object result; + public EdxLogException(String message, Object result) { super(message); this.result = result; } + + } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/consumer/KafkaHandleLabConsumer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/consumer/KafkaHandleLabConsumer.java index 78abce807..6c372a42a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/consumer/KafkaHandleLabConsumer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/consumer/KafkaHandleLabConsumer.java @@ -14,12 +14,11 @@ @Service @Slf4j public class KafkaHandleLabConsumer { - @Value("${kafka.topic.elr_edx_log}") - private String logTopic = "elr_edx_log"; - private final KafkaManagerProducer kafkaManagerProducer; private final IManagerService managerService; private final IAuthUserService authUserService; + @Value("${kafka.topic.elr_edx_log}") + private String logTopic = "elr_edx_log"; public KafkaHandleLabConsumer(KafkaManagerProducer kafkaManagerProducer, @@ -40,9 +39,7 @@ public void handleMessage(String message) { Gson gson = new Gson(); PublicHealthCaseFlowContainer publicHealthCaseFlowContainer = gson.fromJson(message, PublicHealthCaseFlowContainer.class); managerService.initiatingLabProcessing(publicHealthCaseFlowContainer); - } - catch (Exception e) - { + } catch (Exception e) { e.printStackTrace(); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/consumer/KafkaManagerConsumer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/consumer/KafkaManagerConsumer.java index c5f052f55..05691e3a0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/consumer/KafkaManagerConsumer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/consumer/KafkaManagerConsumer.java @@ -1,10 +1,8 @@ package gov.cdc.dataprocessing.kafka.consumer; import gov.cdc.dataprocessing.constant.KafkaCustomHeader; -import gov.cdc.dataprocessing.exception.DataProcessingConsumerException; import gov.cdc.dataprocessing.exception.DataProcessingException; import gov.cdc.dataprocessing.kafka.producer.KafkaManagerProducer; -import gov.cdc.dataprocessing.service.implementation.manager.ManagerService; import gov.cdc.dataprocessing.service.interfaces.auth_user.IAuthUserService; import gov.cdc.dataprocessing.service.interfaces.manager.IManagerService; import gov.cdc.dataprocessing.utilities.auth.AuthUtil; @@ -21,22 +19,17 @@ @Slf4j public class KafkaManagerConsumer { private static final Logger logger = LoggerFactory.getLogger(KafkaManagerConsumer.class); - - + private final KafkaManagerProducer kafkaManagerProducer; + private final IManagerService managerService; + private final IAuthUserService authUserService; @Value("${kafka.topic.elr_edx_log}") private String logTopic = "elr_edx_log"; - @Value("${kafka.topic.elr_health_case}") private String healthCaseTopic = "elr_processing_public_health_case"; - private final KafkaManagerProducer kafkaManagerProducer; - private final IManagerService managerService; - private final IAuthUserService authUserService; - public KafkaManagerConsumer( KafkaManagerProducer kafkaManagerProducer, - ManagerService managerService, - IAuthUserService authUserService) { + IManagerService managerService, IAuthUserService authUserService) { this.kafkaManagerProducer = kafkaManagerProducer; this.managerService = managerService; this.authUserService = authUserService; @@ -53,8 +46,8 @@ public void handleMessage(String message, try { var profile = this.authUserService.getAuthUserInfo("superuser"); AuthUtil.setGlobalAuthUser(profile); - managerService.processDistribution(dataType,message); - } catch (DataProcessingConsumerException e) { + managerService.processDistribution(dataType, message); + } catch (Exception e) { logger.error("ERROR PROCESSING STEP 1: " + e.getMessage()); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/consumer/KafkaPublicHealthCaseConsumer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/consumer/KafkaPublicHealthCaseConsumer.java index 08c7061d3..bfdfff071 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/consumer/KafkaPublicHealthCaseConsumer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/consumer/KafkaPublicHealthCaseConsumer.java @@ -19,14 +19,13 @@ @Slf4j public class KafkaPublicHealthCaseConsumer { private static final Logger logger = LoggerFactory.getLogger(KafkaPublicHealthCaseConsumer.class); - + private final KafkaManagerProducer kafkaManagerProducer; + private final IManagerService managerService; + private final IAuthUserService authUserService; @Value("${kafka.topic.elr_handle_lab}") private String handleLabTopic = "elr_processing_handle_lab"; @Value("${kafka.topic.elr_edx_log}") private String logTopic = "elr_edx_log"; - private final KafkaManagerProducer kafkaManagerProducer; - private final IManagerService managerService; - private final IAuthUserService authUserService; public KafkaPublicHealthCaseConsumer( KafkaManagerProducer kafkaManagerProducer, @@ -42,8 +41,7 @@ public KafkaPublicHealthCaseConsumer( topics = "${kafka.topic.elr_health_case}" ) public void handleMessageForPublicHealthCase(String message, - @Header(KafkaHeaders.RECEIVED_TOPIC) String topic) - { + @Header(KafkaHeaders.RECEIVED_TOPIC) String topic) { try { var profile = this.authUserService.getAuthUserInfo("superuser"); @@ -51,10 +49,8 @@ public void handleMessageForPublicHealthCase(String message, Gson gson = new Gson(); PublicHealthCaseFlowContainer publicHealthCaseFlowContainer = gson.fromJson(message, PublicHealthCaseFlowContainer.class); managerService.initiatingInvestigationAndPublicHealthCase(publicHealthCaseFlowContainer); - } - catch (Exception e) - { - e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/producer/KafkaManagerProducer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/producer/KafkaManagerProducer.java index cf53c436d..9a4f98659 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/producer/KafkaManagerProducer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/producer/KafkaManagerProducer.java @@ -9,27 +9,24 @@ import org.springframework.stereotype.Service; import java.util.UUID; + @Service @Slf4j -public class KafkaManagerProducer extends KafkaBaseProducer { +public class KafkaManagerProducer extends KafkaBaseProducer { private static final Logger logger = LoggerFactory.getLogger(KafkaManagerProducer.class); - public KafkaManagerProducer(KafkaTemplate kafkaTemplate) { - super(kafkaTemplate); - } - - @Value("${kafka.topic.elr_health_case}") private String phcTopic = "elr_processing_public_health_case"; - @Value("${kafka.topic.elr_handle_lab}") - private String labHandleTopic = "elr_processing_handle_lab" ; - + private String labHandleTopic = "elr_processing_handle_lab"; @Value("${kafka.topic.elr_action_tracker}") - private String actionTrackerTopic = "elr_action_tracker" ; - + private String actionTrackerTopic = "elr_action_tracker"; @Value("${kafka.topic.elr_edx_log}") private String edx_log_topic = "elr_edx_log"; + public KafkaManagerProducer(KafkaTemplate kafkaTemplate) { + super(kafkaTemplate); + } + public void sendDataPhc(String msg) { sendData(phcTopic, msg); } @@ -48,6 +45,7 @@ var record = createProducerRecord(topic, uniqueID, msgContent); // ADD HEADER if needed sendMessage(record); } + public void sendDataEdxActivityLog(String msgContent) { String uniqueID = "DP_LOG_" + UUID.randomUUID(); var record = createProducerRecord(edx_log_topic, uniqueID, msgContent); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/producer/share/KafkaBaseProducer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/producer/share/KafkaBaseProducer.java index 60b3525aa..d04e30adf 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/producer/share/KafkaBaseProducer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/kafka/producer/share/KafkaBaseProducer.java @@ -5,6 +5,7 @@ public class KafkaBaseProducer { private final KafkaTemplate kafkaTemplate; + public KafkaBaseProducer(KafkaTemplate kafkaTemplate) { this.kafkaTemplate = kafkaTemplate; } @@ -12,6 +13,7 @@ public KafkaBaseProducer(KafkaTemplate kafkaTemplate) { protected ProducerRecord createProducerRecord(String topic, String msgKey, String msgContent) { return new ProducerRecord<>(topic, msgKey, msgContent); } + protected void sendMessage(ProducerRecord prodRecord) { kafkaTemplate.send(prodRecord); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/base/BaseContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/base/BaseContainer.java index e4ca4e735..4f53c871f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/base/BaseContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/base/BaseContainer.java @@ -8,12 +8,8 @@ @Getter @Setter -public class BaseContainer implements Serializable, Cloneable -{ - public BaseContainer() - { - - } +@SuppressWarnings("all") +public class BaseContainer implements Serializable, Cloneable { private static final long serialVersionUID = 1L; protected boolean itNew; protected boolean itOld; @@ -21,12 +17,8 @@ public BaseContainer() protected boolean itDelete; protected String superClassType; protected Collection ldfs; - /** - @param objectname1 - @param objectname2 - @param voClass - @return boolean - @roseuid 3BB8B67D021A - */ -// public abstract boolean isEqual(java.lang.Object objectname1, java.lang.Object objectname2, java.lang.Class voClass); + public BaseContainer() { + + } + } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/base/BasePamContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/base/BasePamContainer.java index 336f04d06..a9b88f90a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/base/BasePamContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/base/BasePamContainer.java @@ -11,11 +11,12 @@ @Getter @Setter +@SuppressWarnings("all") public class BasePamContainer implements Serializable { private static final long serialVersionUID = 1L; private Map pamAnswerDTMap; private Collection actEntityDTCollection; private Map pageRepeatingAnswerDTMap; - private Map answerDTMap; + private Map answerDTMap; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/interfaces/InterviewContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/interfaces/InterviewContainer.java index d2122ab0d..d1788de64 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/interfaces/InterviewContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/interfaces/InterviewContainer.java @@ -10,6 +10,7 @@ @Getter @Setter +@SuppressWarnings("all") public class InterviewContainer extends BaseContainer { private static final long serialVersionUID = 1L; private InterviewDto theInterviewDto = new InterviewDto(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/interfaces/PageProxyContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/interfaces/PageProxyContainer.java index 239da24dc..471273921 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/interfaces/PageProxyContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/interfaces/PageProxyContainer.java @@ -4,14 +4,21 @@ import gov.cdc.dataprocessing.model.container.model.PublicHealthCaseContainer; public interface PageProxyContainer { - public static final long serialVersionUID = 1L; - - public String getPageProxyTypeCd(); - public void setPageProxyTypeCd(String pageProxyTypeCd); - public PublicHealthCaseContainer getPublicHealthCaseVO(); - public void setPublicHealthCaseVO(PublicHealthCaseContainer publicHealthCaseContainer); - public InterviewContainer getInterviewVO(); - public void setInterviewVO(InterviewContainer interviewContainer); - public InterventionContainer getInterventionVO(); - public void setInterventionVO(InterventionContainer interventionContainer); + long serialVersionUID = 1L; + + String getPageProxyTypeCd(); + + void setPageProxyTypeCd(String pageProxyTypeCd); + + PublicHealthCaseContainer getPublicHealthCaseVO(); + + void setPublicHealthCaseVO(PublicHealthCaseContainer publicHealthCaseContainer); + + InterviewContainer getInterviewVO(); + + void setInterviewVO(InterviewContainer interviewContainer); + + InterventionContainer getInterventionVO(); + + void setInterventionVO(InterventionContainer interventionContainer); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/interfaces/ReportSummaryInterface.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/interfaces/ReportSummaryInterface.java index 472026026..618ee8c56 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/interfaces/ReportSummaryInterface.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/interfaces/ReportSummaryInterface.java @@ -3,19 +3,19 @@ import java.sql.Timestamp; public interface ReportSummaryInterface { - public boolean getIsTouched(); + boolean getIsTouched(); - public void setItTouched(boolean touched); + void setItTouched(boolean touched); - public boolean getIsAssociated(); + boolean getIsAssociated(); - public void setItAssociated(boolean associated); + void setItAssociated(boolean associated); - public Long getObservationUid(); + Long getObservationUid(); - public void setObservationUid(Long observationUid); + void setObservationUid(Long observationUid); - public Timestamp getActivityFromTime(); + Timestamp getActivityFromTime(); - public void setActivityFromTime(Timestamp aActivityFromTime); + void setActivityFromTime(Timestamp aActivityFromTime); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ClinicalDocumentContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ClinicalDocumentContainer.java index 99710a1a7..ea9100693 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ClinicalDocumentContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ClinicalDocumentContainer.java @@ -10,8 +10,8 @@ @Getter @Setter -public class ClinicalDocumentContainer extends BaseContainer implements Serializable -{ +@SuppressWarnings("all") +public class ClinicalDocumentContainer extends BaseContainer implements Serializable { // private boolean itDirty = false; // private boolean itNew = true; // private boolean itDelete = false; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/CoinfectionSummaryContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/CoinfectionSummaryContainer.java index e4d92d2ac..9b58a5a03 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/CoinfectionSummaryContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/CoinfectionSummaryContainer.java @@ -8,7 +8,8 @@ @Getter @Setter -public class CoinfectionSummaryContainer implements Serializable, Cloneable{ +@SuppressWarnings("all") +public class CoinfectionSummaryContainer implements Serializable, Cloneable { private static final long serialVersionUID = 1L; private Long publicHealthCaseUid; @@ -36,5 +37,4 @@ public class CoinfectionSummaryContainer implements Serializable, Cloneable{ private String processingDecisionCode; - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/DocumentSummaryContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/DocumentSummaryContainer.java index 540f93bdc..a12a54a33 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/DocumentSummaryContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/DocumentSummaryContainer.java @@ -11,6 +11,7 @@ @Getter @Setter +@SuppressWarnings("all") public class DocumentSummaryContainer extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; private Long nbsDocumentUid; @@ -32,162 +33,167 @@ public class DocumentSummaryContainer extends BaseContainer implements RootDtoIn private String firstName; private String lastName; private Timestamp addTime; - private Map associationMap; + private Map associationMap; private String sendingFacilityNm; private String progAreaCd; + private Long lastChgUserId; + private String jurisdictionCd; + private String progAreaCdOverride; + private Timestamp lastChgTime; + private String lastChgReasonCd; + private String statusCd; + private Timestamp statusTime; + private String sharedInd; + private Long programJurisdictionOid; + private Integer versionCtrlNbr; + @Override public Long getLastChgUserId() { - return null; + return lastChgUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.lastChgUserId = aLastChgUserId; } @Override public String getJurisdictionCd() { - return null; + return jurisdictionCd; } @Override public void setJurisdictionCd(String aJurisdictionCd) { - + this.jurisdictionCd = aJurisdictionCd; } @Override public String getProgAreaCd() { - return null; + return progAreaCd; } @Override public void setProgAreaCd(String aProgAreaCd) { - + this.progAreaCd = aProgAreaCd; } @Override public Timestamp getLastChgTime() { - return null; + return lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + this.lastChgTime = aLastChgTime; } @Override public String getLocalId() { - return null; + return localId; } @Override public void setLocalId(String aLocalId) { - + this.localId = aLocalId; } @Override public Long getAddUserId() { - return null; + return addUserID; } @Override public void setAddUserId(Long aAddUserId) { - + this.addUserID = aAddUserId; } @Override public String getLastChgReasonCd() { - return null; + return lastChgReasonCd; } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - - } - - @Override - public String getRecordStatusCd() { - return null; - } - - @Override - public void setRecordStatusCd(String aRecordStatusCd) { - + this.lastChgReasonCd = aLastChgReasonCd; } @Override public Timestamp getRecordStatusTime() { - return null; + return recordStatusTime; } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + this.recordStatusTime = aRecordStatusTime; } @Override public String getStatusCd() { - return null; + return statusCd; } @Override public void setStatusCd(String aStatusCd) { - + this.statusCd = aStatusCd; } @Override public Timestamp getStatusTime() { - return null; + return statusTime; } @Override public void setStatusTime(Timestamp aStatusTime) { - + this.statusTime = aStatusTime; } @Override public String getSuperclass() { - return null; + return this.getClass().getSuperclass().getName(); } @Override public Long getUid() { - return null; + return nbsDocumentUid; } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return addTime; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + this.addTime = aAddTime; } @Override public Long getProgramJurisdictionOid() { - return null; + return programJurisdictionOid; } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + this.programJurisdictionOid = aProgramJurisdictionOid; } @Override public String getSharedInd() { - return null; + return sharedInd; } @Override public void setSharedInd(String aSharedInd) { - + this.sharedInd = aSharedInd; } @Override public Integer getVersionCtrlNbr() { - return null; + return versionCtrlNbr; + } + + public void setVersionCtrlNbr(Integer versionCtrlNbr) { + this.versionCtrlNbr = versionCtrlNbr; } -} +} \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/EdxActivityLogContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/EdxActivityLogContainer.java index 49bdb4f5f..17d700912 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/EdxActivityLogContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/EdxActivityLogContainer.java @@ -6,6 +6,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EdxActivityLogContainer { - private EDXActivityLogDto edxActivityLogDto=new EDXActivityLogDto(); + private EDXActivityLogDto edxActivityLogDto = new EDXActivityLogDto(); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/EntityGroupContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/EntityGroupContainer.java index c3f07da79..3d0128951 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/EntityGroupContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/EntityGroupContainer.java @@ -9,11 +9,12 @@ @Getter @Setter +@SuppressWarnings("all") public class EntityGroupContainer extends BaseContainer { public Collection theEntityLocatorParticipationDTCollection; public Collection theEntityIdDTCollection; - private EntityGroupDto theEntityGroupDT = new EntityGroupDto(); public Collection theParticipationDTCollection; public Collection theRoleDTCollection; + private EntityGroupDto theEntityGroupDT = new EntityGroupDto(); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/InterventionContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/InterventionContainer.java index 68a9cd3e4..cdc11d5cd 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/InterventionContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/InterventionContainer.java @@ -9,14 +9,15 @@ @Getter @Setter +@SuppressWarnings("all") public class InterventionContainer extends BaseContainer { private static final long serialVersionUID = 1L; + //Collections added for Participation and Activity Relationship object association + public Collection theParticipationDTCollection; + public Collection theActRelationshipDTCollection; private InterventionDto theInterventionDto = new InterventionDto(); private Collection theProcedure1DTCollection; private Collection theSubstanceAdministrationDTCollection; private Collection theActIdDTCollection; private Collection theActivityLocatorParticipationDTCollection; - //Collections added for Participation and Activity Relationship object association - public Collection theParticipationDTCollection; - public Collection theActRelationshipDTCollection; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/InvestigationContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/InvestigationContainer.java index 860ce1b25..b5acc2dfd 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/InvestigationContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/InvestigationContainer.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class InvestigationContainer extends LdfBaseContainer { private static final long serialVersionUID = 1L; public PublicHealthCaseContainer thePublicHealthCaseContainer; @@ -40,12 +41,11 @@ public class InvestigationContainer extends LdfBaseContainer { public Collection theLabReportSummaryVOCollection; public Collection theMorbReportSummaryVOCollection; public NotificationContainer theNotificationContainer; + public Collection theDocumentSummaryVOCollection; private boolean associatedNotificationsInd; private String businessObjectName; private boolean isOOSystemInd; private boolean isOOSystemPendInd; - private Collection theContactVOColl; + private Collection theContactVOColl; private Collection theCTContactSummaryDTCollection; - - public Collection theDocumentSummaryVOCollection; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/LabReportSummaryContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/LabReportSummaryContainer.java index 6523d6822..7cfe00236 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/LabReportSummaryContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/LabReportSummaryContainer.java @@ -13,7 +13,8 @@ @Getter @Setter -public class LabReportSummaryContainer extends BaseContainer implements RootDtoInterface,Comparable, ReportSummaryInterface { +@SuppressWarnings("all") +public class LabReportSummaryContainer extends BaseContainer implements RootDtoInterface, Comparable, ReportSummaryInterface { private static final long serialVersionUID = 1L; private boolean isTouched; private boolean isAssociated; @@ -43,19 +44,18 @@ public class LabReportSummaryContainer extends BaseContainer implements RootDtoI private String specimenSource; private String[] selectedcheckboxIds; private String checkBoxId; - // Added these fields for ER 16368 - Start private String providerFirstName = ""; private String providerLastName = ""; private String providerSuffix = ""; private String providerPrefix = ""; private String providerDegree = ""; private String providerUid = ""; - private String degree ; - private String accessionNumber ; + private String degree; + private String accessionNumber; private boolean isLabFromMorb = false; private boolean isReactor = false; private String electronicInd; - private Map associationsMap; + private Map associationsMap; private String processingDecisionCd; private String disabled = ""; private ProviderDataForPrintContainer providerDataForPrintVO; @@ -72,7 +72,6 @@ public class LabReportSummaryContainer extends BaseContainer implements RootDtoI private String orderingFacility; public LabReportSummaryContainer() { - } public LabReportSummaryContainer(Observation_Lab_Summary_ForWorkUp_New observationLabSummaryForWorkUpNew) { @@ -95,102 +94,102 @@ public LabReportSummaryContainer(Observation_Lab_Summary_ForWorkUp_New observati @Override public Long getLastChgUserId() { - return null; + return personUid; // Assuming personUid is the last changed user ID } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.personUid = aLastChgUserId; } @Override public Timestamp getLastChgTime() { - return null; + return dateReceived; // Assuming dateReceived is the last changed time } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + this.dateReceived = aLastChgTime; } @Override public Long getAddUserId() { - return null; + return personUid; // Assuming personUid is the add user ID } @Override public void setAddUserId(Long aAddUserId) { - + this.personUid = aAddUserId; } @Override public String getLastChgReasonCd() { - return null; + return null; // No corresponding field found } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + // No corresponding field found } @Override public Timestamp getRecordStatusTime() { - return null; + return dateReceived; // Assuming dateReceived is the record status time } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + this.dateReceived = aRecordStatusTime; } @Override public String getStatusCd() { - return null; + return status; // Assuming status is the status code } @Override public void setStatusCd(String aStatusCd) { - + this.status = aStatusCd; } @Override public Timestamp getStatusTime() { - return null; + return dateReceived; // Assuming dateReceived is the status time } @Override public void setStatusTime(Timestamp aStatusTime) { - + this.dateReceived = aStatusTime; } @Override public String getSuperclass() { - return null; + return this.getClass().getSuperclass().getName(); } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return dateReceived; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + this.dateReceived = aAddTime; } @Override public Long getProgramJurisdictionOid() { - return null; + return MPRUid; // Assuming MPRUid is the program jurisdiction OID } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + this.MPRUid = aProgramJurisdictionOid; } @Override - public int compareTo(Object o) { - return 0; + public int compareTo(LabReportSummaryContainer o) { + return this.uid.compareTo(o.getUid()); } @Override @@ -210,6 +209,6 @@ public boolean getIsAssociated() { @Override public void setItAssociated(boolean associated) { - isAssociated = associated; + isAssociated = associated; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/LabResultProxyContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/LabResultProxyContainer.java index 8fb872f1e..10c41c610 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/LabResultProxyContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/LabResultProxyContainer.java @@ -12,20 +12,21 @@ @Getter @Setter +@SuppressWarnings("all") public class LabResultProxyContainer extends PageActProxyContainer { @Serial private static final long serialVersionUID = 1L; public boolean associatedNotificationInd; + public boolean associatedInvInd = false; + public Collection theInterventionVOCollection; + public Collection eDXDocumentCollection; private Long sendingFacilityUid; - public boolean associatedInvInd=false; private Collection theObservationContainerCollection = new ArrayList<>(); private Collection theMaterialContainerCollection = new ArrayList<>(); private Collection theRoleDtoCollection = new ArrayList<>(); private Collection theActIdDTCollection; - public Collection theInterventionVOCollection; - public Collection eDXDocumentCollection; private ArrayList theConditionsList; - private Collection messageLogDCollection =null; + private Collection messageLogDCollection = null; private String labClia = null; private boolean manualLab = false; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/LdfBaseContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/LdfBaseContainer.java index fff288d62..412ced9a4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/LdfBaseContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/LdfBaseContainer.java @@ -12,6 +12,7 @@ @Getter @Setter +@SuppressWarnings("all") public class LdfBaseContainer extends BaseContainer { private static final long serialVersionUID = 1L; private Collection ldfUids; @@ -22,8 +23,8 @@ public Collection getTheStateDefinedFieldDataDTCollection() { /* Read all input ldfs. Descard one with no value entered by user */ public void setTheStateDefinedFieldDataDTCollection(List newLdfs) { - if(newLdfs != null && newLdfs.size() > 0){ - ldfs = new ArrayList (); + if (newLdfs != null && newLdfs.size() > 0) { + ldfs = new ArrayList(); ldfUids = new ArrayList(); Iterator itr = newLdfs.iterator(); while (itr.hasNext()) { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/MPRUpdateContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/MPRUpdateContainer.java index 43167aeb8..e1a489d63 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/MPRUpdateContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/MPRUpdateContainer.java @@ -7,15 +7,15 @@ @Getter @Setter +@SuppressWarnings("all") public class MPRUpdateContainer { private PersonContainer mpr = null; private Collection personVOs = null; /** - This is the constructor for the class. + * This is the constructor for the class. */ - public MPRUpdateContainer(PersonContainer mpr, Collection personVOs) - { + public MPRUpdateContainer(PersonContainer mpr, Collection personVOs) { this.mpr = mpr; this.personVOs = personVOs; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/MaterialContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/MaterialContainer.java index d72e29d5e..78b8bf9f5 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/MaterialContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/MaterialContainer.java @@ -15,34 +15,31 @@ @Getter @Setter -public class MaterialContainer extends BaseContainer -{ +@SuppressWarnings("all") +public class MaterialContainer extends BaseContainer { + /** + * collections for role and participation object association added by John Park + */ + public Collection theParticipationDtoCollection; + public Collection theRoleDTCollection; /** * Data Table of Value Object */ private MaterialDto theMaterialDto = new MaterialDto(); - /** * Related Locators */ private Collection theEntityLocatorParticipationDTCollection; - /** * Other Related Entities */ private Collection theEntityIdDtoCollection = new ArrayList<>(); - - /** - * collections for role and participation object association added by John Park - */ - public Collection theParticipationDtoCollection; - public Collection theRoleDTCollection; private Collection theManufacturedMaterialDtoCollection; public MaterialContainer() { - itDirty = false; - itNew = true; + itDirty = false; + itNew = true; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NbsDocumentContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NbsDocumentContainer.java index 10c6ed3f4..7bfbc0deb 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NbsDocumentContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NbsDocumentContainer.java @@ -20,191 +20,204 @@ @Getter @Setter +@SuppressWarnings("all") public class NbsDocumentContainer extends BaseContainer implements ReportSummaryInterface, RootDtoInterface { - - /** - * - */ private static final long serialVersionUID = 1L; - private NBSDocumentDto nbsDocumentDT = new NBSDocumentDto(); - private EDXActivityLogDto eDXActivityLogDT=new EDXActivityLogDto(); + private NBSDocumentDto nbsDocumentDT = new NBSDocumentDto(); + private EDXActivityLogDto eDXActivityLogDT = new EDXActivityLogDto(); private ParticipationDto participationDT = new ParticipationDto(); - private PersonContainer patientVO= new PersonContainer(); - Collection actRelColl = new ArrayList(); - private boolean isFromSecurityQueue =false; - private Boolean isExistingPatient =false; - private Boolean isMultiplePatFound =false; + private PersonContainer patientVO = new PersonContainer(); + private Collection actRelColl = new ArrayList<>(); + private boolean isFromSecurityQueue = false; + private Boolean isExistingPatient = false; + private Boolean isMultiplePatFound = false; private boolean conditionFound; - private String conditionName; - private boolean isAssociatedInv=false; + private String conditionName; + private boolean isAssociatedInv = false; private String originalPHCRLocalId; - private Map eDXEventProcessDTMap = new HashMap(); + private Map eDXEventProcessDTMap = new HashMap<>(); private boolean isContactRecordDoc; private boolean isLabReportDoc; private boolean isCaseReportDoc; private boolean isMorbReportDoc; private boolean isOngoingCase = true; - private ArrayList assoSummaryCaseList = new ArrayList(); - private ArrayList summaryCaseListWithInTimeFrame = new ArrayList(); + private ArrayList assoSummaryCaseList = new ArrayList<>(); + private ArrayList summaryCaseListWithInTimeFrame = new ArrayList<>(); private DSMUpdateAlgorithmDto dsmUpdateAlgorithmDT; - - - private Map eDXEventProcessCaseSummaryDTMap = new HashMap (); + private Map eDXEventProcessCaseSummaryDTMap = new HashMap<>(); + + private boolean isTouched; + private boolean isAssociated; + private Long observationUid; + private Timestamp activityFromTime; + private Long lastChgUserId; + private String jurisdictionCd; + private String progAreaCd; + private Timestamp lastChgTime; + private Long addUserId; + private String lastChgReasonCd; + private Timestamp recordStatusTime; + private String statusCd; + private Timestamp statusTime; + private Long programJurisdictionOid; + private String sharedInd; + private Integer versionCtrlNbr; + private Timestamp addTime; @Override public boolean getIsTouched() { - return false; + return isTouched; } @Override public void setItTouched(boolean touched) { - + this.isTouched = touched; } @Override public boolean getIsAssociated() { - return false; + return isAssociated; } @Override public void setItAssociated(boolean associated) { - + this.isAssociated = associated; } @Override public Long getObservationUid() { - return null; + return observationUid; } @Override public void setObservationUid(Long observationUid) { - + this.observationUid = observationUid; } @Override public Timestamp getActivityFromTime() { - return null; + return activityFromTime; } @Override public void setActivityFromTime(Timestamp aActivityFromTime) { - + this.activityFromTime = aActivityFromTime; } @Override public Long getLastChgUserId() { - return null; + return lastChgUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.lastChgUserId = aLastChgUserId; } @Override public String getJurisdictionCd() { - return null; + return jurisdictionCd; } @Override public void setJurisdictionCd(String aJurisdictionCd) { - + this.jurisdictionCd = aJurisdictionCd; } @Override public String getProgAreaCd() { - return null; + return progAreaCd; } @Override public void setProgAreaCd(String aProgAreaCd) { - + this.progAreaCd = aProgAreaCd; } @Override public Timestamp getLastChgTime() { - return null; + return lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + this.lastChgTime = aLastChgTime; } @Override public String getLocalId() { - return null; + return originalPHCRLocalId; } @Override public void setLocalId(String aLocalId) { - + this.originalPHCRLocalId = aLocalId; } @Override public Long getAddUserId() { - return null; + return addUserId; } @Override public void setAddUserId(Long aAddUserId) { - + this.addUserId = aAddUserId; } @Override public String getLastChgReasonCd() { - return null; + return lastChgReasonCd; } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + this.lastChgReasonCd = aLastChgReasonCd; } @Override public String getRecordStatusCd() { - return null; + return statusCd; } @Override public void setRecordStatusCd(String aRecordStatusCd) { - + this.statusCd = aRecordStatusCd; } @Override public Timestamp getRecordStatusTime() { - return null; + return recordStatusTime; } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + this.recordStatusTime = aRecordStatusTime; } @Override public String getStatusCd() { - return null; + return statusCd; } @Override public void setStatusCd(String aStatusCd) { - + this.statusCd = aStatusCd; } @Override public Timestamp getStatusTime() { - return null; + return statusTime; } @Override public void setStatusTime(Timestamp aStatusTime) { - + this.statusTime = aStatusTime; } @Override public String getSuperclass() { - return null; + return this.getClass().getSuperclass().getName(); } @Override @@ -213,37 +226,41 @@ public Long getUid() { } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return addTime; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + this.addTime = aAddTime; } @Override public Long getProgramJurisdictionOid() { - return null; + return programJurisdictionOid; } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + this.programJurisdictionOid = aProgramJurisdictionOid; } @Override public String getSharedInd() { - return null; + return sharedInd; } @Override public void setSharedInd(String aSharedInd) { - + this.sharedInd = aSharedInd; } @Override public Integer getVersionCtrlNbr() { - return null; + return versionCtrlNbr; + } + + public void setVersionCtrlNbr(Integer versionCtrlNbr) { + this.versionCtrlNbr = versionCtrlNbr; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NonPersonLivingSubjectContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NonPersonLivingSubjectContainer.java index 5ccae8e31..0bbbd5c39 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NonPersonLivingSubjectContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NonPersonLivingSubjectContainer.java @@ -9,7 +9,8 @@ @Getter @Setter -public class NonPersonLivingSubjectContainer extends BaseContainer { +@SuppressWarnings("all") +public class NonPersonLivingSubjectContainer extends BaseContainer { private static final long serialVersionUID = 1L; // private Boolean itDirty = false; // defined in AbstractVO // private Boolean itNew = true; // defined in AbstractVO diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NotificationContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NotificationContainer.java index aed6171bb..8b907f36c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NotificationContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NotificationContainer.java @@ -14,16 +14,16 @@ @Setter @Getter +@SuppressWarnings("all") + public class NotificationContainer extends BaseContainer { private static final long serialVersionUID = 1L; - private NotificationDto theNotificationDT = new NotificationDto(); - private UpdatedNotificationDto theUpdatedNotificationDto = null; - // private Collection theEntityLocatorParticipationDTCollection; public Collection theActivityLocatorParticipationDTCollection; public Collection theActIdDTCollection; - //Collections added for Participation and Activity Relationship object association public Collection theActRelationshipDTCollection; public Collection theParticipationDTCollection; + private NotificationDto theNotificationDT = new NotificationDto(); + private UpdatedNotificationDto theUpdatedNotificationDto = null; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NotificationProxyContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NotificationProxyContainer.java index 65d1756ae..4afb53e09 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NotificationProxyContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NotificationProxyContainer.java @@ -8,8 +8,8 @@ @Getter @Setter -public class NotificationProxyContainer extends BaseContainer -{ +@SuppressWarnings("all") +public class NotificationProxyContainer extends BaseContainer { private static final long serialVersionUID = 1L; public Collection theActRelationshipDTCollection; public PublicHealthCaseContainer thePublicHealthCaseContainer; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NotificationSummaryContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NotificationSummaryContainer.java index 0bbaf2144..543762488 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NotificationSummaryContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/NotificationSummaryContainer.java @@ -9,124 +9,42 @@ @Getter @Setter -public class NotificationSummaryContainer extends BaseContainer implements RootDtoInterface -{ +@SuppressWarnings("all") +public class NotificationSummaryContainer extends BaseContainer implements RootDtoInterface { - /** - * from NotificationDT.notificationtionUid - * (Not for display purposes) - */ + public String isHistory; private Long notificationUid; - - /** - * from NotificationDT.addTime - */ private Timestamp addTime; - - /** - * from NotificationDT.rptSentTime - */ private Timestamp rptSentTime; - - private Timestamp recordStatusTime; - - - /** - * from PublicHealthCaseDto.cd - */ private String cd; - - /** - * from PublicHealthCase.caseClassCd - */ private String caseClassCd; - - /** - * from NotificationDT.localId - */ private String localId; - - /** - * from Notification.txt - */ private String txt; - - /** - * from NotificationDT.lastChgTime - */ private Timestamp lastChgTime; - private String addUserName; - /** - * from NotificationDT.addUserId - */ private Long addUserId; - - /** - * from PublicHealthCase.jurisdictionCd - */ private String jurisdictionCd; - - /** - * from publicHealthCaseDT.publicHealthCaseUid - */ private Long publicHealthCaseUid; - - /** - * from Code_Value_General.code where Code_Value_General.code_set_nm = 'PHC_TYPE' - */ private String cdTxt; - - /** - * from Code_Value_General.code_desc_txt where Code_Value_General.code_set_nm = - * 'S_JURDIC_C' - */ private String jurisdictionCdTxt; - - /** - * from publicHealthCaseDT.localId - */ private String publicHealthCaseLocalId; - - /** - * from Code_Value_General.code where Code_Value_General.code_set_nm = 'PHC_CLASS' - */ private String caseClassCdTxt; - - /** - * from Notification.record_status_cd - */ private String recordStatusCd; private String lastNm; private String firstNm; private String currSexCd; private Timestamp birthTimeCalc; private String autoResendInd; - public String isHistory; - //Needed for Auto Resend private String progAreaCd; private String sharedInd; private String currSexCdDesc; - private Long MPRUid; - - //This is for cd in the Notification table private String cdNotif; - // This is for approve notification checking variable for popup private boolean nndAssociated; private boolean isCaseReport; private Long programJurisdictionOid; private boolean shareAssocaited; - - - /** - * Notification.cd - */ - - - - //Need for the new Notification Queue to add links for patient and condition private String patientFullName; private String patientFullNameLnk; private String conditionCodeTextLnk; @@ -136,7 +54,6 @@ public class NotificationSummaryContainer extends BaseContainer implements RootD private String notificationSrtDescCd; private String recipient; private String exportRecFacilityUid; - //The following variable is required to control the Special Character's of Recipient which is coming from the manageSystems private String codeConverterTemp; private String codeConverterCommentTemp; private boolean isPendingNotification; @@ -144,82 +61,72 @@ public class NotificationSummaryContainer extends BaseContainer implements RootD @Override public Long getLastChgUserId() { - return null; + return addUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.addUserId = aLastChgUserId; } @Override public String getJurisdictionCd() { - return null; + return jurisdictionCd; } @Override public void setJurisdictionCd(String aJurisdictionCd) { - + this.jurisdictionCd = aJurisdictionCd; } @Override public String getProgAreaCd() { - return null; + return progAreaCd; } @Override public void setProgAreaCd(String aProgAreaCd) { - + this.progAreaCd = aProgAreaCd; } @Override public Timestamp getLastChgTime() { - return null; + return lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + this.lastChgTime = aLastChgTime; } @Override public String getLocalId() { - return null; + return localId; } @Override public void setLocalId(String aLocalId) { - + this.localId = aLocalId; } @Override public Long getAddUserId() { - return null; + return addUserId; } @Override public void setAddUserId(Long aAddUserId) { - + this.addUserId = aAddUserId; } @Override public String getLastChgReasonCd() { - return null; + return null; // No corresponding field } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - - } - - @Override - public String getRecordStatusCd() { - return recordStatusCd; - } - - @Override - public void setRecordStatusCd(String aRecordStatusCd) { - this.recordStatusCd = aRecordStatusCd; + // No corresponding field } @Override @@ -234,66 +141,68 @@ public void setRecordStatusTime(Timestamp aRecordStatusTime) { @Override public String getStatusCd() { - return null; + return null; // No corresponding field } @Override public void setStatusCd(String aStatusCd) { - + // No corresponding field } @Override public Timestamp getStatusTime() { - return null; + return null; // No corresponding field } @Override public void setStatusTime(Timestamp aStatusTime) { - + // No corresponding field } @Override public String getSuperclass() { - return null; + return this.getClass().getSuperclass().getName(); } @Override public Long getUid() { - return null; + return notificationUid; } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return addTime; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + this.addTime = aAddTime; } @Override public Long getProgramJurisdictionOid() { - return null; + return programJurisdictionOid; } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + this.programJurisdictionOid = aProgramJurisdictionOid; } @Override public String getSharedInd() { - return null; + return sharedInd; } @Override public void setSharedInd(String aSharedInd) { - + this.sharedInd = aSharedInd; } @Override public Integer getVersionCtrlNbr() { return null; } + + } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ObservationContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ObservationContainer.java index 940ed57df..39573f658 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ObservationContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ObservationContainer.java @@ -14,8 +14,13 @@ @Getter @Setter +@SuppressWarnings("all") public class ObservationContainer extends BaseContainer { private static final long serialVersionUID = 1L; + //Collections added for Participation and Activity Relationship object association + public Collection theParticipationDtoCollection; + public Collection theActRelationshipDtoCollection; + public Collection theMaterialDtoCollection; private ObservationDto theObservationDto = new ObservationDto(); private Collection theActIdDtoCollection; private Collection theObservationReasonDtoCollection; @@ -26,9 +31,5 @@ public class ObservationContainer extends BaseContainer { private Collection theObsValueDateDtoCollection; private Collection theObsValueNumericDtoCollection; private Collection theActivityLocatorParticipationDtoCollection; - //Collections added for Participation and Activity Relationship object association - public Collection theParticipationDtoCollection; - public Collection theActRelationshipDtoCollection; - public Collection theMaterialDtoCollection; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/OrganizationContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/OrganizationContainer.java index 071e78ba9..c30496173 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/OrganizationContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/OrganizationContainer.java @@ -14,6 +14,7 @@ @Getter @Setter +@SuppressWarnings("all") public class OrganizationContainer extends LdfBaseContainer { // public OrganizationDto theOrganizationDto = new OrganizationDto(); // public Collection theOrganizationNameDtoCollection; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PageActProxyContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PageActProxyContainer.java index 7131b0016..f0789e38b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PageActProxyContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PageActProxyContainer.java @@ -18,61 +18,57 @@ @Getter @Setter +@SuppressWarnings("all") public class PageActProxyContainer extends BaseContainer { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public String pageProxyTypeCd = ""; + public String pageProxyTypeCd = ""; + protected Collection theParticipationDtoCollection; + protected Collection theOrganizationContainerCollection; // page business type INV, IXS, etc. private PublicHealthCaseContainer publicHealthCaseContainer; private InterviewContainer interviewContainer; private NotificationContainer theNotificationContainer; private InterventionContainer interventionContainer; - - private Long patientUid; - private String currentInvestigator; - private String fieldSupervisor; - private String caseSupervisor; - private boolean isSTDProgramArea = false; + private Long patientUid; + private String currentInvestigator; + private String fieldSupervisor; + private String caseSupervisor; + private boolean isSTDProgramArea = false; + // contains answer maps private Collection thePersonContainerCollection; - private BasePamContainer pageVO; - // contains answer maps - - private Collection theVaccinationSummaryVOCollection; - private Collection theNotificationSummaryVOCollection; - private Collection theTreatmentSummaryVOCollection; - private Collection theLabReportSummaryVOCollection; - private Collection theMorbReportSummaryVOCollection; - protected Collection theParticipationDtoCollection; - + private Collection theVaccinationSummaryVOCollection; + private Collection theNotificationSummaryVOCollection; + private Collection theTreatmentSummaryVOCollection; + private Collection theLabReportSummaryVOCollection; + private Collection theMorbReportSummaryVOCollection; private Collection theActRelationshipDtoCollection; - private Collection theInvestigationAuditLogSummaryVOCollection; - protected Collection theOrganizationContainerCollection; - private Collection theCTContactSummaryDTCollection; - private Collection theInterviewSummaryDTCollection; - private Collection theNotificationVOCollection; - private Collection theCSSummaryVOCollection; - private Collection nbsAttachmentDTColl; - private Collection nbsNoteDTColl; - private Collection theDocumentSummaryVOCollection; - private boolean isOOSystemInd; - private boolean isOOSystemPendInd; - private boolean associatedNotificationsInd; - private boolean isUnsavedNote; - private boolean isMergeCase; + private Collection theInvestigationAuditLogSummaryVOCollection; + private Collection theCTContactSummaryDTCollection; + private Collection theInterviewSummaryDTCollection; + private Collection theNotificationVOCollection; + private Collection theCSSummaryVOCollection; + private Collection nbsAttachmentDTColl; + private Collection nbsNoteDTColl; + private Collection theDocumentSummaryVOCollection; + private boolean isOOSystemInd; + private boolean isOOSystemPendInd; + private boolean associatedNotificationsInd; + private boolean isUnsavedNote; + private boolean isMergeCase; private Collection theEDXDocumentDTCollection; - private boolean isRenterant; - private boolean isConversionHasModified; + private boolean isRenterant; + private boolean isConversionHasModified; private ExportReceivingFacilityDto exportReceivingFacilityDto; - private Map messageLogDTMap = new HashMap(); + private Map messageLogDTMap = new HashMap(); - public Object deepCopy() throws CloneNotSupportedException, IOException, ClassNotFoundException - { + public Object deepCopy() throws CloneNotSupportedException, IOException, ClassNotFoundException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(this); @@ -80,6 +76,6 @@ public Object deepCopy() throws CloneNotSupportedException, IOException, ClassNo ObjectInputStream ois = new ObjectInputStream(bais); Object deepCopy = ois.readObject(); - return deepCopy; + return deepCopy; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PageContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PageContainer.java index 8b89e8ab2..10cde60eb 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PageContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PageContainer.java @@ -7,9 +7,10 @@ @Getter @Setter +@SuppressWarnings("all") public class PageContainer extends BasePamContainer { - private boolean isCurrInvestgtrDynamic; private static final long serialVersionUID = 1L; + private boolean isCurrInvestgtrDynamic; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PamProxyContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PamProxyContainer.java index f6af87ea6..9e2be6f9e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PamProxyContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PamProxyContainer.java @@ -12,37 +12,24 @@ @Getter @Setter -public class PamProxyContainer extends BaseContainer { +@SuppressWarnings("all") +public class PamProxyContainer extends BaseContainer { private static final long serialVersionUID = 1L; - + public Collection theNotificationVOCollection; + public Collection theDocumentSummaryVOCollection; private PublicHealthCaseContainer publicHealthCaseContainer; - - private Collection thePersonVOCollection; - + private Collection thePersonVOCollection; private BasePamContainer pamVO; - - private Collection theVaccinationSummaryVOCollection; - - private Collection theNotificationSummaryVOCollection; - - private Collection theTreatmentSummaryVOCollection; - - private Collection theLabReportSummaryVOCollection; - - private Collection theMorbReportSummaryVOCollection; - - private Collection theParticipationDTCollection; - - private Collection theInvestigationAuditLogSummaryVOCollection; - - private Collection theOrganizationVOCollection; - - public Collection theNotificationVOCollection; + private Collection theVaccinationSummaryVOCollection; + private Collection theNotificationSummaryVOCollection; + private Collection theTreatmentSummaryVOCollection; + private Collection theLabReportSummaryVOCollection; + private Collection theMorbReportSummaryVOCollection; + private Collection theParticipationDTCollection; + private Collection theInvestigationAuditLogSummaryVOCollection; + private Collection theOrganizationVOCollection; private boolean associatedNotificationsInd; - private NotificationContainer theNotificationContainer; - - public Collection theDocumentSummaryVOCollection; private boolean isOOSystemInd; private boolean isOOSystemPendInd; private Collection theCTContactSummaryDTCollection; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PatientEncounterContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PatientEncounterContainer.java index 731764bf9..aaac92a72 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PatientEncounterContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PatientEncounterContainer.java @@ -10,7 +10,8 @@ @Getter @Setter -public class PatientEncounterContainer extends BaseContainer implements Serializable { +@SuppressWarnings("all") +public class PatientEncounterContainer extends BaseContainer implements Serializable { private static final long serialVersionUID = 1L; public PatientEncounterDto thePatientEncounterDT = new PatientEncounterDto(); public Collection theActivityLocatorParticipationDTCollection; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PersonContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PersonContainer.java index 7fc75b330..01fd249ad 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PersonContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PersonContainer.java @@ -17,20 +17,21 @@ @Setter @Getter +@SuppressWarnings("all") public class PersonContainer extends LdfBaseContainer implements Serializable { public PersonDto thePersonDto = new PersonDto(); - public Collection thePersonNameDtoCollection =new ArrayList<>(); - public Collection thePersonRaceDtoCollection =new ArrayList<>(); - public Collection thePersonEthnicGroupDtoCollection =new ArrayList<>(); + public Collection thePersonNameDtoCollection = new ArrayList<>(); + public Collection thePersonRaceDtoCollection = new ArrayList<>(); + public Collection thePersonEthnicGroupDtoCollection = new ArrayList<>(); public Collection theEntityLocatorParticipationDtoCollection = new ArrayList<>(); public Collection theEntityIdDtoCollection = new ArrayList<>(); - public Collection theParticipationDtoCollection =new ArrayList<>(); + public Collection theParticipationDtoCollection = new ArrayList<>(); public Collection theRoleDtoCollection = new ArrayList<>(); private String defaultJurisdictionCd; -// private Boolean isExistingPatient; + // private Boolean isExistingPatient; private boolean isExt = false; private boolean isMPRUpdateValid = true; private String localIdentifier; @@ -39,12 +40,11 @@ public class PersonContainer extends LdfBaseContainer implements Serializable { /** * NEW VARIABLE - * */ + */ private Boolean patientMatchedFound; - public PersonContainer deepClone() { try { // Serialize the object diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PlaceContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PlaceContainer.java index 4ecedce68..e377888fe 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PlaceContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PlaceContainer.java @@ -11,13 +11,13 @@ @Getter @Setter -public class PlaceContainer extends BaseContainer implements Serializable -{ - private static final long serialVersionUID = 1L; - protected PlaceDto thePlaceDT = new PlaceDto(); +@SuppressWarnings("all") +public class PlaceContainer extends BaseContainer implements Serializable { + private static final long serialVersionUID = 1L; + protected PlaceDto thePlaceDT = new PlaceDto(); protected Collection theEntityLocatorParticipationDTCollection = new ArrayList(); - protected Collection theEntityIdDTCollection = new ArrayList(); - protected Collection theParticipationDTCollection = new ArrayList(); + protected Collection theEntityIdDTCollection = new ArrayList(); + protected Collection theParticipationDTCollection = new ArrayList(); protected Collection theRoleDTCollection; private String localIdentifier; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ProgramAreaContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ProgramAreaContainer.java index 52180a40e..f0e9dd53b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ProgramAreaContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ProgramAreaContainer.java @@ -8,8 +8,8 @@ @Getter @Setter -public class ProgramAreaContainer implements Serializable, Comparable -{ +@SuppressWarnings("all") +public class ProgramAreaContainer implements Serializable, Comparable { private String conditionCd; private String conditionShortNm; @@ -19,6 +19,6 @@ public class ProgramAreaContainer implements Serializable, Comparable @Override public int compareTo(Object o) { - return getConditionShortNm().compareTo( ((ProgramAreaContainer) o).getConditionShortNm() ); + return getConditionShortNm().compareTo(((ProgramAreaContainer) o).getConditionShortNm()); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ProviderDataForPrintContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ProviderDataForPrintContainer.java index b93a318ce..a4ec3ae04 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ProviderDataForPrintContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ProviderDataForPrintContainer.java @@ -7,22 +7,23 @@ @Getter @Setter +@SuppressWarnings("all") public class ProviderDataForPrintContainer implements Serializable { private static final long serialVersionUID = -6215612766789766219L; - private String providerStreetAddress1= ""; + private String providerStreetAddress1 = ""; private String providerCity; private String providerState; private String providerZip; - private String providerPhone= ""; + private String providerPhone = ""; private String providerPhoneExtension; - private String facilityName= ""; + private String facilityName = ""; private String facilityCity; private String facilityState; - private String facilityAddress1= ""; - private String facilityAddress2= ""; - private String facility= ""; - private String facilityZip= ""; + private String facilityAddress1 = ""; + private String facilityAddress2 = ""; + private String facility = ""; + private String facilityZip = ""; private String facilityPhoneExtension; - private String facilityPhone= ""; + private String facilityPhone = ""; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PublicHealthCaseContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PublicHealthCaseContainer.java index 70669939d..a42ac9400 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PublicHealthCaseContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/PublicHealthCaseContainer.java @@ -19,15 +19,9 @@ @Getter @Setter +@SuppressWarnings("all") public class PublicHealthCaseContainer extends BaseContainer { private static final long serialVersionUID = 1L; - // private boolean itNew = false; - // private boolean itDirty = true; - private boolean isPamCase; - private CaseManagementDto theCaseManagementDto = new CaseManagementDto(); - private PublicHealthCaseDto thePublicHealthCaseDto = new PublicHealthCaseDto(); - private Collection theConfirmationMethodDTCollection; - private Collection theActIdDTCollection; public Collection theActivityLocatorParticipationDTCollection; //Collections added for Participation and Activity Relationship object association public Collection theParticipationDTCollection; @@ -36,8 +30,13 @@ public class PublicHealthCaseContainer extends BaseContainer { public Collection nbsAnswerCollection; public Collection edxPHCRLogDetailDTCollection; public Collection edxEventProcessDtoCollection; - - + // private boolean itNew = false; + // private boolean itDirty = true; + private boolean isPamCase; + private CaseManagementDto theCaseManagementDto = new CaseManagementDto(); + private PublicHealthCaseDto thePublicHealthCaseDto = new PublicHealthCaseDto(); + private Collection theConfirmationMethodDTCollection; + private Collection theActIdDTCollection; private String errorText; private boolean isCoinfectionCondition; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ReferralContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ReferralContainer.java index e6b820674..7a3e0667a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ReferralContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ReferralContainer.java @@ -10,8 +10,8 @@ @Getter @Setter -public class ReferralContainer extends BaseContainer implements Serializable -{ +@SuppressWarnings("all") +public class ReferralContainer extends BaseContainer implements Serializable { private static final long serialVersionUID = 1L; // private boolean itDirty = false; // private boolean itNew = true; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ResultedTestSummaryContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ResultedTestSummaryContainer.java index 7af9a1aa6..6516e6727 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ResultedTestSummaryContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/ResultedTestSummaryContainer.java @@ -11,9 +11,10 @@ @Getter @Setter +@SuppressWarnings("all") public class ResultedTestSummaryContainer extends BaseContainer implements RootDtoInterface { private Long sourceActUid; - private String localId; + private String localId; private Long observationUid; private String ctrlCdUserDefined1; private String resultedTest; @@ -39,163 +40,177 @@ public class ResultedTestSummaryContainer extends BaseContainer implements RootD private String highRange; private Integer numericScale1; private String lowRange; - private String uniqueMapKey; - private Integer numericScale2; + private Long lastChgUserId; + private String jurisdictionCd; + private String progAreaCd; + private Timestamp lastChgTime; + private Long addUserId; + private String lastChgReasonCd; + private Timestamp recordStatusTime; + private String statusCd; + private Timestamp statusTime; + private Long programJurisdictionOid; + private String sharedInd; + private Integer versionCtrlNbr; + @Override public Long getLastChgUserId() { - return null; + return lastChgUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.lastChgUserId = aLastChgUserId; } @Override public String getJurisdictionCd() { - return null; + return jurisdictionCd; } @Override public void setJurisdictionCd(String aJurisdictionCd) { - + this.jurisdictionCd = aJurisdictionCd; } @Override public String getProgAreaCd() { - return null; + return progAreaCd; } @Override public void setProgAreaCd(String aProgAreaCd) { - + this.progAreaCd = aProgAreaCd; } @Override public Timestamp getLastChgTime() { - return null; + return lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + this.lastChgTime = aLastChgTime; } @Override public String getLocalId() { - return null; + return localId; } @Override public void setLocalId(String aLocalId) { - + this.localId = aLocalId; } @Override public Long getAddUserId() { - return null; + return addUserId; } @Override public void setAddUserId(Long aAddUserId) { - + this.addUserId = aAddUserId; } @Override public String getLastChgReasonCd() { - return null; + return lastChgReasonCd; } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + this.lastChgReasonCd = aLastChgReasonCd; } @Override public String getRecordStatusCd() { - return null; + return recordStatusCode; } @Override public void setRecordStatusCd(String aRecordStatusCd) { - + this.recordStatusCode = aRecordStatusCd; } @Override public Timestamp getRecordStatusTime() { - return null; + return recordStatusTime; } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + this.recordStatusTime = aRecordStatusTime; } @Override public String getStatusCd() { - return null; + return statusCd; } @Override public void setStatusCd(String aStatusCd) { - + this.statusCd = aStatusCd; } @Override public Timestamp getStatusTime() { - return null; + return statusTime; } @Override public void setStatusTime(Timestamp aStatusTime) { - + this.statusTime = aStatusTime; } @Override public String getSuperclass() { - return null; + return this.getClass().getSuperclass().getName(); } @Override public Long getUid() { - return null; + return observationUid; } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return null; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { } @Override public Long getProgramJurisdictionOid() { - return null; + return programJurisdictionOid; } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + this.programJurisdictionOid = aProgramJurisdictionOid; } @Override public String getSharedInd() { - return null; + return sharedInd; } @Override public void setSharedInd(String aSharedInd) { - + this.sharedInd = aSharedInd; } @Override public Integer getVersionCtrlNbr() { - return null; + return versionCtrlNbr; + } + + public void setVersionCtrlNbr(Integer versionCtrlNbr) { + this.versionCtrlNbr = versionCtrlNbr; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/TreatmentContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/TreatmentContainer.java index 384a6439c..43fd4c65d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/TreatmentContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/TreatmentContainer.java @@ -11,278 +11,209 @@ @Getter @Setter -public class TreatmentContainer extends BaseContainer implements RootDtoInterface -{ - public String arTypeCd; - - /** - * index - * (Not for display purposes) - */ - private String index; +@SuppressWarnings("all") +public class TreatmentContainer extends BaseContainer implements RootDtoInterface { - /** - * from per.person_uid - * (Not for display purposes) - */ + private String arTypeCd; + private String index; private Long personUid; - - /** - * from set in InvestigationProxyEJB with the isAssociated field - */ private String yesNoFlag; - - - /** - * from treatment_administered - */ private String treatmentNameCode; - - /** - * from treatment_administered - */ private String customTreatmentNameCode; - - - /** - * from SRT Code Set, based on material.nm - */ private String treatmentAdministered; - - /** - * from Treatment.treatmentUid - * (Not for display purposes) - */ private Long treatmentUid; private Long uid; - - - /** - * from Treatment.localId - */ private String localId; - - /** - * from Treatment.activityFromTime - */ private Timestamp activityFromTime; - - /** - * from Treatment.activityToTime - */ private Timestamp activityToTime; - - /** - * from par.record_status_cd, - */ private String recordStatusCd; - - - /** - * from ar.target_act_uid PHC_uid - * (Not for display purposes) - */ private Long phcUid; - - /** - * from ar.target_act_uid parentUid - * (Not for display purposes) - */ private Long parentUid; - - - - /** - * MorbReportSummaryVO - */ private Collection morbReportSummaryVOColl; - - /** - * Populated by front-end to indicate if the isAssociated attribute may have been - * changed by the user. - * (not for display purposes) - */ private boolean isTouched; - - /** - * Set by back-end and front-end to indicate if an ActRelationship entry exists or - * should be created to support associating the Vaccination with the Investigation. - * (not for display purposes) - */ private boolean isAssociated; - - private Character isRadioBtnAssociated; // same as isAssociated but we need Character to be able to sort. - + private Character isRadioBtnAssociated; private String actionLink; - private String checkBoxId; - private Timestamp createDate; - - private Map associationMap; - + private Map associationMap; private String providerFirstName = ""; - private Long nbsDocumentUid; - - private String providerLastName = ""; private String providerSuffix = ""; private String providerPrefix = ""; - private String degree="" ; + private String degree = ""; + + private Long lastChgUserId; + private String jurisdictionCd; + private String progAreaCd; + private Timestamp lastChgTime; + private Long addUserId; + private String lastChgReasonCd; + private Timestamp recordStatusTime; + private String statusCd; + private Timestamp statusTime; + private Long programJurisdictionOid; + private String sharedInd; + private Integer versionCtrlNbr; + private Timestamp addTime; @Override public Long getLastChgUserId() { - return null; + return lastChgUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.lastChgUserId = aLastChgUserId; } @Override public String getJurisdictionCd() { - return null; + return jurisdictionCd; } @Override public void setJurisdictionCd(String aJurisdictionCd) { - + this.jurisdictionCd = aJurisdictionCd; } @Override public String getProgAreaCd() { - return null; + return progAreaCd; } @Override public void setProgAreaCd(String aProgAreaCd) { - + this.progAreaCd = aProgAreaCd; } @Override public Timestamp getLastChgTime() { - return null; + return lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + this.lastChgTime = aLastChgTime; } @Override public String getLocalId() { - return null; + return localId; } @Override public void setLocalId(String aLocalId) { - + this.localId = aLocalId; } @Override public Long getAddUserId() { - return null; + return addUserId; } @Override public void setAddUserId(Long aAddUserId) { - + this.addUserId = aAddUserId; } @Override public String getLastChgReasonCd() { - return null; + return lastChgReasonCd; } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + this.lastChgReasonCd = aLastChgReasonCd; } @Override public String getRecordStatusCd() { - return null; + return recordStatusCd; } @Override public void setRecordStatusCd(String aRecordStatusCd) { - + this.recordStatusCd = aRecordStatusCd; } @Override public Timestamp getRecordStatusTime() { - return null; + return recordStatusTime; } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + this.recordStatusTime = aRecordStatusTime; } @Override public String getStatusCd() { - return null; + return statusCd; } @Override public void setStatusCd(String aStatusCd) { - + this.statusCd = aStatusCd; } @Override public Timestamp getStatusTime() { - return null; + return statusTime; } @Override public void setStatusTime(Timestamp aStatusTime) { - + this.statusTime = aStatusTime; } @Override public String getSuperclass() { - return null; + return this.getClass().getSuperclass().getName(); } @Override public Long getUid() { - return null; + return uid; } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return addTime; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + this.addTime = aAddTime; } @Override public Long getProgramJurisdictionOid() { - return null; + return programJurisdictionOid; } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + this.programJurisdictionOid = aProgramJurisdictionOid; } @Override public String getSharedInd() { - return null; + return sharedInd; } @Override public void setSharedInd(String aSharedInd) { - + this.sharedInd = aSharedInd; } @Override public Integer getVersionCtrlNbr() { - return null; + return versionCtrlNbr; + } + + public void setVersionCtrlNbr(Integer versionCtrlNbr) { + this.versionCtrlNbr = versionCtrlNbr; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/UidSummaryContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/UidSummaryContainer.java index beddaba80..972026ab8 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/UidSummaryContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/UidSummaryContainer.java @@ -9,112 +9,126 @@ @Getter @Setter +@SuppressWarnings("all") public class UidSummaryContainer extends BaseContainer implements RootDtoInterface { private Long uid; private Timestamp addTime; private Long linkingUid; private String uniqueMapKey; - - private Timestamp statusTime;//(Release 4.5) extended to populate Investigation create time + private Timestamp statusTime; private String addReasonCd; + private Long lastChgUserId; + private String jurisdictionCd; + private String progAreaCd; + private Timestamp lastChgTime; + private String localId; + private Long addUserId; + private String lastChgReasonCd; + private String recordStatusCd; + private Timestamp recordStatusTime; + private String statusCd; + private Long programJurisdictionOid; + private String sharedInd; + private Integer versionCtrlNbr; @Override public Long getLastChgUserId() { - return null; + return lastChgUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.lastChgUserId = aLastChgUserId; } @Override public String getJurisdictionCd() { - return null; + return jurisdictionCd; } @Override public void setJurisdictionCd(String aJurisdictionCd) { - + this.jurisdictionCd = aJurisdictionCd; } @Override public String getProgAreaCd() { - return null; + return progAreaCd; } @Override public void setProgAreaCd(String aProgAreaCd) { - + this.progAreaCd = aProgAreaCd; } @Override public Timestamp getLastChgTime() { - return null; + return lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + this.lastChgTime = aLastChgTime; } @Override public String getLocalId() { - return null; + return localId; } @Override public void setLocalId(String aLocalId) { - + this.localId = aLocalId; } @Override public Long getAddUserId() { - return null; + return addUserId; } @Override public void setAddUserId(Long aAddUserId) { - + this.addUserId = aAddUserId; } @Override public String getLastChgReasonCd() { - return null; + return lastChgReasonCd; } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + this.lastChgReasonCd = aLastChgReasonCd; } @Override public String getRecordStatusCd() { - return null; + return recordStatusCd; } @Override public void setRecordStatusCd(String aRecordStatusCd) { - + this.recordStatusCd = aRecordStatusCd; } @Override public Timestamp getRecordStatusTime() { - return null; + return recordStatusTime; } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + this.recordStatusTime = aRecordStatusTime; } @Override public String getStatusCd() { - return null; + return statusCd; } @Override public void setStatusCd(String aStatusCd) { + this.statusCd = aStatusCd; } @Override @@ -124,12 +138,12 @@ public Timestamp getStatusTime() { @Override public void setStatusTime(Timestamp aStatusTime) { - statusTime = aStatusTime; + this.statusTime = aStatusTime; } @Override public String getSuperclass() { - return null; + return this.getClass().getSuperclass().getName(); } @Override @@ -138,37 +152,39 @@ public Long getUid() { } @Override - public void setAddTime(Timestamp aAddTime) { - this.addTime = aAddTime; + public Timestamp getAddTime() { + return addTime; } @Override - public Timestamp getAddTime() { - return addTime; + public void setAddTime(Timestamp aAddTime) { + this.addTime = aAddTime; } @Override public Long getProgramJurisdictionOid() { - return null; + return programJurisdictionOid; } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + this.programJurisdictionOid = aProgramJurisdictionOid; } @Override public String getSharedInd() { - return null; + return sharedInd; } @Override public void setSharedInd(String aSharedInd) { - + this.sharedInd = aSharedInd; } @Override public Integer getVersionCtrlNbr() { - return null; + return versionCtrlNbr; } + + } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/auth_user/User.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/auth_user/User.java index 2a9d358eb..900017815 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/auth_user/User.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/auth_user/User.java @@ -6,8 +6,8 @@ @Getter @Setter -public class User extends BaseContainer -{ +@SuppressWarnings("all") +public class User extends BaseContainer { private static final long serialVersionUID = 1L; private String userID; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/auth_user/UserProfile.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/auth_user/UserProfile.java index a474c413f..9b965bfcb 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/auth_user/UserProfile.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/container/model/auth_user/UserProfile.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class UserProfile extends BaseContainer { private static final long serialVersionUID = 1L; public Collection theRealizedRoleDtoCollection; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/RootDtoInterface.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/RootDtoInterface.java index c83de61b5..e0a6ca0ae 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/RootDtoInterface.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/RootDtoInterface.java @@ -5,157 +5,179 @@ public interface RootDtoInterface { /** * A getter for last change user id + * * @return Long * @roseuid 3C73C11500C4 */ - public Long getLastChgUserId(); + Long getLastChgUserId(); /** * A setter for last change user id + * * @param aLastChgUserId * @roseuid 3C73D82701FD */ - public void setLastChgUserId(Long aLastChgUserId); + void setLastChgUserId(Long aLastChgUserId); /** * A getter for jurisdiction code + * * @return String * @roseuid 3C73D8D1030F */ - public String getJurisdictionCd(); + String getJurisdictionCd(); /** * A setter for jurisdiction code + * * @param aJurisdictionCd * @roseuid 3C73D8E5000B */ - public void setJurisdictionCd(String aJurisdictionCd); + void setJurisdictionCd(String aJurisdictionCd); /** * A getter for program area code + * * @return String * @roseuid 3C73D90A0145 */ - public String getProgAreaCd(); + String getProgAreaCd(); /** * A setter for program area code + * * @param aProgAreaCd * @roseuid 3C73D91703E2 */ - public void setProgAreaCd(String aProgAreaCd); + void setProgAreaCd(String aProgAreaCd); /** * A getter for last change time + * * @return java.sql.Timestamp * @roseuid 3C73D9C502AC */ - public Timestamp getLastChgTime(); + Timestamp getLastChgTime(); /** * A setter for last change time + * * @param aLastChgTime * @roseuid 3C73D9D800AB */ - public void setLastChgTime(java.sql.Timestamp aLastChgTime); + void setLastChgTime(java.sql.Timestamp aLastChgTime); /** * A getter for local id + * * @return String * @roseuid 3C73DA200253 */ - public String getLocalId(); + String getLocalId(); /** * A setter for local id + * * @param aLocalId * @roseuid 3C73DA2C00CA */ - public void setLocalId(String aLocalId); + void setLocalId(String aLocalId); /** * A getter for add user id + * * @return Long * @roseuid 3C73DA4701B9 */ - public Long getAddUserId(); + Long getAddUserId(); /** * A stter for add user id + * * @param aAddUserId * @roseuid 3C73DA550123 */ - public void setAddUserId(Long aAddUserId); + void setAddUserId(Long aAddUserId); /** * A getter for last change reason code + * * @return String * @roseuid 3C73DABD00F0 */ - public String getLastChgReasonCd(); + String getLastChgReasonCd(); /** * A setter for last change reason code + * * @param aLastChgReasonCd * @roseuid 3C73DAC60360 */ - public void setLastChgReasonCd(String aLastChgReasonCd); + void setLastChgReasonCd(String aLastChgReasonCd); /** * A getter for record status code + * * @return String * @roseuid 3C73DAFD023D */ - public String getRecordStatusCd(); + String getRecordStatusCd(); /** * A setter for record status code + * * @param aRecordStatusCd * @roseuid 3C73DB0C02AC */ - public void setRecordStatusCd(String aRecordStatusCd); + void setRecordStatusCd(String aRecordStatusCd); /** * A getter for record status time + * * @return java.sql.Timestamp * @roseuid 3C73DB260015 */ - public Timestamp getRecordStatusTime(); + Timestamp getRecordStatusTime(); /** * A setter for record status time + * * @param aRecordStatusTime * @roseuid 3C73DB35002A */ - public void setRecordStatusTime(java.sql.Timestamp aRecordStatusTime); + void setRecordStatusTime(java.sql.Timestamp aRecordStatusTime); /** * A getter for status code + * * @return String * @roseuid 3C73DB60004A */ - public String getStatusCd(); + String getStatusCd(); /** * A setter for status code + * * @param aStatusCd * @roseuid 3C73DB6A030C */ - public void setStatusCd(String aStatusCd); + void setStatusCd(String aStatusCd); /** * A getter for status time + * * @return java.sql.Timestamp * @roseuid 3C73DB6F0381 */ - public Timestamp getStatusTime(); + Timestamp getStatusTime(); /** * A setter for status time + * * @param aStatusTime * @roseuid 3C73DB74018A */ - public void setStatusTime(java.sql.Timestamp aStatusTime); + void setStatusTime(java.sql.Timestamp aStatusTime); /** * Implement base to return class type - currently CLASSTYPE_ACT or @@ -164,102 +186,116 @@ public interface RootDtoInterface { * @return String * @roseuid 3C73FD5C0343 */ - public String getSuperclass(); + String getSuperclass(); /** * A getter for uid + * * @return Long * @roseuid 3C7407A80249 */ - public Long getUid(); - - /** - * A setter for add time - * @param aAddTime - * @roseuid 3C7412520078 - */ - public void setAddTime(java.sql.Timestamp aAddTime); + Long getUid(); /** * A getter for add time + * * @return java.sql.Timestamp * @roseuid 3C74125B0003 */ - public Timestamp getAddTime(); + Timestamp getAddTime(); + + /** + * A setter for add time + * + * @param aAddTime + * @roseuid 3C7412520078 + */ + void setAddTime(java.sql.Timestamp aAddTime); /** * A checker for the new flag + * * @return boolean * @roseuid 3C7440F0021D */ - public boolean isItNew(); + boolean isItNew(); /** * A setter for the new flag + * * @param itNew * @roseuid 3C7441030329 */ - public void setItNew(boolean itNew); + void setItNew(boolean itNew); /** * A checker for the dirty flag + * * @return boolean * @roseuid 3C74410A00DA */ - public boolean isItDirty(); + boolean isItDirty(); /** * A setter for the dirty flag + * * @param itDirty * @roseuid 3C74410F02C2 */ - public void setItDirty(boolean itDirty); + void setItDirty(boolean itDirty); /** * A checker for the delete flag + * * @return boolean * @roseuid 3C74411402B5 */ - public boolean isItDelete(); + boolean isItDelete(); /** * A setter for the delete flag + * * @param itDelete * @roseuid 3C74412E012C */ - public void setItDelete(boolean itDelete); + void setItDelete(boolean itDelete); /** * A getter for program jurisdiction oid + * * @return Long * @roseuid 3CF7906002AE */ - public Long getProgramJurisdictionOid(); + Long getProgramJurisdictionOid(); /** * A setter for the program jurisdiction oid + * * @param aProgramJurisdictionOid * @roseuid 3CF7974902A7 */ - public void setProgramJurisdictionOid(Long aProgramJurisdictionOid); + void setProgramJurisdictionOid(Long aProgramJurisdictionOid); /** * A getter for shared indicator + * * @return String * @roseuid 3CFBB5DA00CD */ - public String getSharedInd(); + String getSharedInd(); /** * A setter for shared indicator + * * @param aSharedInd * @roseuid 3CFBB5EB01F4 */ - public void setSharedInd(String aSharedInd); + void setSharedInd(String aSharedInd); /** * A getter for version control number - * @return Integer + * + * @return Integer */ - public Integer getVersionCtrlNbr(); + Integer getVersionCtrlNbr(); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/act/ActIdDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/act/ActIdDto.java index 1052853b3..90c8e7cdf 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/act/ActIdDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/act/ActIdDto.java @@ -11,8 +11,8 @@ @Getter @Setter -public class ActIdDto extends BaseContainer implements RootDtoInterface -{ +@SuppressWarnings("all") +public class ActIdDto extends BaseContainer implements RootDtoInterface { private Long actUid; private Integer actIdSeq; private String addReasonCd; @@ -43,17 +43,6 @@ public class ActIdDto extends BaseContainer implements RootDtoInterface private String sharedInd = null; - // NOTE: Act Hist is also a Entity Type - public String getSuperclass() { - this.superClassType = NEDSSConstant.CLASSTYPE_ENTITY; - return superClassType; - } - - @Override - public Long getUid() { - return actUid; - } - public ActIdDto() { itDirty = false; itNew = true; @@ -84,4 +73,15 @@ public ActIdDto(ActId actId) { this.validFromTime = actId.getValidFromTime(); this.validToTime = actId.getValidToTime(); } + + // NOTE: Act Hist is also a Entity Type + public String getSuperclass() { + this.superClassType = NEDSSConstant.CLASSTYPE_ENTITY; + return superClassType; + } + + @Override + public Long getUid() { + return actUid; + } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/act/ActRelationshipDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/act/ActRelationshipDto.java index 54f6b2596..2856b6051 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/act/ActRelationshipDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/act/ActRelationshipDto.java @@ -9,8 +9,8 @@ @Getter @Setter -public class ActRelationshipDto extends BaseContainer -{ +@SuppressWarnings("all") +public class ActRelationshipDto extends BaseContainer { private String addReasonCd; private Timestamp addTime; private Long addUserId; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/act/ActivityLocatorParticipationDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/act/ActivityLocatorParticipationDto.java index 1c1d60a84..54d863b42 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/act/ActivityLocatorParticipationDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/act/ActivityLocatorParticipationDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ActivityLocatorParticipationDto extends BaseContainer { private static final long serialVersionUID = 1L; private Long actUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/auth_user/RealizedRoleDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/auth_user/RealizedRoleDto.java index b9e778d56..49c5a012f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/auth_user/RealizedRoleDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/auth_user/RealizedRoleDto.java @@ -5,10 +5,10 @@ import lombok.Getter; import lombok.Setter; -@Setter @Getter -public class RealizedRoleDto extends BaseContainer -{ +@Setter +@SuppressWarnings("all") +public class RealizedRoleDto extends BaseContainer { private static final long serialVersionUID = 1L; private String roleName; private String programAreaCode; @@ -17,10 +17,10 @@ public class RealizedRoleDto extends BaseContainer private String oldJurisdictionCode; private boolean guest; private boolean readOnly = true; // make sure that the default access for permissionset is readyonly - private int seqNum =0; + private int seqNum = 0; private String recordStatus = ""; - private String guestString ="N"; + private String guestString = "N"; public RealizedRoleDto() { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/dsm/DSMAlgorithmDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/dsm/DSMAlgorithmDto.java index 2509941bd..4b2b9367e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/dsm/DSMAlgorithmDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/dsm/DSMAlgorithmDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class DSMAlgorithmDto extends BaseContainer { private static final long serialVersionUID = 4546705321489806575L; private Long dsmAlgorithmUid; @@ -28,6 +29,10 @@ public class DSMAlgorithmDto extends BaseContainer { private Long lastChgUserId; private Timestamp lastChgTime; + public DSMAlgorithmDto() { + + } + public DSMAlgorithmDto(DsmAlgorithm dsmAlgorithm) { this.dsmAlgorithmUid = dsmAlgorithm.getDsmAlgorithmUid(); this.algorithmNm = dsmAlgorithm.getAlgorithmNm(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/dsm/DSMUpdateAlgorithmDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/dsm/DSMUpdateAlgorithmDto.java index 9c9619251..fe9be1576 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/dsm/DSMUpdateAlgorithmDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/dsm/DSMUpdateAlgorithmDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class DSMUpdateAlgorithmDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; @@ -30,159 +31,170 @@ public class DSMUpdateAlgorithmDto extends BaseContainer implements RootDtoInter private Long lastChgUserId; private Timestamp lastChgTime; private String dsmUpdateAlgorithmMapKey; + private String jurisdictionCd; + private String progAreaCd; + private String localId; + private String lastChgReasonCd; + private String recordStatusCd; + private Timestamp recordStatusTime; + private Long programJurisdictionOid; + private String sharedInd; + private Integer versionCtrlNbr; @Override public Long getLastChgUserId() { - return null; + return lastChgUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.lastChgUserId = aLastChgUserId; } @Override public String getJurisdictionCd() { - return null; + return jurisdictionCd; } @Override public void setJurisdictionCd(String aJurisdictionCd) { - + this.jurisdictionCd = aJurisdictionCd; } @Override public String getProgAreaCd() { - return null; + return progAreaCd; } @Override public void setProgAreaCd(String aProgAreaCd) { - + this.progAreaCd = aProgAreaCd; } @Override public Timestamp getLastChgTime() { - return null; + return lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + this.lastChgTime = aLastChgTime; } @Override public String getLocalId() { - return null; + return localId; } @Override public void setLocalId(String aLocalId) { - + this.localId = aLocalId; } @Override public Long getAddUserId() { - return null; + return addUserId; } @Override public void setAddUserId(Long aAddUserId) { - + this.addUserId = aAddUserId; } @Override public String getLastChgReasonCd() { - return null; + return lastChgReasonCd; } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + this.lastChgReasonCd = aLastChgReasonCd; } @Override public String getRecordStatusCd() { - return null; + return recordStatusCd; } @Override public void setRecordStatusCd(String aRecordStatusCd) { - + this.recordStatusCd = aRecordStatusCd; } @Override public Timestamp getRecordStatusTime() { - return null; + return recordStatusTime; } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + this.recordStatusTime = aRecordStatusTime; } @Override public String getStatusCd() { - return null; + return statusCd; } @Override public void setStatusCd(String aStatusCd) { - + this.statusCd = aStatusCd; } @Override public Timestamp getStatusTime() { - return null; + return statusTime; } @Override public void setStatusTime(Timestamp aStatusTime) { - + this.statusTime = aStatusTime; } @Override public String getSuperclass() { - return null; + return this.getClass().getSuperclass().getName(); } @Override public Long getUid() { - return null; + return dsmUpdateAlgorithmUid; } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return addTime; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + this.addTime = aAddTime; } @Override public Long getProgramJurisdictionOid() { - return null; + return programJurisdictionOid; } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + this.programJurisdictionOid = aProgramJurisdictionOid; } @Override public String getSharedInd() { - return null; + return sharedInd; } @Override public void setSharedInd(String aSharedInd) { - + this.sharedInd = aSharedInd; } @Override public Integer getVersionCtrlNbr() { - return null; + return versionCtrlNbr; } + + } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EDXDocumentDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EDXDocumentDto.java index 96bf46ba4..0354b4817 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EDXDocumentDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EDXDocumentDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EDXDocumentDto extends BaseContainer { private Long eDXDocumentUid; private Long actUid; @@ -35,9 +36,9 @@ public class EDXDocumentDto extends BaseContainer { private String viewLink; public EDXDocumentDto() { - itDirty = false; - itNew = false; - itDelete = false; + itDirty = false; + itNew = false; + itDelete = false; } public EDXDocumentDto(EdxDocument domain) { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessCaseSummaryDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessCaseSummaryDto.java index 23a1ab5eb..8184da3a6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessCaseSummaryDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessCaseSummaryDto.java @@ -3,8 +3,9 @@ import lombok.Getter; import lombok.Setter; -@Setter @Getter +@Setter +@SuppressWarnings("all") public class EDXEventProcessCaseSummaryDto extends EDXEventProcessDto { private static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessDto.java index 2de60addb..d602e3be2 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessDto.java @@ -8,6 +8,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EDXEventProcessDto extends BaseContainer { private static final long serialVersionUID = 1L; private Long eDXEventProcessUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxELRLabMapDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxELRLabMapDto.java index 4c980a13c..5a45fdbb0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxELRLabMapDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxELRLabMapDto.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EdxELRLabMapDto { private Long subjectEntityUid; private String roleCd; @@ -33,7 +34,7 @@ public class EdxELRLabMapDto { private Timestamp asOfDate; private Long rootObservationUid; private String entityIdRootExtensionTxt; - private String entityIdAssigningAuthorityCd ; + private String entityIdAssigningAuthorityCd; private String entityIdAssigningAuthorityDescTxt; private String entityIdTypeCd; private String entityIdTypeDescTxt; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxLabIdentiferDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxLabIdentiferDto.java index 97814e026..0318b77a4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxLabIdentiferDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxLabIdentiferDto.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EdxLabIdentiferDto { private static final long serialVersionUID = 1L; private String identifer; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleAlgorothmManagerDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleAlgorothmManagerDto.java index f538541e1..de50d2b1f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleAlgorothmManagerDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleAlgorothmManagerDto.java @@ -15,6 +15,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EdxRuleAlgorothmManagerDto implements Serializable { private static final long serialVersionUID = 1L; private String updateAction; @@ -23,8 +24,8 @@ public class EdxRuleAlgorothmManagerDto implements Serializable { private String dsmAlgorithmName; private String conditionName; - private Map edxRuleApplyDTMap; - private Map edxRuleAdvCriteriaDTMap; + private Map edxRuleApplyDTMap; + private Map edxRuleAdvCriteriaDTMap; private Long dsmAlgorithmUid; private String onFailureToCreateInv; private String action; @@ -38,8 +39,9 @@ public class EdxRuleAlgorothmManagerDto implements Serializable { private String errorText; private Collection sendingFacilityColl; private Map edxBasicCriteriaMap; - public enum STATUS_VAL {Success, Failure}; private Timestamp lastChgTime; + + ; private Long PHCUid; private Long PHCRevisionUid; private NBSDocumentDto documentDT; @@ -51,5 +53,6 @@ public enum STATUS_VAL {Success, Failure}; private boolean isMorbReportDoc; private boolean isCaseUpdated; private EDXActivityLogDto edxActivityLogDto = new EDXActivityLogDto(); + public enum STATUS_VAL {Success, Failure} } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleManageDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleManageDto.java index 6f47efd41..af3bc8910 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleManageDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleManageDto.java @@ -8,6 +8,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EdxRuleManageDto implements Serializable { private static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/entity/EntityIdDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/entity/EntityIdDto.java index a7fc019d8..79779254c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/entity/EntityIdDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/entity/EntityIdDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EntityIdDto extends BaseContainer { private Long entityUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/entity/EntityLocatorParticipationDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/entity/EntityLocatorParticipationDto.java index fbc9bffaf..767cc15b6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/entity/EntityLocatorParticipationDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/entity/EntityLocatorParticipationDto.java @@ -12,6 +12,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EntityLocatorParticipationDto extends BaseContainer { private Long locatorUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/entity/RoleDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/entity/RoleDto.java index 6e386f4df..abe9cc87c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/entity/RoleDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/entity/RoleDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class RoleDto extends BaseContainer { private Long roleSeq; private String addReasonCd; @@ -39,6 +40,7 @@ public class RoleDto extends BaseContainer { public RoleDto() { } + public RoleDto(Role role) { this.roleSeq = role.getRoleSeq(); this.addReasonCd = role.getAddReasonCode(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/generic_helper/StateDefinedFieldDataDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/generic_helper/StateDefinedFieldDataDto.java index 97f8278f8..175dc1ca5 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/generic_helper/StateDefinedFieldDataDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/generic_helper/StateDefinedFieldDataDto.java @@ -8,8 +8,8 @@ @Getter @Setter -public class StateDefinedFieldDataDto extends BaseContainer -{ +@SuppressWarnings("all") +public class StateDefinedFieldDataDto extends BaseContainer { private Long ldfUid; private String businessObjNm; private Timestamp addTime; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lab_result/EdxLabInformationDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lab_result/EdxLabInformationDto.java index fa136b81d..1761a7689 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lab_result/EdxLabInformationDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lab_result/EdxLabInformationDto.java @@ -20,6 +20,7 @@ */ @Getter @Setter +@SuppressWarnings("all") public class EdxLabInformationDto extends EdxRuleAlgorothmManagerDto implements Serializable { private static final long serialVersionUID = 1L; @@ -73,7 +74,7 @@ public class EdxLabInformationDto extends EdxRuleAlgorothmManagerDto implements private boolean labIsUpdateSuccess; private boolean labIsMarkedAsReviewed; - private Map resultedTest; + private Map resultedTest; private String conditionCode; private Object proxyVO; private Map edxSusLabDTMap = new HashMap(); @@ -108,9 +109,9 @@ public class EdxLabInformationDto extends EdxRuleAlgorothmManagerDto implements private boolean resultedTestNameMissing; private boolean drugNameMissing; private boolean obsStatusTranslated; - private String dangerCode; - private String relationship; - private String relationshipDesc; + private String dangerCode; + private String relationship; + private String relationshipDesc; private boolean activityToTimeMissing; private boolean systemException; private boolean universalServiceIdMissing; @@ -150,23 +151,23 @@ public class EdxLabInformationDto extends EdxRuleAlgorothmManagerDto implements public EdxLabInformationDto() { unexpectedResultType = false; childSuscWithoutParentResult = false; - jurisdictionName = null; - programAreaName = null; - jurisdictionAndProgramAreaSuccessfullyDerived = false; + jurisdictionName = null; + programAreaName = null; + jurisdictionAndProgramAreaSuccessfullyDerived = false; - algorithmHasInvestigation = false; - investigationSuccessfullyCreated = false; - investigationMissingFields = false; + algorithmHasInvestigation = false; + investigationSuccessfullyCreated = false; + investigationMissingFields = false; - algorithmHasNotification = false; - notificationSuccessfullyCreated = false; - notificationMissingFields = false; + algorithmHasNotification = false; + notificationSuccessfullyCreated = false; + notificationMissingFields = false; - labIsCreate = false; - labIsCreateSuccess = false; - labIsUpdateDRRQ = false; - labIsUpdateSuccess = false; - labIsMarkedAsReviewed = false; + labIsCreate = false; + labIsCreateSuccess = false; + labIsUpdateDRRQ = false; + labIsUpdateSuccess = false; + labIsMarkedAsReviewed = false; multipleSubjectMatch = false; multipleOrderingProvider = false; @@ -198,7 +199,7 @@ public EdxLabInformationDto() { systemException = false; universalServiceIdMissing = false; missingOrderingProvider = false; - missingOrderingFacility=false; + missingOrderingFacility = false; multipleReceivingFacility = false; patientMatch = false; multipleOBR = false; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/locator/PhysicalLocatorDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/locator/PhysicalLocatorDto.java index f748811a8..d66cca467 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/locator/PhysicalLocatorDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/locator/PhysicalLocatorDto.java @@ -9,8 +9,8 @@ @Getter @Setter -public class PhysicalLocatorDto extends BaseContainer -{ +@SuppressWarnings("all") +public class PhysicalLocatorDto extends BaseContainer { private Long physicalLocatorUid; private String addReasonCd; private Timestamp addTime; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/locator/PostalLocatorDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/locator/PostalLocatorDto.java index bebffc8d9..0d6fc4b13 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/locator/PostalLocatorDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/locator/PostalLocatorDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PostalLocatorDto extends BaseContainer { private Long postalLocatorUid; private String addReasonCd; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/locator/TeleLocatorDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/locator/TeleLocatorDto.java index 31afbe2e2..a49f4de52 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/locator/TeleLocatorDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/locator/TeleLocatorDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class TeleLocatorDto extends BaseContainer { private Long teleLocatorUid; private String addReasonCd; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityDetailLogDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityDetailLogDto.java index 36f5e7746..573a44ced 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityDetailLogDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityDetailLogDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EDXActivityDetailLogDto extends BaseContainer implements Serializable { private static final long serialVersionUID = 1L; private Long edxActivityDetailLogUid; @@ -22,7 +23,6 @@ public class EDXActivityDetailLogDto extends BaseContainer implements Serializab private String commentHtml; - private Long lastChgUserId; private Timestamp lastChgTime; private Long addUserId; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityLogDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityLogDto.java index bbddebdb2..c9d3186cb 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityLogDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityLogDto.java @@ -13,6 +13,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EDXActivityLogDto extends BaseContainer implements Serializable { private static final long serialVersionUID = 1L; @@ -36,7 +37,7 @@ public class EDXActivityLogDto extends BaseContainer implements Serializable { private Collection EDXActivityLogDTWithVocabDetails; private Collection EDXActivityLogDTWithQuesDetails; private Collection EDXActivityLogDTDetails = new ArrayList(); - private Map newaddedCodeSets = new HashMap(); + private Map newaddedCodeSets = new HashMap(); private boolean logDetailAllStatus = false; private String algorithmAction; private String actionId; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/MessageLogDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/MessageLogDto.java index e29eee0b5..417ff682a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/MessageLogDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/MessageLogDto.java @@ -9,17 +9,18 @@ @Getter @Setter +@SuppressWarnings("all") public class MessageLogDto extends BaseContainer { private static final long serialVersionUID = 1L; private Long messageLogUid; - private String messageTxt; - private String conditionCd; + private String messageTxt; + private String conditionCd; private Long personUid; private Long assignedToUid; private Long eventUid; - private String eventTypeCd; - private String messageStatusCd; - private String recordStatusCd; + private String eventTypeCd; + private String messageStatusCd; + private String recordStatusCd; private Timestamp recordStatusTime; private Timestamp addTime; private Long userId; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/NNDActivityLogDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/NNDActivityLogDto.java index a17ee8dfd..ac1ca151d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/NNDActivityLogDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/log/NNDActivityLogDto.java @@ -9,8 +9,8 @@ @Getter @Setter -public class NNDActivityLogDto extends BaseContainer -{ +@SuppressWarnings("all") +public class NNDActivityLogDto extends BaseContainer { private Long nndActivityLogUid; private Integer nndActivityLogSeq; private String errorMessageTxt; @@ -25,6 +25,7 @@ public class NNDActivityLogDto extends BaseContainer public NNDActivityLogDto() { } + public NNDActivityLogDto(NNDActivityLog activityLog) { this.nndActivityLogUid = activityLog.getNndActivityLogUid(); this.nndActivityLogSeq = activityLog.getNndActivityLogSeq(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lookup/DropDownCodeDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lookup/DropDownCodeDto.java index b97346c29..cf562d3d8 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lookup/DropDownCodeDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lookup/DropDownCodeDto.java @@ -9,7 +9,8 @@ @Getter @Setter -public class DropDownCodeDto extends BaseContainer implements RootDtoInterface { +@SuppressWarnings("all") +public class DropDownCodeDto extends BaseContainer implements RootDtoInterface { private String key; private String value; @@ -111,12 +112,12 @@ public void setRecordStatusTime(Timestamp aRecordStatusTime) { @Override public String getStatusCd() { - return null; + return statusCd; } @Override public void setStatusCd(String aStatusCd) { - + statusCd = aStatusCd; } @Override @@ -140,13 +141,13 @@ public Long getUid() { } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return null; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + } @Override diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lookup/LookupMappingDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lookup/LookupMappingDto.java index ed67a8659..0fc63426f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lookup/LookupMappingDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lookup/LookupMappingDto.java @@ -6,6 +6,7 @@ @Getter @Setter +@SuppressWarnings("all") public class LookupMappingDto { private Long lookupQuestionUid; private String fromQuestionIdentifier; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lookup/PrePopMappingDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lookup/PrePopMappingDto.java index 0c9ae2621..879de8d47 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lookup/PrePopMappingDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/lookup/PrePopMappingDto.java @@ -8,6 +8,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PrePopMappingDto extends BaseContainer { private static final long serialVersionUID = 1L; @@ -47,8 +48,7 @@ public PrePopMappingDto(LookupMappingDto lookupMappingDto) { this.toAnsCodeSystemCd = lookupMappingDto.getToAnsCodeSystemCd(); } - public Object deepCopy() throws CloneNotSupportedException, IOException, ClassNotFoundException - { + public Object deepCopy() throws CloneNotSupportedException, IOException, ClassNotFoundException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(this); @@ -56,6 +56,6 @@ public Object deepCopy() throws CloneNotSupportedException, IOException, ClassNo ObjectInputStream ois = new ObjectInputStream(bais); Object deepCopy = ois.readObject(); - return deepCopy; + return deepCopy; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/matching/EdxEntityMatchDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/matching/EdxEntityMatchDto.java index 9fd7d6582..8c57a8139 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/matching/EdxEntityMatchDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/matching/EdxEntityMatchDto.java @@ -8,6 +8,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EdxEntityMatchDto extends BaseContainer { private Long edxEntityMatchUid; private Long entityUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/matching/EdxPatientMatchDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/matching/EdxPatientMatchDto.java index f855913b2..2ed7ff859 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/matching/EdxPatientMatchDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/matching/EdxPatientMatchDto.java @@ -8,6 +8,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EdxPatientMatchDto extends BaseContainer { private Long edxPatientMatchUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/material/ManufacturedMaterialDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/material/ManufacturedMaterialDto.java index 811322ec6..0528646dd 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/material/ManufacturedMaterialDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/material/ManufacturedMaterialDto.java @@ -9,8 +9,8 @@ @Getter @Setter -public class ManufacturedMaterialDto extends BaseContainer -{ +@SuppressWarnings("all") +public class ManufacturedMaterialDto extends BaseContainer { private static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/material/MaterialDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/material/MaterialDto.java index e9852fa78..ef8ae3953 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/material/MaterialDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/material/MaterialDto.java @@ -11,6 +11,7 @@ @Getter @Setter +@SuppressWarnings("all") public class MaterialDto extends BaseContainer implements RootDtoInterface { private Long materialUid; @@ -49,16 +50,6 @@ public class MaterialDto extends BaseContainer implements RootDtoInterface { private String sharedInd = null; - public String getSuperclass() { - this.superClassType = NEDSSConstant.CLASSTYPE_ENTITY; - return superClassType; - } - - @Override - public Long getUid() { - return materialUid; - } - public MaterialDto() { itDirty = false; itNew = true; @@ -98,4 +89,14 @@ public MaterialDto(Material material) { this.versionCtrlNbr = material.getVersionCtrlNbr(); } + public String getSuperclass() { + this.superClassType = NEDSSConstant.CLASSTYPE_ENTITY; + return superClassType; + } + + @Override + public Long getUid() { + return materialUid; + } + } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/msgoute/NbsInterfaceDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/msgoute/NbsInterfaceDto.java index 7525b03df..f06100009 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/msgoute/NbsInterfaceDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/msgoute/NbsInterfaceDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class NbsInterfaceDto extends BaseContainer { private Long nbsInterfaceUid; private Blob payload; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NBSDocumentDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NBSDocumentDto.java index 242cbbe14..6540f1c1d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NBSDocumentDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NBSDocumentDto.java @@ -11,6 +11,7 @@ @Getter @Setter +@SuppressWarnings("all") public class NBSDocumentDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsActEntityDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsActEntityDto.java index c6a20dd3f..92d5af9c9 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsActEntityDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsActEntityDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class NbsActEntityDto extends BaseContainer { private static final long serialVersionUID = 1L; @@ -22,7 +23,7 @@ public class NbsActEntityDto extends BaseContainer { private Long lastChgUserId; private String recordStatusCd; private Timestamp recordStatusTime; - private String typeCd; + private String typeCd; private Long actUid; @@ -31,6 +32,7 @@ public NbsActEntityDto() { itNew = true; itDelete = false; } + public NbsActEntityDto(NbsActEntity nbsActEntity) { this.nbsActEntityUid = nbsActEntity.getNbsActEntityUid(); this.addTime = nbsActEntity.getAddTime(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsAnswerDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsAnswerDto.java index e8f4cab40..0ef2cb1fb 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsAnswerDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsAnswerDto.java @@ -10,6 +10,7 @@ @Getter @Setter +@SuppressWarnings("all") public class NbsAnswerDto extends BaseContainer { private static final long serialVersionUID = 1L; protected Long nbsAnswerUid; @@ -41,7 +42,7 @@ public NbsAnswerDto(NbsAnswer nbsAnswer) { this.nbsQuestionUid = nbsAnswer.getNbsQuestionUid(); this.nbsQuestionVersionCtrlNbr = nbsAnswer.getNbsQuestionVersionCtrlNbr(); this.seqNbr = nbsAnswer.getSeqNbr(); - // this.answerLargeTxt = nbsAnswer.getAnswerLargeTxt(); + // this.answerLargeTxt = nbsAnswer.getAnswerLargeTxt(); this.answerGroupSeqNbr = nbsAnswer.getAnswerGroupSeqNbr(); this.recordStatusCd = nbsAnswer.getRecordStatusCd(); this.recordStatusTime = nbsAnswer.getRecordStatusTime(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsCaseAnswerDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsCaseAnswerDto.java index b810db8e1..1ea99bf77 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsCaseAnswerDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsCaseAnswerDto.java @@ -6,6 +6,7 @@ @Getter @Setter +@SuppressWarnings("all") public class NbsCaseAnswerDto extends NbsAnswerDto { private static final long serialVersionUID = 1L; private Long nbsCaseAnswerUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsNoteDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsNoteDto.java index 6d00486cf..e3349fdb1 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsNoteDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsNoteDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class NbsNoteDto extends BaseContainer implements RootDtoInterface { private Long nbsNoteUid; @@ -24,15 +25,14 @@ public class NbsNoteDto extends BaseContainer implements RootDtoInterface { private String typeCd; private String lastChgUserNm; - @Override public Long getLastChgUserId() { - return null; + return this.lastChgUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.lastChgUserId = aLastChgUserId; } @Override @@ -42,7 +42,7 @@ public String getJurisdictionCd() { @Override public void setJurisdictionCd(String aJurisdictionCd) { - + // No operation needed for setJurisdictionCd() } @Override @@ -52,17 +52,17 @@ public String getProgAreaCd() { @Override public void setProgAreaCd(String aProgAreaCd) { - + // No operation needed for setProgAreaCd() } @Override public Timestamp getLastChgTime() { - return null; + return this.lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + this.lastChgTime = aLastChgTime; } @Override @@ -72,17 +72,17 @@ public String getLocalId() { @Override public void setLocalId(String aLocalId) { - + // No operation needed for setLocalId() } @Override public Long getAddUserId() { - return null; + return this.addUserId; } @Override public void setAddUserId(Long aAddUserId) { - + this.addUserId = aAddUserId; } @Override @@ -92,27 +92,27 @@ public String getLastChgReasonCd() { @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + // No operation needed for setLastChgReasonCd() } @Override public String getRecordStatusCd() { - return null; + return this.recordStatusCode; } @Override public void setRecordStatusCd(String aRecordStatusCd) { - + this.recordStatusCode = aRecordStatusCd; } @Override public Timestamp getRecordStatusTime() { - return null; + return this.recordStatusTime; } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + this.recordStatusTime = aRecordStatusTime; } @Override @@ -122,7 +122,7 @@ public String getStatusCd() { @Override public void setStatusCd(String aStatusCd) { - + // No operation needed for setStatusCd() } @Override @@ -132,7 +132,7 @@ public Timestamp getStatusTime() { @Override public void setStatusTime(Timestamp aStatusTime) { - + // No operation needed for setStatusTime() } @Override @@ -142,17 +142,17 @@ public String getSuperclass() { @Override public Long getUid() { - return null; + return this.nbsNoteUid; } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return this.addTime; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + this.addTime = aAddTime; } @Override @@ -162,7 +162,7 @@ public Long getProgramJurisdictionOid() { @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + // No operation needed for setProgramJurisdictionOid() } @Override @@ -172,7 +172,7 @@ public String getSharedInd() { @Override public void setSharedInd(String aSharedInd) { - + // No operation needed for setSharedInd() } @Override diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsQuestionMetadata.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsQuestionMetadata.java index a9c3669d4..721a25586 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsQuestionMetadata.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/nbs/NbsQuestionMetadata.java @@ -13,9 +13,11 @@ @Getter @Setter +@SuppressWarnings("all") public class NbsQuestionMetadata extends BaseContainer { private static final long serialVersionUID = 1L; + List aList = new ArrayList<>(); private Long nbsQuestionUid; private Timestamp addTime; private Long addUserId; @@ -46,7 +48,7 @@ public class NbsQuestionMetadata extends BaseContainer { private String enableInd; private String defaultValue; private String requiredInd; - private Long parentUid; + private Long parentUid; private String ldfPageId; private Long nbsUiMetadataUid; private Long nbsUiComponentUid; @@ -66,7 +68,6 @@ public class NbsQuestionMetadata extends BaseContainer { private String mask; private String subGroupNm; private String coinfectionIndCd; - List aList = new ArrayList<>(); public NbsQuestionMetadata() { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/notification/NotificationDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/notification/NotificationDto.java index 11a279349..fc47e9304 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/notification/NotificationDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/notification/NotificationDto.java @@ -11,6 +11,7 @@ @Getter @Setter +@SuppressWarnings("all") public class NotificationDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; @@ -111,8 +112,7 @@ public class NotificationDto extends BaseContainer implements RootDtoInterface { private String autoResendInd; - - private Long exportReceivingFacilityUid; + private Long exportReceivingFacilityUid; private String receiving_system_nm; @@ -124,16 +124,6 @@ public class NotificationDto extends BaseContainer implements RootDtoInterface { private String vaccineEnableInd; - public String getSuperclass() { - this.superClassType = NEDSSConstant.CLASSTYPE_ACT; - return superClassType; - } - - @Override - public Long getUid() { - return notificationUid; - } - public NotificationDto() { itDirty = false; itNew = true; @@ -193,4 +183,14 @@ public NotificationDto(Notification domain) { this.nbsInterfaceUid = domain.getNbsInterfaceUid(); } + public String getSuperclass() { + this.superClassType = NEDSSConstant.CLASSTYPE_ACT; + return superClassType; + } + + @Override + public Long getUid() { + return notificationUid; + } + } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/notification/UpdatedNotificationDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/notification/UpdatedNotificationDto.java index d79e7cc67..9943064b9 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/notification/UpdatedNotificationDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/notification/UpdatedNotificationDto.java @@ -8,6 +8,7 @@ @Getter @Setter +@SuppressWarnings("all") public class UpdatedNotificationDto extends BaseContainer { private static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueCodedDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueCodedDto.java index a60ea3b69..f5b062e3a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueCodedDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueCodedDto.java @@ -9,8 +9,8 @@ @Getter @Setter -public class ObsValueCodedDto extends BaseContainer -{ +@SuppressWarnings("all") +public class ObsValueCodedDto extends BaseContainer { private Long observationUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueDateDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueDateDto.java index 0af8894fb..8dc304989 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueDateDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueDateDto.java @@ -9,8 +9,8 @@ @Getter @Setter -public class ObsValueDateDto extends BaseContainer -{ +@SuppressWarnings("all") +public class ObsValueDateDto extends BaseContainer { private static final long serialVersionUID = 1L; private Long observationUid; @@ -34,7 +34,6 @@ public class ObsValueDateDto extends BaseContainer private String sharedInd = null; - public ObsValueDateDto() { itDirty = false; itNew = true; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueNumericDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueNumericDto.java index 382db3a4c..53db0f3cc 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueNumericDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueNumericDto.java @@ -9,8 +9,8 @@ @Getter @Setter -public class ObsValueNumericDto extends BaseContainer -{ +@SuppressWarnings("all") +public class ObsValueNumericDto extends BaseContainer { private String numericValue; private Long observationUid; @@ -44,13 +44,12 @@ public class ObsValueNumericDto extends BaseContainer private Integer numericScale2; - - public ObsValueNumericDto() { itDirty = false; itNew = true; itDelete = false; } + public ObsValueNumericDto(ObsValueNumeric obsValueNumeric) { this.observationUid = obsValueNumeric.getObservationUid(); this.obsValueNumericSeq = obsValueNumeric.getObsValueNumericSeq(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueTxtDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueTxtDto.java index 01e04ff67..be422dde7 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueTxtDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueTxtDto.java @@ -7,8 +7,8 @@ @Getter @Setter -public class ObsValueTxtDto extends BaseContainer -{ +@SuppressWarnings("all") +public class ObsValueTxtDto extends BaseContainer { private Long observationUid; @@ -33,7 +33,6 @@ public class ObsValueTxtDto extends BaseContainer private String sharedInd = null; - public ObsValueTxtDto() { itDirty = false; itNew = true; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObservationDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObservationDto.java index 26f1e977e..9de69a974 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObservationDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObservationDto.java @@ -11,6 +11,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ObservationDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; private Long observationUid; @@ -173,16 +174,6 @@ public class ObservationDto extends BaseContainer implements RootDtoInterface { private String pregnantIndCd; private Integer pregnantWeek; - public String getSuperclass() { - this.superClassType = NEDSSConstant.CLASSTYPE_ACT; - return superClassType; - } - - @Override - public Long getUid() { - return observationUid; - } - public ObservationDto() { itDirty = false; itNew = true; @@ -266,6 +257,16 @@ public ObservationDto(Observation observation) { this.processingDecisionTxt = observation.getProcessingDecisionTxt(); } + public String getSuperclass() { + this.superClassType = NEDSSConstant.CLASSTYPE_ACT; + return superClassType; + } + + @Override + public Long getUid() { + return observationUid; + } + // // Constructor for converting Observation to ObservationDto // public ObservationDto(Observation observation) { // this.observationUid = observation.getObservationUid(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObservationInterpDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObservationInterpDto.java index dfd2cada8..17a6a3b4b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObservationInterpDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObservationInterpDto.java @@ -7,13 +7,14 @@ @Getter @Setter +@SuppressWarnings("all") public class ObservationInterpDto extends BaseContainer { + boolean _bDirty = false; + boolean _bNew = false; private Long observationUid; private String interpretationCd; private String interpretationDescTxt; - boolean _bDirty = false; - boolean _bNew = false; public ObservationInterpDto() { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObservationReasonDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObservationReasonDto.java index 7d5525bcd..3984add28 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObservationReasonDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/observation/ObservationReasonDto.java @@ -7,8 +7,8 @@ @Getter @Setter -public class ObservationReasonDto extends BaseContainer -{ +@SuppressWarnings("all") +public class ObservationReasonDto extends BaseContainer { private Long observationUid; @@ -25,7 +25,6 @@ public class ObservationReasonDto extends BaseContainer private String sharedInd = null; - public ObservationReasonDto() { itDirty = false; itNew = true; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/organization/OrganizationDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/organization/OrganizationDto.java index c0da4803e..74b1f768b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/organization/OrganizationDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/organization/OrganizationDto.java @@ -11,6 +11,7 @@ @Getter @Setter +@SuppressWarnings("all") public class OrganizationDto extends BaseContainer implements RootDtoInterface { private Long organizationUid; private String addReasonCd; @@ -54,6 +55,50 @@ public class OrganizationDto extends BaseContainer implements RootDtoInterface { private String edxInd = null; + public OrganizationDto() { + itDirty = false; + itNew = true; + itDelete = false; + } + + public OrganizationDto(Organization organization) { + this.organizationUid = organization.getOrganizationUid(); + this.addReasonCd = organization.getAddReasonCode(); + this.addTime = organization.getAddTime(); + this.addUserId = organization.getAddUserId(); + this.cd = organization.getCode(); + this.cdDescTxt = organization.getCodeDescTxt(); + this.description = organization.getDescription(); + this.durationAmt = organization.getDurationAmt(); + this.durationUnitCd = organization.getDurationUnitCd(); + this.fromTime = organization.getFromTime(); + this.lastChgReasonCd = organization.getLastChgReasonCd(); + this.lastChgTime = organization.getLastChgTime(); + this.lastChgUserId = organization.getLastChgUserId(); + this.localId = organization.getLocalId(); + this.recordStatusCd = organization.getRecordStatusCd(); + this.recordStatusTime = organization.getRecordStatusTime(); + this.standardIndustryClassCd = organization.getStandardIndustryClassCd(); + this.standardIndustryDescTxt = organization.getStandardIndustryDescTxt(); + this.statusCd = organization.getStatusCd(); + this.statusTime = organization.getStatusTime(); + this.toTime = organization.getToTime(); + this.userAffiliationTxt = organization.getUserAffiliationTxt(); + this.displayNm = organization.getDisplayNm(); + this.streetAddr1 = organization.getStreetAddr1(); + this.streetAddr2 = organization.getStreetAddr2(); + this.cityCd = organization.getCityCd(); + this.cityDescTxt = organization.getCityDescTxt(); + this.stateCd = organization.getStateCd(); + this.cntyCd = organization.getCntyCd(); + this.cntryCd = organization.getCntryCd(); + this.zipCd = organization.getZipCd(); + this.phoneNbr = organization.getPhoneNbr(); + this.phoneCntryCd = organization.getPhoneCntryCd(); + this.electronicInd = organization.getElectronicInd(); + this.versionCtrlNbr = organization.getVersionCtrlNbr(); + } + //NOTE: Org Hist also same type public String getSuperclass() { this.superClassType = NEDSSConstant.CLASSTYPE_ENTITY; @@ -64,47 +109,4 @@ public String getSuperclass() { public Long getUid() { return organizationUid; } - - public OrganizationDto(){ - itDirty = false; - itNew = true; - itDelete = false; - } - public OrganizationDto(Organization organization){ - this.organizationUid=organization.getOrganizationUid(); - this.addReasonCd=organization.getAddReasonCode(); - this.addTime=organization.getAddTime(); - this.addUserId=organization.getAddUserId(); - this.cd=organization.getCode(); - this.cdDescTxt=organization.getCodeDescTxt(); - this.description=organization.getDescription(); - this.durationAmt=organization.getDurationAmt(); - this.durationUnitCd=organization.getDurationUnitCd(); - this.fromTime=organization.getFromTime(); - this.lastChgReasonCd=organization.getLastChgReasonCd(); - this.lastChgTime=organization.getLastChgTime(); - this.lastChgUserId=organization.getLastChgUserId(); - this.localId=organization.getLocalId(); - this.recordStatusCd=organization.getRecordStatusCd(); - this.recordStatusTime=organization.getRecordStatusTime(); - this.standardIndustryClassCd=organization.getStandardIndustryClassCd(); - this.standardIndustryDescTxt=organization.getStandardIndustryDescTxt(); - this.statusCd=organization.getStatusCd(); - this.statusTime=organization.getStatusTime(); - this.toTime=organization.getToTime(); - this.userAffiliationTxt=organization.getUserAffiliationTxt(); - this.displayNm=organization.getDisplayNm(); - this.streetAddr1=organization.getStreetAddr1(); - this.streetAddr2=organization.getStreetAddr2(); - this.cityCd=organization.getCityCd(); - this.cityDescTxt=organization.getCityDescTxt(); - this.stateCd=organization.getStateCd(); - this.cntyCd=organization.getCntyCd(); - this.cntryCd=organization.getCntryCd(); - this.zipCd=organization.getZipCd(); - this.phoneNbr=organization.getPhoneNbr(); - this.phoneCntryCd=organization.getPhoneCntryCd(); - this.electronicInd=organization.getElectronicInd(); - this.versionCtrlNbr=organization.getVersionCtrlNbr(); - } } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/organization/OrganizationNameDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/organization/OrganizationNameDto.java index db6712989..130d58e46 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/organization/OrganizationNameDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/organization/OrganizationNameDto.java @@ -13,6 +13,7 @@ @Getter @Setter +@SuppressWarnings("all") public class OrganizationNameDto extends BaseContainer implements RootDtoInterface { private Long organizationUid; private Integer organizationNameSeq; @@ -25,6 +26,21 @@ public class OrganizationNameDto extends BaseContainer implements RootDtoInterfa private Long programJurisdictionOid = null; private String sharedInd = null; + public OrganizationNameDto() { + itDirty = false; + itNew = true; + itDelete = false; + } + + public OrganizationNameDto(OrganizationName organizationName) { + this.organizationUid = organizationName.getOrganizationUid(); + this.organizationNameSeq = organizationName.getOrganizationNameSeq(); + this.nmTxt = organizationName.getNameText(); + this.nmUseCd = organizationName.getNameUseCode(); + this.recordStatusCd = organizationName.getRecordStatusCode(); + this.defaultNmInd = organizationName.getDefaultNameIndicator(); + } + @Override public Long getLastChgUserId() { return organizationUid; @@ -32,7 +48,7 @@ public Long getLastChgUserId() { @Override public void setLastChgUserId(Long aLastChgUserId) { - + // No operation needed for setLastChgUserId() } @Override @@ -42,7 +58,7 @@ public Timestamp getLastChgTime() { @Override public void setLastChgTime(Timestamp aLastChgTime) { - + // No operation needed for setLastChgTime() } @Override @@ -52,7 +68,7 @@ public String getLocalId() { @Override public void setLocalId(String aLocalId) { - + // No operation needed for setLocalId() } @Override @@ -72,7 +88,7 @@ public String getLastChgReasonCd() { @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + // No operation needed for setLastChgReasonCd() } @Override @@ -82,7 +98,7 @@ public Timestamp getRecordStatusTime() { @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + // No operation needed for setRecordStatusTime() } @Override @@ -92,7 +108,7 @@ public String getStatusCd() { @Override public void setStatusCd(String aStatusCd) { - + // No operation needed for setStatusCd() } @Override @@ -102,9 +118,10 @@ public Timestamp getStatusTime() { @Override public void setStatusTime(Timestamp aStatusTime) { - + // No operation needed for setStatusTime() } + @Override public String getSuperclass() { this.superClassType = NEDSSConstant.CLASSTYPE_ENTITY; return superClassType; @@ -116,32 +133,17 @@ public Long getUid() { } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return null; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + // No operation needed for setAddTime() } @Override public Integer getVersionCtrlNbr() { return null; } - - public OrganizationNameDto(){ - itDirty = false; - itNew = true; - itDelete = false; - - } - public OrganizationNameDto(OrganizationName organizationName){ - this.organizationUid=organizationName.getOrganizationUid(); - this.organizationNameSeq=organizationName.getOrganizationNameSeq(); - this.nmTxt=organizationName.getNameText(); - this.nmUseCd=organizationName.getNameUseCode(); - this.recordStatusCd=organizationName.getRecordStatusCode(); - this.defaultNmInd=organizationName.getDefaultNameIndicator(); - } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/LocalFieldsDT.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/LocalFieldsDT.java new file mode 100644 index 000000000..01556e24d --- /dev/null +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/LocalFieldsDT.java @@ -0,0 +1,22 @@ +package gov.cdc.dataprocessing.model.dto.other; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class LocalFieldsDT { + private Long nbsUiMetadataUid; + private String questionLabel; + private String typeCdDesc; + private Integer orderNbr; + private Long nbsQuestionUid; + private Long parentUid; + private String tab; + private String section; + private String subSection; + private String viewLink; + private String editLink; + private String deleteLink; + +} diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NbsPageDT.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NbsPageDT.java new file mode 100644 index 000000000..4747da6b8 --- /dev/null +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NbsPageDT.java @@ -0,0 +1,24 @@ +package gov.cdc.dataprocessing.model.dto.other; + +import lombok.Getter; +import lombok.Setter; + +import java.sql.Timestamp; + +@Getter +@Setter +public class NbsPageDT { + private Long nbsPageUid; + private Long waTemplateUid; + private String formCd; + private String descTxt; + private byte[] jspPayload; + private String datamartNm; + private String localId; + private String busObjType; + private Long lastChgUserId; + private Timestamp lastChgTime; + private String recordStatusCd; + private Timestamp recordStatusTime; + +} diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NbsQuestionDT.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NbsQuestionDT.java new file mode 100644 index 000000000..c0cf75b42 --- /dev/null +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NbsQuestionDT.java @@ -0,0 +1,33 @@ +package gov.cdc.dataprocessing.model.dto.other; + +import lombok.Getter; +import lombok.Setter; + +import java.sql.Timestamp; + +@Getter +@Setter +public class NbsQuestionDT { + private Long nbsQuestionUid; + private Timestamp addTime; + private Long addUserId; + private Long codeSetGroupId; + private String dataCd; + private String dataLocation; + private String questionIdentifier; + private String questionOid; + private String questionOidSystemTxt; + private String questionUnitIdentifier; + private String dataType; + private String dataUseCd; + private Timestamp lastChgTime; + private Long lastChgUserId; + private String questionLabel; + private String questionToolTip; + private String datamartColumnNm; + private String partTypeCd; + private String defaultValue; + private Integer versionCtrlNbr; + private String unitParentIdentifier; + +} diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NbsRdbMetadataDT.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NbsRdbMetadataDT.java new file mode 100644 index 000000000..66f99c3be --- /dev/null +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NbsRdbMetadataDT.java @@ -0,0 +1,26 @@ +package gov.cdc.dataprocessing.model.dto.other; + +import lombok.Getter; +import lombok.Setter; + +import java.sql.Timestamp; + +@Getter +@Setter +public class NbsRdbMetadataDT { + private Long nbsRdbMetadataUid; + private Long nbsPageUid; + private Long nbsUiMetadataUid; + private String recordStatusCd; + private Timestamp recordStatusTime; + private Long lastChgUserId; + private Timestamp lastChgTime; + private String localId; + private String rptAdminColumnNm; + private String rdbTableNm; + private String userDefinedColumnNm; + private String rdbColumnNm; + private Integer dataMartRepeatNbr; + + +} diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NbsUiMetadataDT.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NbsUiMetadataDT.java new file mode 100644 index 000000000..c5f9406d5 --- /dev/null +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NbsUiMetadataDT.java @@ -0,0 +1,331 @@ +package gov.cdc.dataprocessing.model.dto.other; + +import gov.cdc.dataprocessing.model.container.base.BaseContainer; +import gov.cdc.dataprocessing.model.dto.RootDtoInterface; + +import java.sql.Timestamp; + +public class NbsUiMetadataDT extends BaseContainer implements RootDtoInterface { + private static final long serialVersionUID = 1L; + private Long nbsUiMetadataUid; + private Long nbsUiComponentUid; + private Long nbsQuestionUid; + private Long parentUid; + private Long nbsPageUid; + private String questionLabel; + private String questionToolTip; + private String investigationFormCd; + private String enableInd; + private String defaultValue; + private String displayInd; + private Integer orderNbr; + private String requiredInd; + private Integer tabOrderId; + private String tabName; + private Timestamp addTime; + private Long addUserId; + private Timestamp lastChgTime; + private Long lastChgUserId; + private String recordStatusCd; + private Timestamp recordStatusTime; + private Long maxLength; + private String ldfPosition; + private String cssStyle; + private String ldfPageId; + private String ldfStatusCd; + private Timestamp ldfStatusTime; + private Integer versionCtrlNbr; + private String adminComment; + private String fieldSize; + private String futureDateInd; + private Long nbsTableUid; + private Long codeSetGroupId; + private String dataCd; + private String dataLocation; + private String dataType; + private String dataUseCd; + private String legacyDataLocation; + private String partTypeCd; + private Integer questionGroupSeqNbr; + private String questionIdentifier; + private String questionOid; + private String questionOidSystemTxt; + private String questionUnitIdentifier; + private String repeatsIndCd; + private String unitParentIdentifier; + private String groupNm; + private String subGroupNm; + private String descTxt; + private String mask; + private Long minValue; + private Long maxValue; + private String standardNndIndCd; + private String unitTypeCd; + private String unitValue; + private String otherValueIndCd; + private String coinfectionIndCd; + + /* Batch entry attributes */ + private String batchTableAppearIndCd; + private String batchTableHeader; + private Integer batchTableColumnWidth ; + private String questionWithQuestionIdentifier; + private String blockName; + private Integer dataMartRepeatNumber; + + + + + + public NbsUiMetadataDT() {} + + public Long getNbsUiMetadataUid() { + return nbsUiMetadataUid; + } + public void setNbsUiMetadataUid(Long nbsUiMetadataUid) { + this.nbsUiMetadataUid = nbsUiMetadataUid; + } + public Long getNbsUiComponentUid() { + return nbsUiComponentUid; + } + public void setNbsUiComponentUid(Long nbsUiComponentUid) { + this.nbsUiComponentUid = nbsUiComponentUid; + } + public Long getNbsQuestionUid() { + return nbsQuestionUid; + } + public void setNbsQuestionUid(Long nbsQuestionUid) { + this.nbsQuestionUid = nbsQuestionUid; + } + public Long getParentUid() { + return parentUid; + } + public void setParentUid(Long parentUid) { + this.parentUid = parentUid; + } + public Long getNbsPageUid() { + return nbsPageUid; + } + public void setNbsPageUid(Long nbsPageUid) { + this.nbsPageUid = nbsPageUid; + } + public String getQuestionLabel() { + return questionLabel; + } + public void setQuestionLabel(String questionLabel) { + this.questionLabel = questionLabel; + } + public String getQuestionToolTip() { + return questionToolTip; + } + public void setQuestionToolTip(String questionToolTip) { + this.questionToolTip = questionToolTip; + } + public String getInvestigationFormCd() { + return investigationFormCd; + } + public void setInvestigationFormCd(String investigationFormCd) { + this.investigationFormCd = investigationFormCd; + } + public String getEnableInd() { + return enableInd; + } + public void setEnableInd(String enableInd) { + this.enableInd = enableInd; + } + public String getDefaultValue() { + return defaultValue; + } + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + public String getDisplayInd() { + return displayInd; + } + public void setDisplayInd(String displayInd) { + this.displayInd = displayInd; + } + public Integer getOrderNbr() { + return orderNbr; + } + public void setOrderNbr(Integer orderNbr) { + this.orderNbr = orderNbr; + } + public String getRequiredInd() { + return requiredInd; + } + public void setRequiredInd(String requiredInd) { + this.requiredInd = requiredInd; + } + public String getTabName() { + return tabName; + } + public void setTabName(String tabName) { + this.tabName = tabName; + } + public Timestamp getAddTime() { + return addTime; + } + public void setAddTime(Timestamp addTime) { + this.addTime = addTime; + } + public Long getAddUserId() { + return addUserId; + } + public void setAddUserId(Long addUserId) { + this.addUserId = addUserId; + } + public Timestamp getLastChgTime() { + return lastChgTime; + } + public void setLastChgTime(Timestamp lastChgTime) { + this.lastChgTime = lastChgTime; + } + public Long getLastChgUserId() { + return lastChgUserId; + } + public void setLastChgUserId(Long lastChgUserId) { + this.lastChgUserId = lastChgUserId; + } + public String getRecordStatusCd() { + return recordStatusCd; + } + public void setRecordStatusCd(String recordStatusCd) { + this.recordStatusCd = recordStatusCd; + } + public Timestamp getRecordStatusTime() { + return recordStatusTime; + } + public void setRecordStatusTime(Timestamp recordStatusTime) { + this.recordStatusTime = recordStatusTime; + } + public Long getMaxLength() { + return maxLength; + } + public void setMaxLength(Long maxLength) { + this.maxLength = maxLength; + } + public String getLdfPosition() { + return ldfPosition; + } + public void setLdfPosition(String ldfPosition) { + this.ldfPosition = ldfPosition; + } + public String getCssStyle() { + return cssStyle; + } + public void setCssStyle(String cssStyle) { + this.cssStyle = cssStyle; + } + public String getLdfPageId() { + return ldfPageId; + } + public void setLdfPageId(String ldfPageId) { + this.ldfPageId = ldfPageId; + } + + public String getJurisdictionCd() { + // TODO Auto-generated method stub + return null; + } + public String getLastChgReasonCd() { + // TODO Auto-generated method stub + return null; + } + public String getLocalId() { + // TODO Auto-generated method stub + return null; + } + public String getProgAreaCd() { + // TODO Auto-generated method stub + return null; + } + public Long getProgramJurisdictionOid() { + // TODO Auto-generated method stub + return null; + } + public String getSharedInd() { + // TODO Auto-generated method stub + return null; + } + public String getStatusCd() { + // TODO Auto-generated method stub + return null; + } + public Timestamp getStatusTime() { + // TODO Auto-generated method stub + return null; + } + public String getSuperclass() { + // TODO Auto-generated method stub + return null; + } + public Long getUid() { + // TODO Auto-generated method stub + return null; + } + public boolean isItDelete() { + // TODO Auto-generated method stub + return false; + } + public boolean isItDirty() { + // TODO Auto-generated method stub + return false; + } + public boolean isItNew() { + // TODO Auto-generated method stub + return false; + } + public void setItDelete(boolean itDelete) { + // TODO Auto-generated method stub + + } + public void setItDirty(boolean itDirty) { + // TODO Auto-generated method stub + + } + public void setItNew(boolean itNew) { + // TODO Auto-generated method stub + + } + public void setJurisdictionCd(String jurisdictionCd) { + // TODO Auto-generated method stub + + } + public void setLastChgReasonCd(String lastChgReasonCd) { + // TODO Auto-generated method stub + + } + public void setLocalId(String localId) { + // TODO Auto-generated method stub + + } + public void setProgAreaCd(String progAreaCd) { + // TODO Auto-generated method stub + + } + public void setProgramJurisdictionOid(Long programJurisdictionOid) { + // TODO Auto-generated method stub + + } + public void setSharedInd(String sharedInd) { + // TODO Auto-generated method stub + + } + + @Override + public Integer getVersionCtrlNbr() { + return versionCtrlNbr; + } + + public void setStatusCd(String statusCd) { + // TODO Auto-generated method stub + + } + public void setStatusTime(Timestamp statusTime) { + // TODO Auto-generated method stub + + } + + +} diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NndMetadataDT.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NndMetadataDT.java new file mode 100644 index 000000000..a53d712d3 --- /dev/null +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/other/NndMetadataDT.java @@ -0,0 +1,169 @@ +package gov.cdc.dataprocessing.model.dto.other; + +import gov.cdc.dataprocessing.model.container.base.BaseContainer; +import gov.cdc.dataprocessing.model.dto.RootDtoInterface; +import lombok.Getter; +import lombok.Setter; + +import java.sql.Timestamp; +@Getter +@Setter +public class NndMetadataDT extends BaseContainer implements RootDtoInterface { + private Long nndMetadataUid; + private String investigationFormCd; + private String questionIdentifierNnd; + private String questionLabelNnd; + private String questionRequiredNnd; + private String questionDataTypeNnd; + private String HL7SegmentField; + private String orderGroupId; + private String translationTableNm; + private Timestamp addTime; + private Long addUserId; + private Timestamp lastChgTime; + private Long lastChgUserId; + private String recordStatusCd; + private Timestamp recordStatusTime; + private String questionIdentifier; + private String msgTriggerIndCd; + private String xmlPath; + private String xmlTag; + private String xmlDataType; + private String partTypeCd; + private Integer repeatGroupSeqNbr; + private Integer questionOrderNnd; + private Long nbsPageUid; + private Long nbsUiMetadataUid; + private String questionMap; + private String indicatorCd; + private static final long serialVersionUID = 1L; + + public NndMetadataDT() {} + + + @Override + public String getJurisdictionCd() { + // TODO Auto-generated method stub + return null; + } + @Override + public String getLastChgReasonCd() { + // TODO Auto-generated method stub + return null; + } + @Override + public String getLocalId() { + // TODO Auto-generated method stub + return null; + } + @Override + public String getProgAreaCd() { + // TODO Auto-generated method stub + return null; + } + @Override + public Long getProgramJurisdictionOid() { + // TODO Auto-generated method stub + return null; + } + @Override + public String getSharedInd() { + // TODO Auto-generated method stub + return null; + } + @Override + public String getStatusCd() { + // TODO Auto-generated method stub + return null; + } + @Override + public Timestamp getStatusTime() { + // TODO Auto-generated method stub + return null; + } + @Override + public String getSuperclass() { + // TODO Auto-generated method stub + return null; + } + @Override + public Long getUid() { + // TODO Auto-generated method stub + return null; + } + @Override + public Integer getVersionCtrlNbr() { + // TODO Auto-generated method stub + return null; + } + @Override + public boolean isItDelete() { + // TODO Auto-generated method stub + return false; + } + @Override + public boolean isItDirty() { + // TODO Auto-generated method stub + return false; + } + @Override + public boolean isItNew() { + // TODO Auto-generated method stub + return false; + } + @Override + public void setItDelete(boolean itDelete) { + // TODO Auto-generated method stub + + } + @Override + public void setItDirty(boolean itDirty) { + // TODO Auto-generated method stub + + } + @Override + public void setItNew(boolean itNew) { + // TODO Auto-generated method stub + + } + @Override + public void setJurisdictionCd(String jurisdictionCd) { + // TODO Auto-generated method stub + + } + @Override + public void setLastChgReasonCd(String lastChgReasonCd) { + // TODO Auto-generated method stub + + } + @Override + public void setLocalId(String localId) { + // TODO Auto-generated method stub + + } + @Override + public void setProgAreaCd(String progAreaCd) { + // TODO Auto-generated method stub + + } + @Override + public void setProgramJurisdictionOid(Long programJurisdictionOid) { + // TODO Auto-generated method stub + + } + @Override + public void setSharedInd(String sharedInd) { + // TODO Auto-generated method stub + + } + @Override + public void setStatusCd(String statusCd) { + // TODO Auto-generated method stub + + } + @Override + public void setStatusTime(Timestamp statusTime) { + // TODO Auto-generated method stub + + } +} diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/participation/ParticipationDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/participation/ParticipationDto.java index a004c07ce..fa1ebbe03 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/participation/ParticipationDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/participation/ParticipationDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ParticipationDto extends BaseContainer { private String addReasonCd; private Timestamp addTime; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonDto.java index 4c3bfdcb4..3faf1d246 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonDto.java @@ -11,6 +11,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PersonDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; private String dedupMatchInd; @@ -121,25 +122,14 @@ public class PersonDto extends BaseContainer implements RootDtoInterface { private String jurisdictionCd = null; private Long programJurisdictionOid = null; private String sharedInd = null; - private String edxInd =null; - private boolean isCaseInd= false; + private String edxInd = null; + private boolean isCaseInd = false; private String speaksEnglishCd; private String additionalGenderCd; private String eharsId; private String ethnicUnkReasonCd; private String sexUnkReasonCd; - private boolean isReentrant= false; - - // Same on PersonHIST - public String getSuperclass() { - this.superClassType = NEDSSConstant.CLASSTYPE_ENTITY; - return superClassType; - } - - @Override - public Long getUid() { - return personUid; - } + private boolean isReentrant = false; public PersonDto() { itDirty = false; @@ -254,4 +244,15 @@ public PersonDto(Person person) { this.eharsId = person.getEharsId(); } + // Same on PersonHIST + public String getSuperclass() { + this.superClassType = NEDSSConstant.CLASSTYPE_ENTITY; + return superClassType; + } + + @Override + public Long getUid() { + return personUid; + } + } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonEthnicGroupDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonEthnicGroupDto.java index b9a543645..135596c8e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonEthnicGroupDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonEthnicGroupDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PersonEthnicGroupDto extends BaseContainer { private Long personUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonNameDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonNameDto.java index 340d56733..9683cbfcc 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonNameDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonNameDto.java @@ -8,8 +8,10 @@ import lombok.Setter; import java.sql.Timestamp; + @Getter @Setter +@SuppressWarnings("all") public class PersonNameDto extends BaseContainer implements RootDtoInterface { private Long personUid; @@ -52,21 +54,12 @@ public class PersonNameDto private Integer versionCtrlNbr; private String localId; - public String getSuperclass() { - this.superClassType = NEDSSConstant.CLASSTYPE_ENTITY; - return superClassType; - } - - @Override - public Long getUid() { - return personUid; - } - public PersonNameDto() { itDirty = false; itNew = true; itDelete = false; } + public PersonNameDto(PersonName personName) { this.personUid = personName.getPersonUid(); this.personNameSeq = personName.getPersonNameSeq(); @@ -100,4 +93,14 @@ public PersonNameDto(PersonName personName) { this.userAffiliationTxt = personName.getUserAffiliationTxt(); this.asOfDate = personName.getAsOfDate(); } + + public String getSuperclass() { + this.superClassType = NEDSSConstant.CLASSTYPE_ENTITY; + return superClassType; + } + + @Override + public Long getUid() { + return personUid; + } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonRaceDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonRaceDto.java index 9e586d192..ffeb5acc4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonRaceDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/person/PersonRaceDto.java @@ -11,6 +11,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PersonRaceDto extends BaseContainer implements RootDtoInterface { private Long personUid; @@ -37,16 +38,6 @@ public class PersonRaceDto extends BaseContainer implements RootDtoInterface { private String statusCd; private String localId; - public String getSuperclass() { - this.superClassType = NEDSSConstant.CLASSTYPE_ENTITY; - return superClassType; - } - - @Override - public Long getUid() { - return personUid; - } - public PersonRaceDto() { itDirty = false; itNew = true; @@ -70,7 +61,15 @@ public PersonRaceDto(PersonRace personRace) { this.asOfDate = personRace.getAsOfDate(); } + public String getSuperclass() { + this.superClassType = NEDSSConstant.CLASSTYPE_ENTITY; + return superClassType; + } + @Override + public Long getUid() { + return personUid; + } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/CTContactSummaryDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/CTContactSummaryDto.java index a9f1bc171..f65123d69 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/CTContactSummaryDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/CTContactSummaryDto.java @@ -10,6 +10,7 @@ @Getter @Setter +@SuppressWarnings("all") public class CTContactSummaryDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; @@ -49,7 +50,6 @@ public class CTContactSummaryDto extends BaseContainer implements RootDtoInterfa private String associatedWith; private Timestamp createDate; - private String contactReferralBasisCd; private Long namedDuringInterviewUid; private Long thirdPartyEntityPhcUid; //this is really Other Infected Investigation @@ -75,7 +75,7 @@ public Long getLastChgUserId() { @Override public void setLastChgUserId(Long aLastChgUserId) { - + // No operation needed for setLastChgUserId() } @Override @@ -85,7 +85,7 @@ public String getJurisdictionCd() { @Override public void setJurisdictionCd(String aJurisdictionCd) { - + // No operation needed for setJurisdictionCd() } @Override @@ -95,7 +95,7 @@ public String getProgAreaCd() { @Override public void setProgAreaCd(String aProgAreaCd) { - + // No operation needed for setProgAreaCd() } @Override @@ -105,7 +105,7 @@ public Timestamp getLastChgTime() { @Override public void setLastChgTime(Timestamp aLastChgTime) { - + // No operation needed for setLastChgTime() } @Override @@ -115,7 +115,7 @@ public String getLocalId() { @Override public void setLocalId(String aLocalId) { - + // No operation needed for setLocalId() } @Override @@ -125,7 +125,7 @@ public Long getAddUserId() { @Override public void setAddUserId(Long aAddUserId) { - + // No operation needed for setAddUserId() } @Override @@ -135,7 +135,7 @@ public String getLastChgReasonCd() { @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + // No operation needed for setLastChgReasonCd() } @Override @@ -145,7 +145,7 @@ public String getRecordStatusCd() { @Override public void setRecordStatusCd(String aRecordStatusCd) { - + // No operation needed for setRecordStatusCd() } @Override @@ -155,7 +155,7 @@ public Timestamp getRecordStatusTime() { @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + // No operation needed for setRecordStatusTime() } @Override @@ -165,7 +165,7 @@ public String getStatusCd() { @Override public void setStatusCd(String aStatusCd) { - + // No operation needed for setStatusCd() } @Override @@ -175,7 +175,7 @@ public Timestamp getStatusTime() { @Override public void setStatusTime(Timestamp aStatusTime) { - + // No operation needed for setStatusTime() } @Override @@ -189,13 +189,13 @@ public Long getUid() { } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return null; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + // No operation needed for setAddTime() } @Override @@ -205,7 +205,7 @@ public Long getProgramJurisdictionOid() { @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + // No operation needed for setProgramJurisdictionOid() } @Override @@ -215,7 +215,7 @@ public String getSharedInd() { @Override public void setSharedInd(String aSharedInd) { - + // No operation needed for setSharedInd() } @Override diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/CaseManagementDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/CaseManagementDto.java index cf14cc833..0db649ae5 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/CaseManagementDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/CaseManagementDto.java @@ -9,61 +9,61 @@ @Getter @Setter +@SuppressWarnings("all") public class CaseManagementDto extends BaseContainer { private static final long serialVersionUID = -5127476121435352079L; - - private Long caseManagementUid; - private Long publicHealthCaseUid; - private String status900; - private String eharsId; - private String epiLinkId; - private String fieldFollUpOojOutcome; - private String fieldRecordNumber; - private String fldFollUpDispo; - private Timestamp fldFollUpDispoDate; - private Timestamp fldFollUpExamDate; - private Timestamp fldFollUpExpectedDate; - private String fldFollUpExpectedIn; - private String fldFollUpInternetOutcome; - private String fldFollUpNotificationPlan; - private String fldFollUpProvDiagnosis; - private String fldFollUpProvExmReason; - private String initFollUp; - private String initFollUpClinicCode; - private Timestamp initFollUpClosedDate; - private String initFollUpNotifiable; - private String internetFollUp; - private String oojAgency; - private Timestamp oojDueDate; - private String oojNumber; - private String patIntvStatusCd; - private String subjComplexion; - private String subjHair; - private String subjHeight; - private String subjOthIdntfyngInfo; - private String subjSizeBuild; - private Timestamp survClosedDate; - private String survPatientFollUp; - private String survProvDiagnosis; - private String survProvExmReason; - private String survProviderContact; - private String actRefTypeCd; - private String initiatingAgncy; - private Timestamp oojInitgAgncyOutcDueDate; - private Timestamp oojInitgAgncyOutcSntDate; - private Timestamp oojInitgAgncyRecdDate; - public boolean isCaseManagementDTPopulated; - public String caseReviewStatus; - private Timestamp survAssignedDate; - private Timestamp follUpAssignedDate; - private Timestamp initFollUpAssignedDate; - private Timestamp interviewAssignedDate; + public boolean isCaseManagementDTPopulated; + public String caseReviewStatus; + private Long caseManagementUid; + private Long publicHealthCaseUid; + private String status900; + private String eharsId; + private String epiLinkId; + private String fieldFollUpOojOutcome; + private String fieldRecordNumber; + private String fldFollUpDispo; + private Timestamp fldFollUpDispoDate; + private Timestamp fldFollUpExamDate; + private Timestamp fldFollUpExpectedDate; + private String fldFollUpExpectedIn; + private String fldFollUpInternetOutcome; + private String fldFollUpNotificationPlan; + private String fldFollUpProvDiagnosis; + private String fldFollUpProvExmReason; + private String initFollUp; + private String initFollUpClinicCode; + private Timestamp initFollUpClosedDate; + private String initFollUpNotifiable; + private String internetFollUp; + private String oojAgency; + private Timestamp oojDueDate; + private String oojNumber; + private String patIntvStatusCd; + private String subjComplexion; + private String subjHair; + private String subjHeight; + private String subjOthIdntfyngInfo; + private String subjSizeBuild; + private Timestamp survClosedDate; + private String survPatientFollUp; + private String survProvDiagnosis; + private String survProvExmReason; + private String survProviderContact; + private String actRefTypeCd; + private String initiatingAgncy; + private Timestamp oojInitgAgncyOutcDueDate; + private Timestamp oojInitgAgncyOutcSntDate; + private Timestamp oojInitgAgncyRecdDate; + private Timestamp survAssignedDate; + private Timestamp follUpAssignedDate; + private Timestamp initFollUpAssignedDate; + private Timestamp interviewAssignedDate; private Timestamp initInterviewAssignedDate; - private Timestamp caseClosedDate; - private Timestamp caseReviewStatusDate; + private Timestamp caseClosedDate; + private Timestamp caseReviewStatusDate; // not in db - private String localId; + private String localId; public CaseManagementDto() { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ClinicalDocumentDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ClinicalDocumentDto.java index 6d65dfe39..c1afe0536 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ClinicalDocumentDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ClinicalDocumentDto.java @@ -10,8 +10,8 @@ @Getter @Setter -public class ClinicalDocumentDto extends BaseContainer implements RootDtoInterface -{ +@SuppressWarnings("all") +public class ClinicalDocumentDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; private Long clinicalDocumentUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ConfirmationMethodDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ConfirmationMethodDto.java index 9f5ebc9df..2c044570a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ConfirmationMethodDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ConfirmationMethodDto.java @@ -9,8 +9,8 @@ @Getter @Setter -public class ConfirmationMethodDto extends BaseContainer -{ +@SuppressWarnings("all") +public class ConfirmationMethodDto extends BaseContainer { private static final long serialVersionUID = 1L; private Long publicHealthCaseUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/EntityGroupDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/EntityGroupDto.java index 81c2809b7..b06be7acd 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/EntityGroupDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/EntityGroupDto.java @@ -10,8 +10,8 @@ @Getter @Setter -public class EntityGroupDto extends BaseContainer implements RootDtoInterface -{ +@SuppressWarnings("all") +public class EntityGroupDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; private Long entityGroupUid; @@ -103,116 +103,125 @@ public EntityGroupDto(EntityGroup entityGroup) { this.versionCtrlNbr = entityGroup.getVersionCtrlNbr(); } - - @Override public Long getLastChgUserId() { - return null; + return lastChgUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + // No operation needed for setLastChgUserId() + lastChgUserId = aLastChgUserId; } @Override public String getJurisdictionCd() { - return null; + return jurisdictionCd; } @Override public void setJurisdictionCd(String aJurisdictionCd) { - + // No operation needed for setJurisdictionCd() + jurisdictionCd = aJurisdictionCd; } @Override public String getProgAreaCd() { - return null; + return progAreaCd; } @Override public void setProgAreaCd(String aProgAreaCd) { - + // No operation needed for setProgAreaCd() + progAreaCd = aProgAreaCd; } @Override public Timestamp getLastChgTime() { - return null; + return lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + // No operation needed for setLastChgTime() + lastChgTime = aLastChgTime; } @Override public String getLocalId() { - return null; + return localId; } @Override public void setLocalId(String aLocalId) { - + // No operation needed for setLocalId() + localId = aLocalId; } @Override public Long getAddUserId() { - return null; + return addUserId; } @Override public void setAddUserId(Long aAddUserId) { - + // No operation needed for setAddUserId() + addUserId = addUserId; } @Override public String getLastChgReasonCd() { - return null; + return lastChgReasonCd; } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + // No operation needed for setLastChgReasonCd() + lastChgReasonCd = aLastChgReasonCd; } @Override public String getRecordStatusCd() { - return null; + return recordStatusCd; } @Override public void setRecordStatusCd(String aRecordStatusCd) { - + // No operation needed for setRecordStatusCd() + recordStatusCd = aRecordStatusCd; } @Override public Timestamp getRecordStatusTime() { - return null; + return recordStatusTime; } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + // No operation needed for setRecordStatusTime() + recordStatusTime = aRecordStatusTime; } @Override public String getStatusCd() { - return null; + return statusCd; } @Override public void setStatusCd(String aStatusCd) { - + // No operation needed for setStatusCd() + statusCd = aStatusCd; } @Override public Timestamp getStatusTime() { - return null; + return statusTime; } @Override public void setStatusTime(Timestamp aStatusTime) { - + // No operation needed for setStatusTime() + statusTime = aStatusTime; } @Override @@ -226,37 +235,40 @@ public Long getUid() { } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return addTime; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + // No operation needed for setAddTime() + addTime = aAddTime; } @Override public Long getProgramJurisdictionOid() { - return null; + return programJurisdictionOid; } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + // No operation needed for setProgramJurisdictionOid() + programJurisdictionOid = aProgramJurisdictionOid; } @Override public String getSharedInd() { - return null; + return sharedInd; } @Override public void setSharedInd(String aSharedInd) { - + // No operation needed for setSharedInd() + sharedInd = aSharedInd; } @Override public Integer getVersionCtrlNbr() { - return null; + return versionCtrlNbr; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ExportReceivingFacilityDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ExportReceivingFacilityDto.java index 26f8123e4..f0975208c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ExportReceivingFacilityDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ExportReceivingFacilityDto.java @@ -8,6 +8,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ExportReceivingFacilityDto extends BaseContainer { private static final long serialVersionUID = 1L; private Timestamp addTime; @@ -18,7 +19,7 @@ public class ExportReceivingFacilityDto extends BaseContainer { private Long exportReceivingFacilityUid; private String recordStatusCd; private String receivingSystemNm; - private String receivingSystemOid; + private String receivingSystemOid; private String receivingSystemShortName; private String receivingSystemOwner; private String receivingSystemOwnerOid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/InterventionDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/InterventionDto.java index c0f9219dd..c81399a5c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/InterventionDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/InterventionDto.java @@ -11,6 +11,7 @@ @Getter @Setter +@SuppressWarnings("all") public class InterventionDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; @@ -124,17 +125,6 @@ public class InterventionDto extends BaseContainer implements RootDtoInterface { private String electronicInd; - - public String getSuperclass() { - this.superClassType = NEDSSConstant.CLASSTYPE_ACT; - return superClassType; - } - - @Override - public Long getUid() { - return interventionUid; - } - public InterventionDto() { itDirty = false; itNew = true; @@ -198,5 +188,15 @@ public InterventionDto(Intervention domain) { this.electronicInd = domain.getElectronicInd(); } + public String getSuperclass() { + this.superClassType = NEDSSConstant.CLASSTYPE_ACT; + return superClassType; + } + + @Override + public Long getUid() { + return interventionUid; + } + } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/InterviewDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/InterviewDto.java index 1fd91e720..0e8073080 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/InterviewDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/InterviewDto.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class InterviewDto extends BaseContainer { private static final long serialVersionUID = 1L; @@ -42,7 +43,6 @@ public class InterviewDto extends BaseContainer { private Integer versionCtrlNbr; - private String addUserName; private String lastChgUserName; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/NonPersonLivingSubjectDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/NonPersonLivingSubjectDto.java index 70088b5e3..a10c17ad8 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/NonPersonLivingSubjectDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/NonPersonLivingSubjectDto.java @@ -10,7 +10,8 @@ @Getter @Setter -public class NonPersonLivingSubjectDto extends BaseContainer implements RootDtoInterface { +@SuppressWarnings("all") +public class NonPersonLivingSubjectDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; private Long nonPersonUid; private String addReasonCd; @@ -83,159 +84,158 @@ public NonPersonLivingSubjectDto(NonPersonLivingSubject entity) { this.versionCtrlNbr = entity.getVersionCtrlNbr(); } - @Override public Long getLastChgUserId() { - return null; + return lastChgUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.lastChgUserId = aLastChgUserId; } @Override public String getJurisdictionCd() { - return null; + return jurisdictionCd; } @Override public void setJurisdictionCd(String aJurisdictionCd) { - + this.jurisdictionCd = aJurisdictionCd; } @Override public String getProgAreaCd() { - return null; + return progAreaCd; } @Override public void setProgAreaCd(String aProgAreaCd) { - + this.progAreaCd = aProgAreaCd; } @Override public Timestamp getLastChgTime() { - return null; + return lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + this.lastChgTime = aLastChgTime; } @Override public String getLocalId() { - return null; + return localId; } @Override public void setLocalId(String aLocalId) { - + this.localId = aLocalId; } @Override public Long getAddUserId() { - return null; + return addUserId; } @Override public void setAddUserId(Long aAddUserId) { - + this.addUserId = aAddUserId; } @Override public String getLastChgReasonCd() { - return null; + return lastChgReasonCd; } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + this.lastChgReasonCd = aLastChgReasonCd; } @Override public String getRecordStatusCd() { - return null; + return recordStatusCd; } @Override public void setRecordStatusCd(String aRecordStatusCd) { - + this.recordStatusCd = aRecordStatusCd; } @Override public Timestamp getRecordStatusTime() { - return null; + return recordStatusTime; } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + this.recordStatusTime = aRecordStatusTime; } @Override public String getStatusCd() { - return null; + return statusCd; } @Override public void setStatusCd(String aStatusCd) { - + this.statusCd = aStatusCd; } @Override public Timestamp getStatusTime() { - return null; + return statusTime; } @Override public void setStatusTime(Timestamp aStatusTime) { - + this.statusTime = aStatusTime; } @Override public String getSuperclass() { - return null; + return NonPersonLivingSubjectDto.class.getSuperclass().getSimpleName(); } @Override public Long getUid() { - return null; + return nonPersonUid; } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return addTime; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + this.addTime = aAddTime; } @Override public Long getProgramJurisdictionOid() { - return null; + return programJurisdictionOid; } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + this.programJurisdictionOid = aProgramJurisdictionOid; } @Override public String getSharedInd() { - return null; + return sharedInd; } @Override public void setSharedInd(String aSharedInd) { - + this.sharedInd = aSharedInd; } @Override public Integer getVersionCtrlNbr() { - return null; + return versionCtrlNbr; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/PatientEncounterDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/PatientEncounterDto.java index 4590c38b3..8fea0ccb6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/PatientEncounterDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/PatientEncounterDto.java @@ -10,7 +10,8 @@ @Getter @Setter -public class PatientEncounterDto extends BaseContainer implements RootDtoInterface { +@SuppressWarnings("all") +public class PatientEncounterDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; private Long patientEncounterUid; private String activityDurationAmt; @@ -74,7 +75,7 @@ public PatientEncounterDto(PatientEncounter entity) { this.addUserId = entity.getAddUserId(); this.admissionSourceCd = entity.getAdmissionSourceCd(); this.admissionSourceDescTxt = entity.getAdmissionSourceDescTxt(); - this.birthEncounterInd = entity.getBirthEncounterInd(); // Assuming birthEncounterInd is of type Character + this.birthEncounterInd = entity.getBirthEncounterInd(); this.cd = entity.getCd(); this.cdDescTxt = entity.getCdDescTxt(); this.confidentialityCd = entity.getConfidentialityCd(); @@ -94,124 +95,123 @@ public PatientEncounterDto(PatientEncounter entity) { this.referralSourceCd = entity.getReferralSourceCd(); this.referralSourceDescTxt = entity.getReferralSourceDescTxt(); this.repeatNbr = entity.getRepeatNbr(); - this.statusCd = entity.getStatusCd(); // Assuming statusCd is of type Character + this.statusCd = entity.getStatusCd(); this.statusTime = entity.getStatusTime(); this.txt = entity.getTxt(); this.userAffiliationTxt = entity.getUserAffiliationTxt(); this.programJurisdictionOid = entity.getProgramJurisdictionOid(); - this.sharedInd = entity.getSharedInd(); // Assuming sharedInd is of type Character + this.sharedInd = entity.getSharedInd(); this.versionCtrlNbr = entity.getVersionCtrlNbr(); } - @Override public Long getLastChgUserId() { - return null; + return lastChgUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.lastChgUserId = aLastChgUserId; } @Override public String getJurisdictionCd() { - return null; + return jurisdictionCd; } @Override public void setJurisdictionCd(String aJurisdictionCd) { - + jurisdictionCd = aJurisdictionCd; } @Override public String getProgAreaCd() { - return null; + return progAreaCd; } @Override public void setProgAreaCd(String aProgAreaCd) { - + this.progAreaCd = aProgAreaCd; } @Override public Timestamp getLastChgTime() { - return null; + return lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + lastChgTime = aLastChgTime; } @Override public String getLocalId() { - return null; + return localId; } @Override public void setLocalId(String aLocalId) { - + this.localId = aLocalId; } @Override public Long getAddUserId() { - return null; + return addUserId; } @Override public void setAddUserId(Long aAddUserId) { - + addUserId = aAddUserId; } @Override public String getLastChgReasonCd() { - return null; + return lastChgReasonCd; } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + this.lastChgReasonCd = aLastChgReasonCd; } @Override public String getRecordStatusCd() { - return null; + return recordStatusCd; } @Override public void setRecordStatusCd(String aRecordStatusCd) { - + recordStatusCd = aRecordStatusCd; } @Override public Timestamp getRecordStatusTime() { - return null; + return recordStatusTime; } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + recordStatusTime = aRecordStatusTime; } @Override public String getStatusCd() { - return null; + return statusCd; } @Override public void setStatusCd(String aStatusCd) { - + statusCd = aStatusCd; } @Override public Timestamp getStatusTime() { - return null; + return statusTime; } @Override public void setStatusTime(Timestamp aStatusTime) { - + statusTime = aStatusTime; } @Override @@ -221,41 +221,41 @@ public String getSuperclass() { @Override public Long getUid() { - return null; + return patientEncounterUid; } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return addTime; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + addTime = aAddTime; } @Override public Long getProgramJurisdictionOid() { - return null; + return programJurisdictionOid; } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + programJurisdictionOid = aProgramJurisdictionOid; } @Override public String getSharedInd() { - return null; + return sharedInd; } @Override public void setSharedInd(String aSharedInd) { - + sharedInd = aSharedInd; } @Override public Integer getVersionCtrlNbr() { - return null; + return versionCtrlNbr; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/PlaceDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/PlaceDto.java index 220f85be2..d71504e45 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/PlaceDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/PlaceDto.java @@ -10,41 +10,40 @@ @Getter @Setter -public class PlaceDto extends BaseContainer implements RootDtoInterface -{ - private static final long serialVersionUID = 1L; - private Long placeUid; - private String addReasonCd; - private Timestamp addTime; - private Long addUserId; - private String cd; - private String cdDescTxt; - private String description; - private String placeContact; - private String placeUrl; - private String placeAppNm; - private String durationAmt; - private String durationUnitCd; - private Timestamp fromTime; - private String lastChgReasonCd; +@SuppressWarnings("all") +public class PlaceDto extends BaseContainer implements RootDtoInterface { + private static final long serialVersionUID = 1L; + private Long placeUid; + private String addReasonCd; + private Timestamp addTime; + private Long addUserId; + private String cd; + private String cdDescTxt; + private String description; + private String placeContact; + private String placeUrl; + private String placeAppNm; + private String durationAmt; + private String durationUnitCd; + private Timestamp fromTime; + private String lastChgReasonCd; private Timestamp lastChgTime; - private Long lastChgUserId; - private String localId; - private String nm; - private String recordStatusCd; - private Timestamp recordStatusTime; - private String statusCd; - private Timestamp statusTime; - private Timestamp toTime; - private String userAffiliationTxt; - private Integer versionCtrlNbr; - private String progAreaCd = null; - private String jurisdictionCd = null; - private Long programJurisdictionOid = null; - private String sharedInd = null; + private Long lastChgUserId; + private String localId; + private String nm; + private String recordStatusCd; + private Timestamp recordStatusTime; + private String statusCd; + private Timestamp statusTime; + private Timestamp toTime; + private String userAffiliationTxt; + private Integer versionCtrlNbr; + private String progAreaCd = null; + private String jurisdictionCd = null; + private Long programJurisdictionOid = null; + private String sharedInd = null; public PlaceDto() { - } public PlaceDto(Place place) { @@ -61,7 +60,6 @@ public PlaceDto(Place place) { place.getCntryCd(); // Assuming the above logic is used to construct the place contact information - this.durationAmt = place.getDurationAmt(); this.durationUnitCd = place.getDurationUnitCd(); this.fromTime = place.getFromTime(); @@ -79,160 +77,158 @@ public PlaceDto(Place place) { this.versionCtrlNbr = place.getVersionCtrlNbr(); } - - @Override public Long getLastChgUserId() { - return null; + return lastChgUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.lastChgUserId = aLastChgUserId; } @Override public String getJurisdictionCd() { - return null; + return jurisdictionCd; } @Override public void setJurisdictionCd(String aJurisdictionCd) { - + this.jurisdictionCd = aJurisdictionCd; } @Override public String getProgAreaCd() { - return null; + return progAreaCd; } @Override public void setProgAreaCd(String aProgAreaCd) { - + this.progAreaCd = aProgAreaCd; } @Override public Timestamp getLastChgTime() { - return null; + return lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + this.lastChgTime = aLastChgTime; } @Override public String getLocalId() { - return null; + return localId; } @Override public void setLocalId(String aLocalId) { - + this.localId = aLocalId; } @Override public Long getAddUserId() { - return null; + return addUserId; } @Override public void setAddUserId(Long aAddUserId) { - + this.addUserId = aAddUserId; } @Override public String getLastChgReasonCd() { - return null; + return lastChgReasonCd; } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + this.lastChgReasonCd = aLastChgReasonCd; } @Override public String getRecordStatusCd() { - return null; + return recordStatusCd; } @Override public void setRecordStatusCd(String aRecordStatusCd) { - + this.recordStatusCd = aRecordStatusCd; } @Override public Timestamp getRecordStatusTime() { - return null; + return recordStatusTime; } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + this.recordStatusTime = aRecordStatusTime; } @Override public String getStatusCd() { - return null; + return statusCd; } @Override public void setStatusCd(String aStatusCd) { - + this.statusCd = aStatusCd; } @Override public Timestamp getStatusTime() { - return null; + return statusTime; } @Override public void setStatusTime(Timestamp aStatusTime) { - + this.statusTime = aStatusTime; } @Override public String getSuperclass() { - return null; + return superClassType; } @Override public Long getUid() { - return null; + return placeUid; } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return addTime; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + this.addTime = aAddTime; } @Override public Long getProgramJurisdictionOid() { - return null; + return programJurisdictionOid; } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + this.programJurisdictionOid = aProgramJurisdictionOid; } @Override public String getSharedInd() { - return null; + return sharedInd; } @Override public void setSharedInd(String aSharedInd) { - + this.sharedInd = aSharedInd; } @Override public Integer getVersionCtrlNbr() { - return null; + return versionCtrlNbr; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/PublicHealthCaseDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/PublicHealthCaseDto.java index d98b62854..bb91f6b87 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/PublicHealthCaseDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/PublicHealthCaseDto.java @@ -12,6 +12,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PublicHealthCaseDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; @@ -129,17 +130,6 @@ public PublicHealthCaseDto() { itDelete = false; } - public String getSuperclass() { - this.superClassType = NEDSSConstant.CLASSTYPE_ACT; - return superClassType; - } - - @Override - public Long getUid() { - return publicHealthCaseUid; - } - - public PublicHealthCaseDto(PublicHealthCase publicHealthCase) { this.publicHealthCaseUid = publicHealthCase.getPublicHealthCaseUid(); this.activityDurationAmt = publicHealthCase.getActivityDurationAmt(); @@ -236,7 +226,15 @@ public PublicHealthCaseDto(PublicHealthCase publicHealthCase) { // this.currentPatientUid = publicHealthCase.getCurrentPatientUid(); } + public String getSuperclass() { + this.superClassType = NEDSSConstant.CLASSTYPE_ACT; + return superClassType; + } + @Override + public Long getUid() { + return publicHealthCaseUid; + } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ReferralDto.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ReferralDto.java index 8aefeb0f7..76f592d28 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ReferralDto.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/model/dto/phc/ReferralDto.java @@ -10,7 +10,8 @@ @Getter @Setter -public class ReferralDto extends BaseContainer implements RootDtoInterface { +@SuppressWarnings("all") +public class ReferralDto extends BaseContainer implements RootDtoInterface { private static final long serialVersionUID = 1L; private Long referralUid; private String activityDurationAmt; @@ -89,159 +90,158 @@ public ReferralDto(Referral referral) { this.versionCtrlNbr = referral.getVersionCtrlNbr(); } - @Override public Long getLastChgUserId() { - return null; + return lastChgUserId; } @Override public void setLastChgUserId(Long aLastChgUserId) { - + this.lastChgUserId = aLastChgUserId; } @Override public String getJurisdictionCd() { - return null; + return jurisdictionCd; } @Override public void setJurisdictionCd(String aJurisdictionCd) { - + this.jurisdictionCd = aJurisdictionCd; } @Override public String getProgAreaCd() { - return null; + return progAreaCd; } @Override public void setProgAreaCd(String aProgAreaCd) { - + this.progAreaCd = aProgAreaCd; } @Override public Timestamp getLastChgTime() { - return null; + return lastChgTime; } @Override public void setLastChgTime(Timestamp aLastChgTime) { - + this.lastChgTime = aLastChgTime; } @Override public String getLocalId() { - return null; + return localId; } @Override public void setLocalId(String aLocalId) { - + this.localId = aLocalId; } @Override public Long getAddUserId() { - return null; + return addUserId; } @Override public void setAddUserId(Long aAddUserId) { - + this.addUserId = aAddUserId; } @Override public String getLastChgReasonCd() { - return null; + return lastChgReasonCd; } @Override public void setLastChgReasonCd(String aLastChgReasonCd) { - + this.lastChgReasonCd = aLastChgReasonCd; } @Override public String getRecordStatusCd() { - return null; + return recordStatusCd; } @Override public void setRecordStatusCd(String aRecordStatusCd) { - + this.recordStatusCd = aRecordStatusCd; } @Override public Timestamp getRecordStatusTime() { - return null; + return recordStatusTime; } @Override public void setRecordStatusTime(Timestamp aRecordStatusTime) { - + this.recordStatusTime = aRecordStatusTime; } @Override public String getStatusCd() { - return null; + return statusCd; } @Override public void setStatusCd(String aStatusCd) { - + this.statusCd = aStatusCd; } @Override public Timestamp getStatusTime() { - return null; + return statusTime; } @Override public void setStatusTime(Timestamp aStatusTime) { - + this.statusTime = aStatusTime; } @Override public String getSuperclass() { - return null; + return superClassType; } @Override public Long getUid() { - return null; + return referralUid; } @Override - public void setAddTime(Timestamp aAddTime) { - + public Timestamp getAddTime() { + return addTime; } @Override - public Timestamp getAddTime() { - return null; + public void setAddTime(Timestamp aAddTime) { + this.addTime = aAddTime; } @Override public Long getProgramJurisdictionOid() { - return null; + return programJurisdictionOid; } @Override public void setProgramJurisdictionOid(Long aProgramJurisdictionOid) { - + this.programJurisdictionOid = aProgramJurisdictionOid; } @Override public String getSharedInd() { - return null; + return sharedInd; } @Override public void setSharedInd(String aSharedInd) { - + this.sharedInd = aSharedInd; } @Override public Integer getVersionCtrlNbr() { - return null; + return versionCtrlNbr; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/msgoute/model/NbsInterfaceModel.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/msgoute/model/NbsInterfaceModel.java index 6b36d30f4..d2228b783 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/msgoute/model/NbsInterfaceModel.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/msgoute/model/NbsInterfaceModel.java @@ -12,10 +12,11 @@ @NoArgsConstructor @Getter @Setter +@SuppressWarnings("all") public class NbsInterfaceModel { @Id - @GeneratedValue( strategy = GenerationType.IDENTITY ) - @Column(name="nbs_interface_uid") + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "nbs_interface_uid") private Integer nbsInterfaceUid; @Column(name = "payload", length = 2048, nullable = false) diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/StoredProcRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/StoredProcRepository.java index 65067b71b..1cd85ac94 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/StoredProcRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/StoredProcRepository.java @@ -9,7 +9,7 @@ import java.sql.Timestamp; @Repository -public interface StoredProcRepository extends CrudRepository { +public interface StoredProcRepository extends CrudRepository { @Procedure(name = "UpdateSpecimenCollDate_SP") void updateSpecimenCollDateSP(@Param("NBSInterfaceUid") Long nbsInterfaceUid, @Param("specimentCollectionDate") Timestamp specimentCollectionDate); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/stored_proc/ObservationMatchStoredProcRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/stored_proc/ObservationMatchStoredProcRepository.java index 9cda6a441..2442ec108 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/stored_proc/ObservationMatchStoredProcRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/stored_proc/ObservationMatchStoredProcRepository.java @@ -27,9 +27,8 @@ public Long getMatchedObservation(EdxLabInformationDto edxLabInformationDto) thr String clia = edxLabInformationDto.getSendingFacilityClia(); String fillerNumber = edxLabInformationDto.getFillerNumber(); Timestamp specimenCollectionDate = observationContainer.getTheObservationDto().getEffectiveFromTime(); - String orderedTestCode= observationContainer.getTheObservationDto().getCd(); - if (checkInvalidFillerSpecimenAndOrderedTest(fillerNumber, specimenCollectionDate, orderedTestCode, clia)) - { + String orderedTestCode = observationContainer.getTheObservationDto().getCd(); + if (checkInvalidFillerSpecimenAndOrderedTest(fillerNumber, specimenCollectionDate, orderedTestCode, clia)) { return null; // no match } @@ -66,7 +65,7 @@ public Long getMatchedObservation(EdxLabInformationDto edxLabInformationDto) thr Long observationUid = (Long) storedProcedure.getOutputParameterValue("Observation_uid"); - if (observationUid > 0) { + if (observationUid != null && observationUid > 0) { matchedUID = observationUid; } @@ -77,11 +76,11 @@ public Long getMatchedObservation(EdxLabInformationDto edxLabInformationDto) thr } - protected boolean checkInvalidFillerSpecimenAndOrderedTest( + protected boolean checkInvalidFillerSpecimenAndOrderedTest( String fillerNumber, Timestamp specimenCollectionDate, String orderedTestCode, String clia ) { - return fillerNumber == null || specimenCollectionDate==null || orderedTestCode==null || clia==null; + return fillerNumber == null || specimenCollectionDate == null || orderedTestCode == null || clia == null; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/Act.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/Act.java index 31af9e0bf..462e1342e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/Act.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/Act.java @@ -4,11 +4,13 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; @Entity @Table(name = "Act") -@Data +@Getter +@Setter public class Act { @Id @Column(name = "act_uid") diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActId.java index f6560e5c4..6a5093e6e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActId.java @@ -3,14 +3,16 @@ import gov.cdc.dataprocessing.model.dto.act.ActIdDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.ActIdId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @Entity @Table(name = "Act_id") -@Data +@Getter +@Setter @IdClass(ActIdId.class) public class ActId implements Serializable { private static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActLocatorParticipation.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActLocatorParticipation.java index eaac0a143..29e25543e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActLocatorParticipation.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActLocatorParticipation.java @@ -2,11 +2,13 @@ import gov.cdc.dataprocessing.model.dto.act.ActivityLocatorParticipationDto; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; -@Data +@Getter +@Setter @Entity @Table(name = "Act_locator_participation") public class ActLocatorParticipation { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActRelationship.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActRelationship.java index 666c5f5ad..80126a504 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActRelationship.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActRelationship.java @@ -3,14 +3,16 @@ import gov.cdc.dataprocessing.model.dto.act.ActRelationshipDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.ActRelationshipId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @Entity @Table(name = "Act_relationship") -@Data +@Getter +@Setter @IdClass(ActRelationshipId.class) public class ActRelationship implements Serializable { private static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActRelationshipHistory.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActRelationshipHistory.java index a82784c2f..d48365499 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActRelationshipHistory.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActRelationshipHistory.java @@ -3,7 +3,8 @@ import gov.cdc.dataprocessing.model.dto.act.ActRelationshipDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.ActRelationshipId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @@ -11,7 +12,8 @@ @Entity @Table(name = "Act_relationship_hist") @IdClass(ActRelationshipId.class) -@Data +@Getter +@Setter public class ActRelationshipHistory implements Serializable { private static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUser.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUser.java index 1dad2812b..0b1764110 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUser.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUser.java @@ -4,13 +4,14 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; - -@Data +@Getter +@Setter @Entity @Table(name = "Auth_user") public class AuthUser { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUserRealizedRole.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUserRealizedRole.java index 74d10c49b..e69ef8c89 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUserRealizedRole.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUserRealizedRole.java @@ -1,10 +1,12 @@ package gov.cdc.dataprocessing.repository.nbs.odse.model.auth; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; -@Data +@Getter +@Setter public class AuthUserRealizedRole { private String permSetNm; private Long authUserRoleUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/custom_model/QuestionRequiredNnd.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/custom_model/QuestionRequiredNnd.java index 5a387e75e..3bbf59ae6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/custom_model/QuestionRequiredNnd.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/custom_model/QuestionRequiredNnd.java @@ -1,8 +1,10 @@ package gov.cdc.dataprocessing.repository.nbs.odse.model.custom_model; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter public class QuestionRequiredNnd { private Long nbsQuestionUid; private String questionIdentifier; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/dsm/DsmAlgorithm.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/dsm/DsmAlgorithm.java index ab66b80fd..236f773f5 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/dsm/DsmAlgorithm.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/dsm/DsmAlgorithm.java @@ -1,11 +1,13 @@ package gov.cdc.dataprocessing.repository.nbs.odse.model.dsm; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; -@Data +@Getter +@Setter @Entity @Table(name = "dsm_algorithm") public class DsmAlgorithm { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/edx/EdxDocument.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/edx/EdxDocument.java index 422d90462..cf81a5b2c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/edx/EdxDocument.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/edx/EdxDocument.java @@ -12,7 +12,7 @@ @Getter @Setter @Table(name = "EDX_Document") -public class EdxDocument { +public class EdxDocument { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/edx/EdxEventProcess.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/edx/EdxEventProcess.java index 19252f3d1..e540ef84b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/edx/EdxEventProcess.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/edx/EdxEventProcess.java @@ -5,13 +5,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "EDX_event_process") -@Data +@Getter +@Setter public class EdxEventProcess { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/entity/EntityId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/entity/EntityId.java index c4a01e6ed..da7124002 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/entity/EntityId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/entity/EntityId.java @@ -3,14 +3,16 @@ import gov.cdc.dataprocessing.model.dto.entity.EntityIdDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.EntityIdId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; import static gov.cdc.dataprocessing.utilities.time.TimeStampUtil.getCurrentTimeStamp; -@Data +@Getter +@Setter @Entity @Table(name = "Entity_id") @IdClass(EntityIdId.class) @@ -104,6 +106,7 @@ public class EntityId { public EntityId() { } + public EntityId(EntityIdDto entityIdDto) { var timestamp = getCurrentTimeStamp(); this.entityUid = entityIdDto.getEntityUid(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/entity/EntityLocatorParticipation.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/entity/EntityLocatorParticipation.java index fadd46263..667166299 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/entity/EntityLocatorParticipation.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/entity/EntityLocatorParticipation.java @@ -4,7 +4,8 @@ import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.EntityLocatorParticipationId; import gov.cdc.dataprocessing.utilities.auth.AuthUtil; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @@ -13,7 +14,8 @@ @Entity @Table(name = "Entity_locator_participation", schema = "dbo") @IdClass(EntityLocatorParticipationId.class) // Specify the IdClass -@Data +@Getter +@Setter public class EntityLocatorParticipation { @Id @@ -24,7 +26,7 @@ public class EntityLocatorParticipation { @Column(name = "locator_uid", nullable = false) private Long locatorUid; - // @Version + // @Version @Column(name = "version_ctrl_nbr", nullable = false) private Integer versionCtrlNbr; @@ -113,7 +115,7 @@ public EntityLocatorParticipation(EntityLocatorParticipationDto entityLocatorPar this.addUserId = entityLocatorParticipationDto.getAddUserId(); this.addTime = entityLocatorParticipationDto.getAddTime(); } - + this.cd = entityLocatorParticipationDto.getCd(); this.cdDescTxt = entityLocatorParticipationDto.getCdDescTxt(); this.classCd = entityLocatorParticipationDto.getClassCd(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/entity/Role.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/entity/Role.java index 217f80359..91361127e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/entity/Role.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/entity/Role.java @@ -5,12 +5,14 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; -@Data +@Getter +@Setter @Entity @Table(name = "Role") public class Role { @@ -95,6 +97,7 @@ public class Role { public Role() { } + public Role(RoleDto roleDto) { this.subjectEntityUid = roleDto.getSubjectEntityUid(); this.code = roleDto.getCd(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/generic_helper/LocalUidGenerator.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/generic_helper/LocalUidGenerator.java index 8dd51a898..9eb58dc88 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/generic_helper/LocalUidGenerator.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/generic_helper/LocalUidGenerator.java @@ -5,10 +5,12 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; @Entity -@Data +@Getter +@Setter @Table(name = "Local_UID_generator") public class LocalUidGenerator { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/generic_helper/PrepareEntity.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/generic_helper/PrepareEntity.java index 81d911686..e8209c068 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/generic_helper/PrepareEntity.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/generic_helper/PrepareEntity.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PrepareEntity { private String localId = null; private Long addUserId = null; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActIdId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActIdId.java index 3c0fa0dba..51ef1a179 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActIdId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActIdId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ActIdId implements Serializable { private Long actUid; private Integer actIdSeq; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActRelationshipId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActRelationshipId.java index fbcc53cd5..d3a661827 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActRelationshipId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActRelationshipId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ActRelationshipId implements Serializable { private Long sourceActUid; private Long targetActUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityIdId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityIdId.java index c946267f1..df8de04f1 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityIdId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityIdId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EntityIdId implements Serializable { private Long entityUid; private Integer entityIdSeq; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityLocatorParticipationId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityLocatorParticipationId.java index f3a30712a..3cad027f2 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityLocatorParticipationId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityLocatorParticipationId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class EntityLocatorParticipationId implements Serializable { private Long entityUid; private Long locatorUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/NNDActivityLogId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/NNDActivityLogId.java index a5903a715..1a9db5cda 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/NNDActivityLogId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/NNDActivityLogId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class NNDActivityLogId implements Serializable { private Long nndActivityLogUid; private Integer nndActivityLogSeq; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueCodedId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueCodedId.java index 8baa59c6b..90daef5a0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueCodedId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueCodedId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ObsValueCodedId implements Serializable { private Long observationUid; private String code; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueDateId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueDateId.java index 1240a702a..dfd315b14 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueDateId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueDateId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ObsValueDateId implements Serializable { private Long observationUid; private Integer obsValueDateSeq; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueNumericId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueNumericId.java index f8cfc534b..7262fb9a3 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueNumericId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueNumericId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ObsValueNumericId implements Serializable { private Long observationUid; private Integer obsValueNumericSeq; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueTxtId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueTxtId.java index 138e6f82d..130e41904 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueTxtId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueTxtId.java @@ -8,6 +8,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ObsValueTxtId implements Serializable { private Long observationUid; private Integer obsValueTxtSeq; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationInterpId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationInterpId.java index b9a24441f..6bdf21ec7 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationInterpId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationInterpId.java @@ -8,6 +8,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ObservationInterpId implements Serializable { private Long observationUid; private String interpretationCd; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationReasonId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationReasonId.java index 3c8fb7321..dbf7942ac 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationReasonId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationReasonId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ObservationReasonId implements Serializable { private Long observationUid; private String reasonCd; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationHistId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationHistId.java index 0dfe33047..fdfcd573d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationHistId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationHistId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class OrganizationHistId implements Serializable { private Long organizationUid; private int versionCtrlNbr; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameHistId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameHistId.java index fcf245a50..8f87fe1ac 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameHistId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameHistId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class OrganizationNameHistId implements Serializable { private Long organizationUid; private int organizationNameSeq; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameId.java index d08fa582d..a986804f8 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class OrganizationNameId implements Serializable { private Long organizationUid; private int organizationNameSeq; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationHistId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationHistId.java index 3203aa3f7..1ce8934fa 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationHistId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationHistId.java @@ -7,7 +7,8 @@ @Getter @Setter -public class ParticipationHistId implements Serializable { +@SuppressWarnings("all") +public class ParticipationHistId implements Serializable { private Long subjectEntityUid; private Long actUid; private String typeCd; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationId.java index 6d2000a44..1d361b95c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class ParticipationId implements Serializable { private Long subjectEntityUid; private Long actUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonEthnicGroupId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonEthnicGroupId.java index f8a667116..622212a08 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonEthnicGroupId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonEthnicGroupId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PersonEthnicGroupId implements Serializable { private Long personUid; private String ethnicGroupCd; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonNameId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonNameId.java index aa68f8ce1..56203b23d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonNameId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonNameId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PersonNameId implements Serializable { private Long personUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonRaceId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonRaceId.java index 099c9ef84..dddcbd320 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonRaceId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonRaceId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PersonRaceId implements Serializable { private Long personUid; private String raceCd; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/intervention/Intervention.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/intervention/Intervention.java index 15aac695e..10fa93258 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/intervention/Intervention.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/intervention/Intervention.java @@ -1,4 +1,5 @@ package gov.cdc.dataprocessing.repository.nbs.odse.model.intervention; + import gov.cdc.dataprocessing.model.dto.phc.InterventionDto; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -13,7 +14,7 @@ @Getter @Setter @Table(name = "Intervention") -public class Intervention { +public class Intervention { @Id @Column(name = "intervention_uid") diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/locator/PhysicalLocator.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/locator/PhysicalLocator.java index c07c3934a..e14437c45 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/locator/PhysicalLocator.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/locator/PhysicalLocator.java @@ -5,14 +5,16 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; import java.util.Arrays; @Entity @Table(name = "Physical_locator", schema = "dbo") -@Data +@Getter +@Setter public class PhysicalLocator { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/locator/PostalLocator.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/locator/PostalLocator.java index e7cc89359..2df0bf920 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/locator/PostalLocator.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/locator/PostalLocator.java @@ -5,14 +5,16 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Postal_locator", schema = "dbo") -@Data +@Getter +@Setter public class PostalLocator { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/locator/TeleLocator.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/locator/TeleLocator.java index 3a11dbbf2..f1674187b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/locator/TeleLocator.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/locator/TeleLocator.java @@ -5,13 +5,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Tele_locator", schema = "dbo") -@Data +@Getter +@Setter public class TeleLocator { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/EdxActivityDetailLog.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/EdxActivityDetailLog.java index 38a6e6192..aeae1224e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/EdxActivityDetailLog.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/EdxActivityDetailLog.java @@ -46,6 +46,7 @@ public class EdxActivityDetailLog { public EdxActivityDetailLog() { } + public EdxActivityDetailLog(EDXActivityDetailLogDto eDXActivityDtlLogDto) { //this.id=eDXActivityDtlLogDto.getEdxActivityDetailLogUid(); this.edxActivityLogUid = eDXActivityDtlLogDto.getEdxActivityLogUid(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/EdxActivityLog.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/EdxActivityLog.java index 1c8886a9b..701960ca9 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/EdxActivityLog.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/EdxActivityLog.java @@ -13,7 +13,7 @@ @Table(name = "EDX_activity_log") public class EdxActivityLog { @Id - @GeneratedValue( strategy = GenerationType.IDENTITY ) + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "edx_activity_log_uid", nullable = false) private Long id; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/MessageLog.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/MessageLog.java index 3aeafa8a1..feab931c7 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/MessageLog.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/MessageLog.java @@ -14,7 +14,7 @@ @Getter @Setter @Table(name = "message_log") -public class MessageLog { +public class MessageLog { @Id @Column(name = "message_log_uid") diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/NNDActivityLog.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/NNDActivityLog.java index 207be708a..313523642 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/NNDActivityLog.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/log/NNDActivityLog.java @@ -3,14 +3,16 @@ import gov.cdc.dataprocessing.model.dto.log.NNDActivityLogDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.NNDActivityLogId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @Entity @Table(name = "NND_Activity_log") -@Data +@Getter +@Setter @IdClass(NNDActivityLogId.class) public class NNDActivityLog implements Serializable { private static final long serialVersionUID = 1L; @@ -37,7 +39,7 @@ public class NNDActivityLog implements Serializable { private Timestamp recordStatusTime; @Column(name = "status_cd", length = 1, nullable = false) - private String statusCd; + private String statusCd; @Column(name = "status_time", nullable = false) @Temporal(TemporalType.TIMESTAMP) @@ -49,6 +51,7 @@ public class NNDActivityLog implements Serializable { public NNDActivityLog() { } + public NNDActivityLog(NNDActivityLogDto activityLogDT) { this.nndActivityLogUid = activityLogDT.getNndActivityLogUid(); this.nndActivityLogSeq = activityLogDT.getNndActivityLogSeq(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/lookup/LookupAnswer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/lookup/LookupAnswer.java index 995b8337b..33316b76d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/lookup/LookupAnswer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/lookup/LookupAnswer.java @@ -2,13 +2,15 @@ import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @Entity -@Data +@Getter +@Setter @Table(name = "LOOKUP_ANSWER") public class LookupAnswer implements Serializable { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/lookup/LookupQuestion.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/lookup/LookupQuestion.java index 6345d8b26..51b4a3672 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/lookup/LookupQuestion.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/lookup/LookupQuestion.java @@ -1,13 +1,15 @@ package gov.cdc.dataprocessing.repository.nbs.odse.model.lookup; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @Entity -@Data +@Getter +@Setter @Table(name = "LOOKUP_QUESTION") public class LookupQuestion implements Serializable { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/matching/EdxEntityMatch.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/matching/EdxEntityMatch.java index 9e8a0bbb6..71bdbffde 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/matching/EdxEntityMatch.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/matching/EdxEntityMatch.java @@ -3,11 +3,13 @@ import gov.cdc.dataprocessing.model.dto.matching.EdxEntityMatchDto; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; @Entity @Table(name = "EDX_entity_match") -@Data +@Getter +@Setter public class EdxEntityMatch { @Id @@ -30,6 +32,7 @@ public class EdxEntityMatch { public EdxEntityMatch() { } + public EdxEntityMatch(EdxEntityMatchDto edxEntityMatchDto) { this.edxEntityMatchUid = edxEntityMatchDto.getEdxEntityMatchUid(); this.entityUid = edxEntityMatchDto.getEntityUid(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/matching/EdxPatientMatch.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/matching/EdxPatientMatch.java index bbaef708b..ce7ab273c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/matching/EdxPatientMatch.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/matching/EdxPatientMatch.java @@ -2,11 +2,13 @@ import gov.cdc.dataprocessing.model.dto.matching.EdxPatientMatchDto; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; @Entity @Table(name = "EDX_patient_match") -@Data +@Getter +@Setter public class EdxPatientMatch { @Id @@ -29,6 +31,7 @@ public class EdxPatientMatch { public EdxPatientMatch() { } + public EdxPatientMatch(EdxPatientMatchDto dto) { this.patientUid = dto.getPatientUid(); this.matchString = dto.getMatchString(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/material/ManufacturedMaterial.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/material/ManufacturedMaterial.java index 805bee2e4..87bd6e05e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/material/ManufacturedMaterial.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/material/ManufacturedMaterial.java @@ -3,13 +3,15 @@ import gov.cdc.dataprocessing.model.dto.material.ManufacturedMaterialDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.ManufacturedMaterialId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Manufactured_material") -@Data +@Getter +@Setter @IdClass(ManufacturedMaterialId.class) public class ManufacturedMaterial { private static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/material/Material.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/material/Material.java index e2a5f027c..6a319aa76 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/material/Material.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/material/Material.java @@ -5,12 +5,14 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; -@Data +@Getter +@Setter @Entity @Table(name = "Material") public class Material { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsActEntity.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsActEntity.java index 65b9b743d..47f781df0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsActEntity.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsActEntity.java @@ -2,13 +2,15 @@ import gov.cdc.dataprocessing.model.dto.nbs.NbsActEntityDto; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "NBS_act_entity") -@Data +@Getter +@Setter public class NbsActEntity { @Id @@ -51,6 +53,7 @@ public class NbsActEntity { public NbsActEntity() { } + public NbsActEntity(NbsActEntityDto nbsActEntityDto) { this.nbsActEntityUid = nbsActEntityDto.getNbsActEntityUid(); this.addTime = nbsActEntityDto.getAddTime(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsActEntityHist.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsActEntityHist.java index cb6b51429..496a70eea 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsActEntityHist.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsActEntityHist.java @@ -6,13 +6,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "NBS_act_entity_hist") -@Data +@Getter +@Setter public class NbsActEntityHist { @Id @@ -54,6 +56,7 @@ public class NbsActEntityHist { public NbsActEntityHist() { } + public NbsActEntityHist(NbsActEntityDto nbsActEntityDto) { this.nbsActEntityUid = nbsActEntityDto.getNbsActEntityUid(); this.addTime = nbsActEntityDto.getAddTime(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsAnswer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsAnswer.java index 44db15146..0fa062f3a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsAnswer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsAnswer.java @@ -5,13 +5,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "nbs_answer") -@Data +@Getter +@Setter public class NbsAnswer { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsAnswerHist.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsAnswerHist.java index 3b7a89ef1..eafc5c0d9 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsAnswerHist.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsAnswerHist.java @@ -5,13 +5,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "nbs_answer_hist") -@Data +@Getter +@Setter public class NbsAnswerHist { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsCaseAnswer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsCaseAnswer.java index 434cd9319..3e0d1e101 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsCaseAnswer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsCaseAnswer.java @@ -5,13 +5,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "NBS_case_answer") -@Data +@Getter +@Setter public class NbsCaseAnswer { @Id @@ -79,7 +81,6 @@ public NbsCaseAnswer(NbsCaseAnswerDto nbsCaseAnswerDto) { this.recordStatusCd = nbsCaseAnswerDto.getRecordStatusCd(); this.recordStatusTime = nbsCaseAnswerDto.getRecordStatusTime(); this.seqNbr = nbsCaseAnswerDto.getSeqNbr(); - this.answerLargeTxt = nbsCaseAnswerDto.getAnswerLargeTxt().toString(); this.nbsTableMetadataUid = nbsCaseAnswerDto.getNbsTableMetadataUid(); this.nbsUiMetadataVerCtrlNbr = nbsCaseAnswerDto.getNbsQuestionVersionCtrlNbr(); this.answerGroupSeqNbr = nbsCaseAnswerDto.getAnswerGroupSeqNbr(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsDocument.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsDocument.java index 82c022b48..2b4d198e4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsDocument.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsDocument.java @@ -5,13 +5,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "NBS_document") -@Data +@Getter +@Setter public class NbsDocument { @Id @Column(name = "nbs_document_uid") @@ -101,14 +103,14 @@ public class NbsDocument { @Column(name = "processing_decision_cd") private String processingDecisionCd; - public NbsDocument() { + public NbsDocument() { } public NbsDocument(NBSDocumentDto nbsDocumentDto) { this.nbsDocumentUid = nbsDocumentDto.getNbsDocumentUid(); - this.docPayload = nbsDocumentDto.getDocPayload().toString(); + this.docPayload = nbsDocumentDto.getDocPayload(); this.docTypeCd = nbsDocumentDto.getDocTypeCd(); this.localId = nbsDocumentDto.getLocalId(); this.recordStatusCd = nbsDocumentDto.getRecordStatusCd(); @@ -131,7 +133,7 @@ public NbsDocument(NBSDocumentDto nbsDocumentDto) { this.nbsInterfaceUid = nbsDocumentDto.getNbsInterfaceUid(); this.sendingAppEventId = nbsDocumentDto.getSendingAppEventId(); this.sendingAppPatientId = nbsDocumentDto.getSendingAppPatientId(); - this.phdcDocDerived = nbsDocumentDto.getPhdcDocDerived().toString(); + this.phdcDocDerived = nbsDocumentDto.getPhdcDocDerived(); this.payloadViewIndCd = nbsDocumentDto.getPayloadViewIndCd(); this.externalVersionCtrlNbr = nbsDocumentDto.getExternalVersionCtrlNbr(); this.processingDecisionTxt = nbsDocumentDto.getProcessingDecisiontxt(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsDocumentHist.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsDocumentHist.java index abda55f60..2a78da568 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsDocumentHist.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsDocumentHist.java @@ -5,14 +5,16 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "NBS_document_hist") -@Data +@Getter +@Setter public class NbsDocumentHist { @Id @Column(name = "nbs_document_hist_uid") diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsNote.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsNote.java index 768ba6359..e1c8f2e13 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsNote.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsNote.java @@ -5,11 +5,13 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; -@Data +@Getter +@Setter @Entity @Table(name = "NBS_note") public class NbsNote { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsUiMetaData.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsUiMetaData.java index 21ef91e08..b21dd52f6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsUiMetaData.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/nbs/NbsUiMetaData.java @@ -1,14 +1,16 @@ package gov.cdc.dataprocessing.repository.nbs.odse.model.nbs; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "NBS_ui_metadata") -@Data +@Getter +@Setter public class NbsUiMetaData { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/notification/Notification.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/notification/Notification.java index fb39d7784..21a461121 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/notification/Notification.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/notification/Notification.java @@ -11,7 +11,7 @@ @Getter @Setter @Table(name = "Notification") -public class Notification { +public class Notification { @Id @Column(name = "notification_uid") diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueCoded.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueCoded.java index 329c0771f..5621215e7 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueCoded.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueCoded.java @@ -3,12 +3,14 @@ import gov.cdc.dataprocessing.model.dto.observation.ObsValueCodedDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.ObsValueCodedId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; -@Data +@Getter +@Setter @Entity @Table(name = "Obs_value_coded") @IdClass(ObsValueCodedId.class) @@ -51,7 +53,7 @@ public class ObsValueCoded implements Serializable { private String altCdSystemDescTxt; @Column(name = "code_derived_ind") - private String codeDerivedInd; + private String codeDerivedInd; // Constructors, getters, and setters (Lombok-generated) // diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueDate.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueDate.java index 5e58243fd..06ddbdae0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueDate.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueDate.java @@ -3,14 +3,16 @@ import gov.cdc.dataprocessing.model.dto.observation.ObsValueDateDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.ObsValueDateId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @Entity @Table(name = "Obs_value_date") -@Data +@Getter +@Setter @IdClass(ObsValueDateId.class) public class ObsValueDate implements Serializable { private static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueNumeric.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueNumeric.java index 656d18635..a5437fac1 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueNumeric.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueNumeric.java @@ -3,12 +3,14 @@ import gov.cdc.dataprocessing.model.dto.observation.ObsValueNumericDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.ObsValueNumericId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.math.BigDecimal; -@Data +@Getter +@Setter @Entity @Table(name = "Obs_value_numeric") @IdClass(ObsValueNumericId.class) @@ -52,8 +54,9 @@ public class ObsValueNumeric implements Serializable { // Relationships if needed public ObsValueNumeric() { - + } + public ObsValueNumeric(ObsValueNumericDto obsValueNumericDto) { this.observationUid = obsValueNumericDto.getObservationUid(); this.obsValueNumericSeq = obsValueNumericDto.getObsValueNumericSeq(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueTxt.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueTxt.java index ce16e8ac4..811352048 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueTxt.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObsValueTxt.java @@ -3,12 +3,14 @@ import gov.cdc.dataprocessing.model.dto.observation.ObsValueTxtDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.ObsValueTxtId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; -@Data +@Getter +@Setter @Entity @Table(name = "Obs_value_txt") @IdClass(ObsValueTxtId.class) @@ -51,6 +53,6 @@ public ObsValueTxt(ObsValueTxtDto obsValueTxtDto) { } public ObsValueTxt() { - + } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation.java index 5b25b9f0e..029a2c471 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation.java @@ -5,14 +5,16 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @Entity @Table(name = "Observation") -@Data +@Getter +@Setter public class Observation implements Serializable { protected static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObservationBase.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObservationBase.java index 5378cd491..24f95fbbc 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObservationBase.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObservationBase.java @@ -4,14 +4,16 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @Entity @Table(name = "Observation") -@Data +@Getter +@Setter public class ObservationBase implements Serializable { protected static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObservationInterp.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObservationInterp.java index 4bfbba7f5..a6a963f7d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObservationInterp.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObservationInterp.java @@ -3,12 +3,14 @@ import gov.cdc.dataprocessing.model.dto.observation.ObservationInterpDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.ObservationInterpId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; -@Data +@Getter +@Setter @Entity @Table(name = "Observation_interp") @IdClass(ObservationInterpId.class) diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObservationReason.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObservationReason.java index cd72f584e..1472e49ec 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObservationReason.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/ObservationReason.java @@ -3,10 +3,12 @@ import gov.cdc.dataprocessing.model.dto.observation.ObservationReasonDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.ObservationReasonId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter @Entity @Table(name = "Observation_reason") @IdClass(ObservationReasonId.class) diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation_Lab_Summary_ForWorkUp_New.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation_Lab_Summary_ForWorkUp_New.java index 40ddecb6a..34fe400ec 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation_Lab_Summary_ForWorkUp_New.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation_Lab_Summary_ForWorkUp_New.java @@ -2,20 +2,22 @@ import jakarta.persistence.Entity; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) @Entity @Table(name = "Observation") -@Data +@Getter +@Setter public class Observation_Lab_Summary_ForWorkUp_New extends ObservationBase { private Long uid; - + public Observation_Lab_Summary_ForWorkUp_New() { - + } - + public Observation_Lab_Summary_ForWorkUp_New(Observation base) { this.observationUid = base.getObservationUid(); this.activityDurationAmt = base.getActivityDurationAmt(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation_Question.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation_Question.java index a44526b6a..c1ac1fa0a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation_Question.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation_Question.java @@ -2,7 +2,8 @@ import jakarta.persistence.Entity; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.math.BigDecimal; import java.sql.Timestamp; @@ -10,8 +11,9 @@ @Entity @Table(name = "Observation") -@Data -public class Observation_Question extends ObservationBase{ +@Getter +@Setter +public class Observation_Question extends ObservationBase { private Long obsCodeUid; private String code; private String originalTxt; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation_Summary.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation_Summary.java index 5871a5e53..c223481a7 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation_Summary.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/observation/Observation_Summary.java @@ -1,10 +1,12 @@ package gov.cdc.dataprocessing.repository.nbs.odse.model.observation; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; -@Data +@Getter +@Setter public class Observation_Summary { private Long uid; private Timestamp addTime; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/organization/Organization.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/organization/Organization.java index 7b4005667..7c2c13ba3 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/organization/Organization.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/organization/Organization.java @@ -127,6 +127,7 @@ public class Organization { public Organization() { } + public Organization(OrganizationDto organizationDto) { this.organizationUid = organizationDto.getOrganizationUid(); this.addReasonCode = organizationDto.getAddReasonCd(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/organization/OrganizationName.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/organization/OrganizationName.java index 3bd65cd8f..143caec9f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/organization/OrganizationName.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/organization/OrganizationName.java @@ -3,9 +3,11 @@ import gov.cdc.dataprocessing.model.dto.organization.OrganizationNameDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.OrganizationNameId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter @Entity @IdClass(OrganizationNameId.class) @Table(name = "Organization_name") @@ -36,7 +38,7 @@ public OrganizationName() { public OrganizationName(OrganizationNameDto organizationNameDto) { this.organizationUid = organizationNameDto.getOrganizationUid(); - if(organizationNameDto.getOrganizationNameSeq()!=null){ + if (organizationNameDto.getOrganizationNameSeq() != null) { this.organizationNameSeq = organizationNameDto.getOrganizationNameSeq(); } this.nameText = organizationNameDto.getNmTxt(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/participation/Participation.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/participation/Participation.java index f8f2575a1..6cc002a35 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/participation/Participation.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/participation/Participation.java @@ -3,11 +3,13 @@ import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.ParticipationId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; -@Data +@Getter +@Setter @Entity @IdClass(ParticipationId.class) @Table(name = "Participation") diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/participation/ParticipationHist.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/participation/ParticipationHist.java index a581feb54..8137f5a9f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/participation/ParticipationHist.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/participation/ParticipationHist.java @@ -3,16 +3,18 @@ import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.ParticipationHistId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @Entity @Table(name = "Participation_hist") -@Data +@Getter +@Setter @IdClass(ParticipationHistId.class) -public class ParticipationHist implements Serializable { +public class ParticipationHist implements Serializable { private static final long serialVersionUID = 1L; @Column(name = "subject_entity_uid") @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/Person.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/Person.java index 2c9734bc2..aaa476827 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/Person.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/Person.java @@ -16,13 +16,13 @@ @Getter @Setter @Table(name = "Person") -public class Person { +public class Person { @Id @Column(name = "person_uid") private Long personUid; -// @Version + // @Version @Column(name = "version_ctrl_nbr", nullable = false) private Integer versionCtrlNbr; @@ -338,11 +338,12 @@ public class Person { @Column(name = "sex_unk_reason_cd") private String sexUnkReasonCd; - + // Constructors, getters, and setters public Person() { } + public Person(PersonDto personDto) { var timeStamp = getCurrentTimeStamp(); this.personUid = personDto.getPersonUid(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/PersonEthnicGroup.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/PersonEthnicGroup.java index 9b823bb4e..ea0333c72 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/PersonEthnicGroup.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/PersonEthnicGroup.java @@ -4,7 +4,8 @@ import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.PersonEthnicGroupId; import gov.cdc.dataprocessing.utilities.auth.AuthUtil; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; import java.time.LocalDateTime; @@ -12,7 +13,8 @@ @Entity @Table(name = "Person_ethnic_group", schema = "dbo") @IdClass(PersonEthnicGroupId.class) // Specify the IdClass -@Data +@Getter +@Setter public class PersonEthnicGroup { @Column(name = "person_uid", nullable = false) @@ -57,6 +59,7 @@ public class PersonEthnicGroup { public PersonEthnicGroup() { } + public PersonEthnicGroup(PersonEthnicGroupDto personEthnicGroupDto) { LocalDateTime currentTime = LocalDateTime.now(); Timestamp currentTimestamp = Timestamp.valueOf(currentTime); @@ -72,10 +75,10 @@ public PersonEthnicGroup(PersonEthnicGroupDto personEthnicGroupDto) { this.addTime = currentTimestamp; this.ethnicGroupDescTxt = personEthnicGroupDto.getEthnicGroupDescTxt(); this.lastChgReasonCd = personEthnicGroupDto.getLastChgReasonCd(); - this.lastChgTime = currentTimestamp; + this.lastChgTime = currentTimestamp; this.lastChgUserId = personEthnicGroupDto.getLastChgUserId(); this.recordStatusCd = personEthnicGroupDto.getRecordStatusCd(); - this.recordStatusTime = currentTimestamp; + this.recordStatusTime = currentTimestamp; this.userAffiliationTxt = personEthnicGroupDto.getUserAffiliationTxt(); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/PersonName.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/PersonName.java index 2102dec4d..a0ff3949b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/PersonName.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/PersonName.java @@ -3,13 +3,15 @@ import gov.cdc.dataprocessing.model.dto.person.PersonNameDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.PersonNameId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; import static gov.cdc.dataprocessing.utilities.time.TimeStampUtil.getCurrentTimeStamp; -@Data +@Getter +@Setter @Entity @IdClass(PersonNameId.class) // Specify the IdClass @Table(name = "Person_name") @@ -116,6 +118,7 @@ public class PersonName { public PersonName() { } + public PersonName(PersonNameDto personNameDto) { var timeStamp = getCurrentTimeStamp(); this.personUid = personNameDto.getPersonUid(); @@ -146,7 +149,7 @@ public PersonName(PersonNameDto personNameDto) { this.recordStatusTime = timeStamp; this.statusCd = personNameDto.getStatusCd(); this.statusTime = personNameDto.getStatusTime(); - this.toTime = personNameDto.getToTime() ; + this.toTime = personNameDto.getToTime(); this.userAffiliationTxt = personNameDto.getUserAffiliationTxt(); if (personNameDto.getAsOfDate() == null) { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/PersonRace.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/PersonRace.java index 54ce731b8..7cef6a792 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/PersonRace.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/person/PersonRace.java @@ -3,7 +3,8 @@ import gov.cdc.dataprocessing.model.dto.person.PersonRaceDto; import gov.cdc.dataprocessing.repository.nbs.odse.model.id_class.PersonRaceId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @@ -12,7 +13,8 @@ @Entity @Table(name = "Person_race", schema = "dbo") @IdClass(PersonRaceId.class) // Specify the IdClass -@Data +@Getter +@Setter public class PersonRace { @Id @@ -63,6 +65,7 @@ public class PersonRace { public PersonRace() { } + public PersonRace(PersonRaceDto personRaceDto) { var timestamp = getCurrentTimeStamp(); this.personUid = personRaceDto.getPersonUid(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/ClinicalDocument.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/ClinicalDocument.java index 4f39f1657..540877948 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/ClinicalDocument.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/ClinicalDocument.java @@ -1,14 +1,17 @@ package gov.cdc.dataprocessing.repository.nbs.odse.model.phc; + import gov.cdc.dataprocessing.model.dto.phc.ClinicalDocumentDto; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @Entity @Table(name = "Clinical_document") -@Data +@Getter +@Setter public class ClinicalDocument implements Serializable { private static final long serialVersionUID = 1L; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/ConfirmationMethod.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/ConfirmationMethod.java index 0586f1833..e8cf41b5e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/ConfirmationMethod.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/ConfirmationMethod.java @@ -5,13 +5,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Confirmation_method") -@Data +@Getter +@Setter public class ConfirmationMethod { @Id @Column(name = "public_health_case_uid") diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/EntityGroup.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/EntityGroup.java index 42c72b573..4dfc5255e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/EntityGroup.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/EntityGroup.java @@ -2,13 +2,15 @@ import gov.cdc.dataprocessing.model.dto.phc.EntityGroupDto; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Entity_group") -@Data +@Getter +@Setter public class EntityGroup { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/NonPersonLivingSubject.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/NonPersonLivingSubject.java index cb19d4082..b9fb80113 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/NonPersonLivingSubject.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/NonPersonLivingSubject.java @@ -2,12 +2,14 @@ import gov.cdc.dataprocessing.model.dto.phc.NonPersonLivingSubjectDto; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity -@Data +@Getter +@Setter @Table(name = "Non_Person_living_subject") public class NonPersonLivingSubject { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/PatientEncounter.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/PatientEncounter.java index 56d31f63d..65295bcd5 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/PatientEncounter.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/PatientEncounter.java @@ -2,13 +2,15 @@ import gov.cdc.dataprocessing.model.dto.phc.PatientEncounterDto; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @Entity -@Data +@Getter +@Setter @Table(name = "Patient_encounter") public class PatientEncounter implements Serializable { @@ -137,6 +139,7 @@ public class PatientEncounter implements Serializable { public PatientEncounter() { } + public PatientEncounter(PatientEncounterDto dto) { this.patientEncounterUid = dto.getPatientEncounterUid(); this.activityDurationAmt = dto.getActivityDurationAmt(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/Place.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/Place.java index e358c8d13..583613a14 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/Place.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/Place.java @@ -2,13 +2,15 @@ import gov.cdc.dataprocessing.model.dto.phc.PlaceDto; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; @Entity -@Data +@Getter +@Setter @Table(name = "Place") public class Place implements Serializable { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/Referral.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/Referral.java index 524e8dccc..a2bdaa0ee 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/Referral.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/phc/Referral.java @@ -2,13 +2,15 @@ import gov.cdc.dataprocessing.model.dto.phc.ReferralDto; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Referral") -@Data +@Getter +@Setter public class Referral { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/question/QuestionMetadata.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/question/QuestionMetadata.java index fb2b0f218..16956f223 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/question/QuestionMetadata.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/question/QuestionMetadata.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class QuestionMetadata { private Long nbsQuestionUid; private Timestamp addTime; @@ -81,7 +82,7 @@ public QuestionMetadata(Object[] data) { this.lastChgTime = Timestamp.valueOf((String) data[7]); } if (data.length >= 9) { - this.lastChgUserId = ((Double) data[8]).longValue(); + this.lastChgUserId = ((Double) data[8]).longValue(); } if (data.length >= 10) { this.questionLabel = (String) data[9]; @@ -189,6 +190,7 @@ public QuestionMetadata(Object[] data) { this.questionUnitIdentifier = (String) data[43]; } } + public QuestionMetadata() { } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/question/WAQuestion.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/question/WAQuestion.java index 7c622ee4d..1d1872987 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/question/WAQuestion.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/model/question/WAQuestion.java @@ -4,12 +4,14 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity -@Data +@Getter +@Setter @Table(name = "WA_question") public class WAQuestion { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomAuthUserRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomAuthUserRepository.java index c83d0bed6..374789721 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomAuthUserRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomAuthUserRepository.java @@ -4,6 +4,7 @@ import org.springframework.stereotype.Repository; import java.util.Collection; + @Repository public interface CustomAuthUserRepository { Collection getAuthUserRealizedRole(String userId); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomAuthUserRepositoryImpl.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomAuthUserRepositoryImpl.java index 8feb218af..b252b0853 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomAuthUserRepositoryImpl.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomAuthUserRepositoryImpl.java @@ -16,26 +16,25 @@ public class CustomAuthUserRepositoryImpl implements CustomAuthUserRepository { @PersistenceContext(unitName = "odse") private EntityManager entityManager; - private String SELECT_REALIZED_ROLES_FOR_USER_ID = "" + - "SELECT PS.perm_set_nm \"permSetNm\" " - +",SUR.auth_user_role_uid \"authUserRoleUid\" " - +",SUR.auth_role_nm \"authRoleNm\" " - +",SUR.prog_area_cd \"progAreaCd\" " - +",SUR.jurisdiction_cd \"jurisdictionCd\" " - +",SUR.auth_user_uid \"authUserUid\" " - +",SUR.auth_perm_set_uid \"authPermSetUid\" " - +",SUR.role_guest_ind \"roleGuestInd\" " - +",SUR.read_only_ind \"readOnlyInd\" " - +",SUR.disp_seq_nbr \"dispSeqNbr\" " - +",SUR.add_time \"addTime\" " - +",SUR.add_user_id \"addUserId\" " - +",SUR.last_chg_time \"lastChgTime\" " - +",SUR.last_chg_user_id \"lastChgUserId\" " - +",SUR.record_status_cd \"recordStatusCd\" " - +",SUR.record_status_time \"recordStatusTime\" FROM "+ - "AUTH_USER_ROLE" + " SUR, " + "Auth_perm_set" + " PS, " + "Auth_user" + " SU "+ - " where SUR.auth_user_uid = SU.auth_user_uid "+ - " and PS.auth_perm_set_uid = SUR.auth_perm_set_uid "+ + private final String SELECT_REALIZED_ROLES_FOR_USER_ID = "SELECT PS.perm_set_nm \"permSetNm\" " + + ",SUR.auth_user_role_uid \"authUserRoleUid\" " + + ",SUR.auth_role_nm \"authRoleNm\" " + + ",SUR.prog_area_cd \"progAreaCd\" " + + ",SUR.jurisdiction_cd \"jurisdictionCd\" " + + ",SUR.auth_user_uid \"authUserUid\" " + + ",SUR.auth_perm_set_uid \"authPermSetUid\" " + + ",SUR.role_guest_ind \"roleGuestInd\" " + + ",SUR.read_only_ind \"readOnlyInd\" " + + ",SUR.disp_seq_nbr \"dispSeqNbr\" " + + ",SUR.add_time \"addTime\" " + + ",SUR.add_user_id \"addUserId\" " + + ",SUR.last_chg_time \"lastChgTime\" " + + ",SUR.last_chg_user_id \"lastChgUserId\" " + + ",SUR.record_status_cd \"recordStatusCd\" " + + ",SUR.record_status_time \"recordStatusTime\" FROM " + + "AUTH_USER_ROLE" + " SUR, " + "Auth_perm_set" + " PS, " + "Auth_user" + " SU " + + " where SUR.auth_user_uid = SU.auth_user_uid " + + " and PS.auth_perm_set_uid = SUR.auth_perm_set_uid " + " and UPPER(SU.user_id) = UPPER(:userId)"; public CustomAuthUserRepositoryImpl() { @@ -48,7 +47,7 @@ public Collection getAuthUserRealizedRole(String userId) { query.setParameter("userId", userId); List results = query.getResultList(); if (results != null && !results.isEmpty()) { - for(var result : results) { + for (var result : results) { AuthUserRealizedRole container = new AuthUserRealizedRole(); container.setPermSetNm((String) result[0]); container.setAuthUserRoleUid((Long) result[1]); @@ -57,7 +56,7 @@ public Collection getAuthUserRealizedRole(String userId) { container.setJurisdictionCd((String) result[4]); container.setAuthUserUid((Long) result[5]); container.setAuthPermSetUid((Long) result[6]); - container.setRoleGuestInd( ((Character) result[7]).toString()); + container.setRoleGuestInd(((Character) result[7]).toString()); container.setReadOnlyInd(((Character) result[8]).toString()); container.setDispSeqNbr((Integer) result[9]); container.setAddTime((Timestamp) result[10]); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomNbsQuestionRepositoryImpl.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomNbsQuestionRepositoryImpl.java index a0b152a37..7840e1631 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomNbsQuestionRepositoryImpl.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomNbsQuestionRepositoryImpl.java @@ -16,29 +16,29 @@ public class CustomNbsQuestionRepositoryImpl implements CustomNbsQuestionReposit private EntityManager entityManager; - private String NND_UI_META_DATA_BY_FORM_CODE = "SELECT " + + private final String NND_UI_META_DATA_BY_FORM_CODE = "SELECT " + "distinct num.nbs_question_uid nbsQuestionUid ," + - "nnd.question_identifier questionIdentifier ,"+ - "num.question_label questionLabel ,"+ - "num.data_location dataLocation "+ + "nnd.question_identifier questionIdentifier ," + + "num.question_label questionLabel ," + + "num.data_location dataLocation " + "FROM NND_Metadata nnd INNER JOIN NBS_UI_Metadata num " + "ON nnd.nbs_ui_metadata_uid = num.nbs_ui_metadata_uid " + "WHERE " + - "(nnd.question_required_nnd = 'R') and (num.standard_nnd_ind_cd is null or num.standard_nnd_ind_cd='F')"+ + "(nnd.question_required_nnd = 'R') and (num.standard_nnd_ind_cd is null or num.standard_nnd_ind_cd='F')" + "AND (nnd.investigation_form_cd = :investigationFormCode)"; public CustomNbsQuestionRepositoryImpl() { } - public Collection retrieveQuestionRequiredNnd(String formCd) { + public Collection retrieveQuestionRequiredNnd(String formCd) { Query query = entityManager.createNativeQuery(NND_UI_META_DATA_BY_FORM_CODE); query.setParameter("investigationFormCode", formCd); Collection dataCollection = new ArrayList<>(); List results = query.getResultList(); if (results != null && !results.isEmpty()) { - for(var result : results) { + for (var result : results) { QuestionRequiredNnd container = new QuestionRequiredNnd(); container.setNbsQuestionUid((Long) result[0]); container.setQuestionIdentifier((String) result[1]); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomRepository.java index 216ab3f3d..6e3ab74d1 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomRepository.java @@ -15,29 +15,48 @@ @Repository public interface CustomRepository { Collection getContactByPatientInfo(String queryString); - Map getLabParticipations(Long observationUID); + + Map getLabParticipations(Long observationUID); + ArrayList getPatientPersonInfo(Long observationUID); - ArrayList getProviderInfo(Long observationUID,String partTypeCd); - ArrayList getActIdDetails(Long observationUID); + + ArrayList getProviderInfo(Long observationUID, String partTypeCd); + + ArrayList getActIdDetails(Long observationUID); + String getReportingFacilityName(Long organizationUid); + String getSpecimanSource(Long materialUid); + ProviderDataForPrintContainer getOrderingFacilityAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid); + ProviderDataForPrintContainer getOrderingFacilityPhone(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid); + ProviderDataForPrintContainer getOrderingPersonAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid); + ProviderDataForPrintContainer getOrderingPersonPhone(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid); + ArrayList getTestAndSusceptibilities(String typeCode, Long observationUid, LabReportSummaryContainer labRepEvent, LabReportSummaryContainer labRepSumm); + ArrayList getSusceptibilityUidSummary(ResultedTestSummaryContainer RVO, LabReportSummaryContainer labRepEvent, LabReportSummaryContainer labRepSumm, String typeCode, Long observationUid); ArrayList getSusceptibilityResultedTestSummary(String typeCode, Long observationUid); - Map getAssociatedInvList(Long uid,String sourceClassCd, String theQuery); + + Map getAssociatedInvList(Long uid, String sourceClassCd, String theQuery); + Map retrieveTreatmentSummaryVOForInv(Long publicHealthUID, String theQuery); - MapgetEDXEventProcessMapByCaseId(Long publicHealthCaseUid); + + Map getEDXEventProcessMapByCaseId(Long publicHealthCaseUid); + Map retrieveDocumentSummaryVOForInv(Long publicHealthUID); + List retrieveNotificationSummaryListForInvestigation(Long publicHealthUID, String theQuery); Map getAssociatedDocumentList(Long uid, String targetClassCd, String sourceClassCd, String theQuery); List getLdfCollection(Long busObjectUid, String conditionCode, String theQuery); + NbsDocumentContainer getNbsDocument(Long nbsUid) throws DataProcessingException; - ArrayList getInvListForCoInfectionId(Long mprUid,String coInfectionId) throws DataProcessingException; + + ArrayList getInvListForCoInfectionId(Long mprUid, String coInfectionId) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomRepositoryImpl.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomRepositoryImpl.java index bc0b0b7e7..1e3daac14 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomRepositoryImpl.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomRepositoryImpl.java @@ -23,9 +23,9 @@ @Repository public class CustomRepositoryImpl implements CustomRepository { + private final PublicHealthCaseStoredProcRepository publicHealthCaseStoredProcRepository; @PersistenceContext(unitName = "odse") protected EntityManager entityManager; - private final PublicHealthCaseStoredProcRepository publicHealthCaseStoredProcRepository; public CustomRepositoryImpl(PublicHealthCaseStoredProcRepository publicHealthCaseStoredProcRepository) { this.publicHealthCaseStoredProcRepository = publicHealthCaseStoredProcRepository; @@ -38,7 +38,7 @@ public List getLdfCollection(Long busObjectUid, String List lst = new ArrayList<>(); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { StateDefinedFieldDataDto container = new StateDefinedFieldDataDto(); int i = 0; container.setLdfUid(parseValue(item[i], Long.class)); @@ -56,20 +56,21 @@ public List getLdfCollection(Long busObjectUid, String public Map getAssociatedDocumentList(Long uid, String targetClassCd, String sourceClassCd, String theQuery) { - Map map= new HashMap<> (); + Map map = new HashMap<>(); Query query = entityManager.createNativeQuery(theQuery); query.setParameter("TargetActUid", uid); query.setParameter("SourceClassCd", sourceClassCd); query.setParameter("TargetClassCd", targetClassCd); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { map.put(item[0].toString(), Long.valueOf(item[1].toString())); } } return map; } - public MapgetEDXEventProcessMapByCaseId(Long publicHealthCaseUid) { + + public Map getEDXEventProcessMapByCaseId(Long publicHealthCaseUid) { String docQuery = " SELECT" + " edx_event_process_uid \"eDXEventProcessUid\", " + " nbs_document_uid \"nbsDocumentUid\", " @@ -82,12 +83,12 @@ public Map getAssociatedDocumentList(Long uid, String targetClas + " where edx_event_process.nbs_event_uid=act_relationship.source_act_uid " + " and act_relationship.target_act_uid = :TargetActUid order by nbs_document_uid"; - Map map= new HashMap<> (); + Map map = new HashMap<>(); Query query = entityManager.createNativeQuery(docQuery); query.setParameter("TargetActUid", publicHealthCaseUid); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { EDXEventProcessDto container = new EDXEventProcessDto(); int i = 0; container.setEDXEventProcessUid(parseValue(item[i], Long.class)); @@ -109,12 +110,12 @@ public Map getAssociatedDocumentList(Long uid, String targetClas } public Map retrieveDocumentSummaryVOForInv(Long publicHealthUID) { - Map map= new HashMap (); + Map map = new HashMap(); Query query = entityManager.createNativeQuery(DOCUMENT_FOR_A_PHC); query.setParameter("PhcUid", publicHealthUID); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { DocumentSummaryContainer container = new DocumentSummaryContainer(); int i = 0; Long getNbsDocumentUid = parseValue(item[++i], Long.class); @@ -133,12 +134,12 @@ public Map retrieveDocumentSummaryVOForInv(Long publicHealthUID) } public List retrieveNotificationSummaryListForInvestigation(Long publicHealthUID, String theQuery) { - List map= new ArrayList<> (); + List map = new ArrayList<>(); Query query = entityManager.createNativeQuery(theQuery); query.setParameter("PhcUid", publicHealthUID); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { NotificationSummaryContainer container = new NotificationSummaryContainer(); int i = 0; container.setNotificationUid(parseValue(item[i], Long.class)); @@ -165,12 +166,12 @@ public List retrieveNotificationSummaryListForInve } public Map retrieveTreatmentSummaryVOForInv(Long publicHealthUID, String theQuery) { - Map map= new HashMap (); + Map map = new HashMap(); Query query = entityManager.createNativeQuery(theQuery); query.setParameter("PhcUid", publicHealthUID); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { TreatmentContainer container = new TreatmentContainer(); int i = 0; container.setPhcUid(parseValue(item[i], Long.class)); @@ -186,14 +187,14 @@ public Map retrieveTreatmentSummaryVOForInv(Long publicHealthUID return map; } - public Map getAssociatedInvList(Long uid,String sourceClassCd, String theQuery) { - Map assocoiatedInvMap= new HashMap (); + public Map getAssociatedInvList(Long uid, String sourceClassCd, String theQuery) { + Map assocoiatedInvMap = new HashMap(); Query query = entityManager.createNativeQuery(theQuery); query.setParameter("ClassCd", sourceClassCd); - query.setParameter("ActUid",uid); + query.setParameter("ActUid", uid); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { assocoiatedInvMap.put(item[0].toString(), item[1].toString()); if (sourceClassCd.equalsIgnoreCase(NEDSSConstant.CLASS_CD_OBS)) { if (dataNotNull(item[2])) { @@ -210,12 +211,12 @@ public ArrayList getSusceptibilityResultedTestSumm String theSelect = SELECT_LABSUSCEPTIBILITES_REFLEXTEST_SUMMARY_FORWORKUP_SQLSERVER; Query query = entityManager.createNativeQuery(theSelect); query.setParameter("TypeCode", typeCode); - query.setParameter("TargetActUid",observationUid); + query.setParameter("TargetActUid", observationUid); ArrayList lst = new ArrayList<>(); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); int i = 0; container.setObservationUid(parseValue(item[i], Long.class)); @@ -242,16 +243,15 @@ public ArrayList getSusceptibilityResultedTestSumm return lst; } - public ArrayList getSusceptibilityUidSummary(ResultedTestSummaryContainer RVO, LabReportSummaryContainer labRepEvent, LabReportSummaryContainer labRepSumm, String typeCode, Long observationUid) - { + public ArrayList getSusceptibilityUidSummary(ResultedTestSummaryContainer RVO, LabReportSummaryContainer labRepEvent, LabReportSummaryContainer labRepSumm, String typeCode, Long observationUid) { String theSelect = GET_SOURCE_ACT_UID_FOR_SUSCEPTIBILITES_SQL; Query query = entityManager.createNativeQuery(theSelect); query.setParameter("TypeCode", typeCode); - query.setParameter("TargetActUid",observationUid); + query.setParameter("TargetActUid", observationUid); ArrayList lst = new ArrayList<>(); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { UidSummaryContainer uid = new UidSummaryContainer(); uid.setUid(parseValue(item[0], Long.class)); lst.add(uid); @@ -264,11 +264,11 @@ public ArrayList getTestAndSusceptibilities(String String theSelect = SELECT_LABRESULTED_REFLEXTEST_SUMMARY_FORWORKUP_SQL; Query query = entityManager.createNativeQuery(theSelect); query.setParameter("TypeCode", typeCode); - query.setParameter("TargetActUid",observationUid); + query.setParameter("TargetActUid", observationUid); ArrayList lst = new ArrayList<>(); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); int i = 0; container.setObservationUid(parseValue(item[i], Long.class)); @@ -299,27 +299,27 @@ public ArrayList getTestAndSusceptibilities(String public ProviderDataForPrintContainer getOrderingPersonPhone(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) { String theSelect = "select phone_nbr_txt \"phoneNbrTxt\", extension_txt \"extensionTxt\" from TELE_locator with (nolock) where TELE_locator_uid in (" - +" select locator_uid from Entity_locator_participation with (nolock) where entity_uid= "+ organizationUid + " and cd='O' and class_cd='TELE') "; + + " select locator_uid from Entity_locator_participation with (nolock) where entity_uid= " + organizationUid + " and cd='O' and class_cd='TELE') "; Query query = entityManager.createNativeQuery(theSelect); List results = query.setMaxResults(1).getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { providerDataForPrintVO.setProviderPhone(item[0].toString()); providerDataForPrintVO.setProviderPhoneExtension(item[1].toString()); } } return providerDataForPrintVO; } - public ProviderDataForPrintContainer getOrderingPersonAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) - { + + public ProviderDataForPrintContainer getOrderingPersonAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) { String theSelect = "select street_addr1 \"streetAddr1\", city_desc_txt \"cityDescTxt\", state_cd \"stateCd\", zip_cd \"zipCd\" from Postal_locator with (nolock) where postal_locator_uid in (" - + "select locator_uid from Entity_locator_participation with (nolock) where entity_uid in ("+organizationUid+")and cd='O' and class_cd='PST')"; + + "select locator_uid from Entity_locator_participation with (nolock) where entity_uid in (" + organizationUid + ")and cd='O' and class_cd='PST')"; Query query = entityManager.createNativeQuery(theSelect); List results = query.setMaxResults(1).getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { providerDataForPrintVO.setProviderStreetAddress1(item[0].toString()); providerDataForPrintVO.setProviderCity(item[1].toString()); providerDataForPrintVO.setProviderState(item[2].toString()); @@ -328,32 +328,32 @@ public ProviderDataForPrintContainer getOrderingPersonAddress(ProviderDataForPri } return providerDataForPrintVO; } - public ProviderDataForPrintContainer getOrderingFacilityPhone(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) - { + + public ProviderDataForPrintContainer getOrderingFacilityPhone(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) { String theSelect = "select phone_nbr_txt \"phoneNbrTxt\", extension_txt \"extensionTxt\" from TELE_locator with (nolock) where TELE_locator_uid in (" - +" select locator_uid from Entity_locator_participation with (nolock) where entity_uid= "+ organizationUid +" and cd='PH' and class_cd='TELE') "; + + " select locator_uid from Entity_locator_participation with (nolock) where entity_uid= " + organizationUid + " and cd='PH' and class_cd='TELE') "; Query query = entityManager.createNativeQuery(theSelect); List results = query.setMaxResults(1).getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { providerDataForPrintVO.setFacilityPhone(item[0].toString()); providerDataForPrintVO.setFacilityPhoneExtension(item[1].toString()); } } return providerDataForPrintVO; } - public ProviderDataForPrintContainer getOrderingFacilityAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) - { + + public ProviderDataForPrintContainer getOrderingFacilityAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) { String theSelect = "select street_addr1 \"streetAddr1\", street_addr2 \"streetAddr2\", city_desc_txt \"cityDescTxt\", " + "state_cd \"stateCd\", zip_cd \"zipCd\" from Postal_locator with (nolock) where postal_locator_uid in (" - + "select locator_uid from Entity_locator_participation with (nolock) where entity_uid in ("+ organizationUid+ ")" - + "and cd='O' and class_cd='PST')"; + + "select locator_uid from Entity_locator_participation with (nolock) where entity_uid in (" + organizationUid + ")" + + "and cd='O' and class_cd='PST')"; Query query = entityManager.createNativeQuery(theSelect); List results = query.setMaxResults(1).getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { providerDataForPrintVO.setFacilityAddress1(item[0].toString()); providerDataForPrintVO.setFacilityAddress2(item[1].toString()); providerDataForPrintVO.setFacilityCity(item[2].toString()); @@ -371,14 +371,14 @@ public String getSpecimanSource(Long materialUid) { Query query = entityManager.createNativeQuery(theSelect); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { vals = (item[0].toString()); } } return vals; } - public String getReportingFacilityName(Long organizationUid) { + public String getReportingFacilityName(Long organizationUid) { String vals = null; String theSelect = "SELECT organization_name.nm_txt \"nmTxt\" " @@ -386,15 +386,15 @@ public String getReportingFacilityName(Long organizationUid) { Query query = entityManager.createNativeQuery(theSelect); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { vals = (item[0].toString()); } } return vals; } - public ArrayList getActIdDetails(Long observationUID) { - ArrayList vals= new ArrayList (); + public ArrayList getActIdDetails(Long observationUID) { + ArrayList vals = new ArrayList(); String theSelect = "SELECT Act_id.root_extension_txt \"rootExtTxt\" " + "FROM Act_id with (nolock) " + "WHERE Act_id.Act_uid = " + observationUID; @@ -402,14 +402,15 @@ public ArrayList getActIdDetails(Long observationUID) { Query query = entityManager.createNativeQuery(theSelect); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { vals.add(item[0].toString()); } } return vals; } - public ArrayList getProviderInfo(Long observationUID,String partTypeCd) { - ArrayList vals = new ArrayList (); + + public ArrayList getProviderInfo(Long observationUID, String partTypeCd) { + ArrayList vals = new ArrayList(); //per Pete Varnell - use optimizer hint on select String ORD_PROVIDER_MSQL = "SELECT "; String ORD_PROVIDER = "person_name.person_uid \"providerUid\",person_name.last_nm \"lastNm\", person_name.nm_degree \"degree\", " + @@ -418,13 +419,13 @@ public ArrayList getProviderInfo(Long observationUID,String partTypeCd "participation with (nolock) WHERE person_name.person_uid = participation.subject_entity_uid " + "AND participation.act_uid = observation.observation_uid " + "AND participation.type_cd = '" + partTypeCd + "'" + " AND participation.subject_class_cd='PSN' " + - "AND observation.observation_uid = " + observationUID; + "AND observation.observation_uid = " + observationUID; var theSelect = ORD_PROVIDER_MSQL + ORD_PROVIDER; Query query = entityManager.createNativeQuery(theSelect); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { vals.add(item[0].toString()); vals.add(item[1].toString()); vals.add(item[2].toString()); @@ -438,21 +439,21 @@ public ArrayList getProviderInfo(Long observationUID,String partTypeCd } public ArrayList getPatientPersonInfo(Long observationUID) { - ArrayList vals= new ArrayList (); + ArrayList vals = new ArrayList(); String theSelect = "SELECT person_name.last_nm \"lastNm\", " + "person_name.first_nm \"firstNm\", observation.ctrl_cd_display_form \"ctrlCdDisplayForm\", " + "person.person_parent_uid \"personParentUid\" " + "FROM person with (nolock) , person_name with (nolock) , observation with (nolock) , participation with (nolock) " + "WHERE person.person_uid = participation.subject_entity_uid " + "AND participation.act_uid = observation.observation_uid " + - "AND participation.type_cd = \'PATSBJ\' " + + "AND participation.type_cd = 'PATSBJ' " + "AND person.person_uid = person_name.person_uid " + - "AND person_name.nm_use_cd = \'L\' " + - "AND observation.observation_uid = " + observationUID; + "AND person_name.nm_use_cd = 'L' " + + "AND observation.observation_uid = " + observationUID; Query query = entityManager.createNativeQuery(theSelect); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { vals.add(item[0].toString()); vals.add(item[1].toString()); vals.add(item[2].toString()); @@ -462,31 +463,30 @@ public ArrayList getPatientPersonInfo(Long observationUID) { return vals; } - public Map getLabParticipations(Long observationUID) { + public Map getLabParticipations(Long observationUID) { String QUICK_FIND_PATIENT_MSQL = "SELECT "; - String QUICK_FIND_PATIENT = "participation.subject_class_cd \"classCd\", " + String QUICK_FIND_PATIENT = "participation.subject_class_cd \"classCd\", " + "participation.type_cd \"typeCd\", " + "participation.subject_entity_uid \"subjectEntityUid\" " + "from observation with (nolock), participation with (nolock)" + "WHERE participation.act_uid = observation.observation_uid " - + "AND participation.type_cd in(\'" - + NEDSSConstant.PAR111_TYP_CD + "\',\'" - + NEDSSConstant.PAR104_TYP_CD + "\',\'" - + NEDSSConstant.PAR110_TYP_CD + "\',\'" - + NEDSSConstant.PAR101_TYP_CD + "\')" + + "AND participation.type_cd in('" + + NEDSSConstant.PAR111_TYP_CD + "','" + + NEDSSConstant.PAR104_TYP_CD + "','" + + NEDSSConstant.PAR110_TYP_CD + "','" + + NEDSSConstant.PAR101_TYP_CD + "')" + "AND observation.observation_uid = " + observationUID.toString(); - String theSelect= QUICK_FIND_PATIENT_MSQL+QUICK_FIND_PATIENT; + String theSelect = QUICK_FIND_PATIENT_MSQL + QUICK_FIND_PATIENT; - Map vals = new HashMap(); + Map vals = new HashMap(); Query query = entityManager.createNativeQuery(theSelect); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { - String classCd = item[0].toString(); + for (var item : results) { + String classCd = item[0].toString(); String typeCd = item[1].toString(); Long subjectEntityUid = Long.valueOf(item[2].toString()); - if(classCd.equalsIgnoreCase(NEDSSConstant.CLASS_CD_PSN) && typeCd.equalsIgnoreCase( NEDSSConstant.PAR101_TYP_CD)) - { + if (classCd.equalsIgnoreCase(NEDSSConstant.CLASS_CD_PSN) && typeCd.equalsIgnoreCase(NEDSSConstant.PAR101_TYP_CD)) { continue; } vals.put(typeCd, subjectEntityUid); @@ -502,7 +502,7 @@ public Collection getContactByPatientInfo(String queryStrin Collection ctContactSummaryDtoCollection = new ArrayList<>(); List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { CTContactSummaryDto contact = new CTContactSummaryDto(); int i = 0; contact.setNamedOnDate(parseValue(item[i], Timestamp.class)); @@ -544,7 +544,7 @@ public NbsDocumentContainer getNbsDocument(Long nbsUid) throws DataProcessingExc List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { int i = 0; container.setNbsDocumentUid(parseValue(item[i], Long.class)); container.setLocalId(parseValue(item[++i], String.class)); @@ -591,7 +591,7 @@ public NbsDocumentContainer getNbsDocument(Long nbsUid) throws DataProcessingExc } - public ArrayList getInvListForCoInfectionId(Long mprUid,String coInfectionId) { + public ArrayList getInvListForCoInfectionId(Long mprUid, String coInfectionId) { ArrayList coinfectionInvList = new ArrayList<>(); Query query = entityManager.createNativeQuery(COINFECTION_INV_LIST_FOR_GIVEN_COINFECTION_ID_SQL); @@ -602,7 +602,7 @@ public ArrayList getInvListForCoInfectionId(Long mprUid,String coInfecti List results = query.getResultList(); if (resultValidCheck(results)) { - for(var item : results) { + for (var item : results) { int i = 0; CoinfectionSummaryContainer container = new CoinfectionSummaryContainer(); container.setPublicHealthCaseUid(parseValue(item[i], Long.class)); @@ -614,7 +614,4 @@ public ArrayList getInvListForCoInfectionId(Long mprUid,String coInfecti } - - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/ActRelationshipHistoryRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/ActRelationshipHistoryRepository.java index 63dcbe975..babed4e69 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/ActRelationshipHistoryRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/ActRelationshipHistoryRepository.java @@ -5,5 +5,5 @@ import org.springframework.stereotype.Repository; @Repository -public interface ActRelationshipHistoryRepository extends JpaRepository { +public interface ActRelationshipHistoryRepository extends JpaRepository { } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/ActRelationshipRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/ActRelationshipRepository.java index d6daef487..86c383364 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/ActRelationshipRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/ActRelationshipRepository.java @@ -35,8 +35,8 @@ from Act_relationship WITH (NOLOCK) Optional> loadActRelationshipBySrcIdAndTypeCode(@Param("uid") Long uid, @Param("type") String type); /** - String DELETE_BY_PK = "DELETE from Act_relationship where target_act_uid = ? and source_act_uid = ? and type_cd = ?" - * */ + * String DELETE_BY_PK = "DELETE from Act_relationship where target_act_uid = ? and source_act_uid = ? and type_cd = ?" + */ @Modifying @Query("DELETE FROM ActRelationship data WHERE data.targetActUid = ?1 AND data.sourceActUid = ?2 AND data.typeCd = ?3") void deleteActRelationshipByPk(Long subjectUid, Long actUid, String typeCode); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/NbsActEntityHistRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/NbsActEntityHistRepository.java index 8d2e3df73..b83d433cc 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/NbsActEntityHistRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/NbsActEntityHistRepository.java @@ -5,5 +5,5 @@ import org.springframework.stereotype.Repository; @Repository -public interface NbsActEntityHistRepository extends JpaRepository { +public interface NbsActEntityHistRepository extends JpaRepository { } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/NbsActEntityRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/NbsActEntityRepository.java index e8a91ac00..02c668b49 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/NbsActEntityRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/act/NbsActEntityRepository.java @@ -10,11 +10,11 @@ import java.util.Optional; @Repository -public interface NbsActEntityRepository extends JpaRepository { +public interface NbsActEntityRepository extends JpaRepository { /** - * private final String SELECT_ACT_ENTITY_COLLECTION="SELECT nbs_act_entity_uid \"nbsActEntityUid\", add_time \"addTime\", add_user_id \"addUserId\", last_chg_time \"lastChgTime\", last_chg_user_id \"lastChgUserId\", act_uid \"actUid\", entity_uid \"entityUid\", type_cd \"typeCd\", entity_version_ctrl_nbr \"entityVersionCtrlNbr\" - * FROM "+ DataTables.NBS_ACT_ENTITY_TABLE +" where act_uid=?"; - * */ + * private final String SELECT_ACT_ENTITY_COLLECTION="SELECT nbs_act_entity_uid \"nbsActEntityUid\", add_time \"addTime\", add_user_id \"addUserId\", last_chg_time \"lastChgTime\", last_chg_user_id \"lastChgUserId\", act_uid \"actUid\", entity_uid \"entityUid\", type_cd \"typeCd\", entity_version_ctrl_nbr \"entityVersionCtrlNbr\" + * FROM "+ DataTables.NBS_ACT_ENTITY_TABLE +" where act_uid=?"; + */ @Query("SELECT data FROM NbsActEntity data WHERE data.actUid = :uid") Optional> getNbsActEntitiesByActUid(@Param("uid") Long uid); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/auth/AuthUserRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/auth/AuthUserRepository.java index 92702f921..a7d2a0d68 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/auth/AuthUserRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/auth/AuthUserRepository.java @@ -7,9 +7,10 @@ import org.springframework.stereotype.Repository; import java.util.Optional; + @Repository -public interface AuthUserRepository extends JpaRepository { -// @Query("SELECT pn FROM AuthUser pn WHERE pn.userId = :userName") +public interface AuthUserRepository extends JpaRepository { + // @Query("SELECT pn FROM AuthUser pn WHERE pn.userId = :userName") // Optional findByUserName(@Param("userName") String userName); @Query("SELECT data FROM AuthUser data WHERE data.userId = :userId") Optional findAuthUserByUserId(@Param("userId") String userId); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/dsm/DsmAlgorithmRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/dsm/DsmAlgorithmRepository.java index 01b1be002..79604a628 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/dsm/DsmAlgorithmRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/dsm/DsmAlgorithmRepository.java @@ -10,9 +10,9 @@ import java.util.Optional; @Repository -public interface DsmAlgorithmRepository extends JpaRepository { +public interface DsmAlgorithmRepository extends JpaRepository { -// SELECT_DSM_ALGORITHM_LIST ="SELECT dsm_algorithm_uid \"dsmAlgorithmUid\", algorithm_nm \"algorithmNm\", event_type \"eventType\", condition_list \"conditionList\", frequency \"frequency\" , apply_to \"applyTo\", sending_system_list \"sendingSystemList\", reporting_system_list \"reportingSystemList\", event_action \"eventAction\"," + // SELECT_DSM_ALGORITHM_LIST ="SELECT dsm_algorithm_uid \"dsmAlgorithmUid\", algorithm_nm \"algorithmNm\", event_type \"eventType\", condition_list \"conditionList\", frequency \"frequency\" , apply_to \"applyTo\", sending_system_list \"sendingSystemList\", reporting_system_list \"reportingSystemList\", event_action \"eventAction\"," // +" algorithm_payload \"algorithmPayload\", admin_comment \"adminComment\", status_cd \"statusCd\", status_time \"statusTime\", last_chg_user_id \"lastChgUserId\", last_chg_time \"lastChgTime\" " // +" FROM DSM_algorithm where status_cd='A'"; @Query("SELECT pn FROM DsmAlgorithm pn WHERE pn.statusCd = :statusCd") diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/edx/EdxDocumentRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/edx/EdxDocumentRepository.java index 011637f18..b22d0123c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/edx/EdxDocumentRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/edx/EdxDocumentRepository.java @@ -13,8 +13,8 @@ @Repository public interface EdxDocumentRepository extends JpaRepository { /* - * String SELECT_EDX_DOCUMENT_COLLECTION = "SELECT EDX_Document_uid \"eDXDocumentUid\", act_uid \"actUid\", - * add_time \"addTime\" FROM EDX_Document WITH (NOLOCK) WHERE act_uid = ? order by add_time desc" + * String SELECT_EDX_DOCUMENT_COLLECTION = "SELECT EDX_Document_uid \"eDXDocumentUid\", act_uid \"actUid\", + * add_time \"addTime\" FROM EDX_Document WITH (NOLOCK) WHERE act_uid = ? order by add_time desc" * */ @Query("SELECT data FROM EdxDocument data WHERE data.actUid = :uid") Optional> selectEdxDocumentCollectionByActUid(@Param("uid") Long uid); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/edx/EdxEventProcessRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/edx/EdxEventProcessRepository.java index 66542e52b..1be3500c5 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/edx/EdxEventProcessRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/edx/EdxEventProcessRepository.java @@ -5,5 +5,5 @@ import org.springframework.stereotype.Repository; @Repository -public interface EdxEventProcessRepository extends JpaRepository { +public interface EdxEventProcessRepository extends JpaRepository { } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/entity/EntityIdRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/entity/EntityIdRepository.java index f938c090d..2d1b4a24b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/entity/EntityIdRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/entity/EntityIdRepository.java @@ -18,6 +18,7 @@ public interface EntityIdRepository extends JpaRepository { @Query("SELECT MAX(pn.entityIdSeq) FROM EntityId pn WHERE pn.entityUid = :parentUid") Optional findMaxEntityId(@Param("parentUid") Long parentUid); + @Query("SELECT eid FROM EntityId eid WHERE eid.entityUid = :entityUid AND eid.recordStatusCode ='ACTIVE'") Optional> findByEntityUid(@Param("entityUid") Long entityUid); @@ -25,5 +26,5 @@ public interface EntityIdRepository extends JpaRepository { @Transactional @Modifying @Query("DELETE FROM EntityId pn WHERE pn.entityUid = :entityUid AND pn.entityIdSeq = :entityIdSeq") - void deleteEntityIdAndSeq (@Param("entityUid") Long entityUid, @Param("entityIdSeq") Integer entityIdSeq); + void deleteEntityIdAndSeq(@Param("entityUid") Long entityUid, @Param("entityIdSeq") Integer entityIdSeq); } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/locator/TeleLocatorRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/locator/TeleLocatorRepository.java index 515c694c1..dc37baa2c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/locator/TeleLocatorRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/locator/TeleLocatorRepository.java @@ -10,7 +10,7 @@ import java.util.Optional; @Repository -public interface TeleLocatorRepository extends JpaRepository { +public interface TeleLocatorRepository extends JpaRepository { @Query(value = "SELECT x FROM TeleLocator x WHERE x.teleLocatorUid IN :uids", nativeQuery = false) Optional> findByTeleLocatorUids(@Param("uids") List uids); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/lookup/LookupMappingRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/lookup/LookupMappingRepository.java index 388d0dfb2..366f12860 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/lookup/LookupMappingRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/lookup/LookupMappingRepository.java @@ -10,7 +10,7 @@ import java.util.Optional; @Repository -public interface LookupMappingRepository extends JpaRepository { +public interface LookupMappingRepository extends JpaRepository { @Query(value = "SELECT " + " LOOKUP_QUESTION.*, " + " LOOKUP_ANSWER.FROM_CODE_SYSTEM_CD AS fromAnsCodeSystemCd, " + diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/matching/EdxEntityMatchRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/matching/EdxEntityMatchRepository.java index 4eb604791..0b602e95c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/matching/EdxEntityMatchRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/matching/EdxEntityMatchRepository.java @@ -5,6 +5,6 @@ import org.springframework.stereotype.Repository; @Repository -public interface EdxEntityMatchRepository extends JpaRepository { +public interface EdxEntityMatchRepository extends JpaRepository { } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsAnswerHistRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsAnswerHistRepository.java index a7a636b7b..9831ff2cc 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsAnswerHistRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsAnswerHistRepository.java @@ -5,5 +5,5 @@ import org.springframework.stereotype.Repository; @Repository -public interface NbsAnswerHistRepository extends JpaRepository { +public interface NbsAnswerHistRepository extends JpaRepository { } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsAnswerRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsAnswerRepository.java index 814d27e58..d9c9e3911 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsAnswerRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsAnswerRepository.java @@ -10,15 +10,14 @@ import java.util.Optional; @Repository -public interface NbsAnswerRepository extends JpaRepository { +public interface NbsAnswerRepository extends JpaRepository { /** - * * String SELECT_NBS_ANSWER_COLLECTION = "SELECT nbs_answer_uid \"nbsAnswerUid\", seq_nbr \"seqNbr\", * answer_txt \"answerTxt\", ca.last_chg_time \"lastChgTime\", ca.last_chg_user_id \"lastChgUserId\", * ca.nbs_question_uid \"nbsQuestionUid\", act_uid \"actUid\", nbs_question_version_ctrl_nbr \"nbsQuestionVersionCtrlNbr\", * record_status_cd \"recordStatusCd\", record_status_time \"recordStatusTime\", answer_group_seq_nbr \"answerGroupSeqNbr\" * FROM nbs_answer ca where ca.act_uid = ? ORDER BY nbs_question_uid" - * */ + */ @Query("SELECT data FROM NbsAnswer data WHERE data.actUid = :uid") Optional> getPageAnswerByActUid(@Param("uid") Long uid); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsCaseAnswerRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsCaseAnswerRepository.java index 3533b89fe..3cdb193ff 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsCaseAnswerRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsCaseAnswerRepository.java @@ -10,9 +10,9 @@ import java.util.Optional; @Repository -public interface NbsCaseAnswerRepository extends JpaRepository { +public interface NbsCaseAnswerRepository extends JpaRepository { -// private final String SELECT_NBS_ANSWER_COLLECTION = "SELECT nbs_case_answer_uid \"nbsCaseAnswerUid\", seq_nbr \"seqNbr\", add_time \"addTime\", add_user_id \"addUserId\", answer_txt \"answerTxt\", last_chg_time \"lastChgTime\", last_chg_user_id \"lastChgUserId\", nbs_question_uid \"nbsQuestionUid\", act_uid \"actUid\", nbs_question_version_ctrl_nbr \"nbsQuestionVersionCtrlNbr\", answer_large_txt \"answerLargeTxt\",nbs_table_metadata_uid \"nbsTableMetadataUid\", answer_group_seq_nbr \"answerGroupSeqNbr\" FROM " + // private final String SELECT_NBS_ANSWER_COLLECTION = "SELECT nbs_case_answer_uid \"nbsCaseAnswerUid\", seq_nbr \"seqNbr\", add_time \"addTime\", add_user_id \"addUserId\", answer_txt \"answerTxt\", last_chg_time \"lastChgTime\", last_chg_user_id \"lastChgUserId\", nbs_question_uid \"nbsQuestionUid\", act_uid \"actUid\", nbs_question_version_ctrl_nbr \"nbsQuestionVersionCtrlNbr\", answer_large_txt \"answerLargeTxt\",nbs_table_metadata_uid \"nbsTableMetadataUid\", answer_group_seq_nbr \"answerGroupSeqNbr\" FROM " // + DataTables.NBS_CASE_ANSWER_TABLE + " where act_uid=? order by nbs_question_uid"; @Query("SELECT data FROM NbsCaseAnswer data WHERE data.actUid = :uid") Optional> getNbsCaseAnswerByActUid(@Param("uid") Long uid); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsDocumentRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsDocumentRepository.java index 7f18d4986..1586119c7 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsDocumentRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsDocumentRepository.java @@ -5,5 +5,5 @@ import org.springframework.stereotype.Repository; @Repository -public interface NbsDocumentRepository extends JpaRepository { +public interface NbsDocumentRepository extends JpaRepository { } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsUiMetaDataRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsUiMetaDataRepository.java index e47254b62..a166805da 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsUiMetaDataRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/nbs/NbsUiMetaDataRepository.java @@ -11,7 +11,7 @@ import java.util.Optional; @Repository -public interface NbsUiMetaDataRepository extends JpaRepository { +public interface NbsUiMetaDataRepository extends JpaRepository { @Query(value = ComplexQueries.DMB_QUESTION_OID_METADATA_SQL, nativeQuery = true) Optional> findDmbQuestionMetaData(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/ObservationReasonRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/ObservationReasonRepository.java index 384a1166c..5987b38ee 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/ObservationReasonRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/ObservationReasonRepository.java @@ -11,13 +11,12 @@ @Repository public interface ObservationReasonRepository extends JpaRepository { /** - * public static final String SELECT_OBSERVATION_REASONS = - * "SELECT observation_uid \"observationUid\", reason_cd \"reasonCd\", "+ - * " reason_desc_txt \"reasonDescTxt\" FROM " + - * DataTables.OBSERVATION_REASON_TABLE + - * " WITH (NOLOCK) WHERE observation_uid = ?"; - * - * */ + * public static final String SELECT_OBSERVATION_REASONS = + * "SELECT observation_uid \"observationUid\", reason_cd \"reasonCd\", "+ + * " reason_desc_txt \"reasonDescTxt\" FROM " + + * DataTables.OBSERVATION_REASON_TABLE + + * " WITH (NOLOCK) WHERE observation_uid = ?"; + */ @Query("SELECT data FROM ObservationReason data WHERE data.observationUid = :uid") Collection findRecordsById(@Param("uid") Long uid); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/ObservationRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/ObservationRepository.java index 53b934aa4..8b9eb0dba 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/ObservationRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/ObservationRepository.java @@ -11,7 +11,7 @@ import java.util.Optional; @Repository -public interface ObservationRepository extends JpaRepository { +public interface ObservationRepository extends JpaRepository { @Query(value = ComplexQueries.RETRIEVE_OBSERVATION_QUESTION_SQL, nativeQuery = true) Optional> retrieveObservationQuestion(Long targetActUid); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/Observation_SummaryRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/Observation_SummaryRepository.java index 58f7469dc..c2c80ea8f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/Observation_SummaryRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/Observation_SummaryRepository.java @@ -7,7 +7,7 @@ import java.util.Optional; public interface Observation_SummaryRepository { - Collection findAllActiveLabReportUidListForManage(Long investigationUid, String whereClause); + Collection findAllActiveLabReportUidListForManage(Long investigationUid, String whereClause); - Optional> findLabSummaryForWorkupNew(Long personParentUid, String whereClause); + Optional> findLabSummaryForWorkupNew(Long personParentUid, String whereClause); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/implementation/Observation_SummaryRepositoryImpl.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/implementation/Observation_SummaryRepositoryImpl.java index fef5cdbb8..c9fda1bb9 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/implementation/Observation_SummaryRepositoryImpl.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/implementation/Observation_SummaryRepositoryImpl.java @@ -20,22 +20,18 @@ @Transactional public class Observation_SummaryRepositoryImpl implements Observation_SummaryRepository { - @PersistenceContext(unitName = "odse") - private EntityManager entityManager; - - public String findAllActiveLabReportUidListForManage_SQL = "SELECT "+ - "ar.source_act_uid \"uid\", "+ + public String findAllActiveLabReportUidListForManage_SQL = "SELECT " + + "ar.source_act_uid \"uid\", " + "ISNULL(ar.from_time,obs.add_time ) \"addTime\", " + - "ar.add_reason_cd \"addReasonCd\" "+ - "FROM observation obs with (nolock), Act_Relationship ar with (nolock) "+ + "ar.add_reason_cd \"addReasonCd\" " + + "FROM observation obs with (nolock), Act_Relationship ar with (nolock) " + "WHERE ar.target_class_cd = '" + NEDSSConstant.PUBLIC_HEALTH_CASE_CLASS_CODE + "' " + "AND ar.source_class_cd = '" + NEDSSConstant.OBSERVATION_CLASS_CODE + "' " + "AND ar.type_cd = '" + NEDSSConstant.LAB_REPORT + "' " + "AND ar.record_status_cd = '" + NEDSSConstant.RECORD_STATUS_ACTIVE + "' " + "AND ar.target_act_uid = :targetActUid " + "AND ar.source_act_uid = obs.observation_uid "; - - public String SELECT_LABSUMMARY_FORWORKUPNEW = + public String SELECT_LABSUMMARY_FORWORKUPNEW = "SELECT participation.act_uid \"uid\", " + "OBS.* " + "FROM observation OBS, person, " + @@ -48,7 +44,8 @@ public class Observation_SummaryRepositoryImpl implements Observation_SummaryRep "AND Participation.subject_class_cd = 'PSN' " + "AND Participation.record_status_cd = 'ACTIVE' " + "AND person_parent_uid = :personParentUid"; - + @PersistenceContext(unitName = "odse") + private EntityManager entityManager; @Override public Collection findAllActiveLabReportUidListForManage(Long investigationUid, String whereClause) { @@ -60,7 +57,7 @@ public Collection findAllActiveLabReportUidListForManage(Lo List results = query.getResultList(); if (results != null && !results.isEmpty()) { - for(var result : results) { + for (var result : results) { Observation_Summary container = new Observation_Summary(); container.setUid((Long) result[0]); container.setAddTime((Timestamp) result[1]); @@ -73,7 +70,7 @@ public Collection findAllActiveLabReportUidListForManage(Lo @Override public Optional> findLabSummaryForWorkupNew(Long personParentUid, String whereClause) { var sql = SELECT_LABSUMMARY_FORWORKUPNEW + whereClause; - var res = entityManager.createQuery(sql, Observation_Lab_Summary_ForWorkUp_New.class) + var res = entityManager.createQuery(sql, Observation_Lab_Summary_ForWorkUp_New.class) .setParameter("personParentUid", personParentUid) .getResultList(); return Optional.ofNullable(res); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/organization/OrganizationRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/organization/OrganizationRepository.java index cdfa0fbd4..b8ab0f995 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/organization/OrganizationRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/organization/OrganizationRepository.java @@ -1,4 +1,5 @@ package gov.cdc.dataprocessing.repository.nbs.odse.repos.organization; + import gov.cdc.dataprocessing.repository.nbs.odse.model.organization.Organization; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/participation/ParticipationHistRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/participation/ParticipationHistRepository.java index 0029f413b..c691c5746 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/participation/ParticipationHistRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/participation/ParticipationHistRepository.java @@ -10,7 +10,7 @@ import java.util.Optional; @Repository -public interface ParticipationHistRepository extends JpaRepository { +public interface ParticipationHistRepository extends JpaRepository { @Query("SELECT data.versionCtrlNbr FROM ParticipationHist data WHERE data.subjectEntityUid = ?1 AND data.actUid = ?2 AND data.typeCd = ?3") Optional> findVerNumberByKey(Long subjectEntityUid, Long actUid, String typeCd); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/participation/ParticipationRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/participation/ParticipationRepository.java index efc558ca1..3ec5d2e0e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/participation/ParticipationRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/participation/ParticipationRepository.java @@ -33,9 +33,9 @@ Optional> findPatientMprUidByObservationUid(@Param("classCode") Strin @Query("DELETE FROM Participation p WHERE p.subjectEntityUid = ?1 AND p.actUid = ?2 AND p.typeCode = ?3") void deleteParticipationByPk(Long subjectEntityUid, Long actUid, String typeCd); - Optional> findBySubjectEntityUidAndActUid(Long subjectEntityUid,Long actUid); + Optional> findBySubjectEntityUidAndActUid(Long subjectEntityUid, Long actUid); @Query("SELECT data FROM Participation data WHERE data.subjectEntityUid = :subjectEntityUid") - Optional> findBySubjectEntityUid(@Param("subjectEntityUid") Long subjectEntityUid); + Optional> findBySubjectEntityUid(@Param("subjectEntityUid") Long subjectEntityUid); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/person/PersonNameRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/person/PersonNameRepository.java index 40aee6779..5568640ac 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/person/PersonNameRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/person/PersonNameRepository.java @@ -12,7 +12,7 @@ import java.util.Optional; @Repository -public interface PersonNameRepository extends JpaRepository { +public interface PersonNameRepository extends JpaRepository { @Query("SELECT pn FROM PersonName pn WHERE pn.personUid = :parentUid") Optional> findByParentUid(@Param("parentUid") Long parentUid); @@ -21,11 +21,11 @@ public interface PersonNameRepository extends JpaRepository { @Transactional @Modifying - @Query(value = "DELETE FROM Person_name WHERE person_uid = :personUid AND person_name_seq = :personSeq", nativeQuery = true) - void deletePersonNameByIdAndSeq (@Param("personUid") Long personUid, @Param("personSeq") Integer personSeq); + @Query(value = "DELETE FROM Person_name WHERE person_uid = :personUid AND person_name_seq = :personSeq", nativeQuery = true) + void deletePersonNameByIdAndSeq(@Param("personUid") Long personUid, @Param("personSeq") Integer personSeq); @Transactional @Modifying - @Query(value = "UPDATE Person_name SET status_cd = 'I' WHERE person_uid = :personUid AND person_name_seq = :personSeq", nativeQuery = true) - void updatePersonNameStatus (@Param("personUid") Long personUid, @Param("personSeq") Integer personSeq); + @Query(value = "UPDATE Person_name SET status_cd = 'I' WHERE person_uid = :personUid AND person_name_seq = :personSeq", nativeQuery = true) + void updatePersonNameStatus(@Param("personUid") Long personUid, @Param("personSeq") Integer personSeq); } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/person/PersonRaceRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/person/PersonRaceRepository.java index c19367ee6..7482712d6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/person/PersonRaceRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/person/PersonRaceRepository.java @@ -20,11 +20,11 @@ public interface PersonRaceRepository extends JpaRepository raceCds); + void deletePersonRaceByUid(@Param("personUid") Long personUid, @Param("raceCds") List raceCds); } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/person/PersonRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/person/PersonRepository.java index 56c4f97ae..159c382a8 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/person/PersonRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/person/PersonRepository.java @@ -12,7 +12,7 @@ import java.util.Optional; @Repository -public interface PersonRepository extends JpaRepository { +public interface PersonRepository extends JpaRepository { @Query("SELECT pn FROM Person pn WHERE pn.personParentUid = :parentUid") Optional> findByParentUid(@Param("parentUid") Long parentUid); @@ -22,10 +22,9 @@ public interface PersonRepository extends JpaRepository { Integer updateExistingPersonEdxIndByUid(@Param("uid") Long uid); /** - * * String PATIENTPARENTUID_BY_UID = " SELECT p.person_parent_uid \"personParentUid\" * FROM person p with (nolock) where p.person_uid = ? AND p.record_status_cd = 'ACTIVE' " - * */ + */ @Query("SELECT pn.personParentUid FROM Person pn WHERE pn.personUid = :parentUid AND pn.recordStatusCd='ACTIVE' ") Optional> findPatientParentUidByUid(@Param("parentUid") Long parentUid); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/EntityGroupRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/EntityGroupRepository.java index bcbc5f42d..8aa8c634d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/EntityGroupRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/EntityGroupRepository.java @@ -5,5 +5,5 @@ import org.springframework.stereotype.Repository; @Repository -public interface EntityGroupRepository extends JpaRepository { +public interface EntityGroupRepository extends JpaRepository { } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/NonPersonLivingSubjectRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/NonPersonLivingSubjectRepository.java index 4776a8b90..cd7974299 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/NonPersonLivingSubjectRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/NonPersonLivingSubjectRepository.java @@ -5,5 +5,5 @@ import org.springframework.stereotype.Repository; @Repository -public interface NonPersonLivingSubjectRepository extends JpaRepository { +public interface NonPersonLivingSubjectRepository extends JpaRepository { } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/PatientEncounterRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/PatientEncounterRepository.java index 62923b053..15cea4102 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/PatientEncounterRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/PatientEncounterRepository.java @@ -5,5 +5,5 @@ import org.springframework.stereotype.Repository; @Repository -public interface PatientEncounterRepository extends JpaRepository { +public interface PatientEncounterRepository extends JpaRepository { } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/PlaceRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/PlaceRepository.java index fe9315d8b..e43356578 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/PlaceRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/PlaceRepository.java @@ -5,5 +5,5 @@ import org.springframework.stereotype.Repository; @Repository -public interface PlaceRepository extends JpaRepository { +public interface PlaceRepository extends JpaRepository { } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/PublicHealthCaseRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/PublicHealthCaseRepository.java index 536901600..f472534a0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/PublicHealthCaseRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/phc/PublicHealthCaseRepository.java @@ -5,5 +5,5 @@ import org.springframework.stereotype.Repository; @Repository -public interface PublicHealthCaseRepository extends JpaRepository { +public interface PublicHealthCaseRepository extends JpaRepository { } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/role/RoleRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/role/RoleRepository.java index af65fb375..643d1b1be 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/role/RoleRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/role/RoleRepository.java @@ -21,28 +21,27 @@ public interface RoleRepository extends JpaRepository { /** * String SEARCH_BY_PK = "SELECT count(*) from Role with (NOLOCK) where subject_entity_uid = ? and cd = ? and role_seq = ?" - * */ + */ @Query("SELECT pn FROM Role pn WHERE pn.subjectEntityUid = :entityUid AND pn.code = :code AND pn.roleSeq = :seq") Optional countByPk(Long entityUid, String code, Long seq); /** - * private static final String SELECT_BY_PK = "SELECT max(role_seq) from ROLE with (NOLOCK) where subject_entity_uid = ? and cd = ?"; - * */ + * private static final String SELECT_BY_PK = "SELECT max(role_seq) from ROLE with (NOLOCK) where subject_entity_uid = ? and cd = ?"; + */ @Query(value = "SELECT max(p.roleSeq) FROM Role p WHERE p.subjectEntityUid = :subjectEntityUid AND p.code = :code") Optional loadCountBySubjectCdComb(@Param("subjectEntityUid") Long subjectEntityUid, @Param("code") String code); /** * String SELECT_BY_SUBJECT_SCOPING_CD = "SELECT max(role_seq) from ROLE with (NOLOCK) where subject_entity_uid = ? and cd = ? and scoping_entity_uid=?" - * */ + */ @Query(value = "SELECT max(p.roleSeq) FROM Role p WHERE p.subjectEntityUid = :subjectEntityUid AND p.code = :code AND p.scopingEntityUid = :scopingEntityUid") Optional loadCountBySubjectScpingCdComb(@Param("subjectEntityUid") Long subjectEntityUid, @Param("code") String code, @Param("scopingEntityUid") Long scopingEntityUid); - /** * String DELETE_BY_PK = "DELETE from Role where subject_entity_uid = ? and cd = ? and role_seq = ?" - * */ + */ @Modifying @Query("DELETE FROM Role data WHERE data.subjectEntityUid = ?1 AND data.code = ?2 AND data.roleSeq = ?3") void deleteRoleByPk(Long subjectEntityUid, String code, Long roleSeq); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/ParticipationStoredProcRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/ParticipationStoredProcRepository.java index effe98047..15c811f5a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/ParticipationStoredProcRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/ParticipationStoredProcRepository.java @@ -75,8 +75,6 @@ public void insertParticipation(ParticipationDto participationDto) { storedProcedure.setParameter("act_class_cd", participationDto.getActClassCd()); - - // Execute the stored procedure storedProcedure.execute(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/PublicHealthCaseStoredProcRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/PublicHealthCaseStoredProcRepository.java index 719bfc8ad..cc393cd0f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/PublicHealthCaseStoredProcRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/PublicHealthCaseStoredProcRepository.java @@ -46,17 +46,17 @@ public Collection associatedPublicHealthCaseForMprForCondCd model.setActivityDurationUnitCd((String) result[2]); model.setActivityFromTime((Timestamp) result[3]); model.setActivityToTime((Timestamp) result[4]); - model.setAddReasonCd((String) result[5]); + model.setAddReasonCd((String) result[5]); model.setAddTime((Timestamp) result[6]); - model.setAddUserId((Long) result[7]); - model.setCaseClassCd((String) result[8]); - model.setCd((String) result[9]); - model.setCdDescTxt((String) result[10]); - model.setCdSystemCd((String) result[11]); - model.setCdSystemDescTxt((String) result[12]); - model.setConfidentialityCd((String) result[13]); - model.setConfidentialityDescTxt((String) result[14]); - model.setDetectionMethodCd((String) result[15]); + model.setAddUserId((Long) result[7]); + model.setCaseClassCd((String) result[8]); + model.setCd((String) result[9]); + model.setCdDescTxt((String) result[10]); + model.setCdSystemCd((String) result[11]); + model.setCdSystemDescTxt((String) result[12]); + model.setConfidentialityCd((String) result[13]); + model.setConfidentialityDescTxt((String) result[14]); + model.setDetectionMethodCd((String) result[15]); model.setDetectionMethodDescTxt((String) result[16]); model.setDiseaseImportedCd((String) result[17]); model.setDiseaseImportedDescTxt((String) result[18]); @@ -84,7 +84,7 @@ public Collection associatedPublicHealthCaseForMprForCondCd model.setRecordStatusTime((Timestamp) result[40]); model.setRepeatNbr((Integer) result[41]); model.setRptCntyCd((String) result[42]); - model.setStatusCd( ((Character) result[43]).toString()); + model.setStatusCd(((Character) result[43]).toString()); model.setStatusTime((Timestamp) result[44]); model.setTransmissionModeCd((String) result[45]); model.setTransmissionModeDescTxt((String) result[46]); @@ -140,7 +140,7 @@ public Collection associatedPublicHealthCaseForMprForCondCd @Transactional - public Map getEDXEventProcessMap(Long nbsDocumentUid) throws DataProcessingException { + public Map getEDXEventProcessMap(Long nbsDocumentUid) throws DataProcessingException { Map eventProcessMap = new HashMap<>(); try { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/BaseConditionCode.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/BaseConditionCode.java index f79078d79..24677b9c6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/BaseConditionCode.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/BaseConditionCode.java @@ -5,12 +5,16 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity -@Data +@Getter +@Setter @Table(name = "Condition_code") public class BaseConditionCode { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CityCodeValue.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CityCodeValue.java index c31985186..24a1ad617 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CityCodeValue.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CityCodeValue.java @@ -4,11 +4,13 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; -@Data +@Getter +@Setter @Entity @Table(name = "City_code_value") public class CityCodeValue { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CodeValueGeneral.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CodeValueGeneral.java index 23f07a515..760626250 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CodeValueGeneral.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CodeValueGeneral.java @@ -4,13 +4,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.util.Date; @Entity @Table(name = "Code_value_general", schema = "dbo") -@Data +@Getter +@Setter public class CodeValueGeneral { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ConditionCode.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ConditionCode.java index 0f4c06bc2..d64818dcd 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ConditionCode.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ConditionCode.java @@ -2,10 +2,12 @@ import jakarta.persistence.Entity; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; @Entity -@Data +@Getter +@Setter @Table(name = "Condition_code") public class ConditionCode extends BaseConditionCode { } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ConditionCodeWithPA.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ConditionCodeWithPA.java index 35da0dfac..ccaebfc87 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ConditionCodeWithPA.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ConditionCodeWithPA.java @@ -4,12 +4,14 @@ import gov.cdc.dataprocessing.model.container.model.ProgramAreaContainer; import jakarta.persistence.Entity; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; @Entity -@Data +@Getter +@Setter @Table(name = "Condition_code") public class ConditionCodeWithPA extends BaseConditionCode implements Serializable, Comparable { @@ -19,6 +21,6 @@ public class ConditionCodeWithPA extends BaseConditionCode implements Serializab @Override public int compareTo(Object o) { - return getConditionShortNm().compareTo( ((ProgramAreaContainer) o).getConditionShortNm() ); + return getConditionShortNm().compareTo(((ProgramAreaContainer) o).getConditionShortNm()); } } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ElrXref.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ElrXref.java index 6a8ed1001..83d152ba0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ElrXref.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ElrXref.java @@ -4,13 +4,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.util.Date; @Entity @Table(name = "ELR_XREF", schema = "dbo") -@Data +@Getter +@Setter public class ElrXref { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionCode.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionCode.java index 18ff226fa..897af5c4d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionCode.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionCode.java @@ -4,14 +4,16 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Jurisdiction_code") -@Data +@Getter +@Setter public class JurisdictionCode { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionParticipation.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionParticipation.java index a6488c5c5..718f8b554 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionParticipation.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionParticipation.java @@ -2,16 +2,18 @@ import gov.cdc.dataprocessing.repository.nbs.srte.model.id_class.JurisdictionParticipationId; import jakarta.persistence.*; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; -@Data +@Getter +@Setter @Entity @Table(name = "Jurisdiction_participation") @IdClass(JurisdictionParticipationId.class) -public class JurisdictionParticipation implements Serializable{ +public class JurisdictionParticipation implements Serializable { @Id @Column(name = "jurisdiction_cd") private String jurisdictionCd; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCode.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCode.java index 3b1f04783..0f0020306 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCode.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCode.java @@ -4,12 +4,14 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; -@Data +@Getter +@Setter @Entity @Table(name = "LOINC_code") public class LOINCCode implements Serializable { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCodeCondition.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCodeCondition.java index d5d446ce0..7bcd17d6b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCodeCondition.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCodeCondition.java @@ -4,13 +4,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Loinc_condition") -@Data +@Getter +@Setter public class LOINCCodeCondition { @Id @Column(name = "loinc_cd", length = 20) diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResult.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResult.java index 06685bc22..99f2ea53c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResult.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResult.java @@ -4,13 +4,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Lab_result") -@Data +@Getter +@Setter public class LabResult { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResultSnomed.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResultSnomed.java index 8105364be..57f8029cb 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResultSnomed.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResultSnomed.java @@ -4,14 +4,16 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Lab_result_Snomed") -@Data +@Getter +@Setter public class LabResultSnomed { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTest.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTest.java index bf11c16e7..022b753ff 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTest.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTest.java @@ -4,13 +4,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Lab_test") -@Data +@Getter +@Setter public class LabTest { @Id @Column(name = "lab_test_cd") diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTestLoinc.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTestLoinc.java index 80c516802..59e104b7c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTestLoinc.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTestLoinc.java @@ -4,13 +4,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Labtest_loinc") -@Data +@Getter +@Setter public class LabTestLoinc { @Id @Column(name = "lab_test_cd") diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ProgramAreaCode.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ProgramAreaCode.java index 237134b7d..85b42e04e 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ProgramAreaCode.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ProgramAreaCode.java @@ -4,13 +4,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Program_area_code") -@Data +@Getter +@Setter public class ProgramAreaCode { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/RaceCode.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/RaceCode.java index 960bf1b52..f77c779ed 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/RaceCode.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/RaceCode.java @@ -4,11 +4,13 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.util.Date; -@Data +@Getter +@Setter @Entity @Table(name = "Race_code") public class RaceCode { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedCode.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedCode.java index 8eb304de2..2d9542f11 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedCode.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedCode.java @@ -4,13 +4,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Snomed_code") -@Data +@Getter +@Setter public class SnomedCode { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedCondition.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedCondition.java index f832e287f..cde993801 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedCondition.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedCondition.java @@ -5,13 +5,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.sql.Timestamp; @Entity @Table(name = "Snomed_condition") -@Data +@Getter +@Setter public class SnomedCondition { @Id diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCode.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCode.java index ffc3598f9..93ac67175 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCode.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCode.java @@ -4,11 +4,13 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.util.Date; -@Data +@Getter +@Setter @Entity @Table(name = "State_code") diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCountyCodeValue.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCountyCodeValue.java index 8fe8a1ab4..7231d939d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCountyCodeValue.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCountyCodeValue.java @@ -4,11 +4,13 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.util.Date; -@Data +@Getter +@Setter @Entity @Table(name = "State_county_code_value") public class StateCountyCodeValue { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/id_class/JurisdictionParticipationId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/id_class/JurisdictionParticipationId.java index 94b2a126f..5ea41d8a5 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/id_class/JurisdictionParticipationId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/model/id_class/JurisdictionParticipationId.java @@ -7,6 +7,7 @@ @Getter @Setter +@SuppressWarnings("all") public class JurisdictionParticipationId implements Serializable { private String jurisdictionCd; private String fipsCd; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/CodeValueGeneralRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/CodeValueGeneralRepository.java index 38500014d..118d3725f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/CodeValueGeneralRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/CodeValueGeneralRepository.java @@ -14,41 +14,41 @@ public interface CodeValueGeneralRepository extends JpaRepository findByCodeSetNmAndCode(String codeSetNm, String code); /** - * public static final String CODEQUERYSQL_FOR_DESCRIPTION_TXT = - * "Select code \"key\", " + - * "code_desc_txt \"value\" - * from " + - * "code_Value_General - * where upper(code_set_nm) = ? "; - * */ + * public static final String CODEQUERYSQL_FOR_DESCRIPTION_TXT = + * "Select code \"key\", " + + * "code_desc_txt \"value\" + * from " + + * "code_Value_General + * where upper(code_set_nm) = ? "; + */ @Query(value = "SELECT * FROM Code_value_general WHERE UPPER(code_set_nm) = ?1", nativeQuery = true) Optional> findCodeDescriptionsByCodeSetNm(String codeSetNm); /** * public static final String CODEQUERYSQL = - * "Select code \"key\", " + - * "code_short_desc_txt \"value\", - * concept_code \"altValue\" , - * status_cd \"statusCd\", - * effective_to_time \"effectiveToTime\" - * from " + - * "..code_Value_General - * where upper(code_set_nm) = ? - * order by concept_order_nbr, code_short_desc_txt "; - * */ + * "Select code \"key\", " + + * "code_short_desc_txt \"value\", + * concept_code \"altValue\" , + * status_cd \"statusCd\", + * effective_to_time \"effectiveToTime\" + * from " + + * "..code_Value_General + * where upper(code_set_nm) = ? + * order by concept_order_nbr, code_short_desc_txt "; + */ @Query(value = "SELECT * FROM Code_value_general WHERE UPPER(code_set_nm) = ?1 ORDER BY concept_order_nbr, code_short_desc_txt", nativeQuery = true) Optional> findCodeValuesByCodeSetNm(String codeSetNm); /** - * private static String SELECT_SRTCODE_INFO_SQL = - * "SELECT concept_preferred_nm \"codedValueDescription\", - * code_system_cd \"codedValueCodingSystem\", - * concept_code \"codedValue\" - * FROM "+ - * NEDSSConstants.SYSTEM_REFERENCE_TABLE + ".."; - * WHERE code_set_nm = ? AND code = ? - * */ + * private static String SELECT_SRTCODE_INFO_SQL = + * "SELECT concept_preferred_nm \"codedValueDescription\", + * code_system_cd \"codedValueCodingSystem\", + * concept_code \"codedValue\" + * FROM "+ + * NEDSSConstants.SYSTEM_REFERENCE_TABLE + ".."; + * WHERE code_set_nm = ? AND code = ? + */ @Query(value = "SELECT * FROM Code_value_general WHERE code_set_nm = ?1 AND code = ?2", nativeQuery = true) Optional> findCodeValuesByCodeSetNmAndCode(String codeSetNm, String code); } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/ConditionCodeRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/ConditionCodeRepository.java index 450526005..e905700f0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/ConditionCodeRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/ConditionCodeRepository.java @@ -32,18 +32,17 @@ Optional> findConditionCodeByLabResultLabIdAndCd( /** - * public static final String PROGRAMAREACONDITIONSSQL = - * "SELECT c.condition_cd \"conditionCd\", " + - * " c.condition_short_nm \"conditionShortNm\", - * c.prog_area_cd \"stateProgAreaCode\", " + - * "p.prog_area_desc_txt \"stateProgAreaCdDesc\", - * c. investigation_form_cd \"investigationFormCd\" - * FROM " + - * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..Condition_code c INNER JOIN " + - * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..Program_area_code p ON c.prog_area_cd = p.prog_area_cd " + - * " and c.indent_level_nbr = ? and c.prog_area_cd IN "; - * - * */ + * public static final String PROGRAMAREACONDITIONSSQL = + * "SELECT c.condition_cd \"conditionCd\", " + + * " c.condition_short_nm \"conditionShortNm\", + * c.prog_area_cd \"stateProgAreaCode\", " + + * "p.prog_area_desc_txt \"stateProgAreaCdDesc\", + * c. investigation_form_cd \"investigationFormCd\" + * FROM " + + * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..Condition_code c INNER JOIN " + + * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..Program_area_code p ON c.prog_area_cd = p.prog_area_cd " + + * " and c.indent_level_nbr = ? and c.prog_area_cd IN "; + */ @Query(value = "SELECT c.*, " + "c.prog_area_cd AS stateProgAreaCode, " + "p.prog_area_desc_txt AS stateProgAreaCdDesc " + @@ -55,14 +54,13 @@ Optional> findConditionCodeByLabResultLabIdAndCd( Optional> findProgramAreaConditionCode(@Param("indentLevel") Integer indentLevel, @Param("progAreaCodes") List progAreaCodes); - /** - * public static final String PROGRAMAREACONDITIONSSQLWOINDENT = - * "SELECT c.condition_cd \"conditionCd\", " + " c.condition_short_nm \"conditionShortNm\", c.prog_area_cd \"stateProgAreaCode\", " + "p.prog_area_desc_txt \"stateProgAreaCdDesc\", c. investigation_form_cd \"investigationFormCd\" FROM " + - * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..Condition_code c INNER JOIN " + - * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..Program_area_code p ON c.prog_area_cd = p.prog_area_cd " + - * " and c.condition_cd = ?"; - * */ + * public static final String PROGRAMAREACONDITIONSSQLWOINDENT = + * "SELECT c.condition_cd \"conditionCd\", " + " c.condition_short_nm \"conditionShortNm\", c.prog_area_cd \"stateProgAreaCode\", " + "p.prog_area_desc_txt \"stateProgAreaCdDesc\", c. investigation_form_cd \"investigationFormCd\" FROM " + + * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..Condition_code c INNER JOIN " + + * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..Program_area_code p ON c.prog_area_cd = p.prog_area_cd " + + * " and c.condition_cd = ?"; + */ @Query(value = "SELECT c.*, " + "c.prog_area_cd AS stateProgAreaCode, " + "p.prog_area_desc_txt AS stateProgAreaCdDesc " + diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/ElrXrefRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/ElrXrefRepository.java index f7199dc3b..97f99d2c4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/ElrXrefRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/ElrXrefRepository.java @@ -12,9 +12,9 @@ public interface ElrXrefRepository extends JpaRepository { /** - * private static final String ELR_CODE_X_REF_SQL = "SELECT to_code FROM "+NEDSSConstants.SYSTEM_REFERENCE_TABLE+"..elr_xref WHERE from_code_set_nm = ? "+ - * "and from_code = ? and to_code_set_nm = ?"; - * */ + * private static final String ELR_CODE_X_REF_SQL = "SELECT to_code FROM "+NEDSSConstants.SYSTEM_REFERENCE_TABLE+"..elr_xref WHERE from_code_set_nm = ? "+ + * "and from_code = ? and to_code_set_nm = ?"; + */ @Query(value = "SELECT * FROM elr_xref WHERE from_code_set_nm = ?1 " + "and from_code = ?2 and to_code_set_nm = ?3", nativeQuery = true) Optional findToCodeByConditions(String fromCodeSetNm, String fromCode, String toCodeSetNm); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/JurisdictionCodeRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/JurisdictionCodeRepository.java index 4ce0d6c56..70b1256e6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/JurisdictionCodeRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/JurisdictionCodeRepository.java @@ -12,10 +12,10 @@ public interface JurisdictionCodeRepository extends JpaRepository { /** - * public static final String JURISDICTION_CODED_VALUES_SQL = - * "SELECT code \"key\" , " + " code_desc_txt \"value\" , export_ind \"altValue\" FROM " + - * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..Jurisdiction_code order by code_desc_txt"; - * */ + * public static final String JURISDICTION_CODED_VALUES_SQL = + * "SELECT code \"key\" , " + " code_desc_txt \"value\" , export_ind \"altValue\" FROM " + + * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..Jurisdiction_code order by code_desc_txt"; + */ @Query(value = "SELECT * FROM JurisdictionCode ORDER BY code_desc_txt", nativeQuery = true) Optional> findJurisdictionCodeValues(); } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/JurisdictionParticipationRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/JurisdictionParticipationRepository.java index 388cc5b28..94bcee654 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/JurisdictionParticipationRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/JurisdictionParticipationRepository.java @@ -15,33 +15,33 @@ public interface JurisdictionParticipationRepository extends JpaRepository> findJurisdiction(@Param("fipsCd") String flipsCode, @Param("typeCd") String typeCode); /** * public static final String JURISDICTION_CITY_SELECT_SQL = - * "select a.jurisdiction_cd \"key\", 1 \"value\" " + - * "from " + NEDSSConstants.SYSTEM_REFERENCE_TABLE + - * "..jurisdiction_participation a, " + - * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..city_code_value b " + - * "where a.fips_cd= b.code " + - * "and a.type_cd = ? " + - * "and substring(b.code_desc_txt, 0, { fn LENGTH(b.code_desc_txt) }- 3) = ? " + - * "and b.parent_is_cd = ? "; - * */ + * "select a.jurisdiction_cd \"key\", 1 \"value\" " + + * "from " + NEDSSConstants.SYSTEM_REFERENCE_TABLE + + * "..jurisdiction_participation a, " + + * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..city_code_value b " + + * "where a.fips_cd= b.code " + + * "and a.type_cd = ? " + + * "and substring(b.code_desc_txt, 0, { fn LENGTH(b.code_desc_txt) }- 3) = ? " + + * "and b.parent_is_cd = ? "; + */ @Query(value = "SELECT a.jurisdiction_cd " + "FROM Jurisdiction_Participation a " + "JOIN City_Code_Value b " + @@ -50,8 +50,8 @@ public interface JurisdictionParticipationRepository extends JpaRepository> findJurisdictionForCity(@Param("typeCd") String typeCd, - @Param("substring") String substring, - @Param("parentIsCd") String parentIsCd); + @Param("substring") String substring, + @Param("parentIsCd") String parentIsCd); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LOINCCodeRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LOINCCodeRepository.java index fb260aef9..063932ab2 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LOINCCodeRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LOINCCodeRepository.java @@ -10,7 +10,7 @@ import java.util.Optional; @Repository -public interface LOINCCodeRepository extends JpaRepository { +public interface LOINCCodeRepository extends JpaRepository { @Query(value = "select * from LOINC_code where time_aspect = 'Pt' and system_cd = '^Patient'", nativeQuery = true) Optional> findLoincCodes(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabResultRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabResultRepository.java index 019379e8e..2a205b752 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabResultRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabResultRepository.java @@ -10,7 +10,7 @@ import java.util.Optional; @Repository -public interface LabResultRepository extends JpaRepository { +public interface LabResultRepository extends JpaRepository { @Query(value = "SELECT lr.defaultConditionCd FROM LabResult lr WHERE lr.labResultCd = :labResultCd AND lr.laboratoryId = :laboratoryId") Optional> findDefaultConditionCdByLabResultCdAndLaboratoryId(@Param("labResultCd") String labResultCd, @Param("laboratoryId") String laboratoryId); @@ -22,10 +22,10 @@ public interface LabResultRepository extends JpaRepository { /** - * public static final String CODED_RESULT_VALUES_SQL = - * "SELECT lab_result_cd \"key\" , " + "lab_result_desc_txt \"value\" FROM " + - * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..lab_result where ORGANISM_NAME_IND = 'N' AND LABORATORY_ID = 'DEFAULT'"; - * */ + * public static final String CODED_RESULT_VALUES_SQL = + * "SELECT lab_result_cd \"key\" , " + "lab_result_desc_txt \"value\" FROM " + + * NEDSSConstants.SYSTEM_REFERENCE_TABLE + "..lab_result where ORGANISM_NAME_IND = 'N' AND LABORATORY_ID = 'DEFAULT'"; + */ @Query("SELECT lr FROM LabResult lr WHERE lr.laboratoryId = 'DEFAULT' AND lr.organismNameInd = 'N'") Optional> findLabResultByDefaultLabAndOrgNameN(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabResultSnomedRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabResultSnomedRepository.java index a896eb0b6..3064de203 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabResultSnomedRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabResultSnomedRepository.java @@ -10,7 +10,7 @@ import java.util.Optional; @Repository -public interface LabResultSnomedRepository extends JpaRepository { +public interface LabResultSnomedRepository extends JpaRepository { @Query(value = "SELECT lr.snomedCd FROM LabResultSnomed lr WHERE lr.laboratoryId = :laboratoryId AND lr.labResultCd = :labResultCd") Optional> findSnomedCds(@Param("laboratoryId") String laboratoryId, @Param("labResultCd") String labResultCd); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabTestLoincRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabTestLoincRepository.java index bd670079b..ad5e799ed 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabTestLoincRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabTestLoincRepository.java @@ -10,7 +10,7 @@ import java.util.Optional; @Repository -public interface LabTestLoincRepository extends JpaRepository { +public interface LabTestLoincRepository extends JpaRepository { @Query(value = "SELECT lr.loincCd FROM LabTestLoinc lr WHERE lr.laboratoryId = :laboratoryId AND lr.labTestCd = :labTestCd") Optional> findLoincCds(@Param("laboratoryId") String laboratoryId, @Param("labTestCd") String labTestCd); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabTestRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabTestRepository.java index a733feffe..e69778928 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabTestRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/LabTestRepository.java @@ -20,8 +20,8 @@ public interface LabTestRepository extends JpaRepository { @Query("SELECT lt.defaultProgAreaCd AS key FROM LabTest lt WHERE lt.laboratoryId = :laboratoryId AND lt.labTestCd = :labTestCd") - Optional> findLocalTestDefaultProgramAreaCd(@Param("laboratoryId") String laboratoryId, @Param("labTestCd") String labTestCd); + Optional> findLocalTestDefaultProgramAreaCd(@Param("laboratoryId") String laboratoryId, @Param("labTestCd") String labTestCd); @Query("SELECT lt FROM LabTest lt WHERE lt.laboratoryId = :laboratoryId AND lt.labTestCd = :labTestCd") - Optional> findLabTestByLabIdAndLabTestCode(@Param("laboratoryId") String laboratoryId, @Param("labTestCd") String labTestCd); + Optional> findLabTestByLabIdAndLabTestCode(@Param("laboratoryId") String laboratoryId, @Param("labTestCd") String labTestCd); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/RaceCodeRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/RaceCodeRepository.java index 5526773f9..02d66b6de 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/RaceCodeRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/RaceCodeRepository.java @@ -12,12 +12,12 @@ public interface RaceCodeRepository extends JpaRepository { /** - * public static final String RACESQL = "select code \"key\", " + - * " code_short_desc_txt \"value\" - * from " + - * NEDSSConstants.SYSTEM_REFERENCE_TABLE + - * "..race_code " ; - * */ + * public static final String RACESQL = "select code \"key\", " + + * " code_short_desc_txt \"value\" + * from " + + * NEDSSConstants.SYSTEM_REFERENCE_TABLE + + * "..race_code " ; + */ @Query(value = "SELECT * FROM race_code WHERE status_cd = 'A'", nativeQuery = true) Optional> findAllActiveRaceCodes(); } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/SnomedCodeRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/SnomedCodeRepository.java index 190d6ac11..aa88b3d91 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/SnomedCodeRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/SnomedCodeRepository.java @@ -10,7 +10,7 @@ import java.util.Optional; @Repository -public interface SnomedCodeRepository extends JpaRepository { +public interface SnomedCodeRepository extends JpaRepository { @Query("SELECT sc FROM SnomedCode sc WHERE sc.snomedCd = :snomedCd") Optional> findSnomedProgramAreaExclusion(@Param("snomedCd") String snomedCd); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/StateCodeRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/StateCodeRepository.java index 440cd298c..04630b264 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/StateCodeRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/StateCodeRepository.java @@ -7,7 +7,7 @@ import java.util.Optional; -public interface StateCodeRepository extends JpaRepository { +public interface StateCodeRepository extends JpaRepository { @Query("SELECT pn FROM StateCode pn WHERE pn.stateNm = :state_nm") - Optional findStateCdByStateName( @Param("state_nm") String stateName); + Optional findStateCdByStateName(@Param("state_nm") String stateName); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/StateCountyCodeValueRepository.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/StateCountyCodeValueRepository.java index 67ebc45b0..1fb40c399 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/StateCountyCodeValueRepository.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/StateCountyCodeValueRepository.java @@ -12,6 +12,7 @@ public interface StateCountyCodeValueRepository extends JpaRepository { @Query(value = "SELECT * FROM State_county_code_value WHERE INDENT_LEVEL_NBR='2' ", nativeQuery = true) Optional> findByIndentLevelNbr(); + @Query(value = "SELECT * FROM State_county_code_value WHERE INDENT_LEVEL_NBR = '2' AND parent_is_cd = ?1 ORDER BY code_desc_txt", nativeQuery = true) Optional> findByIndentLevelNbrAndParentIsCdOrderByCodeDescTxt(String parentIsCd); } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/custom/SrteCustomRepositoryImpl.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/custom/SrteCustomRepositoryImpl.java index 5325f7d3e..964431710 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/custom/SrteCustomRepositoryImpl.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/custom/SrteCustomRepositoryImpl.java @@ -12,18 +12,18 @@ import static gov.cdc.dataprocessing.utilities.DataParserForSql.parseValue; @Repository -public class SrteCustomRepositoryImpl implements SrteCustomRepository{ +public class SrteCustomRepositoryImpl implements SrteCustomRepository { @PersistenceContext(unitName = "srte") private EntityManager entityManager; //THIS ONE IS FOR CACHING - public List getAllLabResultJoinWithLabCodingSystemWithOrganismNameInd() { + public List getAllLabResultJoinWithLabCodingSystemWithOrganismNameInd() { String codeSql = "Select Lab_result.LAB_RESULT_CD , lab_result_desc_txt FROM " + " Lab_result Lab_result, " - + " Lab_coding_system Lab_coding_system WHERE "+ - " Lab_coding_system.laboratory_id = 'DEFAULT' and "+ + + " Lab_coding_system Lab_coding_system WHERE " + + " Lab_coding_system.laboratory_id = 'DEFAULT' and " + " Lab_result.organism_name_ind = 'Y'"; Query query = entityManager.createNativeQuery(codeSql); @@ -31,7 +31,7 @@ public List getAllLabResultJoinWithLabCodingSystemWithOrganismNameInd List lst = new ArrayList<>(); List results = query.getResultList(); if (results != null && !results.isEmpty()) { - for(var item : results) { + for (var item : results) { int i = 0; LabResult labResult = new LabResult(); labResult.setLabResultCd(parseValue(item[i], String.class)); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/act/ActRelationshipService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/act/ActRelationshipService.java index c430d86c1..58f8607d0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/act/ActRelationshipService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/act/ActRelationshipService.java @@ -23,7 +23,7 @@ public Collection loadActRelationshipBySrcIdAndTypeCode(Long Collection actRelationshipDtoCollection = new ArrayList<>(); var result = actRelationshipRepository.loadActRelationshipBySrcIdAndTypeCode(uid, type); if (result.isPresent()) { - for(var item : result.get()) { + for (var item : result.get()) { var elem = new ActRelationshipDto(item); actRelationshipDtoCollection.add(elem); } @@ -43,8 +43,7 @@ public void saveActRelationship(ActRelationshipDto actRelationshipDto) throws Da if (actRelationshipDto.isItNew() || (actRelationshipDto.isItDirty() && actRelationshipDto.getTargetActUid() != null && actRelationshipDto.getSourceActUid() != null && actRelationshipDto.getTypeCd() != null)) { actRelationshipRepository.save(data); } - } - else if (actRelationshipDto.isItDelete()) { + } else if (actRelationshipDto.isItDelete()) { actRelationshipRepository.deleteActRelationshipByPk(actRelationshipDto.getTargetActUid(), actRelationshipDto.getSourceActUid(), actRelationshipDto.getTypeCd()); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/action/LabReportProcessing.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/action/LabReportProcessing.java index 5e74ef9fb..6c648dba8 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/action/LabReportProcessing.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/action/LabReportProcessing.java @@ -21,18 +21,17 @@ public String markAsReviewedHandler(Long observationUid, EdxLabInformationDto ed String markAsReviewedFlag = ""; try { - if(edxLabInformationDT.getAssociatedPublicHealthCaseUid()==null || edxLabInformationDT.getAssociatedPublicHealthCaseUid() <0){ + if (edxLabInformationDT.getAssociatedPublicHealthCaseUid() == null || edxLabInformationDT.getAssociatedPublicHealthCaseUid() < 0) { boolean returnValue = observationService.processObservation(observationUid); if (returnValue) { markAsReviewedFlag = "PROCESSED"; - } - else { + } else { markAsReviewedFlag = "UNPROCESSED"; } - }else { + } else { observationService.setLabInvAssociation(observationUid, edxLabInformationDT.getAssociatedPublicHealthCaseUid()); } - }catch(Exception ex){ + } catch (Exception ex) { edxLabInformationDT.setLabIsMarkedAsReviewed(false); edxLabInformationDT.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_12); throw new DataProcessingException(EdxELRConstant.ELR_MASTER_MSG_ID_12); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/answer/AnswerService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/answer/AnswerService.java index afc7901b7..950e785a4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/answer/AnswerService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/answer/AnswerService.java @@ -48,19 +48,19 @@ public PageContainer getNbsAnswerAndAssociation(Long uid) throws DataProcessingE PageContainer pageContainer = new PageContainer(); try { - Map answerDTReturnMap = getPageAnswerDTMaps(uid); + Map answerDTReturnMap = getPageAnswerDTMaps(uid); Map nbsAnswerMap; Map nbsRepeatingAnswerMap; - nbsAnswerMap=(HashMap)answerDTReturnMap.get(NEDSSConstant.NON_REPEATING_QUESTION); - nbsRepeatingAnswerMap=(HashMap)answerDTReturnMap.get(NEDSSConstant.REPEATING_QUESTION); + nbsAnswerMap = (HashMap) answerDTReturnMap.get(NEDSSConstant.NON_REPEATING_QUESTION); + nbsRepeatingAnswerMap = (HashMap) answerDTReturnMap.get(NEDSSConstant.REPEATING_QUESTION); pageContainer.setAnswerDTMap(nbsAnswerMap); pageContainer.setPageRepeatingAnswerDTMap(nbsRepeatingAnswerMap); var result = nbsActEntityRepository.getNbsActEntitiesByActUid(uid); - Collection pageCaseEntityDTCollection= new ArrayList<>(); + Collection pageCaseEntityDTCollection = new ArrayList<>(); if (result.isPresent()) { - for(var item : result.get()) { + for (var item : result.get()) { var elem = new NbsActEntityDto(item); pageCaseEntityDTCollection.add(elem); } @@ -84,7 +84,7 @@ public Map getPageAnswerDTMaps(Long actUid) { var result = nbsAnswerRepository.getPageAnswerByActUid(actUid); if (result.isPresent()) { - for(var item : result.get()){ + for (var item : result.get()) { var elem = new NbsAnswerDto(item); pageAnswerDTCollection.add(elem); } @@ -95,17 +95,15 @@ public Map getPageAnswerDTMaps(Long actUid) { Iterator it = pageAnswerDTCollection.iterator(); Long nbsQuestionUid = 0L; Collection coll = new ArrayList<>(); - while (it.hasNext()) - { + while (it.hasNext()) { NbsAnswerDto pageAnsDT = it.next(); nbsQuestionUid = processingPageAnswerMap(pageAnsDT, - nbsRepeatingAnswerMap, - nbsQuestionUid, coll, - nbsAnswerMap); + nbsRepeatingAnswerMap, + nbsQuestionUid, coll, + nbsAnswerMap); - if (!it.hasNext() && coll.size() > 0) - { + if (!it.hasNext() && coll.size() > 0) { nbsAnswerMap.put(pageAnsDT.getNbsQuestionUid(), coll); } } @@ -116,42 +114,30 @@ public Map getPageAnswerDTMaps(Long actUid) { return nbsReturnAnswerMap; } - protected Long processingPageAnswerMap(NbsAnswerDto pageAnsDT, Map nbsRepeatingAnswerMap, + protected Long processingPageAnswerMap(NbsAnswerDto pageAnsDT, Map nbsRepeatingAnswerMap, Long nbsQuestionUid, Collection coll, Map nbsAnswerMap) { - if (pageAnsDT.getAnswerGroupSeqNbr() != null && pageAnsDT.getAnswerGroupSeqNbr() > -1) - { - if (nbsRepeatingAnswerMap.get(pageAnsDT.getNbsQuestionUid()) == null) - { + if (pageAnsDT.getAnswerGroupSeqNbr() != null && pageAnsDT.getAnswerGroupSeqNbr() > -1) { + if (nbsRepeatingAnswerMap.get(pageAnsDT.getNbsQuestionUid()) == null) { Collection collection = new ArrayList<>(); collection.add(pageAnsDT); nbsRepeatingAnswerMap.put(pageAnsDT.getNbsQuestionUid(), collection); - } - else - { - Collection collection = (Collection ) nbsRepeatingAnswerMap.get(pageAnsDT.getNbsQuestionUid()); + } else { + Collection collection = (Collection) nbsRepeatingAnswerMap.get(pageAnsDT.getNbsQuestionUid()); collection.add(pageAnsDT); nbsRepeatingAnswerMap.put(pageAnsDT.getNbsQuestionUid(), collection); } - } - else if ((pageAnsDT.getNbsQuestionUid().compareTo(nbsQuestionUid) == 0) - && pageAnsDT.getSeqNbr() != null && pageAnsDT.getSeqNbr() > 0) - { + } else if ((pageAnsDT.getNbsQuestionUid().compareTo(nbsQuestionUid) == 0) + && pageAnsDT.getSeqNbr() != null && pageAnsDT.getSeqNbr() > 0) { coll.add(pageAnsDT); - } - else if (pageAnsDT.getSeqNbr() != null && pageAnsDT.getSeqNbr() > 0) - { - if (coll.size() > 0) - { + } else if (pageAnsDT.getSeqNbr() != null && pageAnsDT.getSeqNbr() > 0) { + if (coll.size() > 0) { nbsAnswerMap.put(nbsQuestionUid, coll); coll = new ArrayList<>(); } coll.add(pageAnsDT); - } - else - { - if (coll.size() > 0) - { + } else { + if (coll.size() > 0) { nbsAnswerMap.put(nbsQuestionUid, coll); } nbsAnswerMap.put(pageAnsDT.getNbsQuestionUid(), pageAnsDT); @@ -160,16 +146,17 @@ else if (pageAnsDT.getSeqNbr() != null && pageAnsDT.getSeqNbr() > 0) nbsQuestionUid = pageAnsDT.getNbsQuestionUid(); return nbsQuestionUid; } + @Transactional - public void insertPageVO(PageContainer pageContainer, ObservationDto rootDTInterface) throws DataProcessingException{ - if(pageContainer !=null && pageContainer.getAnswerDTMap() !=null ) { + public void insertPageVO(PageContainer pageContainer, ObservationDto rootDTInterface) throws DataProcessingException { + if (pageContainer != null && pageContainer.getAnswerDTMap() != null) { Collection answerDTColl = new ArrayList<>(pageContainer.getAnswerDTMap().values()); - if(answerDTColl.size()>0) { + if (answerDTColl.size() > 0) { storeAnswerDTCollection(answerDTColl, rootDTInterface); } - if(pageContainer.getPageRepeatingAnswerDTMap() != null) { + if (pageContainer.getPageRepeatingAnswerDTMap() != null) { Collection interviewRepeatingAnswerDTColl = pageContainer.getPageRepeatingAnswerDTMap().values(); - if(interviewRepeatingAnswerDTColl.size()>0) { + if (interviewRepeatingAnswerDTColl.size() > 0) { storeAnswerDTCollection(interviewRepeatingAnswerDTColl, rootDTInterface); } } @@ -184,15 +171,13 @@ public void insertPageVO(PageContainer pageContainer, ObservationDto rootDTInter @Transactional - public void storePageAnswer(PageContainer pageContainer, ObservationDto observationDto) throws DataProcessingException{ + public void storePageAnswer(PageContainer pageContainer, ObservationDto observationDto) throws DataProcessingException { try { delete(observationDto); - if(pageContainer != null && pageContainer.getAnswerDTMap() != null) - { - storeAnswerDTCollection(new ArrayList<>( pageContainer.getAnswerDTMap().values()), observationDto); + if (pageContainer != null && pageContainer.getAnswerDTMap() != null) { + storeAnswerDTCollection(new ArrayList<>(pageContainer.getAnswerDTMap().values()), observationDto); } - if(pageContainer != null && pageContainer.getPageRepeatingAnswerDTMap() != null) - { + if (pageContainer != null && pageContainer.getPageRepeatingAnswerDTMap() != null) { storeAnswerDTCollection(pageContainer.getPageRepeatingAnswerDTMap().values(), observationDto); } @@ -204,9 +189,8 @@ public void storePageAnswer(PageContainer pageContainer, ObservationDto observat } } - public void storeActEntityDTCollectionWithPublicHealthCase(Collection pamDTCollection, PublicHealthCaseDto rootDTInterface) - { - if(!pamDTCollection.isEmpty()){ + public void storeActEntityDTCollectionWithPublicHealthCase(Collection pamDTCollection, PublicHealthCaseDto rootDTInterface) { + if (!pamDTCollection.isEmpty()) { for (NbsActEntityDto pamCaseEntityDT : pamDTCollection) { if (pamCaseEntityDT.isItDelete()) { nbsActEntityRepository.deleteNbsEntityAct(pamCaseEntityDT.getNbsActEntityUid()); @@ -224,7 +208,7 @@ public void storeActEntityDTCollectionWithPublicHealthCase(Collection pamDTCollection, ObservationDto rootDTInterface) { - if(!pamDTCollection.isEmpty()){ + if (!pamDTCollection.isEmpty()) { for (NbsActEntityDto pamCaseEntityDT : pamDTCollection) { if (pamCaseEntityDT.isItDelete()) { nbsActEntityRepository.deleteNbsEntityAct(pamCaseEntityDT.getNbsActEntityUid()); @@ -242,7 +226,7 @@ void storeActEntityDTCollection(Collection pamDTCollection, Obs void insertActEntityDTCollection(Collection actEntityDTCollection, ObservationDto observationDto) // NOSONAR { - if(!actEntityDTCollection.isEmpty()){ + if (!actEntityDTCollection.isEmpty()) { for (NbsActEntityDto pamCaseEntityDT : actEntityDTCollection) { nbsActEntityRepository.save(new NbsActEntity(pamCaseEntityDT)); } @@ -252,7 +236,7 @@ void insertActEntityDTCollection(Collection actEntityDTCollecti @SuppressWarnings("java:S1172") protected void storeAnswerDTCollection(Collection answerDTColl, ObservationDto interfaceDT) throws DataProcessingException { try { - if (answerDTColl != null){ + if (answerDTColl != null) { for (Object o : answerDTColl) { NbsAnswerDto answerDT = (NbsAnswerDto) o; if (answerDT.isItDirty() || answerDT.isItNew()) { @@ -262,23 +246,23 @@ protected void storeAnswerDTCollection(Collection answerDTColl, Observat } } } - } catch(Exception ex) { + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } } - protected void delete(ObservationDto rootDTInterface) throws DataProcessingException{ + protected void delete(ObservationDto rootDTInterface) throws DataProcessingException { try { Collection answerCollection = null; var result = nbsAnswerRepository.getPageAnswerByActUid(rootDTInterface.getObservationUid()); if (result.isPresent()) { answerCollection = new ArrayList<>(); - for(var item : result.get()) { + for (var item : result.get()) { answerCollection.add(new NbsAnswerDto(item)); } } - if(answerCollection!=null && !answerCollection.isEmpty()) { + if (answerCollection != null && !answerCollection.isEmpty()) { insertAnswerHistoryDTCollection(answerCollection); } @@ -286,12 +270,12 @@ protected void delete(ObservationDto rootDTInterface) throws DataProcessingExcep Collection actEntityCollection = null; if (actEntityResult.isPresent()) { actEntityCollection = new ArrayList<>(); - for(var item: actEntityResult.get()) { + for (var item : actEntityResult.get()) { actEntityCollection.add(new NbsActEntityDto(item)); } } - if(actEntityCollection!=null && !actEntityCollection.isEmpty()) { + if (actEntityCollection != null && !actEntityCollection.isEmpty()) { insertPageEntityHistoryDTCollection(actEntityCollection, rootDTInterface); } } catch (Exception e) { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/auth_user/AuthUserService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/auth_user/AuthUserService.java index be41fecec..487b85f0b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/auth_user/AuthUserService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/auth_user/AuthUserService.java @@ -26,8 +26,7 @@ public AuthUserProfileInfo getAuthUserInfo(String authUserId) throws DataProcess authUserData.setAuthUser(authUser.get()); var authUserRoleRes = this.customAuthUserRepository.getAuthUserRealizedRole(authUserId); authUserData.setAuthUserRealizedRoleCollection(authUserRoleRes); - } - else { + } else { throw new DataProcessingException("Auth User Not Found"); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/cache/CachingValueService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/cache/CachingValueService.java index db79c4361..e2d5a5694 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/cache/CachingValueService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/cache/CachingValueService.java @@ -26,7 +26,7 @@ public class CachingValueService implements ICatchingValueService { private final JurisdictionCodeRepository jurisdictionCodeRepository; private final CodeValueGeneralRepository codeValueGeneralRepository; private final ElrXrefRepository elrXrefRepository; - private final RaceCodeRepository raceCodeRepository; + private final RaceCodeRepository raceCodeRepository; private final StateCountyCodeValueRepository stateCountyCodeValueRepository; private final StateCodeRepository stateCodeRepository; private final LOINCCodeRepository loincCodeRepository; @@ -84,7 +84,7 @@ public TreeMap getAllLoinCodeWithComponentName() throws DataProc } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } - return map; + return map; } @Cacheable(cacheNames = "srte", key = "'labResulDescWithOrgnismName'") @@ -100,11 +100,10 @@ public TreeMap getAllLabResultJoinWithLabCodingSystemWithOrganis } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } - return map; + return map; } - @Cacheable(cacheNames = "srte", key = "'snomedCodeByDesc'") public TreeMap getAllSnomedCode() throws DataProcessingException { TreeMap map = new TreeMap<>(); @@ -118,11 +117,10 @@ public TreeMap getAllSnomedCode() throws DataProcessingException } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } - return map; + return map; } - // getCodedResultDesc @Cacheable(cacheNames = "srte", key = "'labResulDesc'") public TreeMap getLabResultDesc() throws DataProcessingException { @@ -131,24 +129,24 @@ public TreeMap getLabResultDesc() throws DataProcessingException var result = labResultRepository.findLabResultByDefaultLabAndOrgNameN(); if (result.isPresent()) { var data = result.get(); - for (LabResult obj :data) { + for (LabResult obj : data) { map.put(obj.getLabResultCd(), obj.getLabResultDescTxt()); } } } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } - return map; + return map; } @Cacheable(cacheNames = "srte", key = "'loincCodes'") - public TreeMap getAOELOINCCodes() throws DataProcessingException { + public TreeMap getAOELOINCCodes() throws DataProcessingException { TreeMap map = new TreeMap<>(); try { var result = loincCodeRepository.findLoincCodes(); if (result.isPresent()) { - for (LOINCCode obj :result.get()) { + for (LOINCCode obj : result.get()) { map.put(obj.getLoincCode(), obj.getLoincCode()); } } @@ -165,14 +163,14 @@ public TreeMap getRaceCodes() throws DataProcessingException { var result = raceCodeRepository.findAllActiveRaceCodes(); if (result.isPresent()) { var raceCode = result.get(); - for (RaceCode obj :raceCode) { + for (RaceCode obj : raceCode) { map.put(obj.getCode(), obj.getCodeShortDescTxt()); } } } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } - return map; + return map; } @Cacheable(cacheNames = "srte", key = "'programAreaCodes'") @@ -180,14 +178,14 @@ public TreeMap getAllProgramAreaCodes() throws DataProcessingExc TreeMap map = new TreeMap<>(); try { var result = programAreaService.getAllProgramAreaCode(); - for (ProgramAreaCode obj :result) { + for (ProgramAreaCode obj : result) { map.put(obj.getProgAreaCd(), obj.getProgAreaDescTxt()); } } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } - return map; + return map; } @Cacheable(cacheNames = "srte", key = "'programAreaCodesWithNbsUid'") @@ -195,14 +193,14 @@ public TreeMap getAllProgramAreaCodesWithNbsUid() throws DataPr TreeMap map = new TreeMap<>(); try { var result = programAreaService.getAllProgramAreaCode(); - for (ProgramAreaCode obj :result) { + for (ProgramAreaCode obj : result) { map.put(obj.getProgAreaCd(), obj.getNbsUid()); } } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } - return map; + return map; } @Cacheable(cacheNames = "srte", key = "'jurisdictionCode'") @@ -210,14 +208,14 @@ public TreeMap getAllJurisdictionCode() throws DataProcessingExc TreeMap map = new TreeMap<>(); try { var result = jurisdictionService.getJurisdictionCode(); - for (JurisdictionCode obj :result) { + for (JurisdictionCode obj : result) { map.put(obj.getCode(), obj.getCodeDescTxt()); } } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } - return map; + return map; } @Cacheable(cacheNames = "srte", key = "'jurisdictionCodeWithNbsUid'") @@ -225,14 +223,14 @@ public TreeMap getAllJurisdictionCodeWithNbsUid() throws DataPr TreeMap map = new TreeMap<>(); try { var result = jurisdictionService.getJurisdictionCode(); - for (JurisdictionCode obj :result) { + for (JurisdictionCode obj : result) { map.put(obj.getCode(), obj.getNbsUid()); } } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } - return map; + return map; } @Cacheable(cacheNames = "srte", key = "'elrXref'") @@ -251,7 +249,7 @@ public TreeMap getAllOnInfectionConditionCode() throws DataProce try { var result = conditionCodeRepository.findCoInfectionConditionCode(); if (result.isPresent()) { - for (ConditionCode obj :result.get()) { + for (ConditionCode obj : result.get()) { map.put(obj.getConditionCd(), obj.getCoinfectionGrpCd()); } @@ -260,7 +258,7 @@ public TreeMap getAllOnInfectionConditionCode() throws DataProce } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } - return map; + return map; } @Cacheable(cacheNames = "srte", key = "'conditionCode'") @@ -274,12 +272,12 @@ public List getAllConditionCode() throws DataProcessingException } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } - return new ArrayList<>(); + return new ArrayList<>(); } /** * Retrieve value from Cache - * */ + */ public TreeMap getCodedValues(String pType, String key) throws DataProcessingException { var cache = cacheManager.getCache("srte"); if (cache != null) { @@ -292,9 +290,9 @@ public TreeMap getCodedValues(String pType, String key) throws D } } } - if ( cache != null && ( + if (cache != null && ( (SrteCache.codedValuesMap.get(key) != null && SrteCache.codedValuesMap.get(key).isEmpty()) - || SrteCache.codedValuesMap.get(key) == null) + || SrteCache.codedValuesMap.get(key) == null) ) { SrteCache.codedValuesMap.putAll(getCodedValuesCallRepos(pType)); cache.put("codedValues", SrteCache.codedValuesMap); @@ -306,8 +304,8 @@ public TreeMap getCodedValues(String pType, String key) throws D /** * Retrieve value from Cache - * */ - public String getCodeDescTxtForCd(String code, String codeSetNm) throws DataProcessingException { + */ + public String getCodeDescTxtForCd(String code, String codeSetNm) throws DataProcessingException { var cache = cacheManager.getCache("srte"); if (cache != null) { Cache.ValueWrapper valueWrapper; @@ -321,8 +319,8 @@ public String getCodeDescTxtForCd(String code, String codeSetNm) throws DataPro } if ( cache != null && ( - (SrteCache.codeDescTxtMap.get(code) != null && SrteCache.codeDescTxtMap.get(code).isEmpty()) - || SrteCache.codeDescTxtMap.get(code) == null) + (SrteCache.codeDescTxtMap.get(code) != null && SrteCache.codeDescTxtMap.get(code).isEmpty()) + || SrteCache.codeDescTxtMap.get(code) == null) ) { SrteCache.codeDescTxtMap.putAll(getCodedValuesCallRepos(codeSetNm)); cache.put("codeDescTxt", SrteCache.codeDescTxtMap); @@ -336,8 +334,7 @@ public String findToCode(String fromCodeSetNm, String fromCode, String toCodeSet var result = elrXrefRepository.findToCodeByConditions(fromCodeSetNm, fromCode, toCodeSetNm); if (result.isPresent()) { return result.get().getToCode(); - } - else { + } else { return ""; } } catch (Exception e) { @@ -349,7 +346,7 @@ public String findToCode(String fromCodeSetNm, String fromCode, String toCodeSet public String getCountyCdByDesc(String county, String stateCd) throws DataProcessingException { if (county == null || stateCd == null) { - return null; + return null; } String cnty = county.toUpperCase(); if (!cnty.endsWith("COUNTY")) { @@ -368,9 +365,9 @@ public String getCountyCdByDesc(String county, String stateCd) throws DataProces } } - if ( cache != null && + if (cache != null && ((SrteCache.countyCodeByDescMap.get(cnty) != null && SrteCache.countyCodeByDescMap.get(cnty).isEmpty()) - || SrteCache.countyCodeByDescMap.get(cnty) == null) + || SrteCache.countyCodeByDescMap.get(cnty) == null) ) { SrteCache.countyCodeByDescMap.putAll(getCountyCdByDescCallRepos(stateCd)); cache.put("countyCodeByDesc", SrteCache.countyCodeByDescMap); @@ -410,15 +407,14 @@ public TreeMap getCodedValue(String code) throws DataProcessingE try { List codeValueGeneralList; if (code.equals(ELRConstant.ELR_LOG_PROCESS)) { - var result = codeValueGeneralRepository.findCodeDescriptionsByCodeSetNm(code); - if (result.isPresent()) { - codeValueGeneralList = result.get(); - for (CodeValueGeneral obj : codeValueGeneralList) { - map.put(obj.getCode(), obj.getCodeDescTxt()); - } - } - } - else { + var result = codeValueGeneralRepository.findCodeDescriptionsByCodeSetNm(code); + if (result.isPresent()) { + codeValueGeneralList = result.get(); + for (CodeValueGeneral obj : codeValueGeneralList) { + map.put(obj.getCode(), obj.getCodeDescTxt()); + } + } + } else { var result = codeValueGeneralRepository.findCodeValuesByCodeSetNm(code); if (result.isPresent()) { codeValueGeneralList = result.get(); @@ -429,7 +425,7 @@ public TreeMap getCodedValue(String code) throws DataProcessingE } } catch (Exception e) { - throw new DataProcessingException(e.getMessage()); + throw new DataProcessingException(e.getMessage()); } return map; } @@ -445,7 +441,7 @@ private TreeMap getJurisdictionCode() throws DataProcessingExcep } } } catch (Exception e) { - throw new DataProcessingException(e.getMessage()); + throw new DataProcessingException(e.getMessage()); } return map; } @@ -454,14 +450,14 @@ protected TreeMap getCountyCdByDescCallRepos(String stateCd) thr TreeMap codeMap = new TreeMap<>(); try { Optional> result; - if( stateCd==null || stateCd.trim().equals("")) { + if (stateCd == null || stateCd.trim().equals("")) { result = stateCountyCodeValueRepository.findByIndentLevelNbr(); } else { result = stateCountyCodeValueRepository.findByIndentLevelNbrAndParentIsCdOrderByCodeDescTxt(stateCd); } if (result.isPresent()) { - var res = result.get(); + var res = result.get(); for (StateCountyCodeValue obj : res) { codeMap.put(obj.getCode() + " COUNTY", obj.getAssigningAuthorityDescTxt()); } @@ -474,6 +470,4 @@ protected TreeMap getCountyCdByDescCallRepos(String stateCd) thr } - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/data_extraction/DataExtractionService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/data_extraction/DataExtractionService.java index 6457d5957..8eb351b3d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/data_extraction/DataExtractionService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/data_extraction/DataExtractionService.java @@ -41,7 +41,8 @@ public class DataExtractionService implements IDataExtractionService { private final NbsInterfaceStoredProcRepository nbsInterfaceStoredProcRepository; private final DataExtractionServiceUtility dataExtractionServiceUtility; - public DataExtractionService ( + + public DataExtractionService( HL7PatientHandler hl7PatientHandler, ObservationRequestHandler observationRequestHandler, ObservationResultRequestHandler observationResultRequestHandler, @@ -57,6 +58,41 @@ public DataExtractionService ( this.nbsInterfaceStoredProcRepository = nbsInterfaceStoredProcRepository; } + public void specimenProcessing(EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { + if ( + edxLabInformationDto.getRootObservationContainer() != null + && edxLabInformationDto.getRootObservationContainer().getTheObservationDto() != null + && edxLabInformationDto.getRootObservationContainer().getTheObservationDto().getEffectiveFromTime() != null + ) { + nbsInterfaceStoredProcRepository.updateSpecimenCollDateSP(edxLabInformationDto.getNbsInterfaceUid(), edxLabInformationDto.getRootObservationContainer().getTheObservationDto().getEffectiveFromTime()); + } + } + + public void orderObservationNullCheck(List hl7OrderObservationArray, + EdxLabInformationDto edxLabInformationDto, NbsInterfaceModel nbsInterfaceModel) throws DataProcessingException { + if (hl7OrderObservationArray == null || hl7OrderObservationArray.size() == 0) { + edxLabInformationDto.setOrderTestNameMissing(true); + logger.error("HL7CommonLabUtil.processELR error thrown as NO OBR segment is found.Please check message with NBS_INTERFACE_UID:-" + nbsInterfaceModel.getNbsInterfaceUid()); + throw new DataProcessingException(EdxELRConstant.NO_ORDTEST_NAME); + } + } + + public boolean multipleObrCheck(int j, HL7OrderObservationType hl7OrderObservationType) { + return j > 0 && (hl7OrderObservationType.getObservationRequest().getParent() == null + || hl7OrderObservationType.getObservationRequest().getParentResult() == null + || hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationValueDescriptor() == null + || hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationValueDescriptor().getHL7String() == null + || hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationValueDescriptor().getHL7String().trim().equals("") + || hl7OrderObservationType.getObservationRequest().getParent().getHL7FillerAssignedIdentifier() == null + || hl7OrderObservationType.getObservationRequest().getParent().getHL7FillerAssignedIdentifier().getHL7EntityIdentifier() == null + || hl7OrderObservationType.getObservationRequest().getParent().getHL7FillerAssignedIdentifier().getHL7EntityIdentifier().trim().equals("") + || hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationIdentifier() == null + || (hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationIdentifier().getHL7Identifier() == null + && hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationIdentifier().getHL7AlternateIdentifier() == null) + || (hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationIdentifier().getHL7Text() == null + && hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationIdentifier().getHL7AlternateText() == null)); + } + @Transactional public LabResultProxyContainer parsingDataToObject(NbsInterfaceModel nbsInterfaceModel, EdxLabInformationDto edxLabInformationDto) throws JAXBException, DataProcessingException { @@ -65,124 +101,96 @@ public LabResultProxyContainer parsingDataToObject(NbsInterfaceModel nbsInterfac long userId = AuthUtil.authUser.getAuthUserUid(); Timestamp time = new Timestamp(new Date().getTime()); - edxLabInformationDto.setRootObserbationUid(--rootObsUid); - edxLabInformationDto.setPatientUid(--rootObsUid); - edxLabInformationDto.setNextUid(--rootObsUid); - edxLabInformationDto.setUserId(userId); - edxLabInformationDto.setAddTime(time); - - // Set Collection of EDXDocumentDto - Collection collectionXmlDoc = new ArrayList<>(); - EDXDocumentDto edxDocumentDto = new EDXDocumentDto(); - edxDocumentDto.setAddTime(time); - edxDocumentDto.setDocTypeCd(EdxELRConstant.ELR_DOC_TYPE_CD); - edxDocumentDto.setPayload(nbsInterfaceModel.getPayload()); - edxDocumentDto.setRecordStatusCd(EdxELRConstant.ELR_ACTIVE); - edxDocumentDto.setRecordStatusTime(time); - edxDocumentDto.setNbsDocumentMetadataUid(EdxELRConstant.ELR_NBS_DOC_META_UID); - edxDocumentDto.setItDirty(false); - edxDocumentDto.setItNew(true); - collectionXmlDoc.add(edxDocumentDto); - - Container container = dataExtractionServiceUtility.parsingElrXmlPayload(nbsInterfaceModel.getPayload()); - HL7LabReportType hl7LabReportType = container.getHL7LabReport(); - HL7MSHType hl7MSHType = hl7LabReportType.getHL7MSH(); - - - labResultProxyContainer = labResultUtil.getLabResultMessage(hl7MSHType, edxLabInformationDto); - List HL7PatientResultArray = hl7LabReportType.getHL7PATIENTRESULT(); - HL7PatientResultSPMType hl7PatientResultSPMType = null; - - if(HL7PatientResultArray == null || HL7PatientResultArray.size() == 0){ - edxLabInformationDto.setNoSubject(true); - edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); - logger.error("HL7CommonLabUtil.processELR error thrown as NO patient segment is found.Please check message with NBS_INTERFACE_UID:-" + nbsInterfaceModel.getNbsInterfaceUid()); - throw new DataProcessingException(EdxELRConstant.NO_SUBJECT); + edxLabInformationDto.setRootObserbationUid(--rootObsUid); + edxLabInformationDto.setPatientUid(--rootObsUid); + edxLabInformationDto.setNextUid(--rootObsUid); + edxLabInformationDto.setUserId(userId); + edxLabInformationDto.setAddTime(time); + + // Set Collection of EDXDocumentDto + Collection collectionXmlDoc = new ArrayList<>(); + EDXDocumentDto edxDocumentDto = new EDXDocumentDto(); + edxDocumentDto.setAddTime(time); + edxDocumentDto.setDocTypeCd(EdxELRConstant.ELR_DOC_TYPE_CD); + edxDocumentDto.setPayload(nbsInterfaceModel.getPayload()); + edxDocumentDto.setRecordStatusCd(EdxELRConstant.ELR_ACTIVE); + edxDocumentDto.setRecordStatusTime(time); + edxDocumentDto.setNbsDocumentMetadataUid(EdxELRConstant.ELR_NBS_DOC_META_UID); + edxDocumentDto.setItDirty(false); + edxDocumentDto.setItNew(true); + collectionXmlDoc.add(edxDocumentDto); + + Container container = dataExtractionServiceUtility.parsingElrXmlPayload(nbsInterfaceModel.getPayload()); + HL7LabReportType hl7LabReportType = container.getHL7LabReport(); + HL7MSHType hl7MSHType = hl7LabReportType.getHL7MSH(); + + + labResultProxyContainer = labResultUtil.getLabResultMessage(hl7MSHType, edxLabInformationDto); + List HL7PatientResultArray = hl7LabReportType.getHL7PATIENTRESULT(); + HL7PatientResultSPMType hl7PatientResultSPMType = null; + + if (HL7PatientResultArray == null || HL7PatientResultArray.size() == 0) { + edxLabInformationDto.setNoSubject(true); + edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); + logger.error("HL7CommonLabUtil.processELR error thrown as NO patient segment is found.Please check message with NBS_INTERFACE_UID:-" + nbsInterfaceModel.getNbsInterfaceUid()); + throw new DataProcessingException(EdxELRConstant.NO_SUBJECT); + } + // ENSURE HL7 Patient Result Array only has 1 record + else if (HL7PatientResultArray.size() > 1) { + edxLabInformationDto.setMultipleSubject(true); + edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); + logger.error("HL7CommonLabUtil.processELR error thrown as multiple patient segment is found.Please check message with NBS_INTERFACE_UID:-" + nbsInterfaceModel.getNbsInterfaceUid()); + throw new DataProcessingException(EdxELRConstant.MULTIPLE_SUBJECT); + } + + /** + * The If Else above ensure there is only Record with Single Patient Result can move forward + * */ + HL7PATIENTRESULTType hl7PATIENTRESULTType = HL7PatientResultArray.get(0); + labResultProxyContainer = hl7PatientHandler.getPatientAndNextOfKin(hl7PATIENTRESULTType, labResultProxyContainer, edxLabInformationDto); + + List hl7OrderObservationArray = hl7PATIENTRESULTType.getORDEROBSERVATION(); + + orderObservationNullCheck(hl7OrderObservationArray, edxLabInformationDto, nbsInterfaceModel); + + for (int j = 0; j < hl7OrderObservationArray.size(); j++) { + HL7OrderObservationType hl7OrderObservationType = hl7OrderObservationArray.get(j); + if (hl7OrderObservationType.getCommonOrder() != null) { + orcHandler.getORCProcessing(hl7OrderObservationType.getCommonOrder(), labResultProxyContainer, edxLabInformationDto); } - // ENSURE HL7 Patient Result Array only has 1 record - else if(HL7PatientResultArray.size() > 1){ - edxLabInformationDto.setMultipleSubject(true); - edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); - logger.error("HL7CommonLabUtil.processELR error thrown as multiple patient segment is found.Please check message with NBS_INTERFACE_UID:-" + nbsInterfaceModel.getNbsInterfaceUid()); - throw new DataProcessingException(EdxELRConstant.MULTIPLE_SUBJECT); + + if (hl7OrderObservationType.getPatientResultOrderSPMObservation() != null) { + hl7PatientResultSPMType = hl7OrderObservationType.getPatientResultOrderSPMObservation(); } - /** - * The If Else above ensure there is only Record with Single Patient Result can move forward - * */ - HL7PATIENTRESULTType hl7PATIENTRESULTType = HL7PatientResultArray.get(0); - labResultProxyContainer = hl7PatientHandler.getPatientAndNextOfKin(hl7PATIENTRESULTType, labResultProxyContainer, edxLabInformationDto); + if ( + j == 0 && + (hl7OrderObservationType.getObservationRequest().getParent() != null + || hl7OrderObservationType.getObservationRequest().getParentResult() != null) + ) { + edxLabInformationDto.setOrderOBRWithParent(true); + edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); + logger.error("HL7CommonLabUtil.processELR error thrown as either OBR26 is null OR OBR 29 is \"NOT NULL\" for the first OBR section.Please check message with NBS_INTERFACE_UID:-" + nbsInterfaceModel.getNbsInterfaceUid()); + throw new DataProcessingException(EdxELRConstant.ORDER_OBR_WITH_PARENT); - List hl7OrderObservationArray = hl7PATIENTRESULTType.getORDEROBSERVATION(); + } else if (multipleObrCheck(j, hl7OrderObservationType)) { - if(hl7OrderObservationArray==null || hl7OrderObservationArray.size() == 0){ - edxLabInformationDto.setOrderTestNameMissing(true); - logger.error("HL7CommonLabUtil.processELR error thrown as NO OBR segment is found.Please check message with NBS_INTERFACE_UID:-"+ nbsInterfaceModel.getNbsInterfaceUid()); - throw new DataProcessingException(EdxELRConstant.NO_ORDTEST_NAME); + edxLabInformationDto.setMultipleOBR(true); + logger.error("HL7CommonLabUtil.processELR error thrown as either OBR26 is null OR OBR 29 is null for the OBR " + (j + 1) + ".Please check message with NBS_INTERFACE_UID:-" + nbsInterfaceModel.getNbsInterfaceUid()); + edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); + throw new DataProcessingException(EdxELRConstant.MULTIPLE_OBR); } - for (int j = 0; j < hl7OrderObservationArray.size(); j++) { - HL7OrderObservationType hl7OrderObservationType = hl7OrderObservationArray.get(j); - if (hl7OrderObservationType.getCommonOrder() != null) { - orcHandler.getORCProcessing(hl7OrderObservationType.getCommonOrder(), labResultProxyContainer, edxLabInformationDto); - } - - if (hl7OrderObservationType.getPatientResultOrderSPMObservation() != null) { - hl7PatientResultSPMType = hl7OrderObservationType.getPatientResultOrderSPMObservation(); - } - - if( - j==0 && - (hl7OrderObservationType.getObservationRequest().getParent() != null - ||hl7OrderObservationType.getObservationRequest().getParentResult() != null) - ) - { - edxLabInformationDto.setOrderOBRWithParent(true); - edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); - logger.error("HL7CommonLabUtil.processELR error thrown as either OBR26 is null OR OBR 29 is \"NOT NULL\" for the first OBR section.Please check message with NBS_INTERFACE_UID:-"+ nbsInterfaceModel.getNbsInterfaceUid()); - throw new DataProcessingException(EdxELRConstant.ORDER_OBR_WITH_PARENT); - - } - else if( - j>0 && (hl7OrderObservationType.getObservationRequest().getParent()==null - || hl7OrderObservationType.getObservationRequest().getParentResult()==null - || hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationValueDescriptor()== null - || hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationValueDescriptor().getHL7String() == null - || hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationValueDescriptor().getHL7String().trim().equals("") - || hl7OrderObservationType.getObservationRequest().getParent().getHL7FillerAssignedIdentifier()==null - || hl7OrderObservationType.getObservationRequest().getParent().getHL7FillerAssignedIdentifier().getHL7EntityIdentifier()==null - || hl7OrderObservationType.getObservationRequest().getParent().getHL7FillerAssignedIdentifier().getHL7EntityIdentifier().trim().equals("") - || hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationIdentifier()==null - || (hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationIdentifier().getHL7Identifier()==null - && hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationIdentifier().getHL7AlternateIdentifier()==null) - || (hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationIdentifier().getHL7Text()==null - && hl7OrderObservationType.getObservationRequest().getParentResult().getParentObservationIdentifier().getHL7AlternateText()==null)) - ) - { - - edxLabInformationDto.setMultipleOBR(true); - logger.error("HL7CommonLabUtil.processELR error thrown as either OBR26 is null OR OBR 29 is null for the OBR "+(j+1)+".Please check message with NBS_INTERFACE_UID:-"+ nbsInterfaceModel.getNbsInterfaceUid()); - edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); - throw new DataProcessingException(EdxELRConstant.MULTIPLE_OBR); - } - - observationRequestHandler.getObservationRequest(hl7OrderObservationType.getObservationRequest(), hl7PatientResultSPMType, labResultProxyContainer, edxLabInformationDto); - - if( - edxLabInformationDto.getRootObservationContainer()!=null - && edxLabInformationDto.getRootObservationContainer().getTheObservationDto()!=null - && edxLabInformationDto.getRootObservationContainer().getTheObservationDto().getEffectiveFromTime()!=null - ) - { - nbsInterfaceStoredProcRepository.updateSpecimenCollDateSP(edxLabInformationDto.getNbsInterfaceUid(), edxLabInformationDto.getRootObservationContainer().getTheObservationDto().getEffectiveFromTime()); - } - - observationResultRequestHandler.getObservationResultRequest(hl7OrderObservationType.getPatientResultOrderObservation().getOBSERVATION(), labResultProxyContainer, edxLabInformationDto); + observationRequestHandler.getObservationRequest(hl7OrderObservationType.getObservationRequest(), hl7PatientResultSPMType, labResultProxyContainer, edxLabInformationDto); - } - labResultProxyContainer.setEDXDocumentCollection(collectionXmlDoc); + specimenProcessing(edxLabInformationDto); + + observationResultRequestHandler.getObservationResultRequest(hl7OrderObservationType.getPatientResultOrderObservation().getOBSERVATION(), labResultProxyContainer, edxLabInformationDto); + + } + labResultProxyContainer.setEDXDocumentCollection(collectionXmlDoc); - return labResultProxyContainer; + return labResultProxyContainer; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/entity/EntityLocatorParticipationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/entity/EntityLocatorParticipationService.java index 9304083ba..18bedb58d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/entity/EntityLocatorParticipationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/entity/EntityLocatorParticipationService.java @@ -28,6 +28,7 @@ public class EntityLocatorParticipationService implements IEntityLocatorParticip private final PostalLocatorRepository postalLocatorRepository; private final PhysicalLocatorRepository physicalLocatorRepository; private final OdseIdGeneratorService odseIdGeneratorService; + public EntityLocatorParticipationService(EntityLocatorParticipationRepository entityLocatorParticipationRepository, TeleLocatorRepository teleLocatorRepository, PostalLocatorRepository postalLocatorRepository, @@ -40,11 +41,12 @@ public EntityLocatorParticipationService(EntityLocatorParticipationRepository en this.odseIdGeneratorService = odseIdGeneratorService; } + @SuppressWarnings({"java:S6541", "java:S3776"}) @Transactional public void updateEntityLocatorParticipation(Collection locatorCollection, Long patientUid) throws DataProcessingException { - ArrayList personList = (ArrayList ) locatorCollection; - var uid = patientUid; + ArrayList personList = (ArrayList) locatorCollection; + Long uid = patientUid; var locatorData = entityLocatorParticipationRepository.findByParentUid(uid); List entityLocatorParticipations = new ArrayList<>(); if (locatorData.isPresent()) { @@ -70,14 +72,12 @@ public void updateEntityLocatorParticipation(Collection compareStringList = new ArrayList<>(); - if (existingLocator.isPresent()) - { + if (existingLocator.isPresent()) { for (int j = 0; j < existingLocator.get().size(); j++) { comparingString.setLength(0); comparingString.append(existingLocator.get().get(j).getCityCd()); @@ -174,39 +163,29 @@ else if ( uid = entityLocatorParticipationDto.getEntityUid(); entityLocatorParticipationDto.getThePostalLocatorDto().setPostalLocatorUid(localUid.getSeedValueNbr()); postalLocatorRepository.save(new PostalLocator(entityLocatorParticipationDto.getThePostalLocatorDto())); - } - else - { + } else { newLocator = false; } - } - else - { + } else { uid = entityLocatorParticipationDto.getEntityUid(); entityLocatorParticipationDto.getThePostalLocatorDto().setPostalLocatorUid(localUid.getSeedValueNbr()); postalLocatorRepository.save(new PostalLocator(entityLocatorParticipationDto.getThePostalLocatorDto())); } comparingString.setLength(0); - } - else - { + } else { uid = entityLocatorParticipationDto.getEntityUid(); entityLocatorParticipationDto.getThePostalLocatorDto().setPostalLocatorUid(localUid.getSeedValueNbr()); postalLocatorRepository.save(new PostalLocator(entityLocatorParticipationDto.getThePostalLocatorDto())); } - } - else if (entityLocatorParticipationDto.getClassCd().equals(NEDSSConstant.TELE) && entityLocatorParticipationDto.getTheTeleLocatorDto() != null) - { - if (!teleLocators.isEmpty()) - { + } else if (entityLocatorParticipationDto.getClassCd().equals(NEDSSConstant.TELE) && entityLocatorParticipationDto.getTheTeleLocatorDto() != null) { + if (!teleLocators.isEmpty()) { var existingLocator = teleLocatorRepository.findByTeleLocatorUids( teleLocators.stream() .map(EntityLocatorParticipation::getLocatorUid) .collect(Collectors.toList())); List compareStringList = new ArrayList<>(); - if (existingLocator.isPresent()) - { + if (existingLocator.isPresent()) { for (int j = 0; j < existingLocator.get().size(); j++) { comparingString.setLength(0); comparingString.append(existingLocator.get().get(j).getCntryCd()); @@ -224,35 +203,26 @@ else if (entityLocatorParticipationDto.getClassCd().equals(NEDSSConstant.TELE) & existComparingLocator.append(entityLocatorParticipationDto.getTheTeleLocatorDto().getPhoneNbrTxt()); existComparingLocator.append(entityLocatorParticipationDto.getTheTeleLocatorDto().getUrlAddress()); - if (!compareStringList.contains(existComparingLocator.toString().toUpperCase())) - { + if (!compareStringList.contains(existComparingLocator.toString().toUpperCase())) { uid = entityLocatorParticipationDto.getEntityUid(); entityLocatorParticipationDto.getTheTeleLocatorDto().setTeleLocatorUid(localUid.getSeedValueNbr()); teleLocatorRepository.save(new TeleLocator(entityLocatorParticipationDto.getTheTeleLocatorDto())); - } - else - { + } else { newLocator = false; } - } - else - { + } else { uid = entityLocatorParticipationDto.getEntityUid(); entityLocatorParticipationDto.getTheTeleLocatorDto().setTeleLocatorUid(localUid.getSeedValueNbr()); teleLocatorRepository.save(new TeleLocator(entityLocatorParticipationDto.getTheTeleLocatorDto())); } comparingString.setLength(0); - } - else - { + } else { uid = entityLocatorParticipationDto.getEntityUid(); entityLocatorParticipationDto.getTheTeleLocatorDto().setTeleLocatorUid(localUid.getSeedValueNbr()); teleLocatorRepository.save(new TeleLocator(entityLocatorParticipationDto.getTheTeleLocatorDto())); } - } - else - { + } else { newLocator = false; } @@ -273,7 +243,7 @@ else if (entityLocatorParticipationDto.getClassCd().equals(NEDSSConstant.TELE) & @Transactional public void createEntityLocatorParticipation(Collection locatorCollection, Long uid) throws DataProcessingException { - ArrayList personList = (ArrayList ) locatorCollection; + ArrayList personList = (ArrayList) locatorCollection; try { for (EntityLocatorParticipationDto entityLocatorParticipationDto : personList) { boolean inserted = false; @@ -290,7 +260,7 @@ public void createEntityLocatorParticipation(Collection findEntityLocatorById(Long uid) { - var result = entityLocatorParticipationRepository.findByParentUid(uid); + var result = entityLocatorParticipationRepository.findByParentUid(uid); return result.orElseGet(ArrayList::new); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/AutoInvestigationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/AutoInvestigationService.java index 0da1b237c..552b27fb4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/AutoInvestigationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/AutoInvestigationService.java @@ -46,6 +46,7 @@ public class AutoInvestigationService implements IAutoInvestigationService { private final ConditionCodeRepository conditionCodeRepository; private final ICatchingValueService catchingValueService; private final ILookupService lookupService; + public AutoInvestigationService(ConditionCodeRepository conditionCodeRepository, ICatchingValueService catchingValueService, ILookupService lookupService) { @@ -54,11 +55,21 @@ public AutoInvestigationService(ConditionCodeRepository conditionCodeRepository, this.lookupService = lookupService; } + protected boolean autoCreateInvestigationTypeFormRvctCheck(EdxLabInformationDto edxLabInformationDT) { + return edxLabInformationDT.getInvestigationType() != null && edxLabInformationDT.getInvestigationType().equalsIgnoreCase(NEDSSConstant.INV_FORM_RVCT); + } + + protected boolean autoCreateInvestigationRvctAndFormVarCheck(EdxLabInformationDto edxLabInformationDT) { + return edxLabInformationDT.getInvestigationType() != null + && (edxLabInformationDT.getInvestigationType().equalsIgnoreCase(NEDSSConstant.INV_FORM_VAR) + || edxLabInformationDT.getInvestigationType().equalsIgnoreCase(NEDSSConstant.INV_FORM_RVCT)); + } + public Object autoCreateInvestigation(ObservationContainer observationVO, EdxLabInformationDto edxLabInformationDT) throws DataProcessingException { PageActProxyContainer pageActProxyContainer = null; PamProxyContainer pamProxyVO = null; - PublicHealthCaseContainer phcVO= createPublicHealthCaseVO(observationVO, edxLabInformationDT); + PublicHealthCaseContainer phcVO = createPublicHealthCaseVO(observationVO, edxLabInformationDT); Collection theActIdDTCollection = new ArrayList<>(); ActIdDto actIDDT = new ActIdDto(); @@ -67,7 +78,7 @@ public Object autoCreateInvestigation(ObservationContainer observationVO, actIDDT.setTypeCd(NEDSSConstant.ACT_ID_STATE_TYPE_CD); theActIdDTCollection.add(actIDDT); phcVO.setTheActIdDTCollection(theActIdDTCollection); - if(edxLabInformationDT.getInvestigationType()!=null && edxLabInformationDT.getInvestigationType().equalsIgnoreCase(NEDSSConstant.INV_FORM_RVCT)){ + if (autoCreateInvestigationTypeFormRvctCheck(edxLabInformationDT)) { ActIdDto actID1DT = new ActIdDto(); actID1DT.setItNew(true); actID1DT.setActIdSeq(2); @@ -75,17 +86,12 @@ public Object autoCreateInvestigation(ObservationContainer observationVO, theActIdDTCollection.add(actID1DT); phcVO.setTheActIdDTCollection(theActIdDTCollection); } - if (edxLabInformationDT.getInvestigationType()!=null - && (edxLabInformationDT.getInvestigationType().equalsIgnoreCase(NEDSSConstant.INV_FORM_VAR) - || edxLabInformationDT.getInvestigationType().equalsIgnoreCase(NEDSSConstant.INV_FORM_RVCT))) - { + if (autoCreateInvestigationRvctAndFormVarCheck(edxLabInformationDT)) { pamProxyVO = new PamProxyContainer(); pamProxyVO.setItNew(true); pamProxyVO.setItDirty(false); pamProxyVO.setPublicHealthCaseContainer(phcVO); - } - else - { + } else { pageActProxyContainer = new PageActProxyContainer(); pageActProxyContainer.setItNew(true); pageActProxyContainer.setItDirty(false); @@ -96,17 +102,14 @@ public Object autoCreateInvestigation(ObservationContainer observationVO, try { Object obj; - if(pageActProxyContainer !=null) - { - obj= pageActProxyContainer; - } - else - { - obj=pamProxyVO; + if (pageActProxyContainer != null) { + obj = pageActProxyContainer; + } else { + obj = pamProxyVO; } return obj; } catch (Exception e) { - throw new DataProcessingException("AutoInvestigationHandler-autoCreateInvestigation NEDSSSystemException raised"+e); + throw new DataProcessingException("AutoInvestigationHandler-autoCreateInvestigation NEDSSSystemException raised" + e); } } @@ -115,21 +118,21 @@ public Object transferValuesTOActProxyVO(PageActProxyContainer pageActProxyConta Collection personVOCollection, ObservationContainer rootObservationVO, Collection entities, - Map questionIdentifierMap) throws DataProcessingException{ + Map questionIdentifierMap) throws DataProcessingException { try { PersonContainer patientVO; - boolean isOrgAsReporterOfPHCPartDT=false; - boolean isPhysicianOfPHCDT=false; + boolean isOrgAsReporterOfPHCPartDT = false; + boolean isPhysicianOfPHCDT = false; Collection coll = rootObservationVO.getTheParticipationDtoCollection(); Collection partColl = new ArrayList<>(); Collection nbsActEntityDTColl = new ArrayList<>(); long personUid; - if(pageActProxyContainer !=null) - personUid= pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getPublicHealthCaseUid()-1; - else{ - personUid=pamActProxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getPublicHealthCaseUid()-1; + if (pageActProxyContainer != null) + personUid = pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getPublicHealthCaseUid() - 1; + else { + personUid = pamActProxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getPublicHealthCaseUid() - 1; } - if(personVOCollection!=null){ + if (personVOCollection != null) { for (PersonContainer personVO : personVOCollection) { if (personVO.getThePersonDto().getCd().equals("PAT")) { patientVO = personVO; @@ -151,7 +154,7 @@ public Object transferValuesTOActProxyVO(PageActProxyContainer pageActProxyConta } } } - if(entities!=null && entities.size()>0){ + if (entities != null && entities.size() > 0) { for (Object entity : entities) { EdxRuleManageDto edxRuleManageDT = (EdxRuleManageDto) entity; ParticipationDto participationDT = new ParticipationDto(); @@ -167,7 +170,7 @@ public Object transferValuesTOActProxyVO(PageActProxyContainer pageActProxyConta createActEntityObject(participationDT, pageActProxyContainer, pamActProxyVO, nbsActEntityDTColl, partColl); } } - if(coll!=null){ + if (coll != null) { for (ParticipationDto partDT : coll) { boolean createActEntity = false; @@ -207,30 +210,23 @@ public Object transferValuesTOActProxyVO(PageActProxyContainer pageActProxyConta } - if(pageActProxyContainer !=null){ + if (pageActProxyContainer != null) { pageActProxyContainer.setTheParticipationDtoCollection(partColl); - BasePamContainer pamVO ; - if(pageActProxyContainer.getPageVO()!=null) - { - pamVO= pageActProxyContainer.getPageVO(); - } - else - { + BasePamContainer pamVO; + if (pageActProxyContainer.getPageVO() != null) { + pamVO = pageActProxyContainer.getPageVO(); + } else { pamVO = new BasePamContainer(); } pamVO.setActEntityDTCollection(nbsActEntityDTColl); pageActProxyContainer.setPageVO(pamVO); return pageActProxyContainer; - } - else{ + } else { pamActProxyVO.setTheParticipationDTCollection(partColl); BasePamContainer pamVO; - if(pamActProxyVO.getPamVO()!=null) - { - pamVO=pamActProxyVO.getPamVO(); - } - else - { + if (pamActProxyVO.getPamVO() != null) { + pamVO = pamActProxyVO.getPamVO(); + } else { pamVO = new BasePamContainer(); } pamVO.setActEntityDTCollection(nbsActEntityDTColl); @@ -239,11 +235,11 @@ public Object transferValuesTOActProxyVO(PageActProxyContainer pageActProxyConta } } catch (Exception e) { - throw new DataProcessingException("AutoInvestigationHandler-transferValuesTOActProxyVO Exception raised"+e); + throw new DataProcessingException("AutoInvestigationHandler-transferValuesTOActProxyVO Exception raised" + e); } } - private PublicHealthCaseContainer createPublicHealthCaseVO(ObservationContainer observationVO, EdxLabInformationDto edxLabInformationDT) throws DataProcessingException { + protected PublicHealthCaseContainer createPublicHealthCaseVO(ObservationContainer observationVO, EdxLabInformationDto edxLabInformationDT) throws DataProcessingException { PublicHealthCaseContainer phcVO = new PublicHealthCaseContainer(); phcVO.getThePublicHealthCaseDto().setLastChgTime(new java.sql.Timestamp(new Date().getTime())); @@ -266,7 +262,7 @@ private PublicHealthCaseContainer createPublicHealthCaseVO(ObservationContainer phcVO.getThePublicHealthCaseDto().setCd(programAreaVO.getConditionCd()); phcVO.getThePublicHealthCaseDto().setProgAreaCd(programAreaVO.getStateProgAreaCode()); - if(SrteCache.checkWhetherPAIsStdOrHiv(programAreaVO.getStateProgAreaCode())) + if (SrteCache.checkWhetherPAIsStdOrHiv(programAreaVO.getStateProgAreaCode())) phcVO.getThePublicHealthCaseDto().setReferralBasisCd(NEDSSConstant.REFERRAL_BASIS_LAB); phcVO.getThePublicHealthCaseDto().setSharedInd(NEDSSConstant.TRUE); @@ -277,7 +273,7 @@ private PublicHealthCaseContainer createPublicHealthCaseVO(ObservationContainer StringUtils.stringToStrutsTimestamp(StringUtils .formatDate(new Timestamp((new Date()).getTime())))); Calendar now = Calendar.getInstance(); - String dateValue = (now.get(Calendar.MONTH)+1) +"/" + now.get(Calendar.DATE) +"/" + now.get(Calendar.YEAR); + String dateValue = (now.get(Calendar.MONTH) + 1) + "/" + now.get(Calendar.DATE) + "/" + now.get(Calendar.YEAR); int[] weekAndYear = RulesEngineUtil.CalcMMWR(dateValue); phcVO.getThePublicHealthCaseDto().setMmwrWeek(String.valueOf(weekAndYear[0])); phcVO.getThePublicHealthCaseDto().setMmwrYear(String.valueOf(weekAndYear[1])); @@ -293,7 +289,7 @@ private PublicHealthCaseContainer createPublicHealthCaseVO(ObservationContainer phcVO.setItNew(true); phcVO.setItDirty(false); - try{ + try { boolean isSTDProgramArea = SrteCache.checkWhetherPAIsStdOrHiv(phcVO.getThePublicHealthCaseDto().getProgAreaCd()); if (isSTDProgramArea) { CaseManagementDto caseMgtDT = new CaseManagementDto(); @@ -301,8 +297,8 @@ private PublicHealthCaseContainer createPublicHealthCaseVO(ObservationContainer caseMgtDT.setCaseManagementDTPopulated(true); phcVO.setTheCaseManagementDto(caseMgtDT); } - } catch(Exception ex){ - throw new DataProcessingException("Unexpected exception setting CaseManagementDto to PHC -->" +ex); + } catch (Exception ex) { + throw new DataProcessingException("Unexpected exception setting CaseManagementDto to PHC -->" + ex); } return phcVO; @@ -328,8 +324,7 @@ protected void populateProxyFromPrePopMapping(PageActProxyContainer pageActProxy for (ObservationContainer obs : obsCollection) { if (obs.getTheObsValueNumericDtoCollection() != null && obs.getTheObsValueNumericDtoCollection().size() > 0 - && fromPrePopMap.containsKey(obs.getTheObservationDto().getCd())) - { + && fromPrePopMap.containsKey(obs.getTheObservationDto().getCd())) { List obsValueNumList = new ArrayList<>(obs.getTheObsValueNumericDtoCollection()); String value = obsValueNumList.get(0).getNumericUnitCd() == null @@ -337,19 +332,15 @@ protected void populateProxyFromPrePopMapping(PageActProxyContainer pageActProxy : obsValueNumList.get(0).getNumericValue1() + "^" + obsValueNumList.get(0).getNumericUnitCd(); prePopMap.put(obs.getTheObservationDto().getCd(), value); - } - else if (obs.getTheObsValueDateDtoCollection() != null + } else if (obs.getTheObsValueDateDtoCollection() != null && obs.getTheObsValueDateDtoCollection().size() > 0 - && fromPrePopMap.containsKey(obs.getTheObservationDto().getCd())) - { + && fromPrePopMap.containsKey(obs.getTheObservationDto().getCd())) { List obsValueDateList = new ArrayList<>(obs.getTheObsValueDateDtoCollection()); String value = StringUtils.formatDate(obsValueDateList.get(0).getFromTime()); prePopMap.put(obs.getTheObservationDto().getCd(), value); - } - else if (obs.getTheObsValueCodedDtoCollection() != null - && obs.getTheObsValueCodedDtoCollection().size() > 0) - { + } else if (obs.getTheObsValueCodedDtoCollection() != null + && obs.getTheObsValueCodedDtoCollection().size() > 0) { List obsValueCodeList = new ArrayList<>(obs.getTheObsValueCodedDtoCollection()); @@ -359,10 +350,8 @@ else if (obs.getTheObsValueCodedDtoCollection() != null } else if (fromPrePopMap.containsKey(obs.getTheObservationDto().getCd())) { prePopMap.put(obs.getTheObservationDto().getCd(), obsValueCodeList.get(0).getCode()); } - } - else if (obs.getTheObsValueTxtDtoCollection() != null && obs.getTheObsValueTxtDtoCollection().size() > 0 - && fromPrePopMap.containsKey(obs.getTheObservationDto().getCd())) - { + } else if (obs.getTheObsValueTxtDtoCollection() != null && obs.getTheObsValueTxtDtoCollection().size() > 0 + && fromPrePopMap.containsKey(obs.getTheObservationDto().getCd())) { for (ObsValueTxtDto obsValueTxtDT : obs.getTheObsValueTxtDtoCollection()) { if (obsValueTxtDT.getTxtTypeCd() == null || obsValueTxtDT.getTxtTypeCd().trim().equals("") || obsValueTxtDT.getTxtTypeCd().equalsIgnoreCase("O")) { @@ -450,8 +439,7 @@ private void populateFromPrePopMapping(TreeMap prePopMap, PageAc String dataLocation = null; NbsQuestionMetadata quesMetadata = (NbsQuestionMetadata) questionMap .get(toPrePopMappingDT.getToQuestionIdentifier()); - if (quesMetadata != null) - { + if (quesMetadata != null) { dataLocation = quesMetadata.getDataLocation(); } if (toPrePopMappingDT.getToDataType() != null @@ -467,13 +455,9 @@ private void populateFromPrePopMapping(TreeMap prePopMap, PageAc } catch (Exception ex) { logger.info(ex.getMessage()); } - } - else if (toPrePopMappingDT.getToAnswerCode() != null) - { + } else if (toPrePopMappingDT.getToAnswerCode() != null) { value = toPrePopMappingDT.getToAnswerCode(); - } - else - { + } else { value = (String) prePopMap.get(mappingKey); } @@ -500,16 +484,13 @@ else if (toPrePopMappingDT.getToAnswerCode() != null) } } - private void createActEntityObject(ParticipationDto partDT, PageActProxyContainer pageActProxyContainer, - PamProxyContainer pamActProxyVO, Collection nbsActEntityDTColl, Collection partColl ) throws DataProcessingException { + protected void createActEntityObject(ParticipationDto partDT, PageActProxyContainer pageActProxyContainer, + PamProxyContainer pamActProxyVO, Collection nbsActEntityDTColl, Collection partColl) throws DataProcessingException { partDT.setActClassCd(NEDSSConstant.CLASS_CD_CASE); - if(pageActProxyContainer !=null) - { + if (pageActProxyContainer != null) { partDT.setActUid(pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getPublicHealthCaseUid()); - } - else - { + } else { partDT.setActUid(pamActProxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getPublicHealthCaseUid()); } var tree = catchingValueService.getCodedValue(partDT.getTypeCd()); @@ -526,13 +507,13 @@ private void createActEntityObject(ParticipationDto partDT, PageActProxyContaine NbsActEntityDto nbsActEntityDT = new NbsActEntityDto(); - if(pageActProxyContainer !=null){ + if (pageActProxyContainer != null) { nbsActEntityDT.setAddTime(pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getAddTime()); nbsActEntityDT.setLastChgTime(pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getLastChgTime()); nbsActEntityDT.setLastChgUserId(pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getLastChgUserId()); nbsActEntityDT.setRecordStatusCd(pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getRecordStatusCd()); nbsActEntityDT.setAddUserId(pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getAddUserId()); - }else{ + } else { nbsActEntityDT.setAddTime(pamActProxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getAddTime()); nbsActEntityDT.setLastChgTime(pamActProxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getLastChgTime()); nbsActEntityDT.setLastChgUserId(pamActProxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getLastChgUserId()); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/DecisionSupportService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/DecisionSupportService.java index fa9a2abba..783a1bff6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/DecisionSupportService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/DecisionSupportService.java @@ -36,6 +36,9 @@ @Service public class DecisionSupportService implements IDecisionSupportService { + /*sort PublicHealthCaseDTs by add_time descending*/ + final Comparator ADDTIME_ORDER = (e1, e2) -> e2.getAddTime().compareTo(e1.getAddTime()); + final Comparator AlGORITHM_NM_ORDER = (e1, e2) -> e1.getAlgorithmNm().compareToIgnoreCase(e2.getAlgorithmNm()); private final EdxPhcrDocumentUtil edxPhcrDocumentUtil; private final IAutoInvestigationService autoInvestigationService; private final ValidateDecisionSupport validateDecisionSupport; @@ -43,7 +46,6 @@ public class DecisionSupportService implements IDecisionSupportService { private final DsmAlgorithmService dsmAlgorithmService; private final AdvancedCriteria advancedCriteria; private final WdsObjectChecker wdsObjectChecker; - public DecisionSupportService(EdxPhcrDocumentUtil edxPhcrDocumentUtil, IAutoInvestigationService autoInvestigationService, ValidateDecisionSupport validateDecisionSupport, @@ -58,31 +60,26 @@ public DecisionSupportService(EdxPhcrDocumentUtil edxPhcrDocumentUtil, this.advancedCriteria = advancedCriteria; this.wdsObjectChecker = wdsObjectChecker; } - /*sort PublicHealthCaseDTs by add_time descending*/ - final Comparator ADDTIME_ORDER = (e1, e2) -> e2.getAddTime().compareTo(e1.getAddTime()); - final Comparator AlGORITHM_NM_ORDER = (e1, e2) -> e1.getAlgorithmNm().compareToIgnoreCase(e2.getAlgorithmNm()); @Transactional // Was: validateProxyVO public EdxLabInformationDto validateProxyContainer(LabResultProxyContainer labResultProxyVO, EdxLabInformationDto edxLabInformationDT) throws DataProcessingException { List activeElrAlgorithmList = new ArrayList<>(); - var wdsExist = checkActiveWdsAlgorithm( edxLabInformationDT, activeElrAlgorithmList ); + var wdsExist = checkActiveWdsAlgorithm(edxLabInformationDT, activeElrAlgorithmList); if (!wdsExist) { return edxLabInformationDT; } - Collection resultedTestColl=new ArrayList<>(); - Collection resultedTestCodeColl = new ArrayList<>(); + Collection resultedTestColl = new ArrayList<>(); + Collection resultedTestCodeColl = new ArrayList<>(); ObservationContainer orderedTestObservationVO; Map questionIdentifierMap = null; - try - { - Collection personVOCollection=new ArrayList<>(); - if (labResultProxyVO.getThePersonContainerCollection() != null) - { - personVOCollection=labResultProxyVO.getThePersonContainerCollection(); + try { + Collection personVOCollection = new ArrayList<>(); + if (labResultProxyVO.getThePersonContainerCollection() != null) { + personVOCollection = labResultProxyVO.getThePersonContainerCollection(); } orderedTestObservationVO = setupObservationValuesForWds(edxLabInformationDT, labResultProxyVO, resultedTestColl, resultedTestCodeColl); @@ -110,21 +107,17 @@ public EdxLabInformationDto validateProxyContainer(LabResultProxyContainer labRe edxLabInformationDT.getSendingFacilityName() ); boolean isLabMatched = wdsReport.isAlgorithmMatched(); - if (isLabMatched) - { + if (isLabMatched) { algorithmDocument = dsmLabMatchHelper.getAlgorithmDocument(); criteriaMatch = true; - } - else - { + } else { // IF NOT MATCH FOUND CONTINUE and skip the comparing logic wdsReports.add(wdsReport); continue; } String conditionCode = null; - if (algorithmDocument != null && algorithmDocument.getApplyToConditions() != null) - { + if (algorithmDocument != null && algorithmDocument.getApplyToConditions() != null) { List conditionArray = algorithmDocument.getApplyToConditions().getCondition(); for (CodedType codeType : conditionArray) { conditionCode = codeType.getCode(); @@ -144,8 +137,7 @@ public EdxLabInformationDto validateProxyContainer(LabResultProxyContainer labRe questionIdentifierMap ); - if (edxLabInformationDT.isMatchingAlgorithm() && algorithmDocument != null) - { + if (edxLabInformationDT.isMatchingAlgorithm() && algorithmDocument != null) { wdsReports.add(wdsReport); edxLabInformationDT.setDsmAlgorithmName(algorithmDocument.getAlgorithmName()); break; @@ -165,14 +157,14 @@ public EdxLabInformationDto validateProxyContainer(LabResultProxyContainer labRe @SuppressWarnings("java:S3776") protected boolean checkActiveWdsAlgorithm(EdxLabInformationDto edxLabInformationDT, - List activeElrAlgorithmList ) throws DataProcessingException { + List activeElrAlgorithmList) throws DataProcessingException { boolean elrAlgorithmsPresent; // Validating existing WDS Algorithm try { List wdsReportList = new ArrayList<>(); WdsReport report = new WdsReport(); Collection algorithmCollection = selectDSMAlgorithmDTCollection(); - if (algorithmCollection == null || algorithmCollection.isEmpty()) { + if (algorithmCollection == null || algorithmCollection.isEmpty()) { //no algorithms defined elrAlgorithmsPresent = false; report.setAlgorithmMatched(false); @@ -182,16 +174,14 @@ protected boolean checkActiveWdsAlgorithm(EdxLabInformationDto edxLabInformation } elrAlgorithmsPresent = false; //could be only inactive algorithms or only Case reports - for (DsmAlgorithm dsmAlgorithm : algorithmCollection) - { + for (DsmAlgorithm dsmAlgorithm : algorithmCollection) { DSMAlgorithmDto algorithmDT = new DSMAlgorithmDto(dsmAlgorithm); String algorithmString = algorithmDT.getAlgorithmPayload(); //skip inactive and case reports if (algorithmDT.getStatusCd() != null && algorithmDT.getStatusCd().equals(NEDSSConstant.INACTIVE) || algorithmDT.getEventType() != null - && algorithmDT.getEventType().equals(NEDSSConstant.PHC_236)) - { + && algorithmDT.getEventType().equals(NEDSSConstant.PHC_236)) { continue; //skip inactive } @@ -204,8 +194,7 @@ protected boolean checkActiveWdsAlgorithm(EdxLabInformationDto edxLabInformation //helper class DSMLabMatchHelper will assist with algorithm matching DsmLabMatchHelper dsmLabMatchHelper = null; try { - if (algorithmDocument != null) - { + if (algorithmDocument != null) { dsmLabMatchHelper = new DsmLabMatchHelper(algorithmDocument); } } catch (Exception e) { @@ -230,38 +219,33 @@ protected boolean checkActiveWdsAlgorithm(EdxLabInformationDto edxLabInformation } } catch (Exception e1) { - throw new DataProcessingException("ERROR:-ValidateDecisionSupport.validateProxyVO unable to process algorithm as NEDSSAppException . Please check."+e1); + throw new DataProcessingException("ERROR:-ValidateDecisionSupport.validateProxyVO unable to process algorithm as NEDSSAppException . Please check." + e1); } return true; } protected ObservationContainer setupObservationValuesForWds( - EdxLabInformationDto edxLabInformationDT, - LabResultProxyContainer labResultProxyVO, - Collection resultedTestColl, - Collection resultedTestCodeColl + EdxLabInformationDto edxLabInformationDT, + LabResultProxyContainer labResultProxyVO, + Collection resultedTestColl, + Collection resultedTestCodeColl ) { - ObservationContainer orderedTestObservationVO=null; + ObservationContainer orderedTestObservationVO = null; for (ObservationContainer obsVO : labResultProxyVO.getTheObservationContainerCollection()) { String obsDomainCdSt1 = obsVO.getTheObservationDto().getObsDomainCdSt1(); - if (obsDomainCdSt1 != null && obsDomainCdSt1.equalsIgnoreCase(EdxELRConstant.ELR_RESULT_CD)) - { + if (obsDomainCdSt1 != null && obsDomainCdSt1.equalsIgnoreCase(EdxELRConstant.ELR_RESULT_CD)) { resultedTestColl.add(obsVO); String labResultedTestCd = obsVO.getTheObservationDto().getCd(); - if (obsVO.getTheObservationDto().getCd() == null) - { + if (obsVO.getTheObservationDto().getCd() == null) { labResultedTestCd = obsVO.getTheObservationDto().getAltCd(); } - if (labResultedTestCd != null && !resultedTestCodeColl.contains(labResultedTestCd)) - { + if (labResultedTestCd != null && !resultedTestCodeColl.contains(labResultedTestCd)) { resultedTestCodeColl.add(labResultedTestCd); } - } - else if (obsDomainCdSt1 != null && obsDomainCdSt1.equalsIgnoreCase(EdxELRConstant.ELR_ORDER_CD)) - { + } else if (obsDomainCdSt1 != null && obsDomainCdSt1.equalsIgnoreCase(EdxELRConstant.ELR_ORDER_CD)) { orderedTestObservationVO = obsVO; orderedTestObservationVO.getTheObservationDto().setObservationUid(edxLabInformationDT.getRootObserbationUid()); orderedTestObservationVO.setTheParticipationDtoCollection(labResultProxyVO.getTheParticipationDtoCollection()); @@ -273,8 +257,8 @@ else if (obsDomainCdSt1 != null && obsDomainCdSt1.equalsIgnoreCase(EdxELRConstan /** * Description: - * this return true, if Action is Review, Investigation, and Investigation with Notification - * */ + * this return true, if Action is Review, Investigation, and Investigation with Notification + */ protected boolean checkActionInvalid(Algorithm algorithmDocument, boolean criteriaMatch) { boolean result = false; if (!criteriaMatch || algorithmDocument == null || algorithmDocument.getAction() == null) { @@ -283,16 +267,11 @@ protected boolean checkActionInvalid(Algorithm algorithmDocument, boolean criter String code = ""; - if (algorithmDocument.getAction().getCreateInvestigation() != null) - { + if (algorithmDocument.getAction().getCreateInvestigation() != null) { code = algorithmDocument.getAction().getCreateInvestigation().getOnFailureToCreateInvestigation().getCode(); - } - else if (algorithmDocument.getAction().getCreateInvestigationWithNND() != null) - { + } else if (algorithmDocument.getAction().getCreateInvestigationWithNND() != null) { code = algorithmDocument.getAction().getCreateInvestigationWithNND().getOnFailureToCreateInvestigation().getCode(); - } - else if (algorithmDocument.getAction().getMarkAsReviewed() != null) - { + } else if (algorithmDocument.getAction().getMarkAsReviewed() != null) { code = algorithmDocument.getAction().getMarkAsReviewed().getOnFailureToMarkAsReviewed().getCode(); } @@ -306,7 +285,7 @@ else if (algorithmDocument.getAction().getMarkAsReviewed() != null) /** * Description: True if action is not Reviewed - * */ + */ private boolean checkActionNotMarkedAsReviewed(Algorithm algorithmDocument) { return ( algorithmDocument.getAction() != null @@ -320,9 +299,10 @@ private boolean checkActionNotMarkedAsReviewed(Algorithm algorithmDocument) { ) ); } + /** * Description: true if Action is not REVIEW and Adv Criteria is Applied - * */ + */ private boolean checkActionNotMarkedAsReviewedAndAdvCriteriaApplied(Algorithm algorithmDocument, boolean applyAdvInvLogic) { return ( checkActionNotMarkedAsReviewed(algorithmDocument) @@ -331,29 +311,27 @@ private boolean checkActionNotMarkedAsReviewedAndAdvCriteriaApplied(Algorithm al @SuppressWarnings({"java:S107", "java:S6541", "java:S6541", "java:S3776"}) protected void updateObservationBasedOnAction(Algorithm algorithmDocument, - boolean criteriaMatch, - String conditionCode, - ObservationContainer orderedTestObservationVO, - Collection personVOCollection, - EdxLabInformationDto edxLabInformationDT, - WdsReport wdsReport, - Map questionIdentifierMap) throws DataProcessingException { + boolean criteriaMatch, + String conditionCode, + ObservationContainer orderedTestObservationVO, + Collection personVOCollection, + EdxLabInformationDto edxLabInformationDT, + WdsReport wdsReport, + Map questionIdentifierMap) throws DataProcessingException { PageActProxyContainer pageActProxyContainer = null; PamProxyContainer pamProxyVO = null; PublicHealthCaseContainer publicHealthCaseContainer; var isActionValid = checkActionInvalid(algorithmDocument, criteriaMatch); - if (isActionValid) - { - if (conditionCode != null) - { + if (isActionValid) { + if (conditionCode != null) { questionIdentifierMap = edxPhcrDocumentUtil.loadQuestions(conditionCode); } edxLabInformationDT.setConditionCode(conditionCode); boolean isdateLogicValidForNewInv; boolean applyAdvInvLogic = false; - boolean invLogicApplied = algorithmDocument.getElrAdvancedCriteria().getInvLogic() != null + boolean invLogicApplied = algorithmDocument.getElrAdvancedCriteria().getInvLogic() != null && algorithmDocument.getElrAdvancedCriteria().getInvLogic().getInvLogicInd().getCode().equals(NEDSSConstant.YES); // ADVANCE WDS check if (invLogicApplied) { @@ -362,70 +340,55 @@ protected void updateObservationBasedOnAction(Algorithm algorithmDocument, EventDateLogicType eventDateLogicType = algorithmDocument.getElrAdvancedCriteria().getEventDateLogic(); - if (applyAdvInvLogic && eventDateLogicType != null) - { + if (applyAdvInvLogic && eventDateLogicType != null) { // This check for matched Public Health Case in Investigation QUEUE isdateLogicValidForNewInv = specimenCollectionDateCriteria(eventDateLogicType, edxLabInformationDT); - } - else - { + } else { isdateLogicValidForNewInv = true; } boolean isAdvancedInvCriteriaValid = false; - boolean reviewActionApplied = algorithmDocument.getAction() != null && algorithmDocument.getAction().getMarkAsReviewed() != null + boolean reviewActionApplied = algorithmDocument.getAction() != null && algorithmDocument.getAction().getMarkAsReviewed() != null && algorithmDocument.getAction().getMarkAsReviewed().getOnFailureToMarkAsReviewed().getCode().equals("2"); - if (reviewActionApplied && applyAdvInvLogic) - { + if (reviewActionApplied && applyAdvInvLogic) { wdsReport.setAction("MARK_AS_REVIEWED"); isAdvancedInvCriteriaValid = checkAdvancedInvCriteria(algorithmDocument, edxLabInformationDT, questionIdentifierMap); - } - - else if (checkActionNotMarkedAsReviewedAndAdvCriteriaApplied(algorithmDocument, applyAdvInvLogic)) - { + } else if (checkActionNotMarkedAsReviewedAndAdvCriteriaApplied(algorithmDocument, applyAdvInvLogic)) { isAdvancedInvCriteriaValid = checkAdvancedInvCriteriaForCreateInvNoti(algorithmDocument, edxLabInformationDT, questionIdentifierMap); } if ( reviewActionApplied - && ( - !applyAdvInvLogic - || - (applyAdvInvLogic && !isdateLogicValidForNewInv && isAdvancedInvCriteriaValid) + && ( + !applyAdvInvLogic + || + (applyAdvInvLogic && !isdateLogicValidForNewInv && isAdvancedInvCriteriaValid) ) - ) - { + ) { wdsReport.setAction("MARK_AS_REVIEWED"); edxLabInformationDT.setDsmAlgorithmName(algorithmDocument.getAlgorithmName()); - if (conditionCode != null) - { + if (conditionCode != null) { var condCode = SrteCache.findConditionCodeByDescription(conditionCode); condCode.ifPresent(code -> edxLabInformationDT.setConditionName(code.getConditionShortNm())); } edxLabInformationDT.setMatchingAlgorithm(true); - if (algorithmDocument.getAction() != null && algorithmDocument.getAction().getMarkAsReviewed() != null) - { + if (algorithmDocument.getAction() != null && algorithmDocument.getAction().getMarkAsReviewed() != null) { edxLabInformationDT.setAction(DecisionSupportConstants.MARK_AS_REVIEWED); } - } - else if ( - (checkActionNotMarkedAsReviewed(algorithmDocument)) - && ( + } else if ( + (checkActionNotMarkedAsReviewed(algorithmDocument)) + && ( !applyAdvInvLogic - || (applyAdvInvLogic && isdateLogicValidForNewInv) - || (applyAdvInvLogic && !isdateLogicValidForNewInv && isAdvancedInvCriteriaValid) - ) - ) - { + || (applyAdvInvLogic && isdateLogicValidForNewInv) + || (applyAdvInvLogic && !isdateLogicValidForNewInv && isAdvancedInvCriteriaValid) + ) + ) { edxLabInformationDT.setMatchingAlgorithm(true); - if (algorithmDocument.getAction() != null && algorithmDocument.getAction().getCreateInvestigation() != null) - { + if (algorithmDocument.getAction() != null && algorithmDocument.getAction().getCreateInvestigation() != null) { wdsReport.setAction("CREATE_INVESTIGATION"); edxLabInformationDT.setAction(DecisionSupportConstants.CREATE_INVESTIGATION_VALUE); - } - else if (algorithmDocument.getAction() != null && algorithmDocument.getAction().getCreateInvestigationWithNND() != null) - { + } else if (algorithmDocument.getAction() != null && algorithmDocument.getAction().getCreateInvestigationWithNND() != null) { wdsReport.setAction("CREATE_INVESTIGATION_WITH_NOTIFICATION"); edxLabInformationDT.setAction(DecisionSupportConstants.CREATE_INVESTIGATION_WITH_NND_VALUE); } @@ -434,14 +397,11 @@ else if (algorithmDocument.getAction() != null && algorithmDocument.getAction(). //AUTO INVESTIGATION Object obj = autoInvestigationService.autoCreateInvestigation(orderedTestObservationVO, edxLabInformationDT); BasePamContainer pamVO; - if (obj instanceof PageActProxyContainer) - { + if (obj instanceof PageActProxyContainer) { pageActProxyContainer = (PageActProxyContainer) obj; publicHealthCaseContainer = pageActProxyContainer.getPublicHealthCaseContainer(); pamVO = pageActProxyContainer.getPageVO(); - } - else - { + } else { pamProxyVO = (PamProxyContainer) obj; publicHealthCaseContainer = pamProxyVO.getPublicHealthCaseContainer(); pamVO = pamProxyVO.getPamVO(); @@ -453,46 +413,32 @@ else if (algorithmDocument.getAction() != null && algorithmDocument.getAction(). Collection entityMapCollection = new ArrayList<>(); if (applyMap != null && applyMap.size() > 0 && questionIdentifierMap != null) { Set set = applyMap.keySet(); - for (Object o : set) - { + for (Object o : set) { String questionId = (String) o; EdxRuleManageDto edxRuleManageDT = (EdxRuleManageDto) applyMap.get(questionId); NbsQuestionMetadata metaData = (NbsQuestionMetadata) questionIdentifierMap.get(questionId); try { if (metaData.getDataLocation() != null - && metaData.getDataLocation().trim().toUpperCase().startsWith("PUBLIC_HEALTH_CASE")) - { + && metaData.getDataLocation().trim().toUpperCase().startsWith("PUBLIC_HEALTH_CASE")) { validateDecisionSupport.processNbsObject(edxRuleManageDT, publicHealthCaseContainer, metaData); - } - else if (metaData.getDataLocation() != null - && metaData.getDataLocation().trim().toUpperCase().startsWith("NBS_CASE_ANSWER")) - { + } else if (metaData.getDataLocation() != null + && metaData.getDataLocation().trim().toUpperCase().startsWith("NBS_CASE_ANSWER")) { validateDecisionSupport.processNBSCaseAnswerDT(edxRuleManageDT, publicHealthCaseContainer, pamVO, metaData); - } - else if (metaData.getDataLocation() != null - && metaData.getDataLocation().trim().toUpperCase().startsWith("CONFIRMATION_METHOD.CONFIRMATION_METHOD_CD")) - { + } else if (metaData.getDataLocation() != null + && metaData.getDataLocation().trim().toUpperCase().startsWith("CONFIRMATION_METHOD.CONFIRMATION_METHOD_CD")) { validateDecisionSupport.processConfirmationMethodCodeDT(edxRuleManageDT, publicHealthCaseContainer, metaData); - } - else if (metaData.getDataLocation() != null - && metaData.getDataLocation().trim().toUpperCase().startsWith("CONFIRMATION_METHOD.CONFIRMATION_METHOD_TIME")) - { + } else if (metaData.getDataLocation() != null + && metaData.getDataLocation().trim().toUpperCase().startsWith("CONFIRMATION_METHOD.CONFIRMATION_METHOD_TIME")) { validateDecisionSupport.processConfirmationMethodTimeDT(edxRuleManageDT, publicHealthCaseContainer, metaData); - } - else if (metaData.getDataLocation() != null - && metaData.getDataLocation().trim().toUpperCase().startsWith("ACT_ID.ROOT_EXTENSION_TXT")) - { + } else if (metaData.getDataLocation() != null + && metaData.getDataLocation().trim().toUpperCase().startsWith("ACT_ID.ROOT_EXTENSION_TXT")) { validateDecisionSupport.processActIds(edxRuleManageDT, publicHealthCaseContainer, metaData); - } - else if (metaData.getDataLocation() != null + } else if (metaData.getDataLocation() != null && metaData.getDataLocation().trim().toUpperCase().startsWith("CASE_MANAGEMENT") - && obj instanceof PageActProxyContainer) - { + && obj instanceof PageActProxyContainer) { validateDecisionSupport.processNBSCaseManagementDT(edxRuleManageDT, publicHealthCaseContainer, metaData); - } - else if (metaData.getDataLocation() != null - && metaData.getDataType().toUpperCase().startsWith("PART")) - { + } else if (metaData.getDataLocation() != null + && metaData.getDataType().toUpperCase().startsWith("PART")) { entityMapCollection.add(edxRuleManageDT); if (edxRuleManageDT.getParticipationTypeCode() == null || edxRuleManageDT.getParticipationUid() == null @@ -511,18 +457,15 @@ else if (metaData.getDataLocation() != null autoInvestigationService.transferValuesTOActProxyVO(pageActProxyContainer, pamProxyVO, personVOCollection, orderedTestObservationVO, entityMapCollection, questionIdentifierMap); if (questionIdentifierMap != null - && questionIdentifierMap.get(edxPhcrDocumentUtil._REQUIRED) != null) - { + && questionIdentifierMap.get(EdxPhcrDocumentUtil._REQUIRED) != null) { Map nbsAnswerMap = pamVO.getPamAnswerDTMap(); - Map requireMap = (Map) questionIdentifierMap.get(edxPhcrDocumentUtil._REQUIRED); - String errorText = edxPhcrDocumentUtil.requiredFieldCheck(requireMap, nbsAnswerMap); + Map requireMap = (Map) questionIdentifierMap.get(EdxPhcrDocumentUtil._REQUIRED); + String errorText = EdxPhcrDocumentUtil.requiredFieldCheck(requireMap, nbsAnswerMap); publicHealthCaseContainer.setErrorText(errorText); } if (obj instanceof PageActProxyContainer) { edxLabInformationDT.setPageActContainer((PageActProxyContainer) obj); - } - else - { + } else { edxLabInformationDT.setPamContainer((PamProxyContainer) obj); } @@ -533,9 +476,7 @@ else if (metaData.getDataLocation() != null edxLabInformationDT.setMatchingAlgorithm(false); } - } - else - { + } else { wdsReport.setAction("NO_ACTION_FOUND"); edxLabInformationDT.setMatchingAlgorithm(false); } @@ -544,10 +485,9 @@ else if (metaData.getDataLocation() != null private Collection selectDSMAlgorithmDTCollection() throws DataProcessingException { Collection algorithmList; - try - { + try { algorithmList = dsmAlgorithmService.findActiveDsmAlgorithm(); - } catch(Exception se2) { + } catch (Exception se2) { throw new DataProcessingException(se2.getMessage(), se2); } return algorithmList; @@ -566,7 +506,7 @@ private Algorithm parseAlgorithmXml(String xmlPayLoadContent) algorithmDocument = (Algorithm) unmarshaller.unmarshal(inputStream); } catch (Exception e) { - throw new DataProcessingException("HL7ELRValidateDecisionSupport.parseAlgorithmXml Invalid XML "+e); + throw new DataProcessingException("HL7ELRValidateDecisionSupport.parseAlgorithmXml Invalid XML " + e); } return algorithmDocument; @@ -574,65 +514,57 @@ private Algorithm parseAlgorithmXml(String xmlPayLoadContent) /** * Execute when action in available - * */ + */ @SuppressWarnings({"java:S6541", "java:S3776"}) protected boolean specimenCollectionDateCriteria(EventDateLogicType eventDateLogicType, EdxLabInformationDto edxLabInformationDT) throws DataProcessingException { boolean isdateLogicValidForNewInv; - String comparatorCode=""; - int value=0; - Long associatedPHCUid= -1L; - long mprUid= -1L; - if(edxLabInformationDT.getPersonParentUid()>0) - { - mprUid =edxLabInformationDT.getPersonParentUid(); + String comparatorCode = ""; + int value = 0; + Long associatedPHCUid = -1L; + long mprUid = -1L; + if (edxLabInformationDT.getPersonParentUid() > 0) { + mprUid = edxLabInformationDT.getPersonParentUid(); } //see if the selection is no for time period, check for all any investigation with the desired condition code - if(eventDateLogicType.getElrTimeLogic()!=null - && eventDateLogicType.getElrTimeLogic().getElrTimeLogicInd()!=null - && eventDateLogicType.getElrTimeLogic().getElrTimeLogicInd().getCode()!=null + if (eventDateLogicType.getElrTimeLogic() != null + && eventDateLogicType.getElrTimeLogic().getElrTimeLogicInd() != null + && eventDateLogicType.getElrTimeLogic().getElrTimeLogicInd().getCode() != null && eventDateLogicType.getElrTimeLogic().getElrTimeLogicInd().getCode().equals(NEDSSConstant.NO) - ){ + ) { var assocExistPhcWithPid = publicHealthCaseStoredProcRepository.associatedPublicHealthCaseForMprForCondCd(mprUid, edxLabInformationDT.getConditionCode()); edxLabInformationDT.setMatchingPublicHealthCaseDtoColl(assocExistPhcWithPid); } //see if the selection is yes for time period, check for all any investigation with the desired condition code - else if(eventDateLogicType.getElrTimeLogic()!=null - && eventDateLogicType.getElrTimeLogic().getElrTimeLogicInd()!=null - && eventDateLogicType.getElrTimeLogic().getElrTimeLogicInd().getCode()!=null - && eventDateLogicType.getElrTimeLogic().getElrTimeLogicInd().getCode().equals(NEDSSConstant.YES)) - { - if(eventDateLogicType.getWithinTimePeriod()!=null - && eventDateLogicType.getWithinTimePeriod().getComparatorCode()!=null - && eventDateLogicType.getWithinTimePeriod().getComparatorCode().getCode()!=null) - { - comparatorCode= eventDateLogicType.getWithinTimePeriod().getComparatorCode().getCode(); + else if (eventDateLogicType.getElrTimeLogic() != null + && eventDateLogicType.getElrTimeLogic().getElrTimeLogicInd() != null + && eventDateLogicType.getElrTimeLogic().getElrTimeLogicInd().getCode() != null + && eventDateLogicType.getElrTimeLogic().getElrTimeLogicInd().getCode().equals(NEDSSConstant.YES)) { + if (eventDateLogicType.getWithinTimePeriod() != null + && eventDateLogicType.getWithinTimePeriod().getComparatorCode() != null + && eventDateLogicType.getWithinTimePeriod().getComparatorCode().getCode() != null) { + comparatorCode = eventDateLogicType.getWithinTimePeriod().getComparatorCode().getCode(); } - if(eventDateLogicType.getWithinTimePeriod()!=null - && eventDateLogicType.getWithinTimePeriod().getUnit()!=null - && eventDateLogicType.getWithinTimePeriod().getValue1()!=null) - { - value=eventDateLogicType.getWithinTimePeriod().getValue1().intValue(); + if (eventDateLogicType.getWithinTimePeriod() != null + && eventDateLogicType.getWithinTimePeriod().getUnit() != null + && eventDateLogicType.getWithinTimePeriod().getValue1() != null) { + value = eventDateLogicType.getWithinTimePeriod().getValue1().intValue(); } - Timestamp specimenCollectionDate=new Timestamp(edxLabInformationDT.getRootObservationContainer().getTheObservationDto().getEffectiveFromTime().getTime()); - long specimenCollectionDays = specimenCollectionDate.getTime()/(1000 * 60 * 60 * 24); + Timestamp specimenCollectionDate = new Timestamp(edxLabInformationDT.getRootObservationContainer().getTheObservationDto().getEffectiveFromTime().getTime()); + long specimenCollectionDays = specimenCollectionDate.getTime() / (1000 * 60 * 60 * 24); - if(comparatorCode.length() > 0 && mprUid > 0) - { + if (comparatorCode.length() > 0 && mprUid > 0) { Collection associatedPhcDTCollection = publicHealthCaseStoredProcRepository .associatedPublicHealthCaseForMprForCondCd(mprUid, edxLabInformationDT.getConditionCode()); - if(associatedPhcDTCollection!=null && associatedPhcDTCollection.size()>0){ + if (associatedPhcDTCollection != null && associatedPhcDTCollection.size() > 0) { for (PublicHealthCaseDto publicHealthCaseDto : associatedPhcDTCollection) { boolean isdateLogicValidWithThisInv = true; long dateCompare; - if (publicHealthCaseDto.getAssociatedSpecimenCollDate() != null) - { + if (publicHealthCaseDto.getAssociatedSpecimenCollDate() != null) { dateCompare = publicHealthCaseDto.getAssociatedSpecimenCollDate().getTime() / (1000 * 60 * 60 * 24); - } - else - { + } else { dateCompare = publicHealthCaseDto.getAddTime().getTime() / (1000 * 60 * 60 * 24); publicHealthCaseDto.setAssociatedSpecimenCollDate(publicHealthCaseDto.getAddTime()); } @@ -645,29 +577,25 @@ else if(eventDateLogicType.getElrTimeLogic()!=null ); } if (isdateLogicValidWithThisInv) { - if (edxLabInformationDT.getMatchingPublicHealthCaseDtoColl() == null) - { + if (edxLabInformationDT.getMatchingPublicHealthCaseDtoColl() == null) { edxLabInformationDT.setMatchingPublicHealthCaseDtoColl(new ArrayList<>()); } edxLabInformationDT.getMatchingPublicHealthCaseDtoColl().add(publicHealthCaseDto); } } - }else{ - isdateLogicValidForNewInv= true; + } else { + isdateLogicValidForNewInv = true; } } } if (edxLabInformationDT.getMatchingPublicHealthCaseDtoColl() != null - && edxLabInformationDT.getMatchingPublicHealthCaseDtoColl().size() > 0) - { + && edxLabInformationDT.getMatchingPublicHealthCaseDtoColl().size() > 0) { List phclist = new ArrayList(edxLabInformationDT.getMatchingPublicHealthCaseDtoColl()); phclist.sort(ADDTIME_ORDER); - associatedPHCUid = ((PublicHealthCaseDto)phclist.get(0)).getPublicHealthCaseUid(); - isdateLogicValidForNewInv= false; - } - else - { - isdateLogicValidForNewInv= true; + associatedPHCUid = ((PublicHealthCaseDto) phclist.get(0)).getPublicHealthCaseUid(); + isdateLogicValidForNewInv = false; + } else { + isdateLogicValidForNewInv = true; } edxLabInformationDT.setAssociatedPublicHealthCaseUid(associatedPHCUid); return isdateLogicValidForNewInv; @@ -677,28 +605,26 @@ protected boolean specimenDateTimeCheck(String comparatorCode, int daysDifferenc int value, boolean isdateLogicValidWithThisInv) { if (comparatorCode.contains(NEDSSConstant.LESS_THAN_LOGIC) && daysDifference > value) { isdateLogicValidWithThisInv = false; - } - else if (comparatorCode.contains(NEDSSConstant.GREATER_THAN_LOGIC) && daysDifference < value) { + } else if (comparatorCode.contains(NEDSSConstant.GREATER_THAN_LOGIC) && daysDifference < value) { isdateLogicValidWithThisInv = false; - } - else if (comparatorCode.equals(NEDSSConstant.EQUAL_LOGIC) && daysDifference != value) { + } else if (comparatorCode.equals(NEDSSConstant.EQUAL_LOGIC) && daysDifference != value) { isdateLogicValidWithThisInv = false; - } - else if (!comparatorCode.contains(NEDSSConstant.EQUAL_LOGIC) && daysDifference == value) { + } else if (!comparatorCode.contains(NEDSSConstant.EQUAL_LOGIC) && daysDifference == value) { isdateLogicValidWithThisInv = false; } return isdateLogicValidWithThisInv; } + /** * Execute when action is review - * */ + */ @SuppressWarnings({"java:S6541", "java:S3776"}) protected boolean checkAdvancedInvCriteria(Algorithm algorithmDocument, - EdxLabInformationDto edxLabInformationDT, - Map questionIdentifierMap) throws DataProcessingException { + EdxLabInformationDto edxLabInformationDT, + Map questionIdentifierMap) throws DataProcessingException { boolean isAdvancedInvCriteriaMet = false; - try{ + try { Map advanceInvCriteriaMap = advancedCriteria.getAdvancedInvCriteriaMap(algorithmDocument); /* @@ -708,8 +634,7 @@ protected boolean checkAdvancedInvCriteria(Algorithm algorithmDocument, if ((edxLabInformationDT.getMatchingPublicHealthCaseDtoColl() == null || edxLabInformationDT.getMatchingPublicHealthCaseDtoColl().size() == 0) && advanceInvCriteriaMap == null - || advanceInvCriteriaMap.size() == 0) - { + || advanceInvCriteriaMap.size() == 0) { isAdvancedInvCriteriaMet = true; } @@ -720,43 +645,34 @@ protected boolean checkAdvancedInvCriteria(Algorithm algorithmDocument, * and/or Notification actions to succeed, the advanced criteria should * return false, so that new investigation can be created. */ - if(edxLabInformationDT.getMatchingPublicHealthCaseDtoColl()!=null - && edxLabInformationDT.getMatchingPublicHealthCaseDtoColl().size()>0) - { + if (edxLabInformationDT.getMatchingPublicHealthCaseDtoColl() != null + && edxLabInformationDT.getMatchingPublicHealthCaseDtoColl().size() > 0) { for (PublicHealthCaseDto phcDT : edxLabInformationDT.getMatchingPublicHealthCaseDtoColl()) { if (advanceInvCriteriaMap != null - && advanceInvCriteriaMap.size() > 0) - { + && advanceInvCriteriaMap.size() > 0) { Set criteriaSet = advanceInvCriteriaMap.keySet(); for (String questionId : criteriaSet) { Object object = advanceInvCriteriaMap.get(questionId); - if (object instanceof EdxRuleManageDto) - { + if (object instanceof EdxRuleManageDto) { EdxRuleManageDto edxRuleManageDT = (EdxRuleManageDto) object; NbsQuestionMetadata criteriaMetaData = (NbsQuestionMetadata) questionIdentifierMap.get(questionId); - if (criteriaMetaData != null) - { + if (criteriaMetaData != null) { isAdvancedInvCriteriaMet = wdsObjectChecker.checkNbsObject(edxRuleManageDT, phcDT, criteriaMetaData); } - if (!isAdvancedInvCriteriaMet) - { + if (!isAdvancedInvCriteriaMet) { break; } - } - else if (object instanceof Collection) - { + } else if (object instanceof Collection) { Collection collection = (ArrayList) object; for (Object o : collection) { EdxRuleManageDto edxRuleManageDT = (EdxRuleManageDto) o; NbsQuestionMetadata criteriaMetaData = (NbsQuestionMetadata) questionIdentifierMap.get(questionId); - if (criteriaMetaData != null) - { + if (criteriaMetaData != null) { isAdvancedInvCriteriaMet = wdsObjectChecker.checkNbsObject(edxRuleManageDT, phcDT, criteriaMetaData); } - if (!isAdvancedInvCriteriaMet) - { + if (!isAdvancedInvCriteriaMet) { break; } } @@ -766,7 +682,7 @@ else if (object instanceof Collection) * If one of the investigation matches break and get out of the * loop */ - if (isAdvancedInvCriteriaMet){ + if (isAdvancedInvCriteriaMet) { edxLabInformationDT.setAssociatedPublicHealthCaseUid(phcDT.getPublicHealthCaseUid()); break; } @@ -779,63 +695,52 @@ else if (object instanceof Collection) * if the advanced criteria is not met reset the associated * PublicHealthCaseUid to -1, it might have been set by time criteria */ - if(!isAdvancedInvCriteriaMet && edxLabInformationDT.getMatchingPublicHealthCaseDtoColl()!=null - && edxLabInformationDT.getMatchingPublicHealthCaseDtoColl().size()>0) - { + if (!isAdvancedInvCriteriaMet && edxLabInformationDT.getMatchingPublicHealthCaseDtoColl() != null + && edxLabInformationDT.getMatchingPublicHealthCaseDtoColl().size() > 0) { edxLabInformationDT.setAssociatedPublicHealthCaseUid(-1L); } - }catch(Exception ex){ - throw new DataProcessingException ("Exception while checking advanced Investigation Criteria for Lab mark as reviewed: ", ex); + } catch (Exception ex) { + throw new DataProcessingException("Exception while checking advanced Investigation Criteria for Lab mark as reviewed: ", ex); } return isAdvancedInvCriteriaMet; } private void processAction(EdxLabInformationDto edxRuleAlgorothmManagerDT, Algorithm algorithm) throws DataProcessingException { //applicationMap - Map applicationMap= new HashMap<>(); + Map applicationMap = new HashMap<>(); try { ActionType actionType = algorithm.getAction(); - if (actionType.getCreateInvestigation() != null) - { + if (actionType.getCreateInvestigation() != null) { CreateInvestigationType specificActionType = actionType.getCreateInvestigation(); edxRuleAlgorothmManagerDT.setAction(DecisionSupportConstants.CREATE_INVESTIGATION_VALUE); InvestigationDefaultValuesType investigationDefaultValuesType = specificActionType.getInvestigationDefaultValues(); - if (investigationDefaultValuesType != null) - { + if (investigationDefaultValuesType != null) { validateDecisionSupport.parseInvestigationDefaultValuesType(applicationMap, investigationDefaultValuesType); } CodedType failureToCreateType = specificActionType.getOnFailureToCreateInvestigation(); edxRuleAlgorothmManagerDT.setOnFailureToCreateInv(failureToCreateType.getCode()); - if (specificActionType.getUpdateAction() != null) - { + if (specificActionType.getUpdateAction() != null) { edxRuleAlgorothmManagerDT.setUpdateAction(specificActionType.getUpdateAction().getCode()); } - } - else if (actionType.getCreateInvestigationWithNND() != null) - { + } else if (actionType.getCreateInvestigationWithNND() != null) { CreateInvestigationWithNNDType specificActionType = actionType.getCreateInvestigationWithNND(); InvestigationDefaultValuesType investigationDefaultValuesType = specificActionType.getInvestigationDefaultValues(); edxRuleAlgorothmManagerDT.setAction(DecisionSupportConstants.CREATE_INVESTIGATION_WITH_NND_VALUE); - if (investigationDefaultValuesType != null) - { + if (investigationDefaultValuesType != null) { validateDecisionSupport.parseInvestigationDefaultValuesType(applicationMap, investigationDefaultValuesType); } CodedType failureToCreateType = specificActionType.getOnFailureToCreateInvestigation(); edxRuleAlgorothmManagerDT.setOnFailureToCreateInv(failureToCreateType.getCode()); - if (specificActionType.getUpdateAction() != null) - { + if (specificActionType.getUpdateAction() != null) { edxRuleAlgorothmManagerDT.setUpdateAction(specificActionType.getUpdateAction().getCode()); } edxRuleAlgorothmManagerDT.setNndComment(specificActionType.getNNDComment()); - if (specificActionType.getOnFailureToCreateNND() != null) - { + if (specificActionType.getOnFailureToCreateNND() != null) { edxRuleAlgorothmManagerDT.setOnFailureToCreateNND(specificActionType.getOnFailureToCreateNND().getCode()); } - } - else if (actionType.getDeleteDocument() != null) - { + } else if (actionType.getDeleteDocument() != null) { DeleteDocumentType specificActionType = actionType.getDeleteDocument(); } @@ -843,7 +748,7 @@ else if (actionType.getDeleteDocument() != null) edxRuleAlgorothmManagerDT.setEdxRuleApplyDTMap(applicationMap); } catch (Exception e) { - throw new DataProcessingException("HL7ELRValidateDecisionSupport.processAction: exception caught. "+e); + throw new DataProcessingException("HL7ELRValidateDecisionSupport.processAction: exception caught. " + e); } } @@ -854,7 +759,7 @@ protected boolean checkAdvancedInvCriteriaForCreateInvNoti( EdxLabInformationDto edxLabInformationDT, Map questionIdentifierMap) throws DataProcessingException { - try{ + try { Map advanceInvCriteriaMap = advancedCriteria.getAdvancedInvCriteriaMap(algorithmDocument); /* @@ -864,10 +769,9 @@ protected boolean checkAdvancedInvCriteriaForCreateInvNoti( if ( (edxLabInformationDT.getMatchingPublicHealthCaseDtoColl() == null || edxLabInformationDT.getMatchingPublicHealthCaseDtoColl().size() == 0) - && (advanceInvCriteriaMap == null + && (advanceInvCriteriaMap == null || advanceInvCriteriaMap.size() == 0) - ) - { + ) { return true; } @@ -877,9 +781,8 @@ protected boolean checkAdvancedInvCriteriaForCreateInvNoti( */ if ( (edxLabInformationDT.getMatchingPublicHealthCaseDtoColl() != null && edxLabInformationDT.getMatchingPublicHealthCaseDtoColl().size() > 0) - && (advanceInvCriteriaMap == null || advanceInvCriteriaMap.size() == 0) - ) - { + && (advanceInvCriteriaMap == null || advanceInvCriteriaMap.size() == 0) + ) { return false; } @@ -891,8 +794,7 @@ protected boolean checkAdvancedInvCriteriaForCreateInvNoti( */ if (edxLabInformationDT.getMatchingPublicHealthCaseDtoColl() != null && edxLabInformationDT.getMatchingPublicHealthCaseDtoColl().size() > 0 - ) - { + ) { for (Object phcDT : edxLabInformationDT.getMatchingPublicHealthCaseDtoColl()) { if (advanceInvCriteriaMap != null @@ -910,19 +812,16 @@ protected boolean checkAdvancedInvCriteriaForCreateInvNoti( EdxRuleManageDto edxRuleManageDT = (EdxRuleManageDto) object; NbsQuestionMetadata criteriaMetaData = (NbsQuestionMetadata) questionIdentifierMap.get(questionId); - if (criteriaMetaData != null) - { + if (criteriaMetaData != null) { isAdvancedInvCriteriaMet = wdsObjectChecker.checkNbsObject(edxRuleManageDT, phcDT, criteriaMetaData); } - if (!isAdvancedInvCriteriaMet) - { + if (!isAdvancedInvCriteriaMet) { isInvCriteriaValidForAllelements = true; } } - if(isInvCriteriaValidForAllelements) - { + if (isInvCriteriaValidForAllelements) { return false; } } @@ -934,13 +833,11 @@ protected boolean checkAdvancedInvCriteriaForCreateInvNoti( */ return true; } - }catch(Exception ex){ - throw new DataProcessingException ("Exception while checking advanced Investigation Criteria for creating Investigation and/or Notification: ", ex); + } catch (Exception ex) { + throw new DataProcessingException("Exception while checking advanced Investigation Criteria for creating Investigation and/or Notification: ", ex); } return false; } - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/DsmAlgorithmService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/DsmAlgorithmService.java index e1e930365..c5e9381c3 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/DsmAlgorithmService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/DsmAlgorithmService.java @@ -16,7 +16,7 @@ public DsmAlgorithmService(DsmAlgorithmRepository dsmAlgorithmRepository) { } Collection findActiveDsmAlgorithm() { - Collection col = new ArrayList<>(); + Collection col = new ArrayList<>(); var results = dsmAlgorithmRepository.findDsmAlgorithmByStatusCode("A"); if (results.isPresent()) { col = results.get(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/LookupService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/LookupService.java index df85920cf..dcfb53985 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/LookupService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/investigation/LookupService.java @@ -39,116 +39,6 @@ public LookupService(LookupMappingRepository lookupMappingRepository, this.catchingValueService = catchingValueService; } - public TreeMap getToPrePopFormMapping(String formCd) throws DataProcessingException { - TreeMap returnMap; - returnMap = (TreeMap) OdseCache.toPrePopFormMapping.get(formCd); - if (returnMap == null) { - Collection qColl = getPrePopMapping(); - createPrePopToMap(qColl); - } - returnMap = (TreeMap) OdseCache.toPrePopFormMapping.get(formCd); - - return returnMap; - } - - public TreeMap getQuestionMap() { - TreeMap questionMap = null; - - if (OdseCache.map != null && OdseCache.map.size() > 0) { - return (TreeMap) OdseCache.map; - - } - - try { - Collection qColl = getPamQuestions(); - questionMap = createQuestionMap(qColl); - - } catch (Exception e) { - e.printStackTrace(); - } - - if (questionMap != null) { - OdseCache.map.putAll(questionMap); - } - return questionMap; - } - - - // PG_Generic_V2_Investigation - public TreeMap getDMBQuestionMapAfterPublish() { - TreeMap dmbQuestionMap = null; - - try { - //TODO: MUST CACHING THESE TWO. these are queries that pull the entire table into memory - var res = nbsUiMetaDataRepository.findDmbQuestionMetaData(); - var res2 = waQuestionRepository.findGenericQuestionMetaData(); - Collection metaQuestion = new ArrayList<>(); - if (res.isPresent()) { - for(var item : res.get()) { - var commonAttribute = new MetaAndWaCommonAttribute(item); - metaQuestion.add(commonAttribute); - } - if (res2.isPresent()) { - for(var item : res2.get()) { - var commonAttribute = new MetaAndWaCommonAttribute(item); - metaQuestion.add(commonAttribute); - } - } - } - - - dmbQuestionMap = createDMBQuestionMap(metaQuestion); - - } catch (Exception e) { - e.printStackTrace(); - } - if(dmbQuestionMap != null) - { - OdseCache.dmbMap.putAll(dmbQuestionMap); - } - return dmbQuestionMap; - } - - - public void fillPrePopMap() { - - if (OdseCache.fromPrePopFormMapping == null || OdseCache.fromPrePopFormMapping.size() == 0) { - try { - Collection qColl = retrievePrePopMapping(); - createPrePopFromMap(qColl); - - } catch (Exception e) { - e.printStackTrace(); - } - - } - - if (OdseCache.toPrePopFormMapping == null || OdseCache.toPrePopFormMapping.size() == 0) { - try { - Collection qColl = retrievePrePopMapping(); - createPrePopToMap(qColl); - } catch (Exception e) { - e.printStackTrace(); - } - - } - - - } - - - private Collection retrievePrePopMapping () { - var res = lookupMappingRepository.getLookupMappings(); - List lst = new ArrayList<>(); - if (res.isPresent()) { - for(var item : res.get()) { - LookupMappingDto mappingDto = new LookupMappingDto(item); - lst.add(mappingDto); - } - } - return lst; - } - private static void createPrePopFromMap(Collection coll) throws Exception { int count = 0; int loopcount = 0; @@ -338,6 +228,112 @@ private static void createPrePopToMap(Collection coll) throws } + public TreeMap getToPrePopFormMapping(String formCd) throws DataProcessingException { + TreeMap returnMap; + returnMap = (TreeMap) OdseCache.toPrePopFormMapping.get(formCd); + if (returnMap == null) { + Collection qColl = getPrePopMapping(); + createPrePopToMap(qColl); + } + returnMap = (TreeMap) OdseCache.toPrePopFormMapping.get(formCd); + + return returnMap; + } + + public TreeMap getQuestionMap() { + TreeMap questionMap = null; + + if (OdseCache.map != null && OdseCache.map.size() > 0) { + return (TreeMap) OdseCache.map; + + } + + try { + Collection qColl = getPamQuestions(); + questionMap = createQuestionMap(qColl); + + } catch (Exception e) { + e.printStackTrace(); + } + + if (questionMap != null) { + OdseCache.map.putAll(questionMap); + } + return questionMap; + } + + // PG_Generic_V2_Investigation + public TreeMap getDMBQuestionMapAfterPublish() { + TreeMap dmbQuestionMap = null; + + try { + //TODO: MUST CACHING THESE TWO. these are queries that pull the entire table into memory + var res = nbsUiMetaDataRepository.findDmbQuestionMetaData(); + var res2 = waQuestionRepository.findGenericQuestionMetaData(); + Collection metaQuestion = new ArrayList<>(); + if (res.isPresent()) { + for (var item : res.get()) { + var commonAttribute = new MetaAndWaCommonAttribute(item); + metaQuestion.add(commonAttribute); + } + if (res2.isPresent()) { + for (var item : res2.get()) { + var commonAttribute = new MetaAndWaCommonAttribute(item); + metaQuestion.add(commonAttribute); + } + } + } + + + dmbQuestionMap = createDMBQuestionMap(metaQuestion); + + } catch (Exception e) { + e.printStackTrace(); + } + if (dmbQuestionMap != null) { + OdseCache.dmbMap.putAll(dmbQuestionMap); + } + return dmbQuestionMap; + } + + public void fillPrePopMap() { + + if (OdseCache.fromPrePopFormMapping == null || OdseCache.fromPrePopFormMapping.size() == 0) { + try { + Collection qColl = retrievePrePopMapping(); + createPrePopFromMap(qColl); + + } catch (Exception e) { + e.printStackTrace(); + } + + } + + if (OdseCache.toPrePopFormMapping == null || OdseCache.toPrePopFormMapping.size() == 0) { + try { + Collection qColl = retrievePrePopMapping(); + createPrePopToMap(qColl); + } catch (Exception e) { + e.printStackTrace(); + } + + } + + + } + + private Collection retrievePrePopMapping() { + var res = lookupMappingRepository.getLookupMappings(); + List lst = new ArrayList<>(); + if (res.isPresent()) { + for (var item : res.get()) { + LookupMappingDto mappingDto = new LookupMappingDto(item); + lst.add(mappingDto); + } + } + return lst; + } + // public QuestionMap getQuestionMapEJBRef() throws Exception { // if (qMap == null) { @@ -352,20 +348,19 @@ private static void createPrePopToMap(Collection coll) throws // return qMap; // } - - private TreeMap createDMBQuestionMap(Collection coll) throws Exception{ + private TreeMap createDMBQuestionMap(Collection coll) throws Exception { TreeMap qCodeMap = new TreeMap<>(); - int count =0; - int loopcount=0; - int sizecount=0; + int count = 0; + int loopcount = 0; + int sizecount = 0; String currentFormCode; - String previousFormCode=""; + String previousFormCode = ""; //For Demo Purpose CHOLERA Metadata - TreeMap[] map ; + TreeMap[] map; map = new TreeMap[coll.size()]; NbsQuestionMetadata qMetadata = null; - try{ + try { if (coll.size() > 0) { for (MetaAndWaCommonAttribute metaAndWaCommonAttribute : coll) { sizecount++; @@ -379,8 +374,7 @@ private TreeMap createDMBQuestionMap(Collection createDMBQuestionMap(Collection(); map[count].put(questionId, qMetadata); } @@ -425,16 +412,15 @@ private TreeMap createDMBQuestionMap(Collection getPrePopMapping() throws DataProcessingException { + protected Collection getPrePopMapping() throws DataProcessingException { try { return retrievePrePopMapping(); @@ -444,23 +430,22 @@ protected Collection getPrePopMapping() throws DataProcessing } - private Collection getPamQuestions() { + private Collection getPamQuestions() { var res = nbsUiMetaDataRepository.findPamQuestionMetaData(); - Collection questions = new ArrayList<>(); + Collection questions = new ArrayList<>(); if (res.isPresent()) { - questions = res.get(); + questions = res.get(); } return questions; } - private TreeMap createQuestionMap(Collection coll) { - TreeMap qCodeMap = new TreeMap<>(); - TreeMap qInvFormRVCTMap = new TreeMap<>(); + private TreeMap createQuestionMap(Collection coll) { + TreeMap qCodeMap = new TreeMap<>(); + TreeMap qInvFormRVCTMap = new TreeMap<>(); if (coll != null && coll.size() > 0) { for (Object o : coll) { NbsQuestionMetadata qMetadata = (NbsQuestionMetadata) o; - if (qMetadata.getInvestigationFormCd().equals(NBSConstantUtil.INV_FORM_RVCT)) - { + if (qMetadata.getInvestigationFormCd().equals(NBSConstantUtil.INV_FORM_RVCT)) { qInvFormRVCTMap.put(qMetadata.getQuestionIdentifier(), qMetadata); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/JurisdictionService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/JurisdictionService.java index 96f0527c9..846df50c0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/JurisdictionService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/JurisdictionService.java @@ -25,11 +25,11 @@ @Service public class JurisdictionService implements IJurisdictionService { - private StringBuffer detailError= null; private final PatientRepositoryUtil patientRepositoryUtil; private final OrganizationRepositoryUtil organizationRepositoryUtil; private final JurisdictionParticipationRepository jurisdictionParticipationRepository; private final JurisdictionCodeRepository jurisdictionCodeRepository; + private StringBuffer detailError = null; public JurisdictionService(PatientRepositoryUtil patientRepositoryUtil, OrganizationRepositoryUtil organizationRepositoryUtil, @@ -42,14 +42,12 @@ public JurisdictionService(PatientRepositoryUtil patientRepositoryUtil, } public List getJurisdictionCode() { - var jusCode = jurisdictionCodeRepository.findAll(); - if (!jusCode.isEmpty()) { - return jusCode; - } - else - { - return new ArrayList<>(); - } + var jusCode = jurisdictionCodeRepository.findAll(); + if (!jusCode.isEmpty()) { + return jusCode; + } else { + return new ArrayList<>(); + } } public void assignJurisdiction(PersonContainer patientContainer, PersonContainer providerContainer, @@ -60,23 +58,20 @@ public void assignJurisdiction(PersonContainer patientContainer, PersonContainer jurisdictionMap = resolveLabReportJurisdiction(patientContainer, providerContainer, organizationContainer, null); } - if (jurisdictionMap!=null && jurisdictionMap.get(ELRConstant.JURISDICTION_HASHMAP_KEY) != null) { + if (jurisdictionMap != null && jurisdictionMap.get(ELRConstant.JURISDICTION_HASHMAP_KEY) != null) { String jurisdiction = jurisdictionMap.get(ELRConstant.JURISDICTION_HASHMAP_KEY); observationRequest.getTheObservationDto().setJurisdictionCd(jurisdiction); - } - else - { + } else { observationRequest.getTheObservationDto().setJurisdictionCd(null); } } // end of assignJursidiction() - public String deriveJurisdictionCd(BaseContainer proxyVO, ObservationDto rootObsDT) throws DataProcessingException { try { //Retieve provider uid and patient uid - Collection partColl = null; + Collection partColl = null; boolean isLabReport = false; String jurisdictionDerivationInd = AuthUtil.authUser.getJurisdictionDerivationInd(); // if (proxyVO instanceof MorbidityProxyVO) @@ -86,13 +81,11 @@ public String deriveJurisdictionCd(BaseContainer proxyVO, ObservationDto rootObs // } - if (proxyVO instanceof LabResultProxyContainer) - { + if (proxyVO instanceof LabResultProxyContainer) { isLabReport = true; - partColl = ( (LabResultProxyContainer) proxyVO).getTheParticipationDtoCollection(); + partColl = ((LabResultProxyContainer) proxyVO).getTheParticipationDtoCollection(); } - if (partColl == null || partColl.size() == 0) - { + if (partColl == null || partColl.size() == 0) { throw new DataProcessingException("Participation collection is null or empty, it is: " + partColl); } @@ -137,43 +130,35 @@ public String deriveJurisdictionCd(BaseContainer proxyVO, ObservationDto rootObs PersonContainer providerVO = null; OrganizationContainer orderingFacilityVO = null; OrganizationContainer reportingFacilityVO = null; - try - { - if (providerUid != null) - { + try { + if (providerUid != null) { providerVO = patientRepositoryUtil.loadPerson(providerUid); } - if (orderingFacilityUid != null) - { + if (orderingFacilityUid != null) { // orderingFacilityVO = getOrganization(orderingFacilityUid); orderingFacilityVO = organizationRepositoryUtil.loadObject(orderingFacilityUid, null); } - if(reportingFacilityUid!=null) - { + if (reportingFacilityUid != null) { // reportingFacilityVO = getOrganization(reportingFacilityUid); //it was assigned to orderingFacilityVO in the first implementation.not sure if it was correct. reportingFacilityVO = organizationRepositoryUtil.loadObject(orderingFacilityUid, null); } - } - catch (Exception rex) - { - throw new DataProcessingException("Error retieving provider with UID:"+ providerUid +" OR Ordering Facility, its uid is: " + orderingFacilityUid); + } catch (Exception rex) { + throw new DataProcessingException("Error retieving provider with UID:" + providerUid + " OR Ordering Facility, its uid is: " + orderingFacilityUid); } //Get the patient subject PersonContainer patientVO = null; - Collection personVOColl = null; - if (isLabReport) - { - personVOColl = ( (LabResultProxyContainer) proxyVO).getThePersonContainerCollection(); + Collection personVOColl = null; + if (isLabReport) { + personVOColl = ((LabResultProxyContainer) proxyVO).getThePersonContainerCollection(); } // if (isMorbReport) // { // personVOColl = ( (MorbidityProxyVO) proxyVO).getThePersonVOCollection(); // // } - if (patientUid != null && personVOColl != null && personVOColl.size() > 0) - { + if (patientUid != null && personVOColl != null && personVOColl.size() > 0) { for (PersonContainer pVO : personVOColl) { if (pVO == null || pVO.getThePersonDto() == null) { continue; @@ -187,39 +172,29 @@ public String deriveJurisdictionCd(BaseContainer proxyVO, ObservationDto rootObs //Derive the jurisdictionCd Map jMap = null; - if (patientVO != null) - { + if (patientVO != null) { - try - { + try { jMap = resolveLabReportJurisdiction(patientVO, providerVO, orderingFacilityVO, reportingFacilityVO); - } - catch (Exception cex) - { + } catch (Exception cex) { throw new DataProcessingException("Error creating jurisdiction services."); } } //set jurisdiction for order test if (rootObsDT != null) { - if (jMap != null && jMap.containsKey(ELRConstant.JURISDICTION_HASHMAP_KEY)) - { + if (jMap != null && jMap.containsKey(ELRConstant.JURISDICTION_HASHMAP_KEY)) { rootObsDT.setJurisdictionCd(jMap.get(ELRConstant.JURISDICTION_HASHMAP_KEY)); - } - else - { + } else { rootObsDT.setJurisdictionCd(null); } } //Return errors if any - if (jMap != null && jMap.containsKey("ERROR")) - { + if (jMap != null && jMap.containsKey("ERROR")) { return jMap.get("ERROR"); - } - else - { + } else { return null; } } catch (Exception e) { @@ -231,7 +206,7 @@ public String deriveJurisdictionCd(BaseContainer proxyVO, ObservationDto rootObs /** * Description: this method find jurisdiction associated with patient, provider, organization. * Jurisdiction is identified based on Postal locator - * */ + */ private HashMap resolveLabReportJurisdiction(PersonContainer patientContainer, PersonContainer providerContainer, OrganizationContainer organizationContainer, @@ -242,31 +217,27 @@ private HashMap resolveLabReportJurisdiction(PersonContainer pat Collection organizationJurisdictionCollection = null; HashMap map = new HashMap<>(); detailError = new StringBuffer(); - String jurisdiction =null; + String jurisdiction = null; //Initial value was not set in the first implementation. detailError.append("Patient: "); patientJurisdictionCollection = findJurisdiction(patientContainer.getTheEntityLocatorParticipationDtoCollection(), "H", "PST"); // Check to see the subject size. Only proceed if the subject size is not greater than 1. - if (patientJurisdictionCollection.size() <= 1) - { + if (patientJurisdictionCollection.size() <= 1) { // Check the result to make sure that there is a value for the subject's jurisdiction. // If not then go and find the jurisdiction based on the provider - if (patientJurisdictionCollection.size() == 1) - { + if (patientJurisdictionCollection.size() == 1) { Iterator iter = patientJurisdictionCollection.iterator(); jurisdiction = iter.next(); map.put(ELRConstant.JURISDICTION_HASHMAP_KEY, jurisdiction); } - if (jurisdiction==null && providerContainer !=null) - { + if (jurisdiction == null && providerContainer != null) { detailError.append("Provider: "); providerJurisdictionCollection = findJurisdiction(providerContainer.getTheEntityLocatorParticipationDtoCollection(), "WP", "PST"); - if(!(providerJurisdictionCollection.size()==0)) + if (!(providerJurisdictionCollection.size() == 0)) // Check to see the provider size. Only proceed if the provider size is not greater than 1. - if (providerJurisdictionCollection.size() == 1) - { + if (providerJurisdictionCollection.size() == 1) { // Check the result to make sure that there is a value for the provider's jurisdiction. // If not then go and find the jurisdiction based on the provider Iterator iter = providerJurisdictionCollection.iterator(); @@ -276,21 +247,17 @@ private HashMap resolveLabReportJurisdiction(PersonContainer pat } } - if(jurisdiction==null){ - if (organizationContainer != null) - { + if (jurisdiction == null) { + if (organizationContainer != null) { detailError.append("Ordering Facility: "); organizationJurisdictionCollection = findJurisdiction(organizationContainer.getTheEntityLocatorParticipationDtoCollection(), "WP", "PST"); } - if (organizationJurisdictionCollection != null) - { + if (organizationJurisdictionCollection != null) { // Check to see the organization size. Only proceed if the organization size is not greater than 1. - if (organizationJurisdictionCollection.size() <= 1) - { + if (organizationJurisdictionCollection.size() <= 1) { // Check the result to make sure that there is a value for the organization's jurisdiction. // If not then go and find the jurisdiction based on the organization - if (organizationJurisdictionCollection.size() == 1) - { + if (organizationJurisdictionCollection.size() == 1) { Iterator iter = organizationJurisdictionCollection.iterator(); jurisdiction = iter.next(); map.put(ELRConstant.JURISDICTION_HASHMAP_KEY, jurisdiction); @@ -323,7 +290,7 @@ private HashMap resolveLabReportJurisdiction(PersonContainer pat } } - detailError= null; + detailError = null; return map; } catch (Exception e) { e.printStackTrace(); @@ -331,73 +298,68 @@ private HashMap resolveLabReportJurisdiction(PersonContainer pat } } - private Collection findJurisdiction(Collection entityLocatorPartColl, String useCd, String classCd) - { - PostalLocatorDto postalDt; - Collection coll = new ArrayList<>(); + private Collection findJurisdiction(Collection entityLocatorPartColl, String useCd, String classCd) { + PostalLocatorDto postalDt; + Collection coll = new ArrayList<>(); - // Check to make sure that you are able to get a locator participation - if (entityLocatorPartColl != null) - { + // Check to make sure that you are able to get a locator participation + if (entityLocatorPartColl != null) { - // If there is a locator participation then proceed. - if (!entityLocatorPartColl.isEmpty()) - { + // If there is a locator participation then proceed. + if (!entityLocatorPartColl.isEmpty()) { - for (EntityLocatorParticipationDto dt : entityLocatorPartColl) { - // for subject the use code = "H" class cd = "PST" - // for provider the use code = "W" class cd = "PST" - if (dt.getUseCd().equals(useCd) && dt.getClassCd().equals(classCd)) { - postalDt = dt.getThePostalLocatorDto(); + for (EntityLocatorParticipationDto dt : entityLocatorPartColl) { + // for subject the use code = "H" class cd = "PST" + // for provider the use code = "W" class cd = "PST" + if (dt.getUseCd().equals(useCd) && dt.getClassCd().equals(classCd)) { + postalDt = dt.getThePostalLocatorDto(); - // Parse the zip if is valid. - if (postalDt != null) { + // Parse the zip if is valid. + if (postalDt != null) { - String searchZip; - searchZip = parseZip(postalDt.getZipCd()); + String searchZip; + searchZip = parseZip(postalDt.getZipCd()); - if (searchZip == null) { - searchZip = "NO ZIP"; - } - detailError.append(searchZip); - detailError.append(", "); + if (searchZip == null) { + searchZip = "NO ZIP"; + } + detailError.append(searchZip); + detailError.append(", "); - // Attempt to find the jurisicition by zip code. if you do not retrieve any - // data then attempt to retriece by county. If no data then retrieve - // by city. + // Attempt to find the jurisicition by zip code. if you do not retrieve any + // data then attempt to retriece by county. If no data then retrieve + // by city. - var res = jurisdictionParticipationRepository.findJurisdiction(searchZip, "Z"); - if (res.isPresent()) { - coll = res.get(); + var res = jurisdictionParticipationRepository.findJurisdiction(searchZip, "Z"); + if (res.isPresent()) { + coll = res.get(); + } + if (coll.size() < 1) { + String cityDesc = postalDt.getCityDescTxt(); + if (cityDesc == null) { + cityDesc = "NO CITY"; } - if (coll.size() < 1) { - String cityDesc = postalDt.getCityDescTxt(); - if (cityDesc == null) - { - cityDesc = "NO CITY"; + detailError.append(cityDesc); + detailError.append(", "); + if (postalDt.getCityDescTxt() != null) { + var resCity = jurisdictionParticipationRepository.findJurisdictionForCity(postalDt.getCityDescTxt(), postalDt.getStateCd(), "C"); + if (resCity.isPresent()) { + coll = resCity.get(); } - detailError.append(cityDesc); - detailError.append(", "); - if (postalDt.getCityDescTxt() != null) { - var resCity = jurisdictionParticipationRepository.findJurisdictionForCity(postalDt.getCityDescTxt(), postalDt.getStateCd(), "C"); - if (resCity.isPresent()) { - coll = resCity.get(); - } - } - String countyDesc = postalDt.getCntyDescTxt(); - if (countyDesc == null) { - countyDesc = "NO COUNTY"; - } - detailError.append(countyDesc); - detailError.append(", "); - - if (coll.size() < 1) { - var resJus = jurisdictionParticipationRepository.findJurisdiction(postalDt.getCntyCd(), "N"); - if (resJus.isPresent()) { - coll = resJus.get(); - } + } + String countyDesc = postalDt.getCntyDescTxt(); + if (countyDesc == null) { + countyDesc = "NO COUNTY"; + } + detailError.append(countyDesc); + detailError.append(", "); + + if (coll.size() < 1) { + var resJus = jurisdictionParticipationRepository.findJurisdiction(postalDt.getCntyCd(), "N"); + if (resJus.isPresent()) { + coll = resJus.get(); } } } @@ -405,34 +367,31 @@ private Collection findJurisdiction(Collection5) - { + private String parseZip(String searchZip) { + if (searchZip != null && searchZip.trim().length() > 5) { return searchZip.substring(0, 5); - } - else - { + } else { return searchZip; } } - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/ProgramAreaService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/ProgramAreaService.java index c4c8502c2..ebb996ef1 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/ProgramAreaService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/ProgramAreaService.java @@ -19,11 +19,10 @@ @Service @Slf4j public class ProgramAreaService implements IProgramAreaService { - boolean programAreaDerivationExcludeFlag; - private final ISrteCodeObsService srteCodeObsService; private final ProgramAreaCodeRepository programAreaCodeRepository; private final IObservationCodeService observationCodeService; + boolean programAreaDerivationExcludeFlag; public ProgramAreaService( ISrteCodeObsService srteCodeObsService, @@ -51,18 +50,15 @@ public List getAllProgramAreaCode() { * CLIA code assoc with MSH-4.2.1 and PID-3.4.2. * This method set program area to Observation request (root observation) after it found valid code in observation results * */ - public void getProgramArea(Collection observationResults, ObservationContainer observationRequest, String clia) throws DataProcessingException - { + public void getProgramArea(Collection observationResults, ObservationContainer observationRequest, String clia) throws DataProcessingException { String programAreaCode = null; - if (clia == null || clia.trim().equals("")) - { + if (clia == null || clia.trim().equals("")) { clia = NEDSSConstant.DEFAULT; } Map paResults = null; if (observationRequest.getTheObservationDto().getElectronicInd().equals(NEDSSConstant.ELECTRONIC_IND_ELR)) { - if (!observationResults.isEmpty()) - { + if (!observationResults.isEmpty()) { // Program Area happening here paResults = getProgramAreaHelper( clia, @@ -71,23 +67,17 @@ public void getProgramArea(Collection observationResults, ); } - if (paResults != null && paResults.containsKey(ELRConstant.PROGRAM_AREA_HASHMAP_KEY)) - { + if (paResults != null && paResults.containsKey(ELRConstant.PROGRAM_AREA_HASHMAP_KEY)) { programAreaCode = paResults.get(ELRConstant.PROGRAM_AREA_HASHMAP_KEY); observationRequest.getTheObservationDto().setProgAreaCd(programAreaCode); - } - else - { + } else { observationRequest.getTheObservationDto().setProgAreaCd(null); } } - if (paResults != null && paResults.containsKey("ERROR")) - { + if (paResults != null && paResults.containsKey("ERROR")) { observationRequest.getTheObservationDto().setProgAreaCd(null); - } - else - { + } else { observationRequest.getTheObservationDto().setProgAreaCd(programAreaCode); } } @@ -95,14 +85,13 @@ public void getProgramArea(Collection observationResults, /** * Description: method getting program area given CLIA and Observation Requests - * */ + */ private HashMap getProgramAreaHelper(String reportingLabCLIA, Collection observationResults, String electronicInd) throws DataProcessingException { HashMap returnMap = new HashMap<>(); - if (reportingLabCLIA == null) - { + if (reportingLabCLIA == null) { returnMap.put(NEDSSConstant.ERROR, NEDSSConstant.REPORTING_LAB_CLIA_NULL); return returnMap; } @@ -111,8 +100,7 @@ private HashMap getProgramAreaHelper(String reportingLabCLIA, Hashtable paHTBL = new Hashtable<>(); //iterator through each resultTest - while (obsResults.hasNext()) - { + while (obsResults.hasNext()) { ObservationContainer obsResult = obsResults.next(); ObservationDto obsDt = obsResult.getTheObservationDto(); @@ -130,77 +118,63 @@ private HashMap getProgramAreaHelper(String reportingLabCLIA, obsDomainCdSt1.equals(ELRConstant.ELR_OBSERVATION_RESULT) && obsDTCode != null && !obsDTCode.equals(NEDSSConstant.ACT114_TYP_CD) - ) - { + ) { // Retrieve PAs using Lab Result --> SNOMED code mapping // If ELR, use actual CLIA - if manual use "DEFAULT" as CLIA String progAreaCd; - if ( electronicInd.equals(NEDSSConstant.ELECTRONIC_IND_ELR) ) - { + if (electronicInd.equals(NEDSSConstant.ELECTRONIC_IND_ELR)) { progAreaCd = srteCodeObsService.getPAFromSNOMEDCodes(reportingLabCLIA, obsResult.getTheObsValueCodedDtoCollection()); } //NOTE: this wont happen in ELR flow - else - { + else { progAreaCd = srteCodeObsService.getPAFromSNOMEDCodes(NEDSSConstant.DEFAULT, obsResult.getTheObsValueCodedDtoCollection()); } // If PA returned, check to see if it is the same one as before. - if (progAreaCd != null) - { + if (progAreaCd != null) { found = true; paHTBL.put(progAreaCd.trim(), progAreaCd.trim()); - if (paHTBL.size() != 1) - { + if (paHTBL.size() != 1) { break; } } // Retrieve PAs using Resulted Test --> LOINC mapping - if (!found) - { + if (!found) { progAreaCd = srteCodeObsService.getPAFromLOINCCode(reportingLabCLIA, obsResult); // If PA returned, check to see if it is the same one as before. - if (progAreaCd != null) - { + if (progAreaCd != null) { found = true; paHTBL.put(progAreaCd.trim(), progAreaCd.trim()); - if (paHTBL.size() != 1) - { + if (paHTBL.size() != 1) { break; } } } // Retrieve PAs using Local Result Code to PA mapping - if (!found) - { + if (!found) { progAreaCd = srteCodeObsService.getPAFromLocalResultCode(reportingLabCLIA, obsResult.getTheObsValueCodedDtoCollection()); // If PA returned, check to see if it is the same one as before. - if (progAreaCd != null) - { + if (progAreaCd != null) { found = true; paHTBL.put(progAreaCd.trim(), progAreaCd.trim()); - if (paHTBL.size() != 1) - { + if (paHTBL.size() != 1) { break; } } } // Retrieve PAs using Local Result Code to PA mapping - if (!found) - { + if (!found) { progAreaCd = srteCodeObsService.getPAFromLocalTestCode(reportingLabCLIA, obsResult); // If PA returned, check to see if it is the same one as before. - if (progAreaCd != null) - { + if (progAreaCd != null) { found = true; paHTBL.put(progAreaCd.trim(), progAreaCd.trim()); - if (paHTBL.size() != 1) - { + if (paHTBL.size() != 1) { break; } } @@ -208,24 +182,18 @@ private HashMap getProgramAreaHelper(String reportingLabCLIA, //If we haven't found a PA and the no components were excluded based on the exclude flag, //clear the PA hashtable which will fail the derivation - if (!found && !programAreaDerivationExcludeFlag) - { + if (!found && !programAreaDerivationExcludeFlag) { paHTBL.clear(); break; } } } //end of while - if(paHTBL.size() == 0) - { + if (paHTBL.size() == 0) { returnMap.put(NEDSSConstant.ERROR, ELRConstant.PROGRAM_ASSIGN_2); - } - else if (paHTBL.size() == 1) - { + } else if (paHTBL.size() == 1) { returnMap.put(ELRConstant.PROGRAM_AREA_HASHMAP_KEY, paHTBL.keys().nextElement()); - } - else - { + } else { returnMap.put(NEDSSConstant.ERROR, ELRConstant.PROGRAM_ASSIGN_1); } return returnMap; @@ -233,7 +201,7 @@ else if (paHTBL.size() == 1) public String deriveProgramAreaCd(LabResultProxyContainer labResultProxyVO, ObservationContainer orderTest) throws DataProcessingException { //Gathering the result tests - Collection resultTests = new ArrayList<> (); + Collection resultTests = new ArrayList<>(); for (ObservationContainer obsVO : labResultProxyVO.getTheObservationContainerCollection()) { String obsDomainCdSt1 = obsVO.getTheObservationDto().getObsDomainCdSt1(); if (obsDomainCdSt1 != null && @@ -244,47 +212,36 @@ public String deriveProgramAreaCd(LabResultProxyContainer labResultProxyVO, Obse //Get the reporting lab clia String reportingLabCLIA = ""; - if(labResultProxyVO.getLabClia()!=null && labResultProxyVO.isManualLab()) - { - reportingLabCLIA =labResultProxyVO.getLabClia(); - } - else - { + if (labResultProxyVO.getLabClia() != null && labResultProxyVO.isManualLab()) { + reportingLabCLIA = labResultProxyVO.getLabClia(); + } else { reportingLabCLIA = observationCodeService.getReportingLabCLIA(labResultProxyVO); } - if(reportingLabCLIA == null || reportingLabCLIA.trim().equals("")) - { + if (reportingLabCLIA == null || reportingLabCLIA.trim().equals("")) { reportingLabCLIA = NEDSSConstant.DEFAULT; } //Get program area - if(!orderTest.getTheObservationDto().getElectronicInd().equals(NEDSSConstant.ELECTRONIC_IND_ELR)){ + if (!orderTest.getTheObservationDto().getElectronicInd().equals(NEDSSConstant.ELECTRONIC_IND_ELR)) { Map paResults = null; - if (resultTests.size() > 0) - { + if (resultTests.size() > 0) { paResults = srteCodeObsService.getProgramArea(reportingLabCLIA, resultTests, orderTest.getTheObservationDto().getElectronicInd()); } //set program area for order test if (paResults != null && - paResults.containsKey(ELRConstant.PROGRAM_AREA_HASHMAP_KEY)) - { - orderTest.getTheObservationDto().setProgAreaCd( (String) paResults.get( + paResults.containsKey(ELRConstant.PROGRAM_AREA_HASHMAP_KEY)) { + orderTest.getTheObservationDto().setProgAreaCd((String) paResults.get( ELRConstant.PROGRAM_AREA_HASHMAP_KEY)); - } - else - { + } else { orderTest.getTheObservationDto().setProgAreaCd(null); } - if (paResults != null && paResults.containsKey("ERROR")) - { + if (paResults != null && paResults.containsKey("ERROR")) { return (String) paResults.get("ERROR"); - } - else - { + } else { return null; } } @@ -292,9 +249,4 @@ public String deriveProgramAreaCd(LabResultProxyContainer labResultProxyVO, Obse } - - - - - } \ No newline at end of file diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/log/EdxLogService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/log/EdxLogService.java index 82b956e0b..6beaec3f9 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/log/EdxLogService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/log/EdxLogService.java @@ -41,6 +41,7 @@ public EdxActivityDetailLog saveEdxActivityDetailLog(EDXActivityDetailLogDto det EdxActivityDetailLog edxActivityDetailLogResult = edxActivityDetailLogRepository.save(edxActivityDetailLog); return edxActivityDetailLogResult; } + @Transactional public void saveEdxActivityLogs(EDXActivityLogDto edxActivityLogDto) { EdxActivityLog edxActivityLog = new EdxActivityLog(edxActivityLogDto); @@ -51,15 +52,15 @@ public void saveEdxActivityLogs(EDXActivityLogDto edxActivityLogDto) { EdxActivityLog dbActivityLog = dbActivityLogOptional.get(); dbActivityLog.setExceptionTxt(edxActivityLogDto.getExceptionTxt()); edxActivityLogRepository.save(dbActivityLog); - activityLogId=dbActivityLog.getId(); - }else { + activityLogId = dbActivityLog.getId(); + } else { EdxActivityLog edxActivityLogNew = edxActivityLogRepository.save(edxActivityLog); - activityLogId=edxActivityLogNew.getId(); + activityLogId = edxActivityLogNew.getId(); } if (edxActivityLogDto.getEDXActivityLogDTWithVocabDetails() != null) { - Collection edxActivityDetailLogsList= edxActivityLogDto.getEDXActivityLogDTWithVocabDetails(); - for (EDXActivityDetailLogDto eDXActivityDetailLogDto: edxActivityDetailLogsList) { + Collection edxActivityDetailLogsList = edxActivityLogDto.getEDXActivityLogDTWithVocabDetails(); + for (EDXActivityDetailLogDto eDXActivityDetailLogDto : edxActivityDetailLogsList) { eDXActivityDetailLogDto.setEdxActivityLogUid(activityLogId); saveEdxActivityDetailLog(eDXActivityDetailLogDto); } @@ -158,7 +159,7 @@ private void setActivityLogExceptionTxt(EDXActivityLogDto edxActivityLogDto, Str @SuppressWarnings("java:S6541") public void addActivityDetailLogs(EdxLabInformationDto edxLabInformationDto, String detailedMsg) { - try{ + try { ArrayList detailList = (ArrayList) edxLabInformationDto.getEdxActivityLogDto().getEDXActivityLogDTWithVocabDetails(); if (detailList == null) { @@ -334,10 +335,10 @@ else if (edxLabInformationDto.isLabIsCreateSuccess()) String.valueOf(edxLabInformationDto.getPersonParentUid()), EdxRuleAlgorothmManagerDto.STATUS_VAL.Success, msg); } - if(edxLabInformationDto.isNextOfKin()) { + if (edxLabInformationDto.isNextOfKin()) { var nokInfo = edxLabInformationDto.getLabResultProxyContainer().getThePersonContainerCollection() - .stream().filter(nok -> nok.getRole().equals(NEDSSConstant.NOK)).findFirst(); + .stream().filter(nok -> nok.getRole().equals(NEDSSConstant.NOK)).findFirst(); String nokUid; String nokParentUid; String message = EdxELRConstant.NEXT_OF_KIN; @@ -347,12 +348,12 @@ else if (edxLabInformationDto.isLabIsCreateSuccess()) message = message + ". (UID: " + nokUid + ", PUID: " + nokParentUid + ")"; } setActivityDetailLog(detailList, id, EdxRuleAlgorothmManagerDto.STATUS_VAL.Success, message); - }else{ + } else { setActivityDetailLog(detailList, id, EdxRuleAlgorothmManagerDto.STATUS_VAL.Failure, EdxELRConstant.NO_NEXT_OF_KIN); } - if(edxLabInformationDto.isProvider()) { + if (edxLabInformationDto.isProvider()) { setActivityDetailLog(detailList, id, EdxRuleAlgorothmManagerDto.STATUS_VAL.Success, EdxELRConstant.IS_PROVIDER); - }else{ + } else { setActivityDetailLog(detailList, id, EdxRuleAlgorothmManagerDto.STATUS_VAL.Failure, EdxELRConstant.IS_NOT_PROVIDER); } if (edxLabInformationDto.isLabIsCreateSuccess() && edxLabInformationDto.getJurisdictionName() != null) { @@ -381,9 +382,9 @@ else if (edxLabInformationDto.isLabIsCreateSuccess()) setActivityDetailLog(detailList, id, EdxRuleAlgorothmManagerDto.STATUS_VAL.Success, msg); setActivityDetailLog(detailList, id, EdxRuleAlgorothmManagerDto.STATUS_VAL.Success, EdxELRConstant.DOC_CREATE_SUCCESS); } - if(edxLabInformationDto.isObservationMatch()) { + if (edxLabInformationDto.isObservationMatch()) { setActivityDetailLog(detailList, id, EdxRuleAlgorothmManagerDto.STATUS_VAL.Success, EdxELRConstant.OBSERVATION_MATCH); - }else{ + } else { String msg = EdxELRConstant.OBSERVATION_NOT_MATCH.replace("%1", Long.toString(edxLabInformationDto.getRootObserbationUid())); setActivityDetailLog(detailList, id, EdxRuleAlgorothmManagerDto.STATUS_VAL.Success, msg); } @@ -467,14 +468,12 @@ else if (edxLabInformationDto.isLabIsUpdateDRSA()) .append("(WDS value) ").append(wdsNumeric.getOperator()).append(" ") .append(wdsNumeric.getInputCode1()).append(" (Input value 1) & ") .append(wdsNumeric.getInputCode2()).append(" (Input value 2)"); - } - else if (!item.getWdsValueTextReportList().isEmpty()) { + } else if (!item.getWdsValueTextReportList().isEmpty()) { var wdsText = item.getWdsValueTextReportList().get(0); sb.append("Matched on Text Value type. ").append(underCond).append(wdsText.getWdsCode()) .append("(WDS value) matching with ") .append(wdsText.getInputCode()); - } - else if (item.getWdsValueCodedReport() != null ) { + } else if (item.getWdsValueCodedReport() != null) { sb.append("Matched on Coded Value type. ").append(underCond).append(item.getWdsValueCodedReport().getWdsCode()) .append("(WDS value) matching with ") .append(item.getWdsValueCodedReport().getInputCode()); @@ -505,9 +504,8 @@ else if (item.getWdsValueCodedReport() != null ) { // EdxELRConstant.OFCN); // } edxLabInformationDto.getEdxActivityLogDto().setEDXActivityLogDTWithVocabDetails(detailList); - } - catch (Exception e) { - ArrayList delailList = (ArrayList)edxLabInformationDto.getEdxActivityLogDto().getEDXActivityLogDTWithVocabDetails(); + } catch (Exception e) { + ArrayList delailList = (ArrayList) edxLabInformationDto.getEdxActivityLogDto().getEDXActivityLogDTWithVocabDetails(); if (delailList == null) { delailList = new ArrayList(); } @@ -523,8 +521,9 @@ private void setActivityDetailLog(ArrayList detailLogs, edxActivityDetailLogDto.setComment(comment); detailLogs.add(edxActivityDetailLogDto); } + public void addActivityDetailLogsForWDS(EdxLabInformationDto edxLabInformationDto, String detailedMsg) { - try{ + try { ArrayList detailList = (ArrayList) edxLabInformationDto.getEdxActivityLogDto().getEDXActivityLogDTWithVocabDetails(); if (detailList == null) { @@ -560,8 +559,7 @@ public void addActivityDetailLogsForWDS(EdxLabInformationDto edxLabInformationDt EdxELRConstant.OFCN); } edxLabInformationDto.getEdxActivityLogDto().setEDXActivityLogDTWithVocabDetails(detailList); - } - catch (Exception e) { + } catch (Exception e) { log.error("Error while adding activity detail log.", e); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/log/MessageLogService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/log/MessageLogService.java index 81475725e..8448e9319 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/log/MessageLogService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/log/MessageLogService.java @@ -20,15 +20,14 @@ public MessageLogService(MessageLogRepository messageLogRepository) { @Transactional public void saveMessageLog(Collection messageLogDtoCollection) throws DataProcessingException { - try{ - if(messageLogDtoCollection !=null) - { + try { + if (messageLogDtoCollection != null) { for (MessageLogDto messageLogDto : messageLogDtoCollection) { MessageLog msg = new MessageLog(messageLogDto); messageLogRepository.save(msg); } } - }catch(Exception ex){ + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/log/NNDActivityLogService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/log/NNDActivityLogService.java index b4daf0f6e..725ff051b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/log/NNDActivityLogService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/log/NNDActivityLogService.java @@ -33,7 +33,7 @@ public void saveNddActivityLog(NNDActivityLogDto nndActivityLogDto) throws DataP nndActivityLogDto.setStatusTime(timeStamp); long uid; - if(nndActivityLogDto.getNndActivityLogUid() == null) { + if (nndActivityLogDto.getNndActivityLogUid() == null) { var id = odseIdGeneratorService.getLocalIdAndUpdateSeed(NND_METADATA); uid = id.getSeedValueNbr(); } else { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/lookup_data/SrteCodeObsService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/lookup_data/SrteCodeObsService.java index d8cb17fec..7794ab05c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/lookup_data/SrteCodeObsService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/lookup_data/SrteCodeObsService.java @@ -15,7 +15,6 @@ @Service public class SrteCodeObsService implements ISrteCodeObsService { - private boolean programAreaDerivationExcludeFlag = false; //NOSONAR private final ProgAreaSnomeCodeStoredProcRepository progAreaSnomeCodeStoredProcRepository; private final SnomedConditionRepository snomedConditionRepository; private final LOINCCodeRepository loincCodeRepository; @@ -25,6 +24,7 @@ public class SrteCodeObsService implements ISrteCodeObsService { private final LabResultSnomedRepository labResultSnomedRepository; private final SnomedCodeRepository snomedCodeRepository; private final ConditionCodeRepository conditionCodeRepository; + private boolean programAreaDerivationExcludeFlag = false; //NOSONAR public SrteCodeObsService(ProgAreaSnomeCodeStoredProcRepository progAreaSnomeCodeStoredProcRepository, @@ -62,10 +62,9 @@ public String getConditionForSnomedCode(String snomedCd) { public String getConditionForLoincCode(String loinCd) { var result = loincCodeRepository.findConditionForLoincCode(loinCd); - if(result.isPresent()) { + if (result.isPresent()) { return result.get().get(0); - } - else { + } else { return ""; } } @@ -74,8 +73,7 @@ public String getDefaultConditionForLocalResultCode(String labResultCd, String l var result = labResultRepository.findDefaultConditionCdByLabResultCdAndLaboratoryId(labResultCd, laboratoryId); if (result.isPresent()) { return result.get().get(0); - } - else { + } else { return ""; } } @@ -84,8 +82,7 @@ public String getDefaultConditionForLabTest(String labTestCd, String laboratoryI var result = labTestRepository.findDefaultConditionForLabTest(labTestCd, laboratoryId); if (result.isPresent()) { return result.get().get(0); - } - else { + } else { return ""; } } @@ -102,12 +99,10 @@ public ObservationContainer labLoincSnomedLookup(ObservationContainer obsVO, Str * will not be set on the OT and RT. * */ - if (labClia == null && obsVO.getTheObservationDto().getCdSystemCd().equals(NEDSSConstant.DEFAULT)) - { - labClia = NEDSSConstant.DEFAULT ; + if (labClia == null && obsVO.getTheObservationDto().getCdSystemCd().equals(NEDSSConstant.DEFAULT)) { + labClia = NEDSSConstant.DEFAULT; } - if (labClia == null ) - { + if (labClia == null) { return obsVO; } doLoincCdLookupForObservationDT(obsVO.getTheObservationDto(), labClia); @@ -135,8 +130,7 @@ private void doLoincCdLookupForObservationDT(ObservationDto obsDT, String labCli } private void doSnomedCdLookupForObsValueCodedDTs(Collection obsValueCodedDtos, String labClia) { - if (obsValueCodedDtos == null || obsValueCodedDtos.isEmpty()) - { + if (obsValueCodedDtos == null || obsValueCodedDtos.isEmpty()) { return; } for (ObsValueCodedDto obsValueCodedDto : obsValueCodedDtos) { @@ -168,8 +162,7 @@ public HashMap getProgramArea(String reportingLabCLIA, Collection observationContainerCollection, String electronicInd) throws DataProcessingException { HashMap returnMap = new HashMap<>(); - if (reportingLabCLIA == null) - { + if (reportingLabCLIA == null) { returnMap.put(NEDSSConstant.ERROR, NEDSSConstant.REPORTING_LAB_CLIA_NULL); return returnMap; } @@ -178,8 +171,7 @@ public HashMap getProgramArea(String reportingLabCLIA, Hashtable paHTBL = new Hashtable<>(); //iterator through each resultTest - while (obsIt.hasNext()) - { + while (obsIt.hasNext()) { ObservationContainer obsVO = obsIt.next(); ObservationDto obsDt = obsVO.getTheObservationDto(); @@ -191,50 +183,39 @@ public HashMap getProgramArea(String reportingLabCLIA, programAreaDerivationExcludeFlag = false; // make sure you are dealing with a resulted test here. - if ( (obsDomainCdSt1 != null) + if ((obsDomainCdSt1 != null) && obsDomainCdSt1.equals(ELRConstant.ELR_OBSERVATION_RESULT) && (obsDTCode != null) && (!obsDTCode.equals(NEDSSConstant.ACT114_TYP_CD)) - ) - { + ) { // Retrieve PAs using Lab Result --> SNOMED code mapping // If ELR, use actual CLIA - if manual use "DEFAULT" as CLIA String progAreaCd; - if ( electronicInd.equals(NEDSSConstant.ELECTRONIC_IND_ELR) ) - { + if (electronicInd.equals(NEDSSConstant.ELECTRONIC_IND_ELR)) { progAreaCd = getPAFromSNOMEDCodes(reportingLabCLIA, obsVO.getTheObsValueCodedDtoCollection()); - } - else - { + } else { progAreaCd = getPAFromSNOMEDCodes(NEDSSConstant.DEFAULT, obsVO.getTheObsValueCodedDtoCollection()); } // If PA returned, check to see if it is the same one as before. - if (progAreaCd != null) - { + if (progAreaCd != null) { paHTBL.put(progAreaCd.trim(), progAreaCd.trim()); - if (paHTBL.size() != 1) - { + if (paHTBL.size() != 1) { break; } } - ///adawfaf + ///adawfaf } } //end of while - if(paHTBL.size() == 0) - { + if (paHTBL.size() == 0) { returnMap.put(NEDSSConstant.ERROR, ELRConstant.PROGRAM_ASSIGN_2); - } - else if (paHTBL.size() == 1) - { + } else if (paHTBL.size() == 1) { returnMap.put(ELRConstant.PROGRAM_AREA_HASHMAP_KEY, paHTBL.keys().nextElement().toString()); - } - else - { + } else { returnMap.put(NEDSSConstant.ERROR, ELRConstant.PROGRAM_ASSIGN_1); } return returnMap; @@ -243,14 +224,14 @@ else if (paHTBL.size() == 1) /** * Returns a collection of Snomed codes to be used to resolve the program area code. * If more than one type of snomed is resolved, return null. + * * @param reportingLabCLIA : String * @return Vector */ // AK - 7/25/04 public String getPAFromSNOMEDCodes(String reportingLabCLIA, Collection obsValueCodedDtoColl) throws DataProcessingException { Vector snomedVector = new Vector<>(); - if (reportingLabCLIA == null) - { + if (reportingLabCLIA == null) { return null; } @@ -288,8 +269,7 @@ public String getPAFromSNOMEDCodes(String reportingLabCLIA, Collection codeVector, String reportingLabCLIA, String nextLookUp, String type) { - if (codeVector == null || codeVector.size() == 0) - { + if (codeVector == null || codeVector.size() == 0) { return null; } @@ -366,7 +344,7 @@ protected String getProgAreaCd(Vector codeVector, String reportingLabCLI try { for (int k = 0; k < codeVector.size(); k++) { - progAreaCdList = progAreaSnomeCodeStoredProcRepository.getProgAreaCd( (String) codeVector.elementAt(k), type, reportingLabCLIA); + progAreaCdList = progAreaSnomeCodeStoredProcRepository.getProgAreaCd((String) codeVector.elementAt(k), type, reportingLabCLIA); // The above method returns the count of PAs found at // index 1 and program area at index 0 @@ -377,13 +355,11 @@ protected String getProgAreaCd(Vector codeVector, String reportingLabCLI String currentPAcode = (String) progAreaCdList.get("PROGRAM"); // Compare with previously retrieved PA and return null if they are different. - if (lastPACode == null) - { + if (lastPACode == null) { lastPACode = currentPAcode; } } //end of for - } - catch (Exception e) { + } catch (Exception e) { return null; //break out } //end of catch return lastPACode; @@ -392,6 +368,7 @@ protected String getProgAreaCd(Vector codeVector, String reportingLabCLI /** * Attempts to resolve a ProgramAreaCd based on Loinc. + * * @param reportingLabCLIA : String * @return loincVector : Vector */ @@ -399,38 +376,32 @@ protected String getProgAreaCd(Vector codeVector, String reportingLabCLI public String getPAFromLOINCCode(String reportingLabCLIA, ObservationContainer resultTestVO) throws DataProcessingException { ObservationDto obsDt = resultTestVO.getTheObservationDto(); - if (obsDt == null || reportingLabCLIA == null) - { + if (obsDt == null || reportingLabCLIA == null) { return null; } String cdSystemCd = obsDt.getCdSystemCd(); - if (cdSystemCd == null || cdSystemCd.trim().equals("")) - { + if (cdSystemCd == null || cdSystemCd.trim().equals("")) { return null; } String obsCode = obsDt.getCd(); - if (obsCode == null || obsCode.trim().equals("")) - { + if (obsCode == null || obsCode.trim().equals("")) { return null; } Vector loincVector = new Vector<>(); - if(cdSystemCd.equals(ELRConstant.ELR_OBSERVATION_LOINC)) - { + if (cdSystemCd.equals(ELRConstant.ELR_OBSERVATION_LOINC)) { //Check if this loinc code should be excluded from Program Area derivation //If so, set exclude flag so we won't fail this resulted test if no PA is derived for it - if (removePADerivationExcludedLoincCodes(obsCode)){ + if (removePADerivationExcludedLoincCodes(obsCode)) { programAreaDerivationExcludeFlag = true; return null; } loincVector.addElement(obsCode); - } - else - { + } else { //Check if this local test code should be excluded from Program Area derivation //If so, set exclude flag so we won't fail this resulted test if no PA is derived for it if (removePADerivationExcludedLabTestCodes(obsCode, reportingLabCLIA)) { @@ -438,9 +409,8 @@ public String getPAFromLOINCCode(String reportingLabCLIA, ObservationContainer r return null; } - Map loincList = progAreaSnomeCodeStoredProcRepository.getSnomed(obsCode, "LT", reportingLabCLIA); - if ( loincList.containsKey ("COUNT") && (Integer) loincList.get("COUNT") == 1) - { + Map loincList = progAreaSnomeCodeStoredProcRepository.getSnomed(obsCode, "LT", reportingLabCLIA); + if (loincList.containsKey("COUNT") && (Integer) loincList.get("COUNT") == 1) { loincVector.addElement(loincList.get("LOINC")); } } @@ -450,9 +420,9 @@ public String getPAFromLOINCCode(String reportingLabCLIA, ObservationContainer r } //end of getLoincColl(...) private boolean removePADerivationExcludedLabTestCodes(String labTestCd, String reportingLabCLIA) { - var result = labTestRepository.findLabTestForExclusion(labTestCd, reportingLabCLIA); - if(result.isPresent()) { - for(var item : result.get()) { + var result = labTestRepository.findLabTestForExclusion(labTestCd, reportingLabCLIA); + if (result.isPresent()) { + for (var item : result.get()) { if (item.getPaDerivationExcludeCd() != null && item.getPaDerivationExcludeCd().equals(NEDSSConstant.YES)) { return true; } @@ -462,9 +432,9 @@ private boolean removePADerivationExcludedLabTestCodes(String labTestCd, String } private boolean removePADerivationExcludedLoincCodes(String loincCd) { - var result = loincCodeRepository.findLoinCCodeExclusion(loincCd); - if(result.isPresent()) { - for(var item : result.get()) { + var result = loincCodeRepository.findLoinCCodeExclusion(loincCd); + if (result.isPresent()) { + for (var item : result.get()) { if (item.getPaDerivationExcludeCode() != null && item.getPaDerivationExcludeCode().equals(NEDSSConstant.YES)) { return true; } @@ -475,6 +445,7 @@ private boolean removePADerivationExcludedLoincCodes(String loincCd) { /** * Attempts to resolve a program area cd based on Local Result code. + * * @param reportingLabCLIA : String * @return progrAreaCd : String */ @@ -483,8 +454,7 @@ public String getPAFromLocalResultCode(String reportingLabCLIA, Collection codeV if (defaultPACColl.size() == 1) { String currentPACode = defaultPACColl.iterator().next(); // Compare with previously retrieved PA and return null if they are different. - if (lastPACode == null) - { + if (lastPACode == null) { lastPACode = currentPACode; - } - else if (!currentPACode.equals(lastPACode)) - { + } else if (!currentPACode.equals(lastPACode)) { return null; } } } - } - catch (Exception e) { + } catch (Exception e) { e.printStackTrace(); return null; //????leave observation.progAreaCd == null????? } //end of catch @@ -571,18 +535,14 @@ private String findLocalResultDefaultConditionProgramAreaCdFromLabResult(Vector< if (defaultPACColl.size() == 1) { String currentPACode = defaultPACColl.iterator().next(); // Compare with previously retrieved PA and return null if they are different. - if (lastPACode == null) - { + if (lastPACode == null) { lastPACode = currentPACode; - } - else if (!currentPACode.equals(lastPACode)) - { + } else if (!currentPACode.equals(lastPACode)) { return null; } } } - } - catch (Exception e) { + } catch (Exception e) { e.printStackTrace(); return null; //????leave observation.progAreaCd == null????? } //end of catch @@ -592,6 +552,7 @@ else if (!currentPACode.equals(lastPACode)) /** * Attempts to resolve a program area cd based on LocalTestDefault cd. + * * @param reportingLabCLIA : String * @return progAreaCd : String */ @@ -602,14 +563,12 @@ public String getPAFromLocalTestCode(String reportingLabCLIA, ObservationContain String code = getLocalTestCode(obsDt); - if (reportingLabCLIA == null || code == null || code.trim().equals("")) - { + if (reportingLabCLIA == null || code == null || code.trim().equals("")) { return null; } //Check if this code should be excluded from Program Area derivation - if (removePADerivationExcludedLabTestCodes(code, reportingLabCLIA)) - { + if (removePADerivationExcludedLabTestCodes(code, reportingLabCLIA)) { return null; } @@ -644,18 +603,14 @@ private String findLocalResultDefaultConditionProgramAreaCdFromLabTest(Vector organizationFuture = CompletableFuture.supplyAsync(() -> { try { - return organizationService.processingOrganization(labResult); + return organizationService.processingOrganization(labResult); } catch (DataProcessingConsumerException e) { throw new RuntimeException(e); } @@ -121,31 +117,22 @@ public void serviceAggregationAsync(LabResultProxyContainer labResult, EdxLabInf // Wait for all tasks to complete CompletableFuture allFutures = CompletableFuture.allOf(observationFuture, patientFuture, organizationFuture); - try - { + try { allFutures.get(); // Wait for all tasks to complete - } - catch (InterruptedException e) - { + } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new DataProcessingException(THREAD_EXCEPTION_MSG, e); - } - catch (ExecutionException e) - { + } catch (ExecutionException e) { throw new DataProcessingException("Failed to execute tasks", e); } // Get the results from CompletableFuture try { personAggContainer = patientFuture.get(); organizationContainer = organizationFuture.get(); - } - catch (InterruptedException e) - { + } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new DataProcessingException(THREAD_EXCEPTION_MSG, e); - } - catch (ExecutionException e) - { + } catch (ExecutionException e) { throw new DataProcessingException("Failed to get results", e); } @@ -154,14 +141,10 @@ public void serviceAggregationAsync(LabResultProxyContainer labResult, EdxLabInf CompletableFuture progAndJurisdictionFuture = progAndJurisdictionAggregationAsync(labResult, edxLabInformationDto, personAggContainer, organizationContainer); try { progAndJurisdictionFuture.get(); - } - catch (InterruptedException e) - { + } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new DataProcessingException(THREAD_EXCEPTION_MSG, e); - } - catch (ExecutionException e) - { + } catch (ExecutionException e) { throw new DataProcessingException("Failed to execute progAndJurisdictionAggregationAsync", e); } } @@ -169,9 +152,9 @@ public void serviceAggregationAsync(LabResultProxyContainer labResult, EdxLabInf @SuppressWarnings("java:S3776") protected CompletableFuture progAndJurisdictionAggregationAsync(LabResultProxyContainer labResult, - EdxLabInformationDto edxLabInformationDto, - PersonAggContainer personAggContainer, - OrganizationContainer organizationContainer) { + EdxLabInformationDto edxLabInformationDto, + PersonAggContainer personAggContainer, + OrganizationContainer organizationContainer) { return CompletableFuture.runAsync(() -> { // Pulling Jurisdiction and Program from OBS ObservationContainer observationRequest = null; @@ -215,13 +198,12 @@ protected void roleAggregation(LabResultProxyContainer labResult) { *Roles must be checked for NEW, UPDATED, MARK FOR DELETE buckets. */ - Map mappedExistingRoleCollection = new HashMap<>(); - Map mappedNewRoleCollection = new HashMap<>(); - if(labResult.getTheRoleDtoCollection()!=null){ + Map mappedExistingRoleCollection = new HashMap<>(); + Map mappedNewRoleCollection = new HashMap<>(); + if (labResult.getTheRoleDtoCollection() != null) { - Collection coll=labResult.getTheRoleDtoCollection(); - if(!coll.isEmpty()) - { + Collection coll = labResult.getTheRoleDtoCollection(); + if (!coll.isEmpty()) { for (RoleDto roleDT : coll) { if (roleDT.isItDelete()) { mappedExistingRoleCollection.put(roleDT.getSubjectEntityUid() + roleDT.getCd() + roleDT.getScopingEntityUid(), roleDT); @@ -235,7 +217,7 @@ protected void roleAggregation(LabResultProxyContainer labResult) { ArrayList list = new ArrayList<>(); //update scenario - if(!mappedNewRoleCollection.isEmpty()){ + if (!mappedNewRoleCollection.isEmpty()) { Set set = mappedNewRoleCollection.keySet(); for (Object o : set) { String key = (String) o; @@ -262,7 +244,7 @@ protected void roleAggregation(LabResultProxyContainer labResult) { Map modifiedRoleMap = new HashMap<>(); ArrayList listFinal = new ArrayList<>(); - if(!list.isEmpty()){ + if (!list.isEmpty()) { for (Object o : list) { RoleDto roleDT = (RoleDto) o; if (roleDT.isItDelete()) { @@ -271,8 +253,7 @@ protected void roleAggregation(LabResultProxyContainer labResult) { continue; } //We will write the role if there are no existing role relationships. - if (roleDT.getScopingEntityUid() == null) - { + if (roleDT.getScopingEntityUid() == null) { long count; count = roleService.loadCountBySubjectCdComb(roleDT).longValue(); if (count == 0) { @@ -280,9 +261,7 @@ protected void roleAggregation(LabResultProxyContainer labResult) { modifiedRoleMap.put(roleDT.getSubjectEntityUid() + roleDT.getRoleSeq() + roleDT.getCd(), roleDT); } - } - else - { + } else { int checkIfExisits; checkIfExisits = roleService.loadCountBySubjectScpingCdComb(roleDT); @@ -317,7 +296,7 @@ protected void roleAggregation(LabResultProxyContainer labResult) { } } - if(!modifiedRoleMap.isEmpty()){ + if (!modifiedRoleMap.isEmpty()) { Collection roleCollection = modifiedRoleMap.values(); listFinal.addAll(roleCollection); } @@ -355,12 +334,12 @@ protected void observationAggregation(LabResultProxyContainer labResult, EdxLabI protected PersonAggContainer patientAggregation(LabResultProxyContainer labResultProxyContainer, EdxLabInformationDto edxLabInformationDto, - Collection personContainerCollection) throws DataProcessingConsumerException, DataProcessingException { + Collection personContainerCollection) throws DataProcessingConsumerException, DataProcessingException { PersonAggContainer container = new PersonAggContainer(); PersonContainer personContainerObj = null; PersonContainer providerVOObj = null; - if (personContainerCollection != null && !personContainerCollection.isEmpty() ) { + if (personContainerCollection != null && !personContainerCollection.isEmpty()) { Iterator it = personContainerCollection.iterator(); boolean orderingProviderIndicator = false; @@ -369,12 +348,10 @@ protected PersonAggContainer patientAggregation(LabResultProxyContainer labResul if (personContainer.getRole() != null && personContainer.getRole().equalsIgnoreCase(EdxELRConstant.ELR_NEXT_OF_KIN)) { patientService.processingNextOfKin(labResultProxyContainer, personContainer); edxLabInformationDto.setNextOfKin(true); - } - else { + } else { if (personContainer.thePersonDto.getCd().equalsIgnoreCase(EdxELRConstant.ELR_PATIENT_CD)) { - personContainerObj = patientService.processingPatient(labResultProxyContainer, edxLabInformationDto, personContainer); - } - else if (personContainer.thePersonDto.getCd().equalsIgnoreCase(EdxELRConstant.ELR_PROVIDER_CD)) { + personContainerObj = patientService.processingPatient(labResultProxyContainer, edxLabInformationDto, personContainer); + } else if (personContainer.thePersonDto.getCd().equalsIgnoreCase(EdxELRConstant.ELR_PROVIDER_CD)) { providerVOObj = patientService.processingProvider(labResultProxyContainer, edxLabInformationDto, personContainer, orderingProviderIndicator); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerCacheService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerCacheService.java index 11dae8acb..9d4546711 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerCacheService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerCacheService.java @@ -26,7 +26,7 @@ public ManagerCacheService(ICatchingValueService cachingValueService, this.cacheManager = cacheManager; } - @SuppressWarnings({"java:S3776","java:S1488", "java:S112", "java:S2696"}) + @SuppressWarnings({"java:S3776", "java:S1488", "java:S112", "java:S2696"}) public CompletableFuture loadAndInitCachedValueAsync() { CompletableFuture future = CompletableFuture.runAsync(() -> { if (SrteCache.loincCodesMap.isEmpty()) { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerService.java index f148eb052..8760ca954 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerService.java @@ -109,12 +109,8 @@ public ManagerService(IObservationService observationService, @Transactional public void processDistribution(String eventType, String data) throws DataProcessingConsumerException { if (AuthUtil.authUser != null) { - switch (eventType) { - case EVENT_ELR: - processingELR(data); - break; - default: - break; + if (eventType.equals(EVENT_ELR)) { + processingELR(data); } } else { throw new DataProcessingConsumerException("Invalid User"); @@ -155,7 +151,7 @@ public void initiatingInvestigationAndPublicHealthCase(PublicHealthCaseFlowConta Long patParentUid = -1L; String patFirstName = null; String patLastName = null; - for(var item : publicHealthCaseFlowContainer.getLabResultProxyContainer().getThePersonContainerCollection()) { + for (var item : publicHealthCaseFlowContainer.getLabResultProxyContainer().getThePersonContainerCollection()) { if (item.getThePersonDto().getCd().equals("PAT")) { patUid = item.getThePersonDto().getUid(); patParentUid = item.getThePersonDto().getPersonParentUid(); @@ -181,14 +177,12 @@ public void initiatingInvestigationAndPublicHealthCase(PublicHealthCaseFlowConta phcContainer.setWdsTrackerView(trackerView); if (edxLabInformationDto.getPageActContainer() != null - || edxLabInformationDto.getPamContainer() != null) { + || edxLabInformationDto.getPamContainer() != null) { if (edxLabInformationDto.getPageActContainer() != null) { var pageActProxyVO = (PageActProxyContainer) edxLabInformationDto.getPageActContainer(); trackerView.setPublicHealthCase(pageActProxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto()); - } - else - { - var pamProxyVO = (PamProxyContainer)edxLabInformationDto.getPamContainer(); + } else { + var pamProxyVO = (PamProxyContainer) edxLabInformationDto.getPamContainer(); trackerView.setPublicHealthCase(pamProxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto()); } } @@ -209,10 +203,8 @@ public void initiatingInvestigationAndPublicHealthCase(PublicHealthCaseFlowConta nbsInterfaceRepository.save(nbsInterfaceModel); } - } - finally - { - if(nbsInterfaceModel != null) { + } finally { + if (nbsInterfaceModel != null) { edxLogService.updateActivityLogDT(nbsInterfaceModel, edxLabInformationDto); edxLogService.addActivityDetailLogs(edxLabInformationDto, detailedMsg); Gson gson = new Gson(); @@ -227,7 +219,7 @@ public void initiatingInvestigationAndPublicHealthCase(PublicHealthCaseFlowConta @Transactional public void initiatingLabProcessing(PublicHealthCaseFlowContainer publicHealthCaseFlowContainer) { NbsInterfaceModel nbsInterfaceModel = null; - EdxLabInformationDto edxLabInformationDto=null; + EdxLabInformationDto edxLabInformationDto = null; try { edxLabInformationDto = publicHealthCaseFlowContainer.getEdxLabInformationDto(); ObservationDto observationDto = publicHealthCaseFlowContainer.getObservationDto(); @@ -253,23 +245,18 @@ public void initiatingLabProcessing(PublicHealthCaseFlowContainer publicHealthCa edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_11); } - } - else if (edxLabInformationDto.getPageActContainer() != null || edxLabInformationDto.getPamContainer() != null) - { + } else if (edxLabInformationDto.getPageActContainer() != null || edxLabInformationDto.getPamContainer() != null) { //Check for user security to create investigation //checkSecurity(nbsSecurityObj, edxLabInformationDto, NBSBOLookup.INVESTIGATION, NBSOperationLookup.ADD, programAreaCd, jurisdictionCd); if (edxLabInformationDto.getPageActContainer() != null) { - pageActProxyContainer = edxLabInformationDto.getPageActContainer(); + pageActProxyContainer = edxLabInformationDto.getPageActContainer(); publicHealthCaseContainer = pageActProxyContainer.getPublicHealthCaseContainer(); - } - else - { + } else { pamProxyVO = edxLabInformationDto.getPamContainer(); publicHealthCaseContainer = pamProxyVO.getPublicHealthCaseContainer(); } - if (publicHealthCaseContainer.getErrorText() != null) - { + if (publicHealthCaseContainer.getErrorText() != null) { //TODO: LOGGING requiredFieldError(publicHealthCaseContainer.getErrorText(), edxLabInformationDto); } @@ -285,9 +272,7 @@ else if (edxLabInformationDto.getPageActContainer() != null || edxLabInformation edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_3); edxLabInformationDto.setPublicHealthCaseUid(phcUid); edxLabInformationDto.setLabAssociatedToInv(true); - } - else if (observationDto.getJurisdictionCd() != null && observationDto.getProgAreaCd() != null) - { + } else if (observationDto.getJurisdictionCd() != null && observationDto.getProgAreaCd() != null) { phcUid = pamService.setPamProxyWithAutoAssoc(pamProxyVO, edxLabInformationDto.getRootObserbationUid(), NEDSSConstant.LABRESULT_CODE); pamProxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto().setPublicHealthCaseUid(phcUid); @@ -297,28 +282,27 @@ else if (observationDto.getJurisdictionCd() != null && observationDto.getProgAre edxLabInformationDto.setLabAssociatedToInv(true); } - if(edxLabInformationDto.getAction() != null - && edxLabInformationDto.getAction().equalsIgnoreCase(DecisionSupportConstants.CREATE_INVESTIGATION_WITH_NND_VALUE)){ + if (edxLabInformationDto.getAction() != null + && edxLabInformationDto.getAction().equalsIgnoreCase(DecisionSupportConstants.CREATE_INVESTIGATION_WITH_NND_VALUE)) { //TODO: LOGGING EDXActivityDetailLogDto edxActivityDetailLogDT = investigationNotificationService.sendNotification(publicHealthCaseContainer, edxLabInformationDto.getNndComment()); edxActivityDetailLogDT.setRecordType(EdxELRConstant.ELR_RECORD_TP); edxActivityDetailLogDT.setRecordName(EdxELRConstant.ELR_RECORD_NM); - ArrayList details = (ArrayList)edxLabInformationDto.getEdxActivityLogDto().getEDXActivityLogDTWithVocabDetails(); - if(details==null){ + ArrayList details = (ArrayList) edxLabInformationDto.getEdxActivityLogDto().getEDXActivityLogDTWithVocabDetails(); + if (details == null) { details = new ArrayList<>(); } details.add(edxActivityDetailLogDT); edxLabInformationDto.getEdxActivityLogDto().setEDXActivityLogDTWithVocabDetails(details); - if(edxActivityDetailLogDT.getLogType()!=null && edxActivityDetailLogDT.getLogType().equals(EdxRuleAlgorothmManagerDto.STATUS_VAL.Failure.name())){ - if(edxActivityDetailLogDT.getComment()!=null && edxActivityDetailLogDT.getComment().contains(EdxELRConstant.MISSING_NOTF_REQ_FIELDS)){ + if (edxActivityDetailLogDT.getLogType() != null && edxActivityDetailLogDT.getLogType().equals(EdxRuleAlgorothmManagerDto.STATUS_VAL.Failure.name())) { + if (edxActivityDetailLogDT.getComment() != null && edxActivityDetailLogDT.getComment().contains(EdxELRConstant.MISSING_NOTF_REQ_FIELDS)) { edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_8); edxLabInformationDto.setNotificationMissingFields(true); - } - else{ + } else { edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_10); } - throw new DataProcessingException("MISSING NOTI REQUIRED: "+edxActivityDetailLogDT.getComment()); - }else{ + throw new DataProcessingException("MISSING NOTI REQUIRED: " + edxActivityDetailLogDT.getComment()); + } else { edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_6); } @@ -326,9 +310,7 @@ else if (observationDto.getJurisdictionCd() != null && observationDto.getProgAre } nbsInterfaceModel.setRecordStatusCd(DpConstant.DP_SUCCESS_STEP_3); nbsInterfaceRepository.save(nbsInterfaceModel); - } - catch (Exception e) - { + } catch (Exception e) { if (nbsInterfaceModel != null) { nbsInterfaceModel.setRecordStatusCd(DpConstant.DP_FAILURE_STEP_3); nbsInterfaceRepository.save(nbsInterfaceModel); @@ -339,18 +321,17 @@ else if (observationDto.getJurisdictionCd() != null && observationDto.getProgAre } else { edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_9); } - } - else if ((edxLabInformationDto.getPageActContainer() != null - || edxLabInformationDto.getPamContainer() != null) - && edxLabInformationDto.isInvestigationSuccessfullyCreated()){ + } else if ((edxLabInformationDto.getPageActContainer() != null + || edxLabInformationDto.getPamContainer() != null) + && edxLabInformationDto.isInvestigationSuccessfullyCreated()) { if (edxLabInformationDto.isNotificationMissingFields()) { edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_8); } else { edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_10); } } - }finally { - if(nbsInterfaceModel != null) { + } finally { + if (nbsInterfaceModel != null) { edxLogService.updateActivityLogDT(nbsInterfaceModel, edxLabInformationDto); edxLogService.addActivityDetailLogsForWDS(edxLabInformationDto, ""); @@ -447,9 +428,7 @@ private void processingELR(String data) { kafkaManagerProducer.sendDataPhc(jsonString); //return result; - } - catch (Exception e) - { + } catch (Exception e) { if (nbsInterfaceModel != null) { nbsInterfaceModel.setRecordStatusCd(DpConstant.DP_FAILURE_STEP_1); nbsInterfaceRepository.save(nbsInterfaceModel); @@ -471,12 +450,10 @@ private void processingELR(String data) { } else { edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_9); } - } - else if ( + } else if ( (edxLabInformationDto.getPageActContainer() != null - || edxLabInformationDto.getPamContainer() != null) - && edxLabInformationDto.isInvestigationSuccessfullyCreated()) - { + || edxLabInformationDto.getPamContainer() != null) + && edxLabInformationDto.isInvestigationSuccessfullyCreated()) { if (edxLabInformationDto.isNotificationMissingFields()) { edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_8); } else { @@ -487,91 +464,88 @@ else if ( // error check function in here to create the details message - logger.error("Exception EdxLabHelper.getUnProcessedELR processing exception: " + e, e); - - if(edxLabInformationDto.getErrorText()==null){ - //if error text is null, that means lab was not created due to unexpected error. - if(e.getMessage().contains(EdxELRConstant.SQL_FIELD_TRUNCATION_ERROR_MSG) - || e.getMessage().contains(EdxELRConstant.ORACLE_FIELD_TRUNCATION_ERROR_MSG)) - { - edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_18); - edxLabInformationDto.setFieldTruncationError(true); - edxLabInformationDto.setSystemException(false); - try{ - // Extract table name from Exception message, first find table name and ignore text after it. - StringWriter errors = new StringWriter(); - e.printStackTrace(new PrintWriter(errors)); - String exceptionMessage = errors.toString(); - //Patient is not created so setting patient_parent_id to 0 - edxLabInformationDto.setPersonParentUid(0); - //No need to create success message "The Ethnicity code provided in the message is not found in the SRT database. The code is saved to the NBS." in case of exception scenario - edxLabInformationDto.setEthnicityCodeTranslated(true); - String textToLookFor = "Table Name : "; - String tableName = exceptionMessage.substring(exceptionMessage.indexOf(textToLookFor)+textToLookFor.length()); - tableName = tableName.substring(0, tableName.indexOf(" ")); - detailedMsg = "SQLException while inserting into "+tableName+"\n "+accessionNumberToAppend+"\n "+exceptionMessage; - detailedMsg = detailedMsg.substring(0,Math.min(detailedMsg.length(), 2000)); - }catch(Exception ex){ - logger.error("Exception while formatting exception message for Activity Log: "+ex.getMessage(), ex); - } - } else if (e.getMessage().contains(EdxELRConstant.DATE_VALIDATION)) { - edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_20); - edxLabInformationDto.setInvalidDateError(true); - edxLabInformationDto.setSystemException(false); + logger.error("Exception EdxLabHelper.getUnProcessedELR processing exception: " + e, e); + if (edxLabInformationDto.getErrorText() == null) { + //if error text is null, that means lab was not created due to unexpected error. + if (e.getMessage().contains(EdxELRConstant.SQL_FIELD_TRUNCATION_ERROR_MSG) + || e.getMessage().contains(EdxELRConstant.ORACLE_FIELD_TRUNCATION_ERROR_MSG)) { + edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_18); + edxLabInformationDto.setFieldTruncationError(true); + edxLabInformationDto.setSystemException(false); + try { + // Extract table name from Exception message, first find table name and ignore text after it. + StringWriter errors = new StringWriter(); + e.printStackTrace(new PrintWriter(errors)); + String exceptionMessage = errors.toString(); //Patient is not created so setting patient_parent_id to 0 edxLabInformationDto.setPersonParentUid(0); - //No need to create success message for Ethnic code + //No need to create success message "The Ethnicity code provided in the message is not found in the SRT database. The code is saved to the NBS." in case of exception scenario edxLabInformationDto.setEthnicityCodeTranslated(true); - try { - // Extract problem date from Exception message - String problemDateInfoSubstring = e.getMessage().substring(e.getMessage().indexOf(EdxELRConstant.DATE_VALIDATION)); - problemDateInfoSubstring = problemDateInfoSubstring.substring(0,problemDateInfoSubstring.indexOf(EdxELRConstant.DATE_VALIDATION_END_DELIMITER1)); - detailedMsg = problemDateInfoSubstring+"\n "+accessionNumberToAppend+"\n"+e.getMessage(); - detailedMsg = detailedMsg.substring(0,Math.min(detailedMsg.length(), 2000)); - }catch(Exception ex){ - logger.error("Exception while formatting date exception message for Activity Log: "+ex.getMessage(), ex); - } - }else{ - edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_16); - try{ - //Patient is not created so setting patient_parent_id to 0 - edxLabInformationDto.setPersonParentUid(0); - //No need to create success message for Ethnicity code provided in the message is not found in the SRT database. The code is saved to the NBS." in case of exception scenario - edxLabInformationDto.setEthnicityCodeTranslated(true); - StringWriter errors = new StringWriter(); - e.printStackTrace(new PrintWriter(errors)); - String exceptionMessage = accessionNumberToAppend+"\n"+errors; - detailedMsg = exceptionMessage.substring(0,Math.min(exceptionMessage.length(), 2000)); - }catch(Exception ex){ - logger.error("Exception while formatting exception message for Activity Log: "+ex.getMessage(), ex); - } + String textToLookFor = "Table Name : "; + String tableName = exceptionMessage.substring(exceptionMessage.indexOf(textToLookFor) + textToLookFor.length()); + tableName = tableName.substring(0, tableName.indexOf(" ")); + detailedMsg = "SQLException while inserting into " + tableName + "\n " + accessionNumberToAppend + "\n " + exceptionMessage; + detailedMsg = detailedMsg.substring(0, Math.min(detailedMsg.length(), 2000)); + } catch (Exception ex) { + logger.error("Exception while formatting exception message for Activity Log: " + ex.getMessage(), ex); } - } - if( edxLabInformationDto.isInvestigationMissingFields() || edxLabInformationDto.isNotificationMissingFields() || (edxLabInformationDto.getErrorText()!=null && edxLabInformationDto.getErrorText().equals(EdxELRConstant.ELR_MASTER_LOG_ID_10))){ + } else if (e.getMessage().contains(EdxELRConstant.DATE_VALIDATION)) { + edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_20); + edxLabInformationDto.setInvalidDateError(true); edxLabInformationDto.setSystemException(false); - } - if(edxLabInformationDto.isReflexResultedTestCdMissing() - || edxLabInformationDto.isResultedTestNameMissing() - || edxLabInformationDto.isOrderTestNameMissing() - || edxLabInformationDto.isReasonforStudyCdMissing()){ - try{ - String exceptionMsg = e.getMessage(); - String textToLookFor = "XMLElementName: "; - detailedMsg = "Blank identifiers in segments "+exceptionMsg.substring(exceptionMsg.indexOf(textToLookFor)+textToLookFor.length())+"\n\n"+accessionNumberToAppend; - detailedMsg = detailedMsg.substring(0,Math.min(detailedMsg.length(), 2000)); - }catch(Exception ex){ - logger.error("Exception while formatting exception message for Activity Log: "+ex.getMessage(), ex); + //Patient is not created so setting patient_parent_id to 0 + edxLabInformationDto.setPersonParentUid(0); + //No need to create success message for Ethnic code + edxLabInformationDto.setEthnicityCodeTranslated(true); + try { + // Extract problem date from Exception message + String problemDateInfoSubstring = e.getMessage().substring(e.getMessage().indexOf(EdxELRConstant.DATE_VALIDATION)); + problemDateInfoSubstring = problemDateInfoSubstring.substring(0, problemDateInfoSubstring.indexOf(EdxELRConstant.DATE_VALIDATION_END_DELIMITER1)); + detailedMsg = problemDateInfoSubstring + "\n " + accessionNumberToAppend + "\n" + e.getMessage(); + detailedMsg = detailedMsg.substring(0, Math.min(detailedMsg.length(), 2000)); + } catch (Exception ex) { + logger.error("Exception while formatting date exception message for Activity Log: " + ex.getMessage(), ex); + } + } else { + edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_16); + try { + //Patient is not created so setting patient_parent_id to 0 + edxLabInformationDto.setPersonParentUid(0); + //No need to create success message for Ethnicity code provided in the message is not found in the SRT database. The code is saved to the NBS." in case of exception scenario + edxLabInformationDto.setEthnicityCodeTranslated(true); + StringWriter errors = new StringWriter(); + e.printStackTrace(new PrintWriter(errors)); + String exceptionMessage = accessionNumberToAppend + "\n" + errors; + detailedMsg = exceptionMessage.substring(0, Math.min(exceptionMessage.length(), 2000)); + } catch (Exception ex) { + logger.error("Exception while formatting exception message for Activity Log: " + ex.getMessage(), ex); } } + } + if (edxLabInformationDto.isInvestigationMissingFields() || edxLabInformationDto.isNotificationMissingFields() || (edxLabInformationDto.getErrorText() != null && edxLabInformationDto.getErrorText().equals(EdxELRConstant.ELR_MASTER_LOG_ID_10))) { + edxLabInformationDto.setSystemException(false); + } + + if (edxLabInformationDto.isReflexResultedTestCdMissing() + || edxLabInformationDto.isResultedTestNameMissing() + || edxLabInformationDto.isOrderTestNameMissing() + || edxLabInformationDto.isReasonforStudyCdMissing()) { + try { + String exceptionMsg = e.getMessage(); + String textToLookFor = "XMLElementName: "; + detailedMsg = "Blank identifiers in segments " + exceptionMsg.substring(exceptionMsg.indexOf(textToLookFor) + textToLookFor.length()) + "\n\n" + accessionNumberToAppend; + detailedMsg = detailedMsg.substring(0, Math.min(detailedMsg.length(), 2000)); + } catch (Exception ex) { + logger.error("Exception while formatting exception message for Activity Log: " + ex.getMessage(), ex); + } + } //throw new DataProcessingConsumerException(e.getMessage(), result); - } - finally - { - if(nbsInterfaceModel != null) { + } finally { + if (nbsInterfaceModel != null) { edxLogService.updateActivityLogDT(nbsInterfaceModel, edxLabInformationDto); edxLogService.addActivityDetailLogs(edxLabInformationDto, detailedMsg); gson = new Gson(); @@ -584,8 +558,7 @@ else if ( private void requiredFieldError(String errorTxt, EdxLabInformationDto edxLabInformationDT) throws DataProcessingException { if (errorTxt != null) { edxLabInformationDT.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_5); - if (edxLabInformationDT.getEdxActivityLogDto().getEDXActivityLogDTWithVocabDetails() == null) - { + if (edxLabInformationDT.getEdxActivityLogDto().getEDXActivityLogDTWithVocabDetails() == null) { edxLabInformationDT.getEdxActivityLogDto().setEDXActivityLogDTWithVocabDetails( new ArrayList<>()); } @@ -596,7 +569,7 @@ private void requiredFieldError(String errorTxt, EdxLabInformationDto edxLabInfo // EdxRuleAlgorothmManagerDto.STATUS_VAL.Failure, errorTxt); edxLabInformationDT.setInvestigationMissingFields(true); - throw new DataProcessingException("MISSING REQUIRED FIELDS: "+errorTxt); + throw new DataProcessingException("MISSING REQUIRED FIELDS: " + errorTxt); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/material/MaterialService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/material/MaterialService.java index 2e33789a7..7f656aa49 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/material/MaterialService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/material/MaterialService.java @@ -192,7 +192,7 @@ public Long saveMaterial(MaterialContainer materialContainer) throws DataProcess } - private Long updateMaterial(MaterialContainer materialContainer) throws DataProcessingException{ + private Long updateMaterial(MaterialContainer materialContainer) throws DataProcessingException { var timestamp = getCurrentTimeStamp(); if (materialContainer.getTheMaterialDto() != null) { Material material = new Material(materialContainer.getTheMaterialDto()); @@ -211,7 +211,7 @@ private Long updateMaterial(MaterialContainer materialContainer) throws DataPro } } - if (materialContainer.getTheMaterialDto() != null) { + if (materialContainer.getTheMaterialDto() != null) { return materialContainer.getTheMaterialDto().getMaterialUid(); } return null; @@ -251,9 +251,10 @@ private void persistingEntityLocatorParticipation( entityLocatorParticipationService.createEntityLocatorParticipation(entityCollection, uid); } } + private void persistingManufacturedMaterial(Long uid, Collection manufacturedMaterialDtoCollection) throws DataProcessingException { ArrayList arr = new ArrayList<>(manufacturedMaterialDtoCollection); - for(var item : arr) { + for (var item : arr) { item.setMaterialUid(uid); if (item.getManufacturedMaterialSeq() == null) { throw new DataProcessingException("Material Seq is Null"); @@ -267,16 +268,17 @@ private void persistingManufacturedMaterial(Long uid, Collection entityIdCollection ) throws DataProcessingException { + + private void persistingEntityId(Long uid, Collection entityIdCollection) throws DataProcessingException { try { Iterator anIterator; - ArrayList entityList = (ArrayList )entityIdCollection; + ArrayList entityList = (ArrayList) entityIdCollection; anIterator = entityList.iterator(); int maxSeq = 0; while (anIterator.hasNext()) { EntityIdDto entityID = anIterator.next(); - if(maxSeq == 0) { - if(null == entityID.getEntityUid() || entityID.getEntityUid() < 0) { + if (maxSeq == 0) { + if (null == entityID.getEntityUid() || entityID.getEntityUid() < 0) { entityID.setEntityUid(uid); } var result = entityIdRepository.findMaxEntityId(entityID.getEntityUid()); @@ -295,6 +297,7 @@ private void persistingEntityId(Long uid, Collection entityIdCollec } } + private void persistingMaterial(Material material, Long uid, Timestamp timestamp) { EntityODSE entityODSE = new EntityODSE(); entityODSE.setEntityUid(uid); @@ -314,7 +317,7 @@ private void persistingMaterial(Material material, Long uid, Timestamp timestamp } - if(material.getLastChgTime() == null) { + if (material.getLastChgTime() == null) { material.setLastChgTime(timestamp); } @@ -330,7 +333,7 @@ private void persistingMaterial(Material material, Long uid, Timestamp timestamp material.setStatusTime(timestamp); } - if( material.getVersionCtrlNbr() == null){ + if (material.getVersionCtrlNbr() == null) { material.setVersionCtrlNbr(1); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/notification/NotificationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/notification/NotificationService.java index f858dfb94..7744bb342 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/notification/NotificationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/notification/NotificationService.java @@ -74,8 +74,7 @@ public boolean checkForExistingNotification(BaseContainer vo) throws DataProcess return count > 0; } - private String getActClassCd(BaseContainer vo) - { + private String getActClassCd(BaseContainer vo) { if (vo == null) return null; @@ -97,8 +96,7 @@ private String getActClassCd(BaseContainer vo) return null; } - private Long getRootUid(BaseContainer vo) - { + private Long getRootUid(BaseContainer vo) { if (vo == null) return null; @@ -121,26 +119,26 @@ private Long getRootUid(BaseContainer vo) // } // } else - if (vo instanceof LabResultProxyContainer) { + if (vo instanceof LabResultProxyContainer) { // the root Lab observation UID out of the observation collection Collection obsColl = ((LabResultProxyContainer) vo).getTheObservationContainerCollection(); - for (ObservationContainer observationContainer : obsColl) { - String obsDomainCdSt1 = - observationContainer.getTheObservationDto().getObsDomainCdSt1(); - String obsCtrlCdDisplayForm = - observationContainer.getTheObservationDto().getCtrlCdDisplayForm(); - if (obsDomainCdSt1 != null - && obsDomainCdSt1.equalsIgnoreCase( - NEDSSConstant.ORDERED_TEST_OBS_DOMAIN_CD) - && obsCtrlCdDisplayForm != null - && obsCtrlCdDisplayForm.equalsIgnoreCase( - NEDSSConstant.LAB_REPORT)) { - return observationContainer - .getTheObservationDto() - .getObservationUid(); - } + for (ObservationContainer observationContainer : obsColl) { + String obsDomainCdSt1 = + observationContainer.getTheObservationDto().getObsDomainCdSt1(); + String obsCtrlCdDisplayForm = + observationContainer.getTheObservationDto().getCtrlCdDisplayForm(); + if (obsDomainCdSt1 != null + && obsDomainCdSt1.equalsIgnoreCase( + NEDSSConstant.ORDERED_TEST_OBS_DOMAIN_CD) + && obsCtrlCdDisplayForm != null + && obsCtrlCdDisplayForm.equalsIgnoreCase( + NEDSSConstant.LAB_REPORT)) { + return observationContainer + .getTheObservationDto() + .getObservationUid(); } + } } // else if (vo instanceof VaccinationProxyVO) { @@ -154,18 +152,14 @@ private Long getRootUid(BaseContainer vo) } - - public Long setNotificationProxy(NotificationProxyContainer notificationProxyVO) throws DataProcessingException - { + public Long setNotificationProxy(NotificationProxyContainer notificationProxyVO) throws DataProcessingException { Long notificationUid = null; String permissionFlag; Collection act2 = new ArrayList<>(); - try - { - if (notificationProxyVO == null) - { + try { + if (notificationProxyVO == null) { throw new DataProcessingException("notificationproxyVO is null "); } @@ -192,17 +186,14 @@ public Long setNotificationProxy(NotificationProxyContainer notificationProxyVO) // { // permissionFlag = "CREATE"; // } - } - catch (Exception e) - { + } catch (Exception e) { throw new DataProcessingException(e.toString()); } NotificationContainer notifVO = notificationProxyVO.getTheNotificationContainer(); - if (notifVO == null) - { + if (notifVO == null) { throw new DataProcessingException("notificationVO is null "); } @@ -210,42 +201,34 @@ public Long setNotificationProxy(NotificationProxyContainer notificationProxyVO) notifDT.setProgAreaCd(notificationProxyVO.getThePublicHealthCaseContainer().getThePublicHealthCaseDto().getProgAreaCd()); notifDT.setJurisdictionCd(notificationProxyVO.getThePublicHealthCaseContainer().getThePublicHealthCaseDto().getJurisdictionCd()); - if (permissionFlag.equals("CREATE")) - { + if (permissionFlag.equals("CREATE")) { notifDT.setCaseConditionCd(notificationProxyVO.getThePublicHealthCaseContainer().getThePublicHealthCaseDto().getCd()); } - if ((notifVO.isItDirty()) || (notifVO.isItNew())) - { + if ((notifVO.isItDirty()) || (notifVO.isItNew())) { String boLookup = NBSBOLookup.NOTIFICATION; String triggerCd = ""; - if (permissionFlag.equals("CREATE")) - { + if (permissionFlag.equals("CREATE")) { triggerCd = NEDSSConstant.NOT_CR_APR; } - if (permissionFlag.equals("CREATENEEDSAPPROVAL")) - { + if (permissionFlag.equals("CREATENEEDSAPPROVAL")) { triggerCd = NEDSSConstant.NOT_CR_PEND_APR; } String tableName = "Notification"; String moduleCd = NEDSSConstant.BASE; - if(notifVO.isItNew() && propertyUtil.isHIVProgramArea(notifDT.getProgAreaCd())) - { + if (notifVO.isItNew() && propertyUtil.isHIVProgramArea(notifDT.getProgAreaCd())) { triggerCd = NEDSSConstant.NOT_HIV;// for HIV, notification is always created as completed } - if(notifVO.isItDirty() && propertyUtil.isHIVProgramArea(notifDT.getProgAreaCd())) - { + if (notifVO.isItDirty() && propertyUtil.isHIVProgramArea(notifDT.getProgAreaCd())) { triggerCd = NEDSSConstant.NOT_HIV_EDIT;// for HIV, notification always stay as completed } - try - { + try { notifDT = (NotificationDto) prepareAssocModelHelper.prepareVO(notifDT, boLookup, triggerCd, tableName, moduleCd, notifDT.getVersionCtrlNbr()); - if (notifDT.getCd() == null || notifDT.getCd().isEmpty()) - { + if (notifDT.getCd() == null || notifDT.getCd().isEmpty()) { notifDT.setCd(NEDSSConstant.CLASS_CD_NOTIFICATION); } @@ -258,8 +241,7 @@ public Long setNotificationProxy(NotificationProxyContainer notificationProxyVO) notificationUid = realUid; falseUid = notifVO.getTheNotificationDT().getNotificationUid(); - if (notifVO.isItNew()) - { + if (notifVO.isItNew()) { ActRelationshipDto actRelDT; actRelDT = iUidService.setFalseToNewForNotification(notificationProxyVO, falseUid, realUid); notifDT.setNotificationUid(realUid); @@ -270,9 +252,7 @@ public Long setNotificationProxy(NotificationProxyContainer notificationProxyVO) notificationProxyVO.setTheActRelationshipDTCollection(act2); actRelationshipRepositoryUtil.storeActRelationship(actRelDT); } - } - catch (Exception e) - { + } catch (Exception e) { throw new DataProcessingException(" : " + e); } } // end of if new or dirty @@ -280,5 +260,4 @@ public Long setNotificationProxy(NotificationProxyContainer notificationProxyVO) } // end of setNotificationProxy - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/EdxDocumentService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/EdxDocumentService.java index 2e47edd1e..6d3a8e20d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/EdxDocumentService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/EdxDocumentService.java @@ -22,7 +22,7 @@ public Collection selectEdxDocumentCollectionByActUid(Long uid) Collection edxDocumentDtoCollection = new ArrayList<>(); var result = edxDocumentRepository.selectEdxDocumentCollectionByActUid(uid); if (result.isPresent()) { - for(var item: result.get()) { + for (var item : result.get()) { var elem = new EDXDocumentDto(item); elem.setItDirty(false); elem.setItNew(false); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationCodeService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationCodeService.java index 42aa0f528..716dff63d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationCodeService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationCodeService.java @@ -37,10 +37,9 @@ public ObservationCodeService(ISrteCodeObsService srteCodeObsService, public String getReportingLabCLIA(BaseContainer proxy) throws DataProcessingException { - Collection partColl = null; - if (proxy instanceof LabResultProxyContainer) - { - partColl = ( (LabResultProxyContainer) proxy).getTheParticipationDtoCollection(); + Collection partColl = null; + if (proxy instanceof LabResultProxyContainer) { + partColl = ((LabResultProxyContainer) proxy).getTheParticipationDtoCollection(); } // if (proxy instanceof MorbidityProxyVO) // { @@ -57,8 +56,7 @@ public String getReportingLabCLIA(BaseContainer proxy) throws DataProcessingExce OrganizationContainer reportingLabVO = null; - if (reportingLabUid != null) - { + if (reportingLabUid != null) { reportingLabVO = organizationRepositoryUtil.loadObject(reportingLabUid, null); } @@ -66,9 +64,8 @@ public String getReportingLabCLIA(BaseContainer proxy) throws DataProcessingExce //Get the CLIA String reportingLabCLIA = null; - if(reportingLabVO != null) - { - Collection entityIdColl = reportingLabVO.getTheEntityIdDtoCollection(); + if (reportingLabVO != null) { + Collection entityIdColl = reportingLabVO.getTheEntityIdDtoCollection(); if (entityIdColl != null && entityIdColl.size() > 0) { for (EntityIdDto idDT : entityIdColl) { @@ -91,12 +88,11 @@ public String getReportingLabCLIA(BaseContainer proxy) throws DataProcessingExce } - /** * UNREACHABLE METHOD for the current flow; only reached if the payload is not ELR * deriveTheConditionCodeList - used by Associate to Investigations - * when associating an STD lab to a closed investigation. - * Condition list determines the Processing Decision to show. + * when associating an STD lab to a closed investigation. + * Condition list determines the Processing Decision to show. */ public ArrayList deriveTheConditionCodeList(LabResultProxyContainer labResultProxyVO, ObservationContainer orderTest) throws DataProcessingException { @@ -121,16 +117,14 @@ public ArrayList deriveTheConditionCodeList(LabResultProxyContainer labR // Get the reporting lab clia String reportingLabCLIA = ""; - if (labResultProxyVO.getLabClia() != null && labResultProxyVO.isManualLab()){ + if (labResultProxyVO.getLabClia() != null && labResultProxyVO.isManualLab()) { reportingLabCLIA = labResultProxyVO.getLabClia(); - } - else { + } else { if (orderTest.getTheParticipationDtoCollection() != null) { reportingLabCLIA = getReportingLabCLIAId(orderTest.getTheParticipationDtoCollection()); } } - if (reportingLabCLIA == null || reportingLabCLIA.trim().equals("")) - { + if (reportingLabCLIA == null || reportingLabCLIA.trim().equals("")) { reportingLabCLIA = NEDSSConstant.DEFAULT; } @@ -148,7 +142,7 @@ private ArrayList getDerivedConditionList(String reportingLabCLIA, Collection observationContainerCollection, String electronicInd) throws DataProcessingException { int noConditionFoundForResultedTestCount = 0; - ArrayList returnList = new ArrayList<> (); + ArrayList returnList = new ArrayList<>(); // iterator through each resultTest for (ObservationContainer observationContainer : observationContainerCollection) { @@ -224,8 +218,7 @@ private ArrayList getDerivedConditionList(String reportingLabCLIA, } } //if we couldn't derive a condition for a test, return no conditions - if (noConditionFoundForResultedTestCount > 0) - { + if (noConditionFoundForResultedTestCount > 0) { returnList.clear(); //incomplete list - return empty list } @@ -280,7 +273,7 @@ private String getReportingLabCLIAId(Collection partColl) thro /** * Returns a List of Condition Codes associated with the passed Snomed codes. * - * @param reportingLabCLIA : String + * @param reportingLabCLIA : String * @param obsValueCodedDtoColl : Collection * @return ArrayList */ @@ -346,38 +339,32 @@ private String getConditionForLOINCCode(String reportingLabCLIA, ObservationCont String loincCd = ""; ObservationDto obsDt = resultTestVO.getTheObservationDto(); - if (obsDt == null || reportingLabCLIA == null) - { + if (obsDt == null || reportingLabCLIA == null) { return null; } String cdSystemCd = obsDt.getCdSystemCd(); - if (cdSystemCd == null || cdSystemCd.trim().equals("")) - { + if (cdSystemCd == null || cdSystemCd.trim().equals("")) { return null; } String obsCode = obsDt.getCd(); - if (obsCode == null || obsCode.trim().equals("")) - { + if (obsCode == null || obsCode.trim().equals("")) { return null; } if (cdSystemCd.equals(ELRConstant.ELR_OBSERVATION_LOINC)) { loincCd = obsCode; - } - else - { - Map snomedMap = srteCodeObsService.getSnomed(obsCode, "LT", reportingLabCLIA); + } else { + Map snomedMap = srteCodeObsService.getSnomed(obsCode, "LT", reportingLabCLIA); - if(snomedMap.containsKey("COUNT") && (Integer) snomedMap.get("COUNT") == 1) { + if (snomedMap.containsKey("COUNT") && (Integer) snomedMap.get("COUNT") == 1) { loincCd = (String) snomedMap.get("LOINC"); } } // If we have resolved the LOINC code, try to derive the condition - if (loincCd == null || loincCd.isEmpty()) - { + if (loincCd == null || loincCd.isEmpty()) { return loincCd; } @@ -394,15 +381,15 @@ private String getConditionForLOINCCode(String reportingLabCLIA, ObservationCont /** * Gets the default condition for a Local Result code. * If we find that it maps to more than one condition code, return nothing. - * @param reportingLabCLIA : String + * + * @param reportingLabCLIA : String * @param obsValueCodedDtoColl: Collection * @return conditionCd : String */ private String getConditionCodeForLocalResultCode(String reportingLabCLIA, Collection obsValueCodedDtoColl) { String conditionCd = ""; HashMap conditionMap = new HashMap<>(); - if (obsValueCodedDtoColl == null || reportingLabCLIA == null) - { + if (obsValueCodedDtoColl == null || reportingLabCLIA == null) { return null; } @@ -417,31 +404,28 @@ private String getConditionCodeForLocalResultCode(String reportingLabCLIA, Colle } } } - if (conditionMap.size() > 1 || conditionMap.isEmpty()) - { - return(""); - } - else { - return(conditionCd); + if (conditionMap.size() > 1 || conditionMap.isEmpty()) { + return (""); + } else { + return (conditionCd); } } /** * Gets the default condition for the Local Test code. - * @param resultTestVO : Collection + * + * @param resultTestVO : Collection * @param reportingLabCLIA : String * @return conditionCd : String */ private String getConditionCodeForLocalTestCode(String reportingLabCLIA, ObservationContainer resultTestVO) { //edit checks - if (reportingLabCLIA == null || resultTestVO == null) - { + if (reportingLabCLIA == null || resultTestVO == null) { return null; } ObservationDto obsDt = resultTestVO.getTheObservationDto(); - if (obsDt.getCd() == null || obsDt.getCd().equals("") || obsDt.getCd().equals(" ") || obsDt.getCdSystemCd() == null) - { + if (obsDt.getCd() == null || obsDt.getCd().equals("") || obsDt.getCd().equals(" ") || obsDt.getCdSystemCd() == null) { return null; } @@ -451,20 +435,17 @@ private String getConditionCodeForLocalTestCode(String reportingLabCLIA, Observa /** * Gets the default condition for the Lab Test code. + * * @return conditionCd : String */ private String getDefaultConditionForLabTestCode(String labTestCd, String reportingLabCLIA) { - String conditionCd = srteCodeObsService.getDefaultConditionForLabTest(labTestCd, reportingLabCLIA ); + String conditionCd = srteCodeObsService.getDefaultConditionForLabTest(labTestCd, reportingLabCLIA); //see if the DEFAULT is set for the lab test if still not found.. - if ((conditionCd == null || conditionCd.isEmpty()) && !reportingLabCLIA.equals(NEDSSConstant.DEFAULT)) - { + if ((conditionCd == null || conditionCd.isEmpty()) && !reportingLabCLIA.equals(NEDSSConstant.DEFAULT)) { conditionCd = srteCodeObsService.getDefaultConditionForLabTest(labTestCd, NEDSSConstant.DEFAULT); } - return(conditionCd); + return (conditionCd); } - - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationMatchingService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationMatchingService.java index f0596991e..214dc13fa 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationMatchingService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationMatchingService.java @@ -25,7 +25,7 @@ public class ObservationMatchingService implements IObservationMatchingService { private static final Logger logger = LoggerFactory.getLogger(ObservationMatchingService.class); - private final ObservationMatchStoredProcRepository observationMatchStoredProcRepository; + private final ObservationMatchStoredProcRepository observationMatchStoredProcRepository; private final ObservationRepository observationRepository; public ObservationMatchingService(ObservationMatchStoredProcRepository observationMatchStoredProcRepository, @@ -86,32 +86,28 @@ public ObservationDto checkingMatchingObservation(EdxLabInformationDto edxLabInf // MATCHED edxLabInformationDto.setObservationMatch(true); return obsDT; - } - else if (odsStatus.equals(EdxELRConstant.ELR_OBS_STATUS_CD_SUPERCEDED) + } else if (odsStatus.equals(EdxELRConstant.ELR_OBS_STATUS_CD_SUPERCEDED) && msgStatus.equals(EdxELRConstant.ELR_OBS_STATUS_CD_COMPLETED) ) { edxLabInformationDto.setFinalPostCorrected(true); edxLabInformationDto.setLocalId(obsDT.getLocalId()); edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_14); throw new DataProcessingException("Lab report " + obsDT.getLocalId() + " was not updated. Final report with Accession # " + fillerNumber + " was sent after a corrected report was received."); - } - else if (odsStatus.equals(EdxELRConstant.ELR_OBS_STATUS_CD_COMPLETED) + } else if (odsStatus.equals(EdxELRConstant.ELR_OBS_STATUS_CD_COMPLETED) && msgStatus.equals(EdxELRConstant.ELR_OBS_STATUS_CD_NEW) ) { edxLabInformationDto.setPreliminaryPostFinal(true); edxLabInformationDto.setLocalId(obsDT.getLocalId()); edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_14); throw new DataProcessingException("Lab report " + obsDT.getLocalId() + " was not updated. Preliminary report with Accession # " + fillerNumber + " was sent after a final report was received."); - } - else if (odsStatus.equals(EdxELRConstant.ELR_OBS_STATUS_CD_SUPERCEDED) + } else if (odsStatus.equals(EdxELRConstant.ELR_OBS_STATUS_CD_SUPERCEDED) && msgStatus.equals(EdxELRConstant.ELR_OBS_STATUS_CD_NEW) ) { edxLabInformationDto.setPreliminaryPostCorrected(true); edxLabInformationDto.setLocalId(obsDT.getLocalId()); edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_14); throw new DataProcessingException("Lab report " + obsDT.getLocalId() + " was not updated. Preliminary report with Accession # " + fillerNumber + " was sent after a corrected report was received."); - } - else { + } else { edxLabInformationDto.setFinalPostCorrected(true); edxLabInformationDto.setLocalId(obsDT.getLocalId()); logger.error(" Error!! Invalid status combination: msgInObs status=" + msgStatus + " odsObs status=" + odsStatus); @@ -127,50 +123,46 @@ else if (odsStatus.equals(EdxELRConstant.ELR_OBS_STATUS_CD_SUPERCEDED) public void processMatchedProxyVO(LabResultProxyContainer labResultProxyVO, LabResultProxyContainer matchedlabResultProxyVO, EdxLabInformationDto edxLabInformationDT) { - Long matchedObservationUid =null; + Long matchedObservationUid = null; ObservationDto matchedObservationDto = null; Collection observationCollection = matchedlabResultProxyVO.getTheObservationContainerCollection(); Iterator it = observationCollection.iterator(); Collection updatedARCollection = new ArrayList<>(); Collection updatedPartCollection = new ArrayList<>(); - Collection updatedRoleCollection=new ArrayList<>(); + Collection updatedRoleCollection = new ArrayList<>(); while (it.hasNext()) { ObservationContainer observationContainer = it.next(); String obsDomainCdSt1 = observationContainer.getTheObservationDto().getObsDomainCdSt1(); if (obsDomainCdSt1 != null - && obsDomainCdSt1.equalsIgnoreCase(EdxELRConstant.ELR_ORDER_CD) + && obsDomainCdSt1.equalsIgnoreCase(EdxELRConstant.ELR_ORDER_CD) ) { matchedObservationDto = observationContainer.getTheObservationDto(); //update the order status - if(edxLabInformationDT.getRootObservationContainer()!=null && edxLabInformationDT.getRootObservationContainer().getTheObservationDto()!=null) - { + if (edxLabInformationDT.getRootObservationContainer() != null && edxLabInformationDT.getRootObservationContainer().getTheObservationDto() != null) { observationContainer.getTheObservationDto().setStatusCd(edxLabInformationDT.getRootObservationContainer().getTheObservationDto().getStatusCd()); } observationContainer.setItDirty(true); observationContainer.setItNew(false); - matchedObservationUid= observationContainer.getTheObservationDto().getObservationUid(); + matchedObservationUid = observationContainer.getTheObservationDto().getObservationUid(); - } - else{ - if(observationContainer.getTheObservationDto().getCtrlCdDisplayForm()!=null - && ( + } else { + if (observationContainer.getTheObservationDto().getCtrlCdDisplayForm() != null + && ( observationContainer.getTheObservationDto().getCd().equalsIgnoreCase(EdxELRConstant.ELR_LAB_CD) - || observationContainer.getTheObservationDto().getCtrlCdDisplayForm().equalsIgnoreCase(EdxELRConstant.ELR_LAB_COMMENT) - ) - ){ + || observationContainer.getTheObservationDto().getCtrlCdDisplayForm().equalsIgnoreCase(EdxELRConstant.ELR_LAB_COMMENT) + ) + ) { observationContainer.setItDirty(true); continue; - } - else - { + } else { observationContainer.setItDelete(true); } - if(labResultProxyVO.getTheObservationContainerCollection()==null){ + if (labResultProxyVO.getTheObservationContainerCollection() == null) { labResultProxyVO.setTheObservationContainerCollection(new ArrayList<>()); } labResultProxyVO.getTheObservationContainerCollection().add(observationContainer); @@ -186,8 +178,7 @@ public void processMatchedProxyVO(LabResultProxyContainer labResultProxyVO, } if (actRelationshipDto.getTypeCd() != null && actRelationshipDto.getTypeCd().equals(EdxELRConstant.ELR_AR_LAB_COMMENT)) { updatedARCollection.add(actRelationshipDto); - } - else { + } else { actRelationshipDto.setItDelete(true); updatedARCollection.add(actRelationshipDto); } @@ -214,13 +205,12 @@ public void processMatchedProxyVO(LabResultProxyContainer labResultProxyVO, Long patientUid; Collection coll = matchedlabResultProxyVO.getThePersonContainerCollection(); - if(coll!=null){ + if (coll != null) { for (PersonContainer personVO : coll) { if (personVO.getThePersonDto() != null && personVO.getThePersonDto().getCdDescTxt() != null && personVO.getThePersonDto().getCdDescTxt().equalsIgnoreCase(EdxELRConstant.ELR_PATIENT_DESC) - ) - { + ) { patientUid = personVO.getThePersonDto().getPersonUid(); edxLabInformationDT.setPatientUid(patientUid); } @@ -229,14 +219,14 @@ public void processMatchedProxyVO(LabResultProxyContainer labResultProxyVO, } Collection orgColl = matchedlabResultProxyVO.getTheOrganizationContainerCollection(); - if(orgColl!=null){ + if (orgColl != null) { for (OrganizationContainer organizationContainer : orgColl) { rolecoll.addAll(organizationContainer.getTheRoleDTCollection()); } } Collection matColl = matchedlabResultProxyVO.getTheMaterialContainerCollection(); - if(matColl!=null){ + if (matColl != null) { for (MaterialContainer materialContainer : matColl) { rolecoll.addAll(materialContainer.getTheRoleDTCollection()); } @@ -251,14 +241,13 @@ public void processMatchedProxyVO(LabResultProxyContainer labResultProxyVO, updatedRoleCollection.addAll(labResultProxyVO.getTheRoleDtoCollection()); labResultProxyVO.setTheRoleDtoCollection(updatedRoleCollection); - if(labResultProxyVO.getTheObservationContainerCollection() != null){ + if (labResultProxyVO.getTheObservationContainerCollection() != null) { for (ObservationContainer obsVO : labResultProxyVO.getTheObservationContainerCollection()) { String obsDomainCdSt1 = obsVO.getTheObservationDto().getObsDomainCdSt1(); if (obsDomainCdSt1 != null - && obsDomainCdSt1.equalsIgnoreCase(EdxELRConstant.ELR_ORDER_CD) + && obsDomainCdSt1.equalsIgnoreCase(EdxELRConstant.ELR_ORDER_CD) && matchedObservationDto != null - ) - { + ) { obsVO.getTheObservationDto().setObservationUid(matchedObservationUid); obsVO.getTheObservationDto().setVersionCtrlNbr(matchedObservationDto.getVersionCtrlNbr()); obsVO.getTheObservationDto().setProgAreaCd(matchedObservationDto.getProgAreaCd()); @@ -278,14 +267,13 @@ public void processMatchedProxyVO(LabResultProxyContainer labResultProxyVO, } } - if(labResultProxyVO.getTheActRelationshipDtoCollection()!=null) - { + if (labResultProxyVO.getTheActRelationshipDtoCollection() != null) { for (ActRelationshipDto actRelationshipDto : labResultProxyVO.getTheActRelationshipDtoCollection()) { if (actRelationshipDto.getTargetActUid().compareTo(edxLabInformationDT.getRootObserbationUid()) == 0 && (!actRelationshipDto.getTypeCd().equals(EdxELRConstant.ELR_SUPPORT_CD) - || !actRelationshipDto.getTypeCd().equals(EdxELRConstant.ELR_REFER_CD) - || !actRelationshipDto.getTypeCd().equals(EdxELRConstant.ELR_COMP_CD) - ) + || !actRelationshipDto.getTypeCd().equals(EdxELRConstant.ELR_REFER_CD) + || !actRelationshipDto.getTypeCd().equals(EdxELRConstant.ELR_COMP_CD) + ) ) { actRelationshipDto.setTargetActUid(matchedObservationUid); break; @@ -298,15 +286,11 @@ private ObservationDto matchingObservation(EdxLabInformationDto edxLabInformatio Long observationUid = observationMatchStoredProcRepository.getMatchedObservation(edxLabInformationDto); if (observationUid == null) { return null; - } - else - { + } else { var result = observationRepository.findById(observationUid); if (result.isEmpty()) { return null; - } - else - { + } else { ObservationDto observationDto = new ObservationDto(result.get()); observationDto.setItNew(false); observationDto.setItDirty(false); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationService.java index 0216626a4..727642947 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationService.java @@ -146,7 +146,7 @@ public ObservationService(INNDActivityLogService nndActivityLogService, /** * Getting Observation Dto into LabResult Container - * */ + */ public LabResultProxyContainer getObservationToLabResultContainer(Long observationUid) throws DataProcessingException { LabResultProxyContainer labResultProxyVO; if (observationUid == null) { @@ -160,7 +160,7 @@ public LabResultProxyContainer getObservationToLabResultContainer(Long observati /** * Origin: sendLabResultToProxy - * */ + */ @Transactional public ObservationDto processingLabResultContainer(LabResultProxyContainer labResultProxyContainer) throws DataProcessingException { if (labResultProxyContainer == null) { @@ -170,7 +170,7 @@ public ObservationDto processingLabResultContainer(LabResultProxyContainer labRe labResultProxyContainer.setItNew(true); labResultProxyContainer.setItDirty(false); Map returnMap = setLabResultProxy(labResultProxyContainer); - obsDT = (ObservationDto)returnMap.get(NEDSSConstant.SETLAB_RETURN_OBSDT); + obsDT = (ObservationDto) returnMap.get(NEDSSConstant.SETLAB_RETURN_OBSDT); return obsDT; } @@ -206,14 +206,11 @@ public void setLabInvAssociation(Long labUid, Long investigationUid) throws Data /** * Loading Existing Either Observation or Intervention * was: getActVO - * */ - private BaseContainer getAbstractObjectForObservationOrIntervention(String actType, Long anUid) throws DataProcessingException - { + */ + private BaseContainer getAbstractObjectForObservationOrIntervention(String actType, Long anUid) throws DataProcessingException { BaseContainer obj = null; - if (anUid != null) - { - if (actType.equalsIgnoreCase(NEDSSConstant.OBSERVATION_CLASS_CODE)) - { + if (anUid != null) { + if (actType.equalsIgnoreCase(NEDSSConstant.OBSERVATION_CLASS_CODE)) { obj = observationRepositoryUtil.loadObject(anUid); } } @@ -223,23 +220,23 @@ private BaseContainer getAbstractObjectForObservationOrIntervention(String actTy /** * Retrieving assoc data from Participation: PERSON, ORG, MATERIAL, ROLE - * */ - private Map retrieveEntityFromParticipationForContainer(Collection partColl) throws DataProcessingException { + */ + private Map retrieveEntityFromParticipationForContainer(Collection partColl) throws DataProcessingException { Map entityHolder = new HashMap<>(); //Retrieve associated persons Map assocMapper = retrievePersonAndRoleFromParticipation(partColl); if (assocMapper.containsKey(DataProcessingMapKey.PERSON)) { - entityHolder.put(DataProcessingMapKey.PERSON, assocMapper.get(DataProcessingMapKey.PERSON)); + entityHolder.put(DataProcessingMapKey.PERSON, assocMapper.get(DataProcessingMapKey.PERSON)); } //Retrieve associated organizations - entityHolder.put(DataProcessingMapKey.ORGANIZATION, retrieveOrganizationFromParticipation(partColl)); + entityHolder.put(DataProcessingMapKey.ORGANIZATION, retrieveOrganizationFromParticipation(partColl)); //Retrieve associated materials - entityHolder.put(DataProcessingMapKey.MATERIAL, retrieveMaterialFromParticipation(partColl)); + entityHolder.put(DataProcessingMapKey.MATERIAL, retrieveMaterialFromParticipation(partColl)); if (assocMapper.containsKey(DataProcessingMapKey.ROLE)) { @@ -251,9 +248,9 @@ private Map retrieveEntityFromParticipationForCon /** * Was: retrieveOrganizationVOsForProxyVO - * */ - Collection retrieveOrganizationFromParticipation(Collection partColl) throws DataProcessingException { - Collection theOrganizationVOCollection = null; + */ + Collection retrieveOrganizationFromParticipation(Collection partColl) throws DataProcessingException { + Collection theOrganizationVOCollection = null; for (ParticipationDto partDT : partColl) { if (partDT == null) { continue; @@ -263,9 +260,9 @@ Collection retrieveOrganizationFromParticipation(Collection retrieveOrganizationFromParticipation(Collection retrieveMaterialFromParticipation(Collection partColl) - { - Collection theMaterialVOCollection = null; + */ + protected Collection retrieveMaterialFromParticipation(Collection partColl) { + Collection theMaterialVOCollection = null; for (ParticipationDto partDT : partColl) { if (partDT == null) { continue; @@ -293,9 +289,9 @@ protected Collection retrieveMaterialFromParticipation(Collection retrieveMaterialFromParticipation(Collection retrievePersonAndRoleFromParticipation(Collection partColl) - { + */ + protected Map retrievePersonAndRoleFromParticipation(Collection partColl) { Map mapper = new HashMap<>(); - Collection thePersonVOCollection = new ArrayList<> (); - Collection patientRollCollection = new ArrayList<> (); + Collection thePersonVOCollection = new ArrayList<>(); + Collection patientRollCollection = new ArrayList<>(); for (ParticipationDto partDT : partColl) { if (partDT == null) { continue; @@ -329,9 +324,9 @@ protected Map retrievePersonAndRoleFromParticipati //If person... if (subjectClassCd != null - && subjectClassCd.equalsIgnoreCase(NEDSSConstant.PAR110_SUB_CD) - && recordStatusCd != null - && recordStatusCd.equalsIgnoreCase(NEDSSConstant.ACTIVE) + && subjectClassCd.equalsIgnoreCase(NEDSSConstant.PAR110_SUB_CD) + && recordStatusCd != null + && recordStatusCd.equalsIgnoreCase(NEDSSConstant.ACTIVE) ) { PersonContainer vo = patientRepositoryUtil.loadPerson(partDT.getSubjectEntityUid()); thePersonVOCollection.add(vo); @@ -361,11 +356,10 @@ protected Map retrievePersonAndRoleFromParticipati /** * Getting List of person given Entity Uid for Role - * */ - protected Collection retrieveScopedPersons(Long scopingUid) - { - Collection roleDTColl = roleService.findRoleScopedToPatient(scopingUid); - Collection scopedPersons = null; + */ + protected Collection retrieveScopedPersons(Long scopingUid) { + Collection roleDTColl = roleService.findRoleScopedToPatient(scopingUid); + Collection scopedPersons = null; for (RoleDto roleDT : roleDTColl) { if (roleDT == null) { @@ -386,7 +380,7 @@ protected Collection retrieveScopedPersons(Long scopingUid) /** * was: retrieveActForProxyVO - * */ + */ Map retrieveActForLabResultContainer(Collection actRelColl) throws DataProcessingException { Map mapper = new HashMap<>(); @@ -405,12 +399,11 @@ Map retrieveActForLabResultContainer(Collection retrieveObservationFromActRelationship(Collection actRelColl) throws DataProcessingException - { + */ + private Map retrieveObservationFromActRelationship(Collection actRelColl) throws DataProcessingException { Map mapper = new HashMap<>(); - Collection theObservationContainerCollection = new ArrayList<> (); - Collection performingLabColl = new ArrayList<> (); + Collection theObservationContainerCollection = new ArrayList<>(); + Collection performingLabColl = new ArrayList<>(); for (ActRelationshipDto actRelDT : actRelColl) { if (actRelDT == null) { @@ -458,8 +451,7 @@ private Map retrieveObservationFromActRelationshi } } //If a Resulted Test observation - else if (typeCd != null && typeCd.equalsIgnoreCase(NEDSSConstant.ACT108_TYP_CD)) - { + else if (typeCd != null && typeCd.equalsIgnoreCase(NEDSSConstant.ACT108_TYP_CD)) { ObservationContainer rtObservationContainer = (ObservationContainer) getAbstractObjectForObservationOrIntervention(NEDSSConstant.OBSERVATION_CLASS_CODE, observationUid); if (rtObservationContainer == null) { continue; @@ -489,9 +481,8 @@ else if (typeCd != null && typeCd.equalsIgnoreCase(NEDSSConstant.ACT108_TYP_CD)) /** * was: retrieveReflexObservations */ - private Collection retrieveReflexObservationsFromActRelationship(Collection actRelColl) throws DataProcessingException - { - Collection reflexObsVOCollection = null; + private Collection retrieveReflexObservationsFromActRelationship(Collection actRelColl) throws DataProcessingException { + Collection reflexObsVOCollection = null; for (ActRelationshipDto actRelDT : actRelColl) { if (actRelDT == null) { @@ -505,21 +496,20 @@ private Collection retrieveReflexObservationsFromActRelat //If reflex ordered test observation... if (typeCd != null - && typeCd.equalsIgnoreCase(NEDSSConstant.ACT109_TYP_CD) - && sourceClassCd != null - && sourceClassCd.equalsIgnoreCase(NEDSSConstant.OBSERVATION_CLASS_CODE) - && targetClassCd != null - && targetClassCd.equalsIgnoreCase(NEDSSConstant.OBSERVATION_CLASS_CODE) - && recordStatusCd != null - && recordStatusCd.equalsIgnoreCase(NEDSSConstant.ACTIVE) + && typeCd.equalsIgnoreCase(NEDSSConstant.ACT109_TYP_CD) + && sourceClassCd != null + && sourceClassCd.equalsIgnoreCase(NEDSSConstant.OBSERVATION_CLASS_CODE) + && targetClassCd != null + && targetClassCd.equalsIgnoreCase(NEDSSConstant.OBSERVATION_CLASS_CODE) + && recordStatusCd != null + && recordStatusCd.equalsIgnoreCase(NEDSSConstant.ACTIVE) ) { Long observationUid = actRelDT.getSourceActUid(); ObservationContainer reflexObs = (ObservationContainer) getAbstractObjectForObservationOrIntervention(NEDSSConstant.OBSERVATION_CLASS_CODE, observationUid); if (reflexObs == null) { continue; - } - else { + } else { if (reflexObsVOCollection == null) { reflexObsVOCollection = new ArrayList<>(); } @@ -542,9 +532,8 @@ private Collection retrieveReflexObservationsFromActRelat * Retrieves the Reflex Result Test * was: retrieveReflexRTs */ - private Collection retrieveReflexRTsAkaObservationFromActRelationship(Collection actRelColl) throws DataProcessingException - { - Collection reflexRTCollection = null; + private Collection retrieveReflexRTsAkaObservationFromActRelationship(Collection actRelColl) throws DataProcessingException { + Collection reflexRTCollection = null; for (ActRelationshipDto actRelDT : actRelColl) { if (actRelDT == null) { @@ -558,13 +547,13 @@ private Collection retrieveReflexRTsAkaObservationFromAct //If reflex resulted test observation... if (typeCd != null - && typeCd.equalsIgnoreCase(NEDSSConstant.ACT110_TYP_CD) - && sourceClassCd != null - && sourceClassCd.equalsIgnoreCase(NEDSSConstant.OBSERVATION_CLASS_CODE) - && targetClassCd != null - && targetClassCd.equalsIgnoreCase(NEDSSConstant.OBSERVATION_CLASS_CODE) - && recordStatusCd != null - && recordStatusCd.equalsIgnoreCase(NEDSSConstant.ACTIVE) + && typeCd.equalsIgnoreCase(NEDSSConstant.ACT110_TYP_CD) + && sourceClassCd != null + && sourceClassCd.equalsIgnoreCase(NEDSSConstant.OBSERVATION_CLASS_CODE) + && targetClassCd != null + && targetClassCd.equalsIgnoreCase(NEDSSConstant.OBSERVATION_CLASS_CODE) + && recordStatusCd != null + && recordStatusCd.equalsIgnoreCase(NEDSSConstant.ACTIVE) ) { Long observationUid = actRelDT.getSourceActUid(); ObservationContainer reflexObs = (ObservationContainer) getAbstractObjectForObservationOrIntervention(NEDSSConstant.OBSERVATION_CLASS_CODE, observationUid); @@ -582,11 +571,11 @@ private Collection retrieveReflexRTsAkaObservationFromAct } // LOAD the performing lab + /** * was: retrievePerformingLab - * */ - private OrganizationContainer retrievePerformingLabAkaOrganizationFromParticipation(Collection partColl) throws DataProcessingException - { + */ + private OrganizationContainer retrievePerformingLabAkaOrganizationFromParticipation(Collection partColl) throws DataProcessingException { OrganizationContainer lab = null; for (ParticipationDto partDT : partColl) { @@ -601,13 +590,13 @@ private OrganizationContainer retrievePerformingLabAkaOrganizationFromParticipat //If performing lab... if (typeCd != null - && typeCd.equals(NEDSSConstant.PAR122_TYP_CD) - && subjectClassCd != null - && subjectClassCd.equalsIgnoreCase(NEDSSConstant.PAR122_SUB_CD) - && actClassCd != null - && actClassCd.equals(NEDSSConstant.OBSERVATION_CLASS_CODE) - && recordStatusCd != null - && recordStatusCd.equalsIgnoreCase(NEDSSConstant.ACTIVE) + && typeCd.equals(NEDSSConstant.PAR122_TYP_CD) + && subjectClassCd != null + && subjectClassCd.equalsIgnoreCase(NEDSSConstant.PAR122_SUB_CD) + && actClassCd != null + && actClassCd.equals(NEDSSConstant.OBSERVATION_CLASS_CODE) + && recordStatusCd != null + && recordStatusCd.equalsIgnoreCase(NEDSSConstant.ACTIVE) ) { Long organizationUid = partDT.getSubjectEntityUid(); lab = organizationRepositoryUtil.loadObject(organizationUid, partDT.getActUid()); @@ -619,10 +608,9 @@ private OrganizationContainer retrievePerformingLabAkaOrganizationFromParticipat /** * was: retrieveInterventionVOsForProxyVO - * */ - private Collection retrieveInterventionFromActRelationship(Collection actRelColl) throws DataProcessingException - { - Collection theInterventionVOCollection = null; + */ + private Collection retrieveInterventionFromActRelationship(Collection actRelColl) throws DataProcessingException { + Collection theInterventionVOCollection = null; for (ActRelationshipDto actRelDT : actRelColl) { if (actRelDT == null) { @@ -634,11 +622,11 @@ private Collection retrieveInterventionFromActRelationship(Collection col = actRelationshipService.loadActRelationshipBySrcIdAndTypeCode(observationId, NEDSSConstant.LAB_REPORT); - if (col != null && col.size() > 0) - { + if (col != null && col.size() > 0) { lrProxyVO.setAssociatedInvInd(true); } @@ -679,24 +666,22 @@ protected void processingNotELRLab(boolean isELR, LabResultProxyContainer lrProx } } - protected void loadingObservationToLabResultContainerActHelper(LabResultProxyContainer lrProxyVO, - boolean isELR, - Map allAct, - ObservationContainer orderedTest) { - if (!allAct.isEmpty()) - { + protected void loadingObservationToLabResultContainerActHelper(LabResultProxyContainer lrProxyVO, + boolean isELR, + Map allAct, + ObservationContainer orderedTest) { + if (!allAct.isEmpty()) { //Set intervention collection - lrProxyVO.setTheInterventionVOCollection( (Collection) allAct.get(DataProcessingMapKey.INTERVENTION)); + lrProxyVO.setTheInterventionVOCollection((Collection) allAct.get(DataProcessingMapKey.INTERVENTION)); //Set observation collection Collection obsColl = (Collection) allAct.get(DataProcessingMapKey.OBSERVATION); - if (obsColl == null) - { + if (obsColl == null) { obsColl = new ArrayList<>(); } //BB - civil0012298 - Retrieve User Name to b displayed instead of ID! - if(!isELR) { + if (!isELR) { orderedTest.getTheObservationDto().setAddUserName(AuthUtil.authUser.getUserId()); orderedTest.getTheObservationDto().setLastChgUserName(AuthUtil.authUser.getUserId()); } @@ -705,48 +690,45 @@ protected void loadingObservationToLabResultContainerActHelper(LabResultProxyCo lrProxyVO.setTheObservationContainerCollection(obsColl); //Adds the performing lab(if any) to the organization cellection - Collection labColl = (Collection) allAct.get(DataProcessingMapKey.ORGANIZATION); - if (labColl != null && labColl.size() > 0) - { + Collection labColl = (Collection) allAct.get(DataProcessingMapKey.ORGANIZATION); + if (labColl != null && labColl.size() > 0) { lrProxyVO.getTheOrganizationContainerCollection().addAll(labColl); } } } + /** - * LabResultProxyVO getLabResultProxyVO(Long observationId, boolean isELR, NBSSecurityObj nbsSecurityObj) - * */ - private LabResultProxyContainer loadingObservationToLabResultContainer(Long observationId, boolean isELR) throws DataProcessingException { - LabResultProxyContainer lrProxyVO = new LabResultProxyContainer(); + * LabResultProxyVO getLabResultProxyVO(Long observationId, boolean isELR, NBSSecurityObj nbsSecurityObj) + */ + private LabResultProxyContainer loadingObservationToLabResultContainer(Long observationId, boolean isELR) throws DataProcessingException { + LabResultProxyContainer lrProxyVO = new LabResultProxyContainer(); // LOADING EXISTING Observation ObservationContainer orderedTest = (ObservationContainer) getAbstractObjectForObservationOrIntervention(NEDSSConstant.OBSERVATION_CLASS_CODE, observationId); - Collection partColl = orderedTest.getTheParticipationDtoCollection(); //NOSONAR + Collection partColl = orderedTest.getTheParticipationDtoCollection(); //NOSONAR - if (partColl != null && !partColl.isEmpty()) - { + if (partColl != null && !partColl.isEmpty()) { Map allEntity = retrieveEntityFromParticipationForContainer(partColl); - if (!allEntity.isEmpty()) - { + if (!allEntity.isEmpty()) { lrProxyVO.setThePersonContainerCollection((Collection) allEntity.get(DataProcessingMapKey.PERSON)); lrProxyVO.setTheOrganizationContainerCollection((Collection) allEntity.get(DataProcessingMapKey.ORGANIZATION)); lrProxyVO.setTheMaterialContainerCollection((Collection) allEntity.get(DataProcessingMapKey.MATERIAL)); - Collection roleObjs = (Collection) allEntity.get(DataProcessingMapKey.ROLE); + Collection roleObjs = (Collection) allEntity.get(DataProcessingMapKey.ROLE); Collection roleDtoCollection; roleDtoCollection = Objects.requireNonNullElseGet(roleObjs, ArrayList::new); lrProxyVO.setTheRoleDtoCollection(roleDtoCollection); } } - Collection actRelColl = orderedTest.getTheActRelationshipDtoCollection(); + Collection actRelColl = orderedTest.getTheActRelationshipDtoCollection(); - if (actRelColl != null && !actRelColl.isEmpty()) - { + if (actRelColl != null && !actRelColl.isEmpty()) { Map allAct = retrieveActForLabResultContainer(actRelColl); - loadingObservationToLabResultContainerActHelper( lrProxyVO, isELR, allAct, orderedTest); + loadingObservationToLabResultContainerActHelper(lrProxyVO, isELR, allAct, orderedTest); } - processingNotELRLab( isELR, lrProxyVO, - orderedTest, observationId); + processingNotELRLab(isELR, lrProxyVO, + orderedTest, observationId); try { PageContainer pageContainer = answerService.getNbsAnswerAndAssociation(observationId); lrProxyVO.setPageVO(pageContainer); @@ -760,47 +742,41 @@ private LabResultProxyContainer loadingObservationToLabResultContainer(Long obse private Map setLabResultProxy(LabResultProxyContainer labResultProxyVO) throws DataProcessingException { - //saving LabResultProxyVO before updating auto resend notifications - Map returnVal = setLabResultProxyWithoutNotificationAutoResend(labResultProxyVO); + //saving LabResultProxyVO before updating auto resend notifications + Map returnVal = setLabResultProxyWithoutNotificationAutoResend(labResultProxyVO); - updateLabResultWithAutoResendNotification(labResultProxyVO); + updateLabResultWithAutoResendNotification(labResultProxyVO); - //TODO: EMAIL NOTIFICATION IS FLAGGED HERE + //TODO: EMAIL NOTIFICATION IS FLAGGED HERE - if(labResultProxyVO.getMessageLogDCollection()!=null && labResultProxyVO.getMessageLogDCollection().size()>0){ - try { - messageLogService.saveMessageLog(labResultProxyVO.getMessageLogDCollection()); - } catch (Exception e) { - logger.error("Unable to store the Error message for = "+ labResultProxyVO.getMessageLogDCollection()); - } + if (labResultProxyVO.getMessageLogDCollection() != null && labResultProxyVO.getMessageLogDCollection().size() > 0) { + try { + messageLogService.saveMessageLog(labResultProxyVO.getMessageLogDCollection()); + } catch (Exception e) { + logger.error("Unable to store the Error message for = " + labResultProxyVO.getMessageLogDCollection()); } - return returnVal; + } + return returnVal; } protected NNDActivityLogDto updateLabResultWithAutoResendNotification(LabResultProxyContainer labResultProxyVO) throws DataProcessingException { NNDActivityLogDto nndActivityLogDto = null; - try - { + try { //update auto resend notifications - if(labResultProxyVO.associatedNotificationInd) - { + if (labResultProxyVO.associatedNotificationInd) { investigationService.updateAutoResendNotificationsAsync(labResultProxyVO); } - } - catch(Exception e) - { + } catch (Exception e) { nndActivityLogDto = new NNDActivityLogDto(); nndActivityLogDto.setErrorMessageTxt(e.toString()); - Collection observationCollection = labResultProxyVO.getTheObservationContainerCollection(); + Collection observationCollection = labResultProxyVO.getTheObservationContainerCollection(); ObservationContainer obsVO = findObservationByCode(observationCollection, NEDSSConstant.LAB_REPORT); String localId = obsVO.getTheObservationDto().getLocalId(); //NOSONAR - if (localId!=null) - { + if (localId != null) { nndActivityLogDto.setLocalId(localId); - } - else + } else nndActivityLogDto.setLocalId("N/A"); //catch & store auto resend notifications exceptions in NNDActivityLog table nndActivityLogService.saveNddActivityLog(nndActivityLogDto); @@ -814,31 +790,25 @@ protected NNDActivityLogDto updateLabResultWithAutoResendNotification(LabResultP private Map setLabResultProxyWithoutNotificationAutoResend(LabResultProxyContainer labResultProxyVO) throws DataProcessingException { //Set flag for type of processing - boolean ELR_PROCESSING = false; + boolean ELR_PROCESSING = AuthUtil.authUser != null || (AuthUtil.authUser != null && AuthUtil.authUser.getUserId().equals(NEDSSConstant.ELR_LOAD_USER_ACCOUNT)); // We need specific auth User for elr processing, but probably wont applicable for data processing - if (AuthUtil.authUser != null || (AuthUtil.authUser != null && AuthUtil.authUser.getUserId().equals(NEDSSConstant.ELR_LOAD_USER_ACCOUNT))) - { - ELR_PROCESSING = true; - } //All well to proceed Map returnVal = new HashMap<>(); Long falseUid; - Long realUid ; + Long realUid; boolean valid = false; + //Process PersonVOCollection and adds the patient mpr uid to the return + Long patientMprUid = personUtil.processLabPersonContainerCollection( + labResultProxyVO.getThePersonContainerCollection(), + false, + labResultProxyVO + ); - //Process PersonVOCollection and adds the patient mpr uid to the return - Long patientMprUid = personUtil.processLabPersonContainerCollection( - labResultProxyVO.getThePersonContainerCollection(), - false, - labResultProxyVO - ); - - if (patientMprUid != null) - { + if (patientMprUid != null) { { returnVal.put(NEDSSConstant.SETLAB_RETURN_MPR_UID, patientMprUid); } @@ -847,20 +817,18 @@ private Map setLabResultProxyWithoutNotificationAutoResend(LabRe Map obsResults; obsResults = processObservationContainerCollection(labResultProxyVO, ELR_PROCESSING); - if (!obsResults.isEmpty()) - { + if (!obsResults.isEmpty()) { returnVal.putAll(obsResults); } //For ELR update, mpr uid may be not available - if(patientMprUid < 0) - { + if (patientMprUid < 0) { patientMprUid = participationService.findPatientMprUidByObservationUid( NEDSSConstant.PERSON, NEDSSConstant.PAR110_TYP_CD, (Long) obsResults.get(NEDSSConstant.SETLAB_RETURN_OBS_UID) ); - if(patientMprUid == null){ + if (patientMprUid == null) { throw new DataProcessingException("Expected this observation to be associated with a patient, observation uid = " + obsResults.get(NEDSSConstant.SETLAB_RETURN_OBS_UID)); } returnVal.put(NEDSSConstant.SETLAB_RETURN_MPR_UID, patientMprUid); @@ -868,13 +836,12 @@ private Map setLabResultProxyWithoutNotificationAutoResend(LabRe //Retrieve and return local ids for the patient and observation - Long observationUid = (Long)obsResults.get(NEDSSConstant.SETLAB_RETURN_OBS_UID); + Long observationUid = (Long) obsResults.get(NEDSSConstant.SETLAB_RETURN_OBS_UID); returnVal.putAll(findLocalUidsFor(patientMprUid, observationUid)); //OrganizationCollection OrganizationContainer organizationContainer; - if (labResultProxyVO.getTheOrganizationContainerCollection() != null) - { + if (labResultProxyVO.getTheOrganizationContainerCollection() != null) { for (OrganizationContainer vo : labResultProxyVO.getTheOrganizationContainerCollection()) { organizationContainer = vo; OrganizationDto newOrganizationDto; @@ -884,8 +851,7 @@ private Map setLabResultProxyWithoutNotificationAutoResend(LabRe if (orgCheck != null && orgCheck.getTheOrganizationDto() != null) { existingVer = orgCheck.getTheOrganizationDto().getVersionCtrlNbr(); } - if (organizationContainer.isItNew()) - { + if (organizationContainer.isItNew()) { newOrganizationDto = (OrganizationDto) prepareAssocModelHelper.prepareVO( organizationContainer.getTheOrganizationDto(), NBSBOLookup.ORGANIZATION, NEDSSConstant.ORG_CR, "ORGANIZATION", @@ -900,9 +866,7 @@ private Map setLabResultProxyWithoutNotificationAutoResend(LabRe if (falseUid.intValue() < 0) { uidService.setFalseToNewForObservation(labResultProxyVO, falseUid, realUid); } - } - else if (organizationContainer.isItDirty()) - { + } else if (organizationContainer.isItDirty()) { newOrganizationDto = (OrganizationDto) prepareAssocModelHelper.prepareVO( organizationContainer.getTheOrganizationDto(), NBSBOLookup.ORGANIZATION, NEDSSConstant.ORG_EDIT, "ORGANIZATION", @@ -919,15 +883,14 @@ else if (organizationContainer.isItDirty()) //MaterialCollection MaterialContainer materialContainer; - if (labResultProxyVO.getTheMaterialContainerCollection() != null) - { + if (labResultProxyVO.getTheMaterialContainerCollection() != null) { for (MaterialContainer vo : labResultProxyVO.getTheMaterialContainerCollection()) { materialContainer = vo; MaterialDto newMaterialDto; logger.debug("materialUID: " + materialContainer.getTheMaterialDto().getMaterialUid()); Integer eixstVerNum = null; - if(materialContainer.getTheMaterialDto().getMaterialUid() > 0) { + if (materialContainer.getTheMaterialDto().getMaterialUid() > 0) { var existMat = materialService.loadMaterialObject(materialContainer.getTheMaterialDto().getMaterialUid()); if (existMat != null && existMat.getTheMaterialDto() != null) { eixstVerNum = existMat.getTheMaterialDto().getVersionCtrlNbr(); @@ -965,8 +928,7 @@ else if (organizationContainer.isItDirty()) //ParticipationCollection - if (labResultProxyVO.getTheParticipationDtoCollection() != null) - { + if (labResultProxyVO.getTheParticipationDtoCollection() != null) { logger.debug("Iniside participation Collection Loop - Lab"); for (ParticipationDto dt : labResultProxyVO.getTheParticipationDtoCollection()) { @@ -987,15 +949,14 @@ else if (organizationContainer.isItDirty()) } } catch (Exception e) { throw new DataProcessingException(e.getMessage()); - } + } } } //ActRelationship Collection - if (labResultProxyVO.getTheActRelationshipDtoCollection() != null) - { + if (labResultProxyVO.getTheActRelationshipDtoCollection() != null) { logger.debug("Act relationship size: " + labResultProxyVO.getTheActRelationshipDtoCollection().size()); for (ActRelationshipDto actRelationshipDto : labResultProxyVO.getTheActRelationshipDtoCollection()) { try { @@ -1010,14 +971,12 @@ else if (organizationContainer.isItDirty()) } - Collection roleDTColl = labResultProxyVO.getTheRoleDtoCollection(); - if (roleDTColl != null && !roleDTColl.isEmpty()) - { + Collection roleDTColl = labResultProxyVO.getTheRoleDtoCollection(); + if (roleDTColl != null && !roleDTColl.isEmpty()) { roleService.storeRoleDTCollection(roleDTColl); } - //add LDF data /** * @TBD Release 6.0, Commented out as LDF will be planned out as new type of answers @@ -1051,13 +1010,11 @@ else if (organizationContainer.isItDirty()) // Does not seem to hit this case - PageContainer pageContainer =(PageContainer)labResultProxyVO.getPageVO(); - if(labResultProxyVO.isItDirty()) - { + PageContainer pageContainer = (PageContainer) labResultProxyVO.getPageVO(); + if (labResultProxyVO.isItDirty()) { answerService.storePageAnswer(pageContainer, rootDT); - } - else { - answerService.insertPageVO(pageContainer, rootDT); + } else { + answerService.insertPageVO(pageContainer, rootDT); } @@ -1065,10 +1022,8 @@ else if (organizationContainer.isItDirty()) return returnVal; } - protected ObservationContainer findObservationByCode(Collection coll, String strCode) - { - if (coll == null) - { + protected ObservationContainer findObservationByCode(Collection coll, String strCode) { + if (coll == null) { return null; } @@ -1095,11 +1050,10 @@ protected ObservationContainer findObservationByCode(Collection processObservationContainerCollection(BaseContainer proxyVO, boolean ELR_PROCESSING) throws DataProcessingException { - if (proxyVO instanceof LabResultProxyContainer) - { - return processLabReportObsContainerCollection( (LabResultProxyContainer) proxyVO, ELR_PROCESSING); + if (proxyVO instanceof LabResultProxyContainer) { + return processLabReportObsContainerCollection((LabResultProxyContainer) proxyVO, ELR_PROCESSING); } //If coming from morbidity, processing this way @@ -1110,8 +1064,7 @@ private Map processObservationContainerCollection(BaseContainer // } //If not above, abort the operation - else - { + else { throw new DataProcessingException("Expected a valid observation proxy vo, it is: " + proxyVO.getClass().getName()); } @@ -1119,22 +1072,20 @@ private Map processObservationContainerCollection(BaseContainer /** * Original Name: processLabReportObsVOCollection - * */ + */ private Map processLabReportObsContainerCollection(LabResultProxyContainer labResultProxyVO, boolean ELR_PROCESSING) throws DataProcessingException { - CollectionobsContainerCollection = labResultProxyVO.getTheObservationContainerCollection(); + Collection obsContainerCollection = labResultProxyVO.getTheObservationContainerCollection(); ObservationContainer observationContainer; Map returnObsVal; boolean isMannualLab = false; //Find out if it is mannual lab String electronicInd = observationUtil.getRootObservationDto(labResultProxyVO).getElectronicInd(); - if(electronicInd != null && !electronicInd.equals(NEDSSConstant.YES)) - { + if (electronicInd != null && !electronicInd.equals(NEDSSConstant.YES)) { isMannualLab = true; } - if (obsContainerCollection != null && !obsContainerCollection.isEmpty()) - { + if (obsContainerCollection != null && !obsContainerCollection.isEmpty()) { for (ObservationContainer item : obsContainerCollection) { observationContainer = item; if (observationContainer == null) { @@ -1153,14 +1104,14 @@ private Map processLabReportObsContainerCollection(LabResultProx // NOTE: data toward DP will never be manual lab if (isMannualLab) { /** - // Removed for Rel 1.1.3 - as we are not doing a reverse translation for ORdered test and Resulted Test - if (isOrderedTest || isResultedTest) { - //Retrieve lab test code - - //Do loinc and snomed lookups for oredered and resulted tests - observationContainer = srteCodeObsService.labLoincSnomedLookup(observationContainer, labResultProxyVO.getLabClia()); - } - logger.debug("observationUID: " + observationContainer.getTheObservationDto().getObservationUid()); + // Removed for Rel 1.1.3 - as we are not doing a reverse translation for ORdered test and Resulted Test + if (isOrderedTest || isResultedTest) { + //Retrieve lab test code + + //Do loinc and snomed lookups for oredered and resulted tests + observationContainer = srteCodeObsService.labLoincSnomedLookup(observationContainer, labResultProxyVO.getLabClia()); + } + logger.debug("observationUID: " + observationContainer.getTheObservationDto().getObservationUid()); **/ } } @@ -1173,8 +1124,7 @@ private Map processLabReportObsContainerCollection(LabResultProx Long observationUid = storeObservationVOCollection(labResultProxyVO); //Return the order test uid - if (observationUid != null) - { + if (observationUid != null) { returnObsVal.put(NEDSSConstant.SETLAB_RETURN_OBS_UID, observationUid); } return returnObsVal; @@ -1182,69 +1132,62 @@ private Map processLabReportObsContainerCollection(LabResultProx } private Map processLabReportOrderTest(LabResultProxyContainer labResultProxyVO, boolean isELR) throws DataProcessingException { - //Retrieve the ordered test - ObservationContainer orderTest = observationUtil.getRootObservationContainer(labResultProxyVO); + //Retrieve the ordered test + ObservationContainer orderTest = observationUtil.getRootObservationContainer(labResultProxyVO); - //Overrides rptToStateTime to current date/time for external user - if (AuthUtil.authUser.getUserType() != null && AuthUtil.authUser.getUserType().equalsIgnoreCase(NEDSSConstant.SEC_USERTYPE_EXTERNAL)) - { - orderTest.getTheObservationDto().setRptToStateTime(getCurrentTimeStamp()); - } + //Overrides rptToStateTime to current date/time for external user + if (AuthUtil.authUser.getUserType() != null && AuthUtil.authUser.getUserType().equalsIgnoreCase(NEDSSConstant.SEC_USERTYPE_EXTERNAL)) { + orderTest.getTheObservationDto().setRptToStateTime(getCurrentTimeStamp()); + } - //Assign program area cd if necessary, and return any errors to the client - Map returnErrors = new HashMap<>(); - String paCd = orderTest.getTheObservationDto().getProgAreaCd(); - if (paCd != null && paCd.equalsIgnoreCase(ProgramAreaJurisdiction.ANY_PROGRAM_AREA)) - { - String paError = programAreaService.deriveProgramAreaCd(labResultProxyVO, orderTest); - if (paError != null) - { - returnErrors.put(NEDSSConstant.SETLAB_RETURN_PROGRAM_AREA_ERRORS, paError); - } + //Assign program area cd if necessary, and return any errors to the client + Map returnErrors = new HashMap<>(); + String paCd = orderTest.getTheObservationDto().getProgAreaCd(); + if (paCd != null && paCd.equalsIgnoreCase(ProgramAreaJurisdiction.ANY_PROGRAM_AREA)) { + String paError = programAreaService.deriveProgramAreaCd(labResultProxyVO, orderTest); + if (paError != null) { + returnErrors.put(NEDSSConstant.SETLAB_RETURN_PROGRAM_AREA_ERRORS, paError); } + } - //Assign jurisdiction cd if necessary - String jurisdictionCd = orderTest.getTheObservationDto().getJurisdictionCd(); - if (jurisdictionCd != null && - (jurisdictionCd.equalsIgnoreCase(ProgramAreaJurisdiction.ANY_JURISDICTION) - || jurisdictionCd.equalsIgnoreCase(ProgramAreaJurisdiction.JURISDICTION_NONE) - ) - ) - { - String jurisdictionError = jurisdictionService.deriveJurisdictionCd(labResultProxyVO, orderTest.getTheObservationDto()); - if (jurisdictionError != null) - { - returnErrors.put(NEDSSConstant.SETLAB_RETURN_JURISDICTION_ERRORS, jurisdictionCd); - } + //Assign jurisdiction cd if necessary + String jurisdictionCd = orderTest.getTheObservationDto().getJurisdictionCd(); + if (jurisdictionCd != null && + (jurisdictionCd.equalsIgnoreCase(ProgramAreaJurisdiction.ANY_JURISDICTION) + || jurisdictionCd.equalsIgnoreCase(ProgramAreaJurisdiction.JURISDICTION_NONE) + ) + ) { + String jurisdictionError = jurisdictionService.deriveJurisdictionCd(labResultProxyVO, orderTest.getTheObservationDto()); + if (jurisdictionError != null) { + returnErrors.put(NEDSSConstant.SETLAB_RETURN_JURISDICTION_ERRORS, jurisdictionCd); } + } - //Manipulate jurisdiction for preparing vo - jurisdictionCd = orderTest.getTheObservationDto().getJurisdictionCd(); - if(jurisdictionCd != null + //Manipulate jurisdiction for preparing vo + jurisdictionCd = orderTest.getTheObservationDto().getJurisdictionCd(); + if (jurisdictionCd != null && (jurisdictionCd.trim().equals("") - || jurisdictionCd.equals("ANY") - || jurisdictionCd.equals("NONE") - ) - ) - { - orderTest.getTheObservationDto().setJurisdictionCd(null); - } + || jurisdictionCd.equals("ANY") + || jurisdictionCd.equals("NONE") + ) + ) { + orderTest.getTheObservationDto().setJurisdictionCd(null); + } - //Do observation object state transition accordingly - performOrderTestStateTransition(labResultProxyVO, orderTest, isELR); + //Do observation object state transition accordingly + performOrderTestStateTransition(labResultProxyVO, orderTest, isELR); - return returnErrors; + return returnErrors; } private Map findLocalUidsFor(Long personMprUid, Long observationUid) throws DataProcessingException { Map localIds = null; - try - { + try { //Find observation local id - if(localIds == null) { - localIds = new HashMap<> (); + if (localIds == null) { + localIds = new HashMap<>(); } var resObs = observationRepository.findById(observationUid); ObservationDto obsDT = new ObservationDto(); @@ -1258,42 +1201,32 @@ private Map findLocalUidsFor(Long personMprUid, Long observation if (resPat.isPresent()) { localIds.put(NEDSSConstant.SETLAB_RETURN_MPR_LOCAL, resPat.get().getLocalId()); } - } - catch (Exception ex) - { + } catch (Exception ex) { throw new DataProcessingException(ex.getMessage(), ex); } return localIds; } protected String processingOrderTestStateTransition(LabResultProxyContainer labResultProxyVO, - ObservationContainer orderTest, - String businessTriggerCd, - boolean isELR) { - if (labResultProxyVO.isItNew() && orderTest.getTheObservationDto().getProcessingDecisionCd()!=null && !orderTest.getTheObservationDto().getProcessingDecisionCd().trim().equals("")) - { + ObservationContainer orderTest, + String businessTriggerCd, + boolean isELR) { + if (labResultProxyVO.isItNew() && orderTest.getTheObservationDto().getProcessingDecisionCd() != null && !orderTest.getTheObservationDto().getProcessingDecisionCd().trim().equals("")) { businessTriggerCd = NEDSSConstant.OBS_LAB_CR_MR; - } - else if (labResultProxyVO.isItNew()) - { + } else if (labResultProxyVO.isItNew()) { businessTriggerCd = NEDSSConstant.OBS_LAB_CR; - } - else if (labResultProxyVO.isItDirty()) - { - if (isELR) - { + } else if (labResultProxyVO.isItDirty()) { + if (isELR) { businessTriggerCd = NEDSSConstant.OBS_LAB_CORRECT; - } - else - { + } else { businessTriggerCd = NEDSSConstant.OBS_LAB_EDIT; } } return businessTriggerCd; } - protected void performOrderTestStateTransition(LabResultProxyContainer labResultProxyVO, ObservationContainer orderTest, boolean isELR) throws DataProcessingException - { + + protected void performOrderTestStateTransition(LabResultProxyContainer labResultProxyVO, ObservationContainer orderTest, boolean isELR) throws DataProcessingException { String businessTriggerCd = null; ObservationDto newObservationDto; @@ -1309,12 +1242,12 @@ protected void performOrderTestStateTransition(LabResultProxyContainer labResult } } - newObservationDto = (ObservationDto) prepareAssocModelHelper.prepareVO( + newObservationDto = (ObservationDto) prepareAssocModelHelper.prepareVO( orderTest.getTheObservationDto(), NBSBOLookup.OBSERVATIONLABREPORT, businessTriggerCd, "OBSERVATION", NEDSSConstant.BASE, - existObsVer - ); - orderTest.setTheObservationDto(newObservationDto); + existObsVer + ); + orderTest.setTheObservationDto(newObservationDto); } @@ -1322,11 +1255,10 @@ protected void performOrderTestStateTransition(LabResultProxyContainer labResult private Long storeObservationVOCollection(BaseContainer proxyVO) throws DataProcessingException { try { //Iterates the observation collection and process each observation vo - Collection obsVOColl = null; + Collection obsVOColl = null; boolean isLabResultProxyVO = false; - if (proxyVO instanceof LabResultProxyContainer) - { - obsVOColl = ( (LabResultProxyContainer) proxyVO).getTheObservationContainerCollection(); + if (proxyVO instanceof LabResultProxyContainer) { + obsVOColl = ((LabResultProxyContainer) proxyVO).getTheObservationContainerCollection(); isLabResultProxyVO = true; } @@ -1335,11 +1267,10 @@ private Long storeObservationVOCollection(BaseContainer proxyVO) throws DataProc // obsVOColl = ( (MorbidityProxyVO) proxyVO).getTheObservationContainerCollection(); // } - ObservationContainer observationContainer ; + ObservationContainer observationContainer; Long returnObsVal = null; - if (obsVOColl != null && obsVOColl.size() > 0) - { + if (obsVOColl != null && obsVOColl.size() > 0) { for (ObservationContainer item : obsVOColl) { observationContainer = item; @@ -1390,18 +1321,14 @@ private Long storeObservationVOCollection(BaseContainer proxyVO) throws DataProc } - - protected boolean processObservationWithProcessingDecision(Long observationUid, String processingDecisionCd, String processingDecisionTxt) throws DataProcessingException { - try - { + try { ObservationContainer observationVO = observationRepositoryUtil.loadObject(observationUid); ObservationDto observationDT = observationVO.getTheObservationDto(); observationDT.setProcessingDecisionCd(processingDecisionCd); - if(processingDecisionTxt!=null && !processingDecisionTxt.isEmpty()) - { + if (processingDecisionTxt != null && !processingDecisionTxt.isEmpty()) { observationDT.setProcessingDecisionTxt(processingDecisionTxt); } @@ -1409,21 +1336,19 @@ protected boolean processObservationWithProcessingDecision(Long observationUid, String businessTrigger; String businessObjLookupName; - if(observationType.equalsIgnoreCase(NEDSSConstant.LABRESULT_CODE)){ + if (observationType.equalsIgnoreCase(NEDSSConstant.LABRESULT_CODE)) { businessTrigger = NEDSSConstant.OBS_LAB_PROCESS; businessObjLookupName = NBSBOLookup.OBSERVATIONLABREPORT; - } - else{ + } else { throw new DataProcessingException("This is not a Lab Report OR a Morbidity Report! MarkAsReviewed only applies to Lab Report or Morbidity Report "); } - if (observationDT.getRecordStatusCd().equalsIgnoreCase(NEDSSConstant.OBS_UNPROCESSED)) - { + if (observationDT.getRecordStatusCd().equalsIgnoreCase(NEDSSConstant.OBS_UNPROCESSED)) { observationDT.setItNew(false); observationDT.setItDirty(true); - RootDtoInterface rootDTInterface = prepareAssocModelHelper.prepareVO( + RootDtoInterface rootDTInterface = prepareAssocModelHelper.prepareVO( observationDT, businessObjLookupName, businessTrigger, @@ -1435,23 +1360,19 @@ protected boolean processObservationWithProcessingDecision(Long observationUid, observationVO.setTheObservationDto((ObservationDto) rootDTInterface); observationRepositoryUtil.saveObservation(observationVO); return true; - } - else - { + } else { return false; } - } - catch (Exception ex) - { + } catch (Exception ex) { throw new DataProcessingException(ex.getMessage(), ex); } } - private void setObservationAssociations(Long investigationUid, Collection observationSummaryVOColl) throws DataProcessingException { + private void setObservationAssociations(Long investigationUid, Collection observationSummaryVOColl) throws DataProcessingException { investigationService.setAssociations(investigationUid, observationSummaryVOColl, - null, null,null, true); + null, null, null, true); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationSummaryService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationSummaryService.java index abfaca5ea..d178f0b88 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationSummaryService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationSummaryService.java @@ -35,11 +35,11 @@ public ObservationSummaryService(Observation_SummaryRepository observationSummar public Collection findAllActiveLabReportUidListForManage(Long investigationUid, String whereClause) throws DataProcessingException { - Collection uidSummaryVOCollection = new ArrayList<>(); - try{ + Collection uidSummaryVOCollection = new ArrayList<>(); + try { var obsSums = observationSummaryRepository.findAllActiveLabReportUidListForManage(investigationUid, whereClause); - for(var item : obsSums) { + for (var item : obsSums) { UidSummaryContainer container = new UidSummaryContainer(); container.setUid(item.getUid()); container.setAddTime(item.getAddTime()); @@ -47,15 +47,15 @@ public Collection findAllActiveLabReportUidListForManage(Lo uidSummaryVOCollection.add(container); } - }catch(Exception ex){ + } catch (Exception ex) { throw new DataProcessingException(ex.toString(), ex); } return uidSummaryVOCollection; } - public Map getLabParticipations(Long observationUID) throws DataProcessingException { - Map vals; + public Map getLabParticipations(Long observationUID) throws DataProcessingException { + Map vals; try { vals = customRepository.getLabParticipations(observationUID); @@ -67,15 +67,11 @@ public Map getLabParticipations(Long observationUID) throws DataP } - public ArrayList getPatientPersonInfo(Long observationUID) throws DataProcessingException - { + public ArrayList getPatientPersonInfo(Long observationUID) throws DataProcessingException { ArrayList vals; - try - { + try { vals = customRepository.getPatientPersonInfo(observationUID); - } - catch(Exception ex) - { + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } @@ -84,43 +80,34 @@ public ArrayList getPatientPersonInfo(Long observationUID) throws DataP } - public ArrayList getProviderInfo(Long observationUID,String partTypeCd) throws DataProcessingException - { + public ArrayList getProviderInfo(Long observationUID, String partTypeCd) throws DataProcessingException { ArrayList orderProviderInfo; - try - { - orderProviderInfo = customRepository.getProviderInfo(observationUID, partTypeCd); - } - catch(Exception ex) - { + try { + orderProviderInfo = customRepository.getProviderInfo(observationUID, partTypeCd); + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } return orderProviderInfo; } - public ArrayList getActIdDetails(Long observationUID) throws DataProcessingException - { + public ArrayList getActIdDetails(Long observationUID) throws DataProcessingException { ArrayList actIdDetails; - try - { + try { actIdDetails = customRepository.getActIdDetails(observationUID); - } - catch(Exception ex) - { + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } return actIdDetails; } - public String getReportingFacilityName(Long organizationUid) throws DataProcessingException - { + public String getReportingFacilityName(Long organizationUid) throws DataProcessingException { String orgName; try { - orgName = customRepository.getReportingFacilityName(organizationUid); + orgName = customRepository.getReportingFacilityName(organizationUid); } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } @@ -138,8 +125,7 @@ public String getSpecimanSource(Long materialUid) throws DataProcessingException } - public ProviderDataForPrintContainer getOrderingFacilityAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException - { + public ProviderDataForPrintContainer getOrderingFacilityAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException { String ORG_NAME_QUERY = "select street_addr1 \"streetAddr1\", street_addr2 \"streetAddr2\", city_desc_txt \"cityDescTxt\", state_cd \"stateCd\", zip_cd \"zipCd\" from Postal_locator with (nolock) where postal_locator_uid in (" + "select locator_uid from Entity_locator_participation with (nolock) where entity_uid in (?)and cd='O' and class_cd='PST')"; @@ -149,31 +135,29 @@ public ProviderDataForPrintContainer getOrderingFacilityAddress(ProviderDataForP try { providerDataForPrintVO = customRepository.getOrderingFacilityAddress(providerDataForPrintVO, organizationUid); - } catch (Exception ex) { + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } return providerDataForPrintVO; } - public ProviderDataForPrintContainer getOrderingFacilityPhone(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException - { + public ProviderDataForPrintContainer getOrderingFacilityPhone(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException { String ORG_NAME_QUERY = "select phone_nbr_txt \"phoneNbrTxt\", extension_txt \"extensionTxt\" from TELE_locator with (nolock) where TELE_locator_uid in (" - +" select locator_uid from Entity_locator_participation with (nolock) where entity_uid= ? and cd='PH' and class_cd='TELE') "; + + " select locator_uid from Entity_locator_participation with (nolock) where entity_uid= ? and cd='PH' and class_cd='TELE') "; /** * Get the OrgPhone */ try { providerDataForPrintVO = customRepository.getOrderingFacilityPhone(providerDataForPrintVO, organizationUid); - }catch (Exception ex) { + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } return providerDataForPrintVO; } - public ProviderDataForPrintContainer getOrderingPersonAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException - { + public ProviderDataForPrintContainer getOrderingPersonAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException { try { providerDataForPrintVO = customRepository.getOrderingPersonAddress(providerDataForPrintVO, organizationUid); } catch (Exception ex) { @@ -182,19 +166,17 @@ public ProviderDataForPrintContainer getOrderingPersonAddress(ProviderDataForPri return providerDataForPrintVO; } - public ProviderDataForPrintContainer getOrderingPersonPhone(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException - { + public ProviderDataForPrintContainer getOrderingPersonPhone(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException { try { providerDataForPrintVO = customRepository.getOrderingPersonPhone(providerDataForPrintVO, organizationUid); - } catch (Exception ex) { + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } return providerDataForPrintVO; } - public Long getProviderInformation (ArrayList providerDetails, LabReportSummaryContainer labRep) - { + public Long getProviderInformation(ArrayList providerDetails, LabReportSummaryContainer labRep) { Long providerUid = null; @@ -204,20 +186,20 @@ public Long getProviderInformation (ArrayList providerDetails, LabRepor if (orderProvider[0] != null) { labRep.setProviderLastName((String) orderProvider[0]); } - if (orderProvider[1] != null){ + if (orderProvider[1] != null) { labRep.setProviderFirstName((String) orderProvider[1]); } - if (orderProvider[2] != null){ + if (orderProvider[2] != null) { labRep.setProviderPrefix((String) orderProvider[2]); } - if (orderProvider[3] != null){ - labRep.setProviderSuffix(( String)orderProvider[3]); + if (orderProvider[3] != null) { + labRep.setProviderSuffix((String) orderProvider[3]); } - if (orderProvider[4] != null){ - labRep.setDegree(( String)orderProvider[4]); + if (orderProvider[4] != null) { + labRep.setDegree((String) orderProvider[4]); } - if (orderProvider[5] != null){ - providerUid= (Long)orderProvider[5]; + if (orderProvider[5] != null) { + providerUid = (Long) orderProvider[5]; labRep.setProviderUid((String.valueOf(orderProvider[5]))); } } @@ -227,10 +209,9 @@ public Long getProviderInformation (ArrayList providerDetails, LabRepor } - public void getTestAndSusceptibilities(String typeCode, Long observationUid, LabReportSummaryContainer labRepEvent, LabReportSummaryContainer labRepSumm) - { + public void getTestAndSusceptibilities(String typeCode, Long observationUid, LabReportSummaryContainer labRepEvent, LabReportSummaryContainer labRepSumm) { ResultedTestSummaryContainer testVO = new ResultedTestSummaryContainer(); - ArrayList testList; + ArrayList testList; testList = customRepository.getTestAndSusceptibilities(typeCode, observationUid, labRepEvent, labRepSumm); //afterReflex = System.currentTimeMillis(); @@ -238,9 +219,9 @@ public void getTestAndSusceptibilities(String typeCode, Long observationUid, Lab if (testList != null) { - if(labRepEvent != null) + if (labRepEvent != null) labRepEvent.setTheResultedTestSummaryVOCollection(testList); - if(labRepSumm != null) + if (labRepSumm != null) labRepSumm.setTheResultedTestSummaryVOCollection(testList); //timing @@ -250,28 +231,24 @@ public void getTestAndSusceptibilities(String typeCode, Long observationUid, Lab } } - + } - public Map getAssociatedInvList(Long uid,String sourceClassCd) throws DataProcessingException - { - Map assocoiatedInvMap; - try{ + public Map getAssociatedInvList(Long uid, String sourceClassCd) throws DataProcessingException { + Map assocoiatedInvMap; + try { String dataAccessWhereClause = queryHelper.getDataAccessWhereClause(NBSBOLookup.INVESTIGATION, "VIEW", ""); if (dataAccessWhereClause == null) { dataAccessWhereClause = ""; - } - else { + } else { dataAccessWhereClause = " AND " + dataAccessWhereClause; } - String query = ASSOCIATED_INV_QUERY+dataAccessWhereClause; + String query = ASSOCIATED_INV_QUERY + dataAccessWhereClause; assocoiatedInvMap = customRepository.getAssociatedInvList(uid, sourceClassCd, query); - } - catch(Exception ex) - { + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } @@ -279,14 +256,13 @@ public Map getAssociatedInvList(Long uid,String sourceClassCd) t } - private void setSusceptibility(ResultedTestSummaryContainer RVO, LabReportSummaryContainer labRepEvent, LabReportSummaryContainer labRepSumm) - { + private void setSusceptibility(ResultedTestSummaryContainer RVO, LabReportSummaryContainer labRepEvent, LabReportSummaryContainer labRepSumm) { ResultedTestSummaryContainer susVO = new ResultedTestSummaryContainer(); int countResult = 0; int countSus = 0; UidSummaryContainer sourceActUidVO = new UidSummaryContainer(); - ArrayList susList; + ArrayList susList; Long sourceActUid = RVO.getSourceActUid(); countResult = countResult + 1; @@ -297,11 +273,11 @@ private void setSusceptibility(ResultedTestSummaryContainer RVO, LabReportSummar //totalSus += (afterSus - beforeSus); if (susList != null) { Iterator susIter = susList.iterator(); - ArrayList susListFinal ; + ArrayList susListFinal; //timing //t4begin = System.currentTimeMillis(); - ArrayList multipleSusceptArray = new ArrayList<> (); + ArrayList multipleSusceptArray = new ArrayList<>(); while (susIter.hasNext()) { UidSummaryContainer uidVO = susIter.next(); @@ -310,7 +286,7 @@ private void setSusceptibility(ResultedTestSummaryContainer RVO, LabReportSummar countSus = countSus + 1; //beforeReflex2 = System.currentTimeMillis(); - susListFinal = customRepository.getSusceptibilityResultedTestSummary( "COMP", sourceAct); + susListFinal = customRepository.getSusceptibilityResultedTestSummary("COMP", sourceAct); //afterReflex2 = System.currentTimeMillis(); @@ -333,13 +309,7 @@ private void setSusceptibility(ResultedTestSummaryContainer RVO, LabReportSummar //t3end = System.currentTimeMillis(); - } - - - - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/organization/OrganizationMatchingService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/organization/OrganizationMatchingService.java index 69efbfb1b..2f93c3597 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/organization/OrganizationMatchingService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/organization/OrganizationMatchingService.java @@ -34,7 +34,7 @@ public class OrganizationMatchingService implements IOrganizationMatchingService public OrganizationMatchingService(EdxPatientMatchRepositoryUtil edxPatientMatchRepositoryUtil, OrganizationRepositoryUtil organizationRepositoryUtil) { this.edxPatientMatchRepositoryUtil = edxPatientMatchRepositoryUtil; - this.organizationRepositoryUtil=organizationRepositoryUtil; + this.organizationRepositoryUtil = organizationRepositoryUtil; } @Transactional @@ -234,7 +234,7 @@ public EDXActivityDetailLogDto getMatchingOrganization( // entityUid = entityController.setOrganization(organizationContainer, // businessTriggerCd, nbsSecurityObj); String businessTriggerCd = NEDSSConstant.ORG_CR; - entityUid=organizationRepositoryUtil.setOrganization(organizationContainer, + entityUid = organizationRepositoryUtil.setOrganization(organizationContainer, businessTriggerCd); } catch (Exception e) { logger.error("Error in getting the entity Controller or setting the Organization"); @@ -271,8 +271,7 @@ public EDXActivityDetailLogDto getMatchingOrganization( throw new DataProcessingException(e.getMessage(), e); } } - if (localEdxEntityMatchDT != null) - { + if (localEdxEntityMatchDT != null) { coll.add(localEdxEntityMatchDT); } if (coll != null) { @@ -428,8 +427,7 @@ private String getNameString(OrganizationContainer organizationContainer) { if (organizationNameDto.getNmUseCd() != null && organizationNameDto.getNmUseCd().equals( NEDSSConstant.LEGAL)) { - if (organizationNameDto.getNmTxt() != null) - { + if (organizationNameDto.getNmTxt() != null) { nameStr = organizationNameDto.getNmTxt(); } } @@ -437,6 +435,7 @@ private String getNameString(OrganizationContainer organizationContainer) { } return nameStr; } + private String telePhoneTxt(OrganizationContainer organizationContainer) { String nameTeleStr = null; String carrot = "^"; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/organization/OrganizationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/organization/OrganizationService.java index 582974334..cb12472c8 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/organization/OrganizationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/organization/OrganizationService.java @@ -23,7 +23,7 @@ public class OrganizationService implements IOrganizationService { public OrganizationService(IOrganizationMatchingService iOrganizationMatchingService, IUidService uidService) { - this.iOrganizationMatchingService = iOrganizationMatchingService; + OrganizationService.iOrganizationMatchingService = iOrganizationMatchingService; this.uidService = uidService; } @@ -38,9 +38,7 @@ public OrganizationContainer processingOrganization(LabResultProxyContainer labR long orgUid; if (organizationContainer.getRole() != null && organizationContainer.getRole().equalsIgnoreCase(EdxELRConstant.ELR_SENDING_FACILITY_CD) && labResultProxyContainer.getSendingFacilityUid() != null) { orgUid = labResultProxyContainer.getSendingFacilityUid(); - } - else - { + } else { EDXActivityDetailLogDto eDXActivityDetailLogDto = iOrganizationMatchingService.getMatchingOrganization(organizationContainer); orgUid = Long.parseLong(eDXActivityDetailLogDto.getRecordId()); } @@ -62,7 +60,7 @@ public OrganizationContainer processingOrganization(LabResultProxyContainer labR } return orderingFacilityVO; } catch (Exception e) { - throw new DataProcessingConsumerException(e.getMessage(), e); + throw new DataProcessingConsumerException(e.getMessage()); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PageService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PageService.java index c342f5c4d..92ecccab3 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PageService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PageService.java @@ -27,39 +27,33 @@ public PageService(IInvestigationService investigationService, PageRepositoryUti public Long setPageProxyWithAutoAssoc(String typeCd, PageActProxyContainer pageProxyVO, Long observationUid, String observationTypeCd, String processingDecision) throws DataProcessingException { - Long publicHealthCaseUID=null; - if(typeCd.equalsIgnoreCase(NEDSSConstant.CASE)){ - publicHealthCaseUID= setPageProxyWithAutoAssoc(pageProxyVO,observationUid,observationTypeCd, processingDecision); + Long publicHealthCaseUID = null; + if (typeCd.equalsIgnoreCase(NEDSSConstant.CASE)) { + publicHealthCaseUID = setPageProxyWithAutoAssoc(pageProxyVO, observationUid, observationTypeCd, processingDecision); } return publicHealthCaseUID; } private Long setPageProxyWithAutoAssoc(PageActProxyContainer pageProxyVO, Long observationUid, - String observationTypeCd, String processingDecision) throws DataProcessingException { + String observationTypeCd, String processingDecision) throws DataProcessingException { Long publicHealthCaseUID; publicHealthCaseUID = pageRepositoryUtil.setPageActProxyVO(pageProxyVO); Collection observationColl = new ArrayList<>(); - if (observationTypeCd.equalsIgnoreCase(NEDSSConstant.LAB_DISPALY_FORM)) - { + if (observationTypeCd.equalsIgnoreCase(NEDSSConstant.LAB_DISPALY_FORM)) { LabReportSummaryContainer labSumVO = new LabReportSummaryContainer(); labSumVO.setItTouched(true); labSumVO.setItAssociated(true); labSumVO.setObservationUid(observationUid); //set the add_reason_code(processing decision) for act_relationship from initial follow-up(pre-populated from Lab report processing decision) field in case management - if(pageProxyVO.getPublicHealthCaseContainer().getTheCaseManagementDto()!=null - && pageProxyVO.getPublicHealthCaseContainer().getTheCaseManagementDto().getInitFollUp()!=null) - { + if (pageProxyVO.getPublicHealthCaseContainer().getTheCaseManagementDto() != null + && pageProxyVO.getPublicHealthCaseContainer().getTheCaseManagementDto().getInitFollUp() != null) { labSumVO.setProcessingDecisionCd(pageProxyVO.getPublicHealthCaseContainer().getTheCaseManagementDto().getInitFollUp()); - } - else - { + } else { labSumVO.setProcessingDecisionCd(processingDecision); } observationColl.add(labSumVO); - } - else - { + } else { // MorbReportSummaryVO morbSumVO = new MorbReportSummaryVO(); // morbSumVO.setItTouched(true); // morbSumVO.setItAssociated(true); @@ -77,10 +71,6 @@ private Long setPageProxyWithAutoAssoc(PageActProxyContainer pageProxyVO, Long o } - - - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PamService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PamService.java index 982159fab..e1611cc0b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PamService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PamService.java @@ -88,20 +88,20 @@ public Long setPamProxyWithAutoAssoc(PamProxyContainer pamProxyVO, Long observat } public void insertPamVO(BasePamContainer pamVO, PublicHealthCaseContainer publichHealthCaseVO) - throws DataProcessingException{ - Collection pamDTCollection =new ArrayList<> (); - Collection repeatingAnswerDTCollection =new ArrayList<> (); - if(pamVO.getPamAnswerDTMap()!=null){ - pamDTCollection= pamVO.getPamAnswerDTMap().values(); + throws DataProcessingException { + Collection pamDTCollection = new ArrayList<>(); + Collection repeatingAnswerDTCollection = new ArrayList<>(); + if (pamVO.getPamAnswerDTMap() != null) { + pamDTCollection = pamVO.getPamAnswerDTMap().values(); } //NOTE: PAM IS EMPTY IN RELEVANT FLOW //storePamAnswerDTCollection(pamDTCollection, publichHealthCaseVO); - if(pamVO.getPageRepeatingAnswerDTMap()!=null){ - repeatingAnswerDTCollection= pamVO.getPageRepeatingAnswerDTMap().values(); + if (pamVO.getPageRepeatingAnswerDTMap() != null) { + repeatingAnswerDTCollection = pamVO.getPageRepeatingAnswerDTMap().values(); } //NOTE: PAM IS EMPTY IN RELEVANT FLOW - answerService.storeActEntityDTCollectionWithPublicHealthCase(pamVO.getActEntityDTCollection(), publichHealthCaseVO.getThePublicHealthCaseDto()); + answerService.storeActEntityDTCollectionWithPublicHealthCase(pamVO.getActEntityDTCollection(), publichHealthCaseVO.getThePublicHealthCaseDto()); } @@ -124,22 +124,18 @@ private Long setPamProxy(PamProxyContainer pamProxyVO) throws DataProcessingExce } - if(pamProxyVO.isItDirty()){ + if (pamProxyVO.isItDirty()) { try { //update auto resend notifications investigationService.updateAutoResendNotificationsAsync(pamProxyVO); - } - catch (Exception e) { + } catch (Exception e) { NNDActivityLogDto nndActivityLogDT = new NNDActivityLogDto(); String phcLocalId = pamProxyVO.getPublicHealthCaseContainer(). getThePublicHealthCaseDto().getLocalId(); nndActivityLogDT.setErrorMessageTxt(e.toString()); - if (phcLocalId != null) - { + if (phcLocalId != null) { nndActivityLogDT.setLocalId(phcLocalId); - } - else - { + } else { nndActivityLogDT.setLocalId("N/A"); } //catch & store auto resend notifications exceptions in NNDActivityLog table @@ -193,25 +189,21 @@ private Long setPamProxy(PamProxyContainer pamProxyVO) throws DataProcessingExce try { - Long falseUid; Long realUid = null; - Iterator anIteratorPerson; + Iterator anIteratorPerson; if (pamProxyVO.getThePersonVOCollection() != null) { for (anIteratorPerson = pamProxyVO.getThePersonVOCollection() - .iterator(); anIteratorPerson.hasNext();) { - personVO = anIteratorPerson.next(); - if (personVO.isItNew()) - { + .iterator(); anIteratorPerson.hasNext(); ) { + personVO = anIteratorPerson.next(); + if (personVO.isItNew()) { if (personVO.getThePersonDto().getCd().equals( NEDSSConstant.PAT)) { // Patient String businessTriggerCd = NEDSSConstant.PAT_CR; realUid = patientMatchingBaseService.setPatientRevision(personVO, businessTriggerCd, NEDSSConstant.PAT); - } - else if (personVO.getThePersonDto().getCd().equals( - NEDSSConstant.PRV)) - { // Provider + } else if (personVO.getThePersonDto().getCd().equals( + NEDSSConstant.PRV)) { // Provider String businessTriggerCd = NEDSSConstant.PRV_CR; var data = patientRepositoryUtil.createPerson(personVO); realUid = data.getPersonParentUid(); @@ -220,20 +212,15 @@ else if (personVO.getThePersonDto().getCd().equals( falseUid = personVO.getThePersonDto().getPersonUid(); // replace the falseId with the realId if (falseUid.intValue() < 0) { - uidService.setFalseToNewForPam(pamProxyVO, falseUid, realUid); + uidService.setFalseToNewForPam(pamProxyVO, falseUid, realUid); } - } - else if (personVO.isItDirty()) - { + } else if (personVO.isItDirty()) { if (personVO.getThePersonDto().getCd().equals( - NEDSSConstant.PAT)) - { + NEDSSConstant.PAT)) { String businessTriggerCd = NEDSSConstant.PAT_EDIT; realUid = patientMatchingBaseService.setPatientRevision(personVO, businessTriggerCd, NEDSSConstant.PAT); - } - else if (personVO.getThePersonDto().getCd().equals( - NEDSSConstant.PRV)) - { // Provider + } else if (personVO.getThePersonDto().getCd().equals( + NEDSSConstant.PRV)) { // Provider String businessTriggerCd = NEDSSConstant.PRV_EDIT; var data = patientRepositoryUtil.createPerson(personVO); realUid = data.getPersonParentUid(); @@ -259,7 +246,7 @@ else if (personVO.getThePersonDto().getCd().equals( String tableName = "PUBLIC_HEALTH_CASE"; String moduleCd = "BASE"; publicHealthCaseDto = (PublicHealthCaseDto) prepareAssocModelHelper.prepareVO(rootDTInterface, businessObjLookupName, - businessTriggerCd, tableName, moduleCd, rootDTInterface.getVersionCtrlNbr()); + businessTriggerCd, tableName, moduleCd, rootDTInterface.getVersionCtrlNbr()); publicHealthCaseContainer.setThePublicHealthCaseDto(publicHealthCaseDto); falsePublicHealthCaseUid = publicHealthCaseContainer @@ -277,13 +264,13 @@ else if (personVO.getThePersonDto().getCd().equals( logger.debug("falsePublicHealthCaseUid.intValue() = " + falsePublicHealthCaseUid.intValue()); } - if( pamProxyVO.isUnsavedNote() && pamProxyVO.getNbsNoteDTColl()!=null && pamProxyVO.getNbsNoteDTColl().size()>0){ + if (pamProxyVO.isUnsavedNote() && pamProxyVO.getNbsNoteDTColl() != null && pamProxyVO.getNbsNoteDTColl().size() > 0) { nbsNoteRepositoryUtil.storeNotes(actualUid, pamProxyVO.getNbsNoteDTColl()); } // this collection should only be populated in edit scenario, xz defect 11861 (10/01/04) if (pamProxyVO.getTheNotificationSummaryVOCollection() != null) { - Collection notSumVOColl = pamProxyVO.getTheNotificationSummaryVOCollection(); + Collection notSumVOColl = pamProxyVO.getTheNotificationSummaryVOCollection(); for (Object o : notSumVOColl) { NotificationSummaryContainer notSummaryVO = (NotificationSummaryContainer) o; // Only handles notifications that are not history and not in auto-resend status. @@ -324,15 +311,14 @@ else if (personVO.getThePersonDto().getCd().equals( Long docUid = null; if (pamProxyVO.getPublicHealthCaseContainer() != null && pamProxyVO.getPublicHealthCaseContainer() .getTheActRelationshipDTCollection() != null) { - Iterator anIteratorAct = null; + Iterator anIteratorAct = null; for (anIteratorAct = pamProxyVO.getPublicHealthCaseContainer() .getTheActRelationshipDTCollection().iterator(); anIteratorAct - .hasNext();) { + .hasNext(); ) { ActRelationshipDto actRelationshipDT = anIteratorAct .next(); - if(actRelationshipDT.getTypeCd() != null && actRelationshipDT.getTypeCd().equals(NEDSSConstant.DocToPHC)) - { - docUid = actRelationshipDT.getSourceActUid(); + if (actRelationshipDT.getTypeCd() != null && actRelationshipDT.getTypeCd().equals(NEDSSConstant.DocToPHC)) { + docUid = actRelationshipDT.getSourceActUid(); } if (actRelationshipDT.isItDelete()) { actRelationshipRepositoryUtil.insertActRelationshipHist(actRelationshipDT); @@ -345,19 +331,19 @@ else if (personVO.getThePersonDto().getCd().equals( * Updating the Document table */ //Getting the DocumentEJB reference - if(docUid != null){ - try{ + if (docUid != null) { + try { //TODO: NBS DOCUMENT, not relevant for ELR - }catch(Exception e){ - throw new DataProcessingException(e.getMessage(),e); + } catch (Exception e) { + throw new DataProcessingException(e.getMessage(), e); } } - Iterator anIteratorPat; + Iterator anIteratorPat; if (pamProxyVO.getTheParticipationDTCollection() != null) { for (anIteratorPat = pamProxyVO.getTheParticipationDTCollection().iterator(); anIteratorPat - .hasNext();) { + .hasNext(); ) { ParticipationDto participationDT = anIteratorPat .next(); if (participationDT.isItDelete()) { @@ -380,12 +366,10 @@ else if (personVO.getThePersonDto().getCd().equals( // logger.debug("the actual Uid for PamProxy Publichealthcase is " // + actualUid); } catch (Exception e) { - throw new DataProcessingException(e.getMessage(),e); + throw new DataProcessingException(e.getMessage(), e); } return actualUid; } - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/participation/ParticipationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/participation/ParticipationService.java index 645a39878..7e1f3a974 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/participation/ParticipationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/participation/ParticipationService.java @@ -37,7 +37,7 @@ public void saveParticipationHist(ParticipationDto participationDto) throws Data var res = participationHistRepository.findVerNumberByKey(participationDto.getSubjectEntityUid(), participationDto.getActUid(), participationDto.getTypeCd()); Integer ver = 1; if (res.isPresent()) { - if(!res.get().isEmpty()) { + if (!res.get().isEmpty()) { ver = Collections.max(res.get()); } } @@ -60,6 +60,7 @@ public void saveParticipation(ParticipationDto participationDto) throws DataProc deleteParticipationByPk(participationDto.getSubjectEntityUid(), participationDto.getActUid(), participationDto.getActClassCd()); } } + private void persistingParticipation(ParticipationDto participationDto) throws DataProcessingException { if (participationDto.getSubjectEntityUid() != null && participationDto.getActUid() != null) { try { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/NokMatchingService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/NokMatchingService.java index e87a71214..7d9c10c62 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/NokMatchingService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/NokMatchingService.java @@ -23,7 +23,7 @@ import java.util.List; @Service -public class NokMatchingService extends NokMatchingBaseService implements INokMatchingService { +public class NokMatchingService extends NokMatchingBaseService implements INokMatchingService { private static final Logger logger = LoggerFactory.getLogger(NokMatchingService.class); public NokMatchingService( @@ -65,11 +65,7 @@ public EdxPatientMatchDto getMatchingNextOfKin(PersonContainer personContainer) } // Try to get the Next of Kin matching with the match string edxPatientMatchFoundDT = getEdxPatientMatchRepositoryUtil().getEdxPatientMatchOnMatchString(edxPatientFoundDT.getTypeCd(), nameAddStrSt1); - if (edxPatientMatchFoundDT.getPatientUid() == null || (edxPatientMatchFoundDT.getPatientUid() != null && edxPatientMatchFoundDT.getPatientUid() <= 0)) { - matchFound = false; - } else { - matchFound = true; - } + matchFound = edxPatientMatchFoundDT.getPatientUid() != null && (edxPatientMatchFoundDT.getPatientUid() == null || edxPatientMatchFoundDT.getPatientUid() > 0); } catch (Exception ex) { logger.error("Error in geting the matching Next of Kin"); throw new DataProcessingException("Error in geting the matching Next of Kin" + ex.getMessage(), ex); @@ -96,11 +92,7 @@ public EdxPatientMatchDto getMatchingNextOfKin(PersonContainer personContainer) edxPatientFoundDT.setMatchStringHashCode((long) (nameTelePhonehshCd)); // Try to get the matching with the match string edxPatientMatchFoundDT = getEdxPatientMatchRepositoryUtil().getEdxPatientMatchOnMatchString(edxPatientFoundDT.getTypeCd(), nameTelePhone); - if (edxPatientMatchFoundDT.getPatientUid() == null || edxPatientMatchFoundDT.getPatientUid() <= 0) { - matchFound = false; - } else { - matchFound = true; - } + matchFound = edxPatientMatchFoundDT.getPatientUid() != null && edxPatientMatchFoundDT.getPatientUid() > 0; } catch (Exception ex) { logger.error("Error in geting the matching Patient"); throw new DataProcessingException("Error in geting the matching Patient" + ex.getMessage(), ex); @@ -123,7 +115,7 @@ public EdxPatientMatchDto getMatchingNextOfKin(PersonContainer personContainer) personContainer.setTheEntityIdDtoCollection(newEntityIdDtoColl); } try { - if (personContainer.getThePersonDto().getCd()!=null && personContainer.getThePersonDto().getCd().equals(NEDSSConstant.PAT)) { // Patient + if (personContainer.getThePersonDto().getCd() != null && personContainer.getThePersonDto().getCd().equals(NEDSSConstant.PAT)) { // Patient patientPersonUid = setAndCreateNewPerson(personContainer); personContainer.getThePersonDto().setPersonParentUid(patientPersonUid.getPersonParentId()); personContainer.getThePersonDto().setLocalId(patientPersonUid.getLocalId()); @@ -137,8 +129,7 @@ public EdxPatientMatchDto getMatchingNextOfKin(PersonContainer personContainer) throw new DataProcessingException("Error in getting the entity Controller or Setting the Patient" + e.getMessage(), e); } personContainer.setPatientMatchedFound(false); - } - else { + } else { personContainer.setPatientMatchedFound(true); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/PatientMatchingService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/PatientMatchingService.java index 655fe9636..11c4c2ed8 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/PatientMatchingService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/PatientMatchingService.java @@ -64,11 +64,10 @@ public EdxPatientMatchDto getMatchingPatient(PersonContainer personContainer) th // Try to get the matching with the match string // (was hash code but hash code had dups on rare occasions) edxPatientMatchFoundDT = getEdxPatientMatchRepositoryUtil().getEdxPatientMatchOnMatchString(cd, localId); - if (edxPatientMatchFoundDT != null && edxPatientMatchFoundDT.isMultipleMatch()){ + if (edxPatientMatchFoundDT != null && edxPatientMatchFoundDT.isMultipleMatch()) { multipleMatchFound = true; matchFound = false; - } - else if (edxPatientMatchFoundDT != null && edxPatientMatchFoundDT.getPatientUid() != null) { + } else if (edxPatientMatchFoundDT != null && edxPatientMatchFoundDT.getPatientUid() != null) { matchFound = true; } } catch (Exception ex) { @@ -136,14 +135,10 @@ else if (edxPatientMatchFoundDT != null && edxPatientMatchFoundDT.getPatientUid( edxPatientFoundDT.setMatchStringHashCode((long) namesdobcursexStrhshCd); } edxPatientMatchFoundDT = getEdxPatientMatchRepositoryUtil().getEdxPatientMatchOnMatchString(cd, namesdobcursexStr); - if (edxPatientMatchFoundDT.isMultipleMatch()){ + if (edxPatientMatchFoundDT.isMultipleMatch()) { multipleMatchFound = true; matchFound = false; - } else if (edxPatientMatchFoundDT.getPatientUid() == null || (edxPatientMatchFoundDT.getPatientUid() != null && edxPatientMatchFoundDT.getPatientUid() <= 0)) { - matchFound = false; - } else { - matchFound = true; - } + } else matchFound = edxPatientMatchFoundDT.getPatientUid() != null && (edxPatientMatchFoundDT.getPatientUid() == null || edxPatientMatchFoundDT.getPatientUid() > 0); } catch (Exception ex) { logger.error("Error in geting the matching Patient"); throw new DataProcessingException("Error in geting the matching Patient" + ex.getMessage(), ex); @@ -178,8 +173,7 @@ else if (edxPatientMatchFoundDT != null && edxPatientMatchFoundDT.getPatientUid( throw new DataProcessingException("Error in getting the entity Controller or Setting the Patient" + e.getMessage(), e); } personContainer.setPatientMatchedFound(false); - } - else { + } else { personContainer.setPatientMatchedFound(true); } @@ -239,13 +233,8 @@ public boolean getMultipleMatchFound() { @Transactional public Long updateExistingPerson(PersonContainer personContainer, String businessTriggerCd) throws DataProcessingException { - return updateExistingPerson(personContainer,businessTriggerCd, personContainer.getThePersonDto().getPersonParentUid()).getPersonId(); + return updateExistingPerson(personContainer, businessTriggerCd, personContainer.getThePersonDto().getPersonParentUid()).getPersonId(); } - - - - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/PersonService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/PersonService.java index ddc66da56..858b56140 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/PersonService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/PersonService.java @@ -32,6 +32,7 @@ public class PersonService implements IPersonService { private final INokMatchingService nokMatchingService; private final IProviderMatchingService providerMatchingService; private final IUidService uidService; + public PersonService( PatientMatchingService patientMatchingService, INokMatchingService nokMatchingService, @@ -75,10 +76,9 @@ public PersonContainer processingPatient(LabResultProxyContainer labResultProxyC personContainer.setRole(EdxELRConstant.ELR_PATIENT_CD); - if(edxLabInformationDto.getPatientUid()>0){ - personUid= edxLabInformationDto.getPatientUid(); - } - else{ + if (edxLabInformationDto.getPatientUid() > 0) { + personUid = edxLabInformationDto.getPatientUid(); + } else { //NOTE: Mathing Patient //NOTE: This matching also persist patient accordingly //NOTE: Either new or existing patient, it will be processed within this method @@ -99,10 +99,10 @@ public PersonContainer processingPatient(LabResultProxyContainer labResultProxyC edxLabInformationDto.setEntityName(firstName + " " + lastName); } - if(edxPatientMatchFoundDT!=null && !edxPatientMatchFoundDT.isMultipleMatch() && personContainer.getPatientMatchedFound()) { + if (edxPatientMatchFoundDT != null && !edxPatientMatchFoundDT.isMultipleMatch() && personContainer.getPatientMatchedFound()) { edxLabInformationDto.setPatientMatch(true); } - if(personContainer.getThePersonDto().getPersonParentUid()!=null){ + if (personContainer.getThePersonDto().getPersonParentUid() != null) { edxLabInformationDto.setPersonParentUid(personContainer.getThePersonDto().getPersonParentUid()); } @@ -131,18 +131,17 @@ public PersonContainer processingProvider(LabResultProxyContainer labResultProxy personUId = eDXActivityDetailLogDto.getRecordId(); if (personUId != null) { long uid = Long.parseLong(personUId); - uidService.setFalseToNewPersonAndOrganization(labResultProxyContainer, falseUid,uid); + uidService.setFalseToNewPersonAndOrganization(labResultProxyContainer, falseUid, uid); personContainer.setItNew(false); personContainer.setItDirty(false); personContainer.getThePersonDto().setItNew(false); personContainer.getThePersonDto().setItDirty(false); } - if (orderingProviderIndicator) - { + if (orderingProviderIndicator) { edxLabInformationDto.setProvider(true); return personContainer; } - orderingProviderIndicator= false; + orderingProviderIndicator = false; } catch (Exception e) { edxLabInformationDto.setProvider(false); @@ -164,7 +163,7 @@ private PersonNameDto parsingPersonName(PersonContainer personContainer) throws public Long getMatchedPersonUID(LabResultProxyContainer matchedlabResultProxyVO) { Long matchedPersonUid = null; Collection personCollection = matchedlabResultProxyVO.getThePersonContainerCollection(); - if(personCollection!=null){ + if (personCollection != null) { for (PersonContainer personVO : personCollection) { String perDomainCdStr = personVO.getThePersonDto().getCdDescTxt(); @@ -176,7 +175,7 @@ public Long getMatchedPersonUID(LabResultProxyContainer matchedlabResultProxyVO) return matchedPersonUid; } - public void updatePersonELRUpdate(LabResultProxyContainer labResultProxyVO, LabResultProxyContainer matchedLabResultProxyVO){ + public void updatePersonELRUpdate(LabResultProxyContainer labResultProxyVO, LabResultProxyContainer matchedLabResultProxyVO) { PersonDto matchedPersonDT; Long matchedPersonUid = null; Long matchedPersonParentUid = null; @@ -185,16 +184,16 @@ public void updatePersonELRUpdate(LabResultProxyContainer labResultProxyVO, LabR Collection updatedPersonNameCollection = new ArrayList<>(); Collection updatedPersonRaceCollection = new ArrayList<>(); Collection updatedPersonEthnicGroupCollection = new ArrayList<>(); - Collection updatedtheEntityLocatorParticipationDTCollection = new ArrayList<>(); + Collection updatedtheEntityLocatorParticipationDTCollection = new ArrayList<>(); Collection updatedtheEntityIdDTCollection = new ArrayList<>(); - HashMap hm = new HashMap<>(); - HashMap ethnicGroupHm = new HashMap<>(); - int nameSeq=0; - int entityIdSeq=0; + HashMap hm = new HashMap<>(); + HashMap ethnicGroupHm = new HashMap<>(); + int nameSeq = 0; + int entityIdSeq = 0; Collection personCollection = matchedLabResultProxyVO.getThePersonContainerCollection(); - if(personCollection!=null){ + if (personCollection != null) { for (PersonContainer personVO : personCollection) { String perDomainCdStr = personVO.getThePersonDto().getCdDescTxt(); if (perDomainCdStr != null && perDomainCdStr.equalsIgnoreCase(EdxELRConstant.ELR_PATIENT_DESC)) { @@ -227,8 +226,6 @@ public void updatePersonELRUpdate(LabResultProxyContainer labResultProxyVO, LabR } - - if (personVO.getThePersonEthnicGroupDtoCollection() != null && personVO.getThePersonEthnicGroupDtoCollection().size() > 0) { for (PersonEthnicGroupDto personEthnicGroupDT : personVO.getThePersonEthnicGroupDtoCollection()) { personEthnicGroupDT.setItDelete(true); @@ -278,7 +275,7 @@ public void updatePersonELRUpdate(LabResultProxyContainer labResultProxyVO, LabR } - if(labResultProxyVO.getThePersonContainerCollection()!=null){ + if (labResultProxyVO.getThePersonContainerCollection() != null) { for (PersonContainer personVO : labResultProxyVO.getThePersonContainerCollection()) { String perDomainCdStr = personVO.getThePersonDto().getCdDescTxt(); if (perDomainCdStr != null && perDomainCdStr.equalsIgnoreCase(EdxELRConstant.ELR_PATIENT_DESC)) { @@ -346,8 +343,8 @@ public void updatePersonELRUpdate(LabResultProxyContainer labResultProxyVO, LabR if (personVO.getThePersonRaceDtoCollection() == null - || (personVO.getThePersonRaceDtoCollection() != null - && personVO.getThePersonRaceDtoCollection().size() == 0) + || (personVO.getThePersonRaceDtoCollection() != null + && personVO.getThePersonRaceDtoCollection().size() == 0) ) { personVO.setThePersonRaceDtoCollection(new ArrayList<>()); personVO.getThePersonRaceDtoCollection().addAll(updatedPersonRaceCollection); @@ -370,8 +367,8 @@ public void updatePersonELRUpdate(LabResultProxyContainer labResultProxyVO, LabR } if (personVO.getThePersonEthnicGroupDtoCollection() == null - || (personVO.getThePersonEthnicGroupDtoCollection() != null - && personVO.getThePersonEthnicGroupDtoCollection().size() == 0) + || (personVO.getThePersonEthnicGroupDtoCollection() != null + && personVO.getThePersonEthnicGroupDtoCollection().size() == 0) ) { personVO.setThePersonEthnicGroupDtoCollection(new ArrayList<>()); personVO.getThePersonEthnicGroupDtoCollection().addAll(updatedPersonEthnicGroupCollection); @@ -393,7 +390,7 @@ public void updatePersonELRUpdate(LabResultProxyContainer labResultProxyVO, LabR var cloneEntityLocatorForParentUid = new ArrayList(); if (personVO.getTheEntityLocatorParticipationDtoCollection() != null - && personVO.getTheEntityLocatorParticipationDtoCollection().size() > 0 + && personVO.getTheEntityLocatorParticipationDtoCollection().size() > 0 ) { for (EntityLocatorParticipationDto entityLocPartDT : personVO.getTheEntityLocatorParticipationDtoCollection()) { entityLocPartDT.setItNew(true); @@ -418,7 +415,7 @@ public void updatePersonELRUpdate(LabResultProxyContainer labResultProxyVO, LabR } if (!Objects.equals(matchedPersonParentUid, matchedPersonUid)) { - var mprRecord = SerializationUtils.clone(entityLocPartDT); + var mprRecord = SerializationUtils.clone(entityLocPartDT); mprRecord.setEntityUid(matchedPersonParentUid); cloneEntityLocatorForParentUid.add(mprRecord); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/ProviderMatchingService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/ProviderMatchingService.java index 2165c3c3a..443ff6aba 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/ProviderMatchingService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/ProviderMatchingService.java @@ -35,6 +35,7 @@ public ProviderMatchingService( PrepareAssocModelHelper prepareAssocModelHelper) { super(edxPatientMatchRepositoryUtil, entityHelper, patientRepositoryUtil, cachingValueService, prepareAssocModelHelper); } + @Transactional public EDXActivityDetailLogDto getMatchingProvider(PersonContainer personContainer) throws DataProcessingException { Long entityUid = personContainer.getThePersonDto().getPersonUid(); @@ -72,13 +73,13 @@ public EDXActivityDetailLogDto getMatchingProvider(PersonContainer personContain theEdxEntityMatchDto = new EdxEntityMatchDto(); theEdxEntityMatchDto.setTypeCd(NEDSSConstant.PRV); theEdxEntityMatchDto.setMatchString(localId); - theEdxEntityMatchDto.setMatchStringHashCode((long)localIdhshCd); + theEdxEntityMatchDto.setMatchStringHashCode((long) localIdhshCd); } // Matching the Identifier (i.e. NPI) String identifier; int identifierHshCd = 0; - List identifierList ; + List identifierList; identifierList = getIdentifier(personContainer); if (identifierList != null && !identifierList.isEmpty()) { for (Object o : identifierList) { @@ -200,7 +201,7 @@ public EDXActivityDetailLogDto getMatchingProvider(PersonContainer personContain edxEntityMatchDto.setEntityUid(entityUid); edxEntityMatchDto.setTypeCd(NEDSSConstant.PRV); edxEntityMatchDto.setMatchString(nameAddStrSt1); - edxEntityMatchDto.setMatchStringHashCode((long)nameAddStrSt1hshCd); + edxEntityMatchDto.setMatchStringHashCode((long) nameAddStrSt1hshCd); try { if (personContainer.getRole() == null) { getEdxPatientMatchRepositoryUtil().saveEdxEntityMatch(edxEntityMatchDto); @@ -218,7 +219,7 @@ public EDXActivityDetailLogDto getMatchingProvider(PersonContainer personContain edxEntityMatchDto.setEntityUid(entityUid); edxEntityMatchDto.setTypeCd(NEDSSConstant.PRV); edxEntityMatchDto.setMatchString(nameTelePhone); - edxEntityMatchDto.setMatchStringHashCode((long)(nameTelePhonehshCd)); + edxEntityMatchDto.setMatchStringHashCode((long) (nameTelePhonehshCd)); try { if (personContainer.getRole() == null) { getEdxPatientMatchRepositoryUtil().saveEdxEntityMatch(edxEntityMatchDto); @@ -227,8 +228,7 @@ public EDXActivityDetailLogDto getMatchingProvider(PersonContainer personContain throw new DataProcessingException(e.getMessage(), e); } } - if (theEdxEntityMatchDto != null) - { + if (theEdxEntityMatchDto != null) { coll.add(theEdxEntityMatchDto); } if (coll != null) { @@ -250,7 +250,7 @@ public EDXActivityDetailLogDto getMatchingProvider(PersonContainer personContain public Long setProvider(PersonContainer personContainer, String businessTriggerCd) throws DataProcessingException { - return processingProvider(personContainer, "", businessTriggerCd) ; + return processingProvider(personContainer, "", businessTriggerCd); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/base/MatchingBaseService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/base/MatchingBaseService.java index 62a8ee90c..53649a4d2 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/base/MatchingBaseService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/base/MatchingBaseService.java @@ -23,7 +23,7 @@ @Getter @Service -public class MatchingBaseService { +public class MatchingBaseService { private static final Logger logger = LoggerFactory.getLogger(MatchingBaseService.class); private final EdxPatientMatchRepositoryUtil edxPatientMatchRepositoryUtil; @@ -58,11 +58,10 @@ protected List getIdentifier(PersonContainer personContainer) throws Dat String carrot = "^"; List returnList; List identifierList = new ArrayList<>(); - String identifier ; - try{ + String identifier; + try { if (personContainer.getTheEntityIdDtoCollection() != null - && !personContainer.getTheEntityIdDtoCollection().isEmpty()) - { + && !personContainer.getTheEntityIdDtoCollection().isEmpty()) { Collection entityIdDtoColl = personContainer.getTheEntityIdDtoCollection(); for (EntityIdDto idDto : entityIdDtoColl) { identifier = null; @@ -125,9 +124,8 @@ protected List getIdentifier(PersonContainer personContainer) throws Dat } } HashSet hashSet = new HashSet<>(identifierList); - returnList = new ArrayList<>(hashSet) ; - } - catch (Exception ex) { + returnList = new ArrayList<>(hashSet); + } catch (Exception ex) { String errorMessage = "Exception while creating hashcode for patient entity IDs . "; logger.debug(ex.getMessage() + errorMessage); throw new DataProcessingException(errorMessage, ex); @@ -137,34 +135,27 @@ protected List getIdentifier(PersonContainer personContainer) throws Dat protected String getNamesStr(PersonContainer personContainer) { String namesStr = null; - if (personContainer.getThePersonDto() != null) - { + if (personContainer.getThePersonDto() != null) { PersonDto personDto = personContainer.getThePersonDto(); if (personDto.getCd() != null - && personDto.getCd().equals(NEDSSConstant.PAT)) - { + && personDto.getCd().equals(NEDSSConstant.PAT)) { if (personContainer.getThePersonNameDtoCollection() != null - && !personContainer.getThePersonNameDtoCollection().isEmpty()) - { + && !personContainer.getThePersonNameDtoCollection().isEmpty()) { Collection personNameDtoColl = personContainer.getThePersonNameDtoCollection(); Iterator personNameIterator = personNameDtoColl.iterator(); Timestamp asofDate = null; - while (personNameIterator.hasNext()) - { + while (personNameIterator.hasNext()) { PersonNameDto personNameDto = personNameIterator.next(); if (personNameDto.getNmUseCd() != null && personNameDto.getNmUseCd().equalsIgnoreCase("L") && personNameDto.getRecordStatusCd() != null - && personNameDto.getRecordStatusCd().equals(NEDSSConstant.RECORD_STATUS_ACTIVE)) - { + && personNameDto.getRecordStatusCd().equals(NEDSSConstant.RECORD_STATUS_ACTIVE)) { // These condition check was how it originally designed in legacy // The way I see it is the second conditional check would never be reached if (asofDate == null || (asofDate.getTime() < personNameDto.getAsOfDate().getTime())) // NOSONAR { namesStr = processingPersonNameBasedOnAsOfDate(personNameDto, namesStr, asofDate); // NOSONAR - } - else if (asofDate.before(personNameDto.getAsOfDate())) - { + } else if (asofDate.before(personNameDto.getAsOfDate())) { namesStr = processingPersonNameBasedOnAsOfDate(personNameDto, namesStr, asofDate); // NOSONAR } } @@ -183,8 +174,7 @@ protected String processingPersonNameBasedOnAsOfDate(PersonNameDto personNameDto if ((personNameDto.getLastNm() != null) && (!personNameDto.getLastNm().trim().equals("")) && (personNameDto.getFirstNm() != null) - && (!personNameDto.getFirstNm().trim().equals(""))) - { + && (!personNameDto.getFirstNm().trim().equals(""))) { namesStr = personNameDto.getLastNm() + caret + personNameDto.getFirstNm(); asofDate = personNameDto.getAsOfDate(); // NOSONAR } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/base/PatientMatchingBaseService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/base/PatientMatchingBaseService.java index 002c5f03f..b7a61746a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/base/PatientMatchingBaseService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/base/PatientMatchingBaseService.java @@ -34,7 +34,7 @@ import java.util.*; @Service -public class PatientMatchingBaseService extends MatchingBaseService{ +public class PatientMatchingBaseService extends MatchingBaseService { private static final Logger logger = LoggerFactory.getLogger(PatientMatchingBaseService.class); public PatientMatchingBaseService( @@ -62,16 +62,14 @@ public Long setPatientRevision(PersonContainer personVO, String businessTriggerC mprPersonVO.getThePersonDto().setAsOfDateAdmin(null); mprPersonVO.getThePersonDto().setAgeReported(null); mprPersonVO.getThePersonDto().setAgeReportedUnitCd(null); - } - else { + } else { if (businessTriggerCd != null && (businessTriggerCd.equals("PAT_CR") || businessTriggerCd .equals("PAT_EDIT"))) { this.updateWithRevision(personVO, personType); } - if (personVO.getThePersonDto().getLocalId() == null || personVO.getThePersonDto().getLocalId().trim().length() == 0) - { + if (personVO.getThePersonDto().getLocalId() == null || personVO.getThePersonDto().getLocalId().trim().length() == 0) { mprPersonUid = personVO.getThePersonDto().getPersonParentUid(); mprPersonVO = getPatientRepositoryUtil().loadPerson(mprPersonUid); personVO.getThePersonDto().setLocalId(mprPersonVO.getThePersonDto().getLocalId()); @@ -110,14 +108,13 @@ private Long setPersonInternal(PersonContainer personVO, String businessObjLooku // changed as per shannon and chase, keep the temp localid and // set it back to personDT after prepareVOUtils - if (personVO.getThePersonDto().isItNew() && !(businessObjLookupName.equalsIgnoreCase(NEDSSConstant.businessObjLookupNamePROVIDER))) - { + if (personVO.getThePersonDto().isItNew() && !(businessObjLookupName.equalsIgnoreCase(NEDSSConstant.businessObjLookupNamePROVIDER))) { localId = personVO.getThePersonDto().getLocalId(); } - if(localId==null){ + if (localId == null) { personVO.getThePersonDto().setEdxInd("Y"); - isELRCase= true; + isELRCase = true; } RootDtoInterface personDT = getPrepareAssocModelHelper().prepareVO( @@ -126,8 +123,7 @@ private Long setPersonInternal(PersonContainer personVO, String businessObjLooku if (personVO.getThePersonDto().isItNew() && !(businessObjLookupName - .equalsIgnoreCase(NEDSSConstant.businessObjLookupNamePROVIDER))) - { + .equalsIgnoreCase(NEDSSConstant.businessObjLookupNamePROVIDER))) { personDT.setLocalId(localId); } @@ -160,7 +156,7 @@ private Long setPersonInternal(PersonContainer personVO, String businessObjLooku if (personVO.isItNew()) { - var res = getPatientRepositoryUtil().createPerson(personVO); + var res = getPatientRepositoryUtil().createPerson(personVO); personUID = res.getPersonUid(); logger.debug(" EntityControllerEJB.setProvider() Person Created"); } else { @@ -169,14 +165,11 @@ private Long setPersonInternal(PersonContainer personVO, String businessObjLooku .getPersonUid(); logger.debug(" EntityControllerEJB.setProvider() Person Updated"); } - if(isELRCase && personType.equals(NEDSSConstant.PAT)) - { + if (isELRCase && personType.equals(NEDSSConstant.PAT)) { personVO.getThePersonDto().setPersonUid(personUID); personVO.getThePersonDto().setPersonParentUid(personUID); setPersonHashCdPatient(personVO); - } - else if (personType.equals(NEDSSConstant.NOK)) - { + } else if (personType.equals(NEDSSConstant.NOK)) { personVO.getThePersonDto().setPersonUid(personUID); personVO.getThePersonDto().setPersonParentUid(personUID); setPersonHashCdNok(personVO); @@ -187,26 +180,20 @@ else if (personType.equals(NEDSSConstant.NOK)) } - private boolean updateWithRevision(PersonContainer newRevision, String personType) throws DataProcessingException { Long mprUID = null; - if(newRevision == null) - { - throw new DataProcessingException("Please provide a not null person object, newRevision is: "+ newRevision); - } - else - { + if (newRevision == null) { + throw new DataProcessingException("Please provide a not null person object, newRevision is: " + newRevision); + } else { //Get the mpr uid PersonDto personDT = newRevision.getThePersonDto(); - if (personDT != null) - { + if (personDT != null) { mprUID = personDT.getPersonParentUid(); } } - if(mprUID == null && newRevision.getThePersonDto() != null) - { - throw new DataProcessingException("A person parent uid expected for this person uid: "+ newRevision.getThePersonDto().getPersonUid()); + if (mprUID == null && newRevision.getThePersonDto() != null) { + throw new DataProcessingException("A person parent uid expected for this person uid: " + newRevision.getThePersonDto().getPersonUid()); } //Retrieve a mpr with the mprUID @@ -214,43 +201,38 @@ private boolean updateWithRevision(PersonContainer newRevision, String personTyp logger.debug("mpr is: " + mpr); - if(mpr != null) //With the MPR, update... + if (mpr != null) //With the MPR, update... { mpr.setMPRUpdateValid(newRevision.isMPRUpdateValid()); //localId need to be same for MPR and Revision and it need to be set at backend newRevision.getThePersonDto().setLocalId(mpr.getThePersonDto().getLocalId()); return update(mpr, newRevision, personType); - } - else //No MPR. + } else //No MPR. { - throw new DataProcessingException("Cannot get a mpr for this person parent uid: "+ mprUID); + throw new DataProcessingException("Cannot get a mpr for this person parent uid: " + mprUID); } } //Updates the mpr, based on the new revision, using the default handler private boolean update(PersonContainer mpr, PersonContainer newRevision, String personType) - throws DataProcessingException - { - Collection aNewRevisionList = new ArrayList<> (); + throws DataProcessingException { + Collection aNewRevisionList = new ArrayList<>(); aNewRevisionList.add(newRevision); MPRUpdateContainer mprUpdateVO = new MPRUpdateContainer(mpr, aNewRevisionList); - if(process(mprUpdateVO)) - { + if (process(mprUpdateVO)) { return saveMPR(mpr, personType); - } - else - { + } else { return false; } } + private boolean saveMPR(PersonContainer mpr, String personType) throws DataProcessingException { return storeMPR(mpr, NEDSSConstant.PAT_EDIT, personType); } - private boolean storeMPR(PersonContainer mpr, String businessTriggerCd, String personType) throws DataProcessingException - { + private boolean storeMPR(PersonContainer mpr, String businessTriggerCd, String personType) throws DataProcessingException { return setMPR(mpr, businessTriggerCd, personType) != null; } @@ -258,11 +240,11 @@ private Long setMPR(PersonContainer personVO, String businessTriggerCd, String p DataProcessingException { Long personUID = null; personVO.getThePersonDto().setEdxInd(NEDSSConstant.EDX_IND); - if(personVO.isExt()){ + if (personVO.isExt()) { personVO.setItNew(false); personVO.setItDirty(false); - if(personVO.isExt()){ - if(personVO.getThePersonNameDtoCollection()!=null){ + if (personVO.isExt()) { + if (personVO.getThePersonNameDtoCollection() != null) { Collection coll = personVO.getThePersonNameDtoCollection(); for (PersonNameDto personNameDT : coll) { personNameDT.setItDirty(true); @@ -273,10 +255,10 @@ private Long setMPR(PersonContainer personVO, String businessTriggerCd, String p } } } - if(personVO.isMPRUpdateValid()){ + if (personVO.isMPRUpdateValid()) { personUID = this.setPersonInternal(personVO, NBSBOLookup.PATIENT, businessTriggerCd, personType); - if(personVO.getThePersonDto().getPersonParentUid()==null) + if (personVO.getThePersonDto().getPersonParentUid() == null) personVO.getThePersonDto().setPersonParentUid(personUID); { setPersonHashCdPatient(personVO); @@ -287,28 +269,25 @@ private Long setMPR(PersonContainer personVO, String businessTriggerCd, String p } - protected boolean process(MPRUpdateContainer mprUpdateVO) - { - PersonContainer mpr = mprUpdateVO.getMpr(); - Collection col = mpr.getTheEntityLocatorParticipationDtoCollection(); - if(col!=null && col.size()>0) - { - for (EntityLocatorParticipationDto entityLocatorParticipationDT : col) { - if ((entityLocatorParticipationDT.getThePhysicalLocatorDto() != null + protected boolean process(MPRUpdateContainer mprUpdateVO) { + PersonContainer mpr = mprUpdateVO.getMpr(); + Collection col = mpr.getTheEntityLocatorParticipationDtoCollection(); + if (col != null && col.size() > 0) { + for (EntityLocatorParticipationDto entityLocatorParticipationDT : col) { + if ((entityLocatorParticipationDT.getThePhysicalLocatorDto() != null && entityLocatorParticipationDT.getThePhysicalLocatorDto().isItDirty()) - || (entityLocatorParticipationDT.getTheTeleLocatorDto() != null - && entityLocatorParticipationDT.getTheTeleLocatorDto().isItDirty()) - || (entityLocatorParticipationDT.getThePostalLocatorDto() != null - && entityLocatorParticipationDT.getThePostalLocatorDto().isItDirty())) - { - entityLocatorParticipationDT.setItDirty(true); - } + || (entityLocatorParticipationDT.getTheTeleLocatorDto() != null + && entityLocatorParticipationDT.getTheTeleLocatorDto().isItDirty()) + || (entityLocatorParticipationDT.getThePostalLocatorDto() != null + && entityLocatorParticipationDT.getThePostalLocatorDto().isItDirty())) { + entityLocatorParticipationDT.setItDirty(true); } } - mpr.setItDelete(false); - mpr.setItNew(false); - mpr.setItDirty(true); - mpr.getThePersonDto().setItDirty(true); + } + mpr.setItDelete(false); + mpr.setItNew(false); + mpr.setItDirty(true); + mpr.getThePersonDto().setItDirty(true); return true; } @@ -323,9 +302,7 @@ private PersonContainer cloneVO(PersonContainer personVO) ObjectInputStream ois = new ObjectInputStream(bais); Object clonePersonVO = ois.readObject(); return (PersonContainer) clonePersonVO; - } - catch (Exception e) - { + } catch (Exception e) { throw new DataProcessingException(e.getMessage(), e); } } @@ -336,7 +313,7 @@ protected PersonId updateExistingPerson(PersonContainer personContainer, String PersonContainer personObj = personContainer.deepClone(); if (businessTriggerCd != null && (businessTriggerCd.equals("PAT_CR") - || businessTriggerCd.equals("PAT_EDIT")) + || businessTriggerCd.equals("PAT_EDIT")) ) { personId = getPersonInternalAddressingRevisionAndMpr(personParentUid); personObj.setMPRUpdateValid(true); @@ -356,27 +333,22 @@ protected String getLNmFnmDobCurSexStr(PersonContainer personContainer) { String carrot = "^"; if (personContainer.getThePersonDto() != null) { PersonDto personDto = personContainer.getThePersonDto(); - if (personDto.getCd() != null && personDto.getCd().equals(NEDSSConstant.PAT)) - { + if (personDto.getCd() != null && personDto.getCd().equals(NEDSSConstant.PAT)) { if (personContainer.getThePersonNameDtoCollection() != null - && !personContainer.getThePersonNameDtoCollection().isEmpty()) - { + && !personContainer.getThePersonNameDtoCollection().isEmpty()) { Collection personNameDtoColl = personContainer.getThePersonNameDtoCollection(); Iterator personNameIterator = personNameDtoColl.iterator(); Timestamp asofDate = null; - while (personNameIterator.hasNext()) - { - PersonNameDto personNameDto = personNameIterator.next(); - if (personNameDto.getNmUseCd() == null) - { + while (personNameIterator.hasNext()) { + PersonNameDto personNameDto = personNameIterator.next(); + if (personNameDto.getNmUseCd() == null) { String Message = "personNameDT.getNmUseCd() is null"; logger.debug(Message); } if (personNameDto.getNmUseCd() != null && personNameDto.getNmUseCd().equalsIgnoreCase("L") && personNameDto.getRecordStatusCd() != null - && personNameDto.getRecordStatusCd().equals(NEDSSConstant.RECORD_STATUS_ACTIVE)) - { + && personNameDto.getRecordStatusCd().equals(NEDSSConstant.RECORD_STATUS_ACTIVE)) { if (asofDate == null || (asofDate.getTime() < personNameDto.getAsOfDate().getTime())) { if (personNameDto.getLastNm() != null @@ -386,8 +358,7 @@ protected String getLNmFnmDobCurSexStr(PersonContainer personContainer) { && personDto.getBirthTime() != null && personDto.getCurrSexCd() != null && !personDto.getCurrSexCd().trim().equals("") - ) - { + ) { namedobcursexStr = personNameDto.getLastNm() + carrot + personNameDto.getFirstNm() @@ -395,11 +366,9 @@ protected String getLNmFnmDobCurSexStr(PersonContainer personContainer) { + carrot + personDto.getCurrSexCd(); asofDate = personNameDto.getAsOfDate(); } - } - else if (asofDate.before(personNameDto.getAsOfDate())) - { + } else if (asofDate.before(personNameDto.getAsOfDate())) { namedobcursexStr = processingPersonName(personNameDto, personDto, - asofDate, namedobcursexStr); + asofDate, namedobcursexStr); } } @@ -411,7 +380,7 @@ else if (asofDate.before(personNameDto.getAsOfDate())) } protected String processingPersonName(PersonNameDto personNameDto, PersonDto personDto, - Timestamp asofDate, String namedobcursexStr) { + Timestamp asofDate, String namedobcursexStr) { String caret = "^"; if (personNameDto.getLastNm() != null && !personNameDto.getLastNm().trim().equals("") @@ -420,8 +389,7 @@ protected String processingPersonName(PersonNameDto personNameDto, PersonDto per && personDto.getBirthTime() != null && personDto.getCurrSexCd() != null && !personDto.getCurrSexCd().trim().equals("") - ) - { + ) { namedobcursexStr = personNameDto.getLastNm() + caret + personNameDto.getFirstNm() @@ -439,20 +407,20 @@ protected void setPersonHashCdPatient(PersonContainer personContainer) throws Da long personUid = personContainer.getThePersonDto().getPersonParentUid(); getEdxPatientMatchRepositoryUtil().deleteEdxPatientMatchDTColl(personUid); try { - if(personContainer.getThePersonDto().getRecordStatusCd().equalsIgnoreCase(NEDSSConstant.RECORD_STATUS_ACTIVE)) - { + if (personContainer.getThePersonDto().getRecordStatusCd().equalsIgnoreCase(NEDSSConstant.RECORD_STATUS_ACTIVE)) { personContainer.getThePersonDto().setPersonUid(personUid); setPersonToMatchEntityPatient(personContainer); } } catch (Exception e) { - logger.warn("Unable to setPatientHashCd for personUid: "+personUid); - logger.warn("Exception in setPatientToEntityMatch -> unhandled exception: " +e.getMessage()); + logger.warn("Unable to setPatientHashCd for personUid: " + personUid); + logger.warn("Exception in setPatientToEntityMatch -> unhandled exception: " + e.getMessage()); } } catch (Exception e) { logger.error("EntityControllerEJB.setPatientHashCd: " + e.getMessage(), e); throw new DataProcessingException(e.getMessage(), e); } } + protected PersonId setAndCreateNewPerson(PersonContainer psn) throws DataProcessingException { PersonId personUID = new PersonId(); PersonContainer personContainer = psn.deepClone(); @@ -490,8 +458,7 @@ private PersonId getPersonInternalAddressingRevisionAndMpr(Long personUID) throw PersonId personId; try { List personList = new ArrayList<>(); - if (personUID != null) - { + if (personUID != null) { personList = getPatientRepositoryUtil().findPersonByParentUid(personUID); personList.sort((p1, p2) -> Long.compare(p2.getPersonUid(), p1.getPersonUid())); } @@ -501,7 +468,7 @@ private PersonId getPersonInternalAddressingRevisionAndMpr(Long personUID) throw Person mpr = null; Person revision = null; - for(var item : personList) { + for (var item : personList) { if (Objects.equals(item.getPersonUid(), personUID)) { mpr = item; personList.remove(item); @@ -513,14 +480,12 @@ private PersonId getPersonInternalAddressingRevisionAndMpr(Long personUID) throw revision = personList.get(0); } - if (mpr != null) - { + if (mpr != null) { personId = new PersonId(); personId.setPersonParentId(mpr.getPersonParentUid()); personId.setPersonId(mpr.getPersonUid()); personId.setLocalId(mpr.getLocalId()); - } - else { + } else { throw new DataProcessingException("Existing Patient Not Found"); } @@ -535,6 +500,7 @@ private PersonId getPersonInternalAddressingRevisionAndMpr(Long personUID) throw } return personId; } + private void prepUpdatingExistingPerson(PersonContainer personContainer) throws DataProcessingException { PersonDto personDto = personContainer.getThePersonDto(); @@ -566,24 +532,22 @@ private void prepUpdatingExistingPerson(PersonContainer personContainer) throws getPatientRepositoryUtil().updateExistingPerson(personContainer); } + @SuppressWarnings("java:S3776") - protected void setPersonToMatchEntityPatient(PersonContainer personContainer) throws DataProcessingException { + protected void setPersonToMatchEntityPatient(PersonContainer personContainer) throws DataProcessingException { Long patientUid = personContainer.getThePersonDto().getPersonUid(); EdxPatientMatchDto edxPatientMatchDto; String cdDescTxt = personContainer.thePersonDto.getCdDescTxt(); if (cdDescTxt == null || cdDescTxt.equalsIgnoreCase("") || !cdDescTxt.equalsIgnoreCase(EdxELRConstant.ELR_NOK_DESC) - ) - { + ) { String identifierStr; int identifierStrhshCd = 0; List identifierStrList = getIdentifier(personContainer); - if (identifierStrList != null && !identifierStrList.isEmpty()) - { - for (String s : identifierStrList) - { - identifierStr = s; + if (identifierStrList != null && !identifierStrList.isEmpty()) { + for (String s : identifierStrList) { + identifierStr = s; if (identifierStr != null) { identifierStr = identifierStr.toUpperCase(); identifierStrhshCd = identifierStr.hashCode(); @@ -640,7 +604,7 @@ protected void setPersonHashCdNok(PersonContainer personContainer) throws DataPr long personUid = personContainer.getThePersonDto().getPersonParentUid(); getEdxPatientMatchRepositoryUtil().deleteEdxPatientMatchDTColl(personUid); try { - if(personContainer.getThePersonDto().getRecordStatusCd().equalsIgnoreCase(NEDSSConstant.RECORD_STATUS_ACTIVE)){ + if (personContainer.getThePersonDto().getRecordStatusCd().equalsIgnoreCase(NEDSSConstant.RECORD_STATUS_ACTIVE)) { personContainer.getThePersonDto().setPersonUid(personUid); setPersonToMatchEntityNok(personContainer); } @@ -658,7 +622,7 @@ protected void setPersonToMatchEntityNok(PersonContainer personContainer) throws EdxPatientMatchDto edxPatientMatchDto; String cdDescTxt = personContainer.thePersonDto.getCdDescTxt(); if (cdDescTxt != null && cdDescTxt.equalsIgnoreCase(EdxELRConstant.ELR_NOK_DESC)) { - String nameAddStrSt1 ; + String nameAddStrSt1; int nameAddStrSt1hshCd; List nameAddressStreetOneStrList = nameAddressStreetOneNOK(personContainer); if (nameAddressStreetOneStrList != null @@ -721,8 +685,7 @@ protected List nameAddressStreetOneNOK(PersonContainer personContainer) && entLocPartDT.getRecordStatusCd() != null && entLocPartDT.getRecordStatusCd().equalsIgnoreCase(NEDSSConstant.RECORD_STATUS_ACTIVE) && entLocPartDT.getClassCd().equals(NEDSSConstant.POSTAL) - && entLocPartDT.getCd() != null) - { + && entLocPartDT.getCd() != null) { PostalLocatorDto postLocDT = entLocPartDT.getThePostalLocatorDto(); if (postLocDT != null && (postLocDT.getStreetAddr1() != null @@ -732,15 +695,13 @@ protected List nameAddressStreetOneNOK(PersonContainer personContainer) && (postLocDT.getStateCd() != null && !postLocDT.getStateCd().equals("")) && (postLocDT.getZipCd() != null - && !postLocDT.getZipCd().equals(""))) - { + && !postLocDT.getZipCd().equals(""))) { nameAddStr = carrot + postLocDT.getStreetAddr1() + carrot + postLocDT.getCityDescTxt() + carrot + postLocDT.getStateCd() + carrot + postLocDT.getZipCd(); } } } - if (nameAddStr != null) - { + if (nameAddStr != null) { nameAddStr = getNamesStr(personContainer) + nameAddStr; } nameAddressStreetOnelNOKist.add(nameAddStr); @@ -781,7 +742,4 @@ protected List telePhoneTxtNOK(PersonContainer personContainer) { } - - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/base/ProviderMatchingBaseService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/base/ProviderMatchingBaseService.java index 77956d2d0..3290a68fe 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/base/ProviderMatchingBaseService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/person/base/ProviderMatchingBaseService.java @@ -27,7 +27,7 @@ import java.util.List; @Service -public class ProviderMatchingBaseService extends MatchingBaseService{ +public class ProviderMatchingBaseService extends MatchingBaseService { private static final Logger logger = LoggerFactory.getLogger(ProviderMatchingBaseService.class); public ProviderMatchingBaseService( @@ -56,12 +56,12 @@ protected String telePhoneTxtProvider(PersonContainer personContainer) { } } } - if (nameTeleStr != null) - { + if (nameTeleStr != null) { nameTeleStr = getNameStringForProvider(personContainer) + nameTeleStr; } return nameTeleStr; } + // Creating string for name and address for providers protected String nameAddressStreetOneProvider(PersonContainer personContainer) { String nameAddStr = null; @@ -95,17 +95,18 @@ protected String nameAddressStreetOneProvider(PersonContainer personContainer) { nameAddStr = getNameStringForProvider(personContainer) + nameAddStr; return nameAddStr; } + protected Long processingProvider(PersonContainer personContainer, String businessObjLookupName, String businessTriggerCd) throws DataProcessingException { try { - boolean callOrgHashCode= false; - if(personContainer.isItNew() && personContainer.getThePersonDto().isItNew() && personContainer.getThePersonDto().getElectronicInd().equalsIgnoreCase("Y") - && !personContainer.getThePersonDto().isCaseInd()){ - callOrgHashCode= true; + boolean callOrgHashCode = false; + if (personContainer.isItNew() && personContainer.getThePersonDto().isItNew() && personContainer.getThePersonDto().getElectronicInd().equalsIgnoreCase("Y") + && !personContainer.getThePersonDto().isCaseInd()) { + callOrgHashCode = true; personContainer.getThePersonDto().setEdxInd("Y"); } - long personUid= persistingProvider(personContainer, "PROVIDER", businessTriggerCd ); + long personUid = persistingProvider(personContainer, "PROVIDER", businessTriggerCd); - if(callOrgHashCode){ + if (callOrgHashCode) { try { personContainer.getThePersonDto().setPersonUid(personUid); /** @@ -113,8 +114,8 @@ protected Long processingProvider(PersonContainer personContainer, String busine * */ setProvidertoEntityMatch(personContainer); } catch (Exception e) { - logger.error("EntityControllerEJB.setProvider method exception thrown for matching criteria:"+e); - throw new DataProcessingException("EntityControllerEJB.setProvider method exception thrown for matching criteria:"+e); + logger.error("EntityControllerEJB.setProvider method exception thrown for matching criteria:" + e); + throw new DataProcessingException("EntityControllerEJB.setProvider method exception thrown for matching criteria:" + e); } } return personUid; @@ -122,9 +123,10 @@ protected Long processingProvider(PersonContainer personContainer, String busine throw new DataProcessingException(e.getMessage()); } } - protected Long persistingProvider(PersonContainer personContainer, String businessObjLookupName, String businessTriggerCd) throws DataProcessingException { - Long personUID ; - String localId ; + + protected Long persistingProvider(PersonContainer personContainer, String businessObjLookupName, String businessTriggerCd) throws DataProcessingException { + Long personUID; + String localId; boolean isELRCase = false; try { localId = personContainer.getThePersonDto().getLocalId(); @@ -133,9 +135,9 @@ protected Long persistingProvider(PersonContainer personContainer, String busine isELRCase = true; } - Collection collParLocator ; + Collection collParLocator; Collection colRole; - Collection colPar ; + Collection colPar; collParLocator = personContainer.getTheEntityLocatorParticipationDtoCollection(); @@ -160,8 +162,7 @@ protected Long persistingProvider(PersonContainer personContainer, String busine if (personContainer.isItNew()) { Person p = getPatientRepositoryUtil().createPerson(personContainer); personUID = p.getPersonUid(); - } - else { + } else { getPatientRepositoryUtil().updateExistingPerson(personContainer); personUID = personContainer.getThePersonDto().getPersonUid(); @@ -174,10 +175,11 @@ protected Long persistingProvider(PersonContainer personContainer, String busine return personUID; } + protected void setProvidertoEntityMatch(PersonContainer personContainer) throws Exception { Long entityUid = personContainer.getThePersonDto().getPersonUid(); - String identifier ; + String identifier; int identifierHshCd; List identifierList; identifierList = getIdentifierForProvider(personContainer); @@ -216,7 +218,7 @@ protected void setProvidertoEntityMatch(PersonContainer personContainer) throws } // Continue for name Telephone with no extension - String nameTelePhone ; + String nameTelePhone; int nameTelePhonehshCd = 0; nameTelePhone = telePhoneTxtProvider(personContainer); if (nameTelePhone != null) { @@ -231,7 +233,7 @@ protected void setProvidertoEntityMatch(PersonContainer personContainer) throws edxEntityMatchDto.setEntityUid(entityUid); edxEntityMatchDto.setTypeCd(NEDSSConstant.PRV); edxEntityMatchDto.setMatchString(nameAddStrSt1); - edxEntityMatchDto.setMatchStringHashCode((long)nameAddStrSt1hshCd); + edxEntityMatchDto.setMatchStringHashCode((long) nameAddStrSt1hshCd); try { getEdxPatientMatchRepositoryUtil().saveEdxEntityMatch(edxEntityMatchDto); } catch (Exception e) { @@ -246,7 +248,7 @@ protected void setProvidertoEntityMatch(PersonContainer personContainer) throws edxEntityMatchDto.setEntityUid(entityUid); edxEntityMatchDto.setTypeCd(NEDSSConstant.PRV); edxEntityMatchDto.setMatchString(nameTelePhone); - edxEntityMatchDto.setMatchStringHashCode((long)nameTelePhonehshCd); + edxEntityMatchDto.setMatchStringHashCode((long) nameTelePhonehshCd); try { getEdxPatientMatchRepositoryUtil().saveEdxEntityMatch(edxEntityMatchDto); } catch (Exception e) { @@ -258,13 +260,14 @@ protected void setProvidertoEntityMatch(PersonContainer personContainer) throws } } + @SuppressWarnings("java:S3776") protected List getIdentifierForProvider(PersonContainer personContainer) throws DataProcessingException { String carrot = "^"; List identifierList = new ArrayList<>(); String identifier = null; Collection newEntityIdDtoColl = new ArrayList<>(); - try{ + try { if (personContainer.getTheEntityIdDtoCollection() != null && !personContainer.getTheEntityIdDtoCollection().isEmpty()) { Collection entityIdDtoColl = personContainer.getTheEntityIdDtoCollection(); @@ -337,7 +340,7 @@ protected List getIdentifierForProvider(PersonContainer personContainer) } personContainer.setTheEntityIdDtoCollection(newEntityIdDtoColl); - }catch (Exception ex) { + } catch (Exception ex) { String errorMessage = "Exception while creating hashcode for Provider entity IDs . "; logger.debug(ex.getMessage() + errorMessage); throw new DataProcessingException(errorMessage, ex); @@ -345,6 +348,7 @@ protected List getIdentifierForProvider(PersonContainer personContainer) return identifierList; } + @SuppressWarnings("java:S3776") protected String getNameStringForProvider(PersonContainer personContainer) { String nameStr = null; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/ContactSummaryService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/ContactSummaryService.java index df4069af1..1be1e22d5 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/ContactSummaryService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/ContactSummaryService.java @@ -45,12 +45,11 @@ public Collection getContactListForInvestigation(Long publicHealthCaseUI } private Collection getPHCContactNamedByPatientSummDTColl(Long publicHealthCaseUID) { - String dataAccessWhereClause = queryHelper.getDataAccessWhereClause(NBSBOLookup.CT_CONTACT,"VIEW", ""); + String dataAccessWhereClause = queryHelper.getDataAccessWhereClause(NBSBOLookup.CT_CONTACT, "VIEW", ""); if (dataAccessWhereClause == null) { dataAccessWhereClause = ""; - } - else { + } else { dataAccessWhereClause = " AND " + dataAccessWhereClause; dataAccessWhereClause = dataAccessWhereClause.replaceAll("program_jurisdiction_oid", "CT_CONTACT.program_jurisdiction_oid"); dataAccessWhereClause = dataAccessWhereClause.replaceAll("shared_ind", "CT_CONTACT.shared_ind_cd"); @@ -60,15 +59,14 @@ private Collection getPHCContactNamedByPatientSummDTColl(Long publicHeal if (dataAccessWhereClause1 == null) { dataAccessWhereClause1 = ""; - } - else { + } else { dataAccessWhereClause1 = " AND " + dataAccessWhereClause1; dataAccessWhereClause1 = dataAccessWhereClause1.replaceAll("program_jurisdiction_oid", "contact.program_jurisdiction_oid"); dataAccessWhereClause1 = dataAccessWhereClause1.replaceAll("shared_ind", "contact.shared_ind"); } - Collection PHCcTContactNameByPatientSummDTColl; - String sql =SELECT_PHCPAT_NAMED_BY_PATIENT_COLLECTION1 + dataAccessWhereClause1 - + SELECT_PHCPAT_NAMED_BY_PATIENT_COLLECTION3 + publicHealthCaseUID+ dataAccessWhereClause; + Collection PHCcTContactNameByPatientSummDTColl; + String sql = SELECT_PHCPAT_NAMED_BY_PATIENT_COLLECTION1 + dataAccessWhereClause1 + + SELECT_PHCPAT_NAMED_BY_PATIENT_COLLECTION3 + publicHealthCaseUID + dataAccessWhereClause; PHCcTContactNameByPatientSummDTColl = getContactNamedByPatientDTColl(sql); return PHCcTContactNameByPatientSummDTColl; } @@ -77,8 +75,7 @@ private Collection getPHCPatientNamedAsContactSummDTColl(Long publicHeal String dataAccessWhereClause = queryHelper.getDataAccessWhereClause(NBSBOLookup.INVESTIGATION, "VIEW", ""); if (dataAccessWhereClause == null) { dataAccessWhereClause = ""; - } - else { + } else { dataAccessWhereClause = " AND " + dataAccessWhereClause; dataAccessWhereClause = dataAccessWhereClause.replaceAll("program_jurisdiction_oid", "subject.program_jurisdiction_oid"); dataAccessWhereClause = dataAccessWhereClause.replaceAll("shared_ind", "subject.shared_ind"); @@ -86,14 +83,13 @@ private Collection getPHCPatientNamedAsContactSummDTColl(Long publicHeal String dataAccessWhereClause1 = queryHelper.getDataAccessWhereClause(NBSBOLookup.CT_CONTACT, "VIEW", ""); if (dataAccessWhereClause1 == null) { dataAccessWhereClause1 = ""; - } - else { + } else { dataAccessWhereClause1 = " AND " + dataAccessWhereClause1; dataAccessWhereClause1 = dataAccessWhereClause1.replaceAll("program_jurisdiction_oid", "CT_CONTACT.program_jurisdiction_oid"); dataAccessWhereClause1 = dataAccessWhereClause1.replaceAll("shared_ind", "CT_CONTACT.shared_ind_cd"); } - Collection PHCcTContactNameByPatientSummDTColl; - String sql = SELECT_PHCPAT_NAMED_BY_CONTACT_COLLECTION +publicHealthCaseUID + Collection PHCcTContactNameByPatientSummDTColl; + String sql = SELECT_PHCPAT_NAMED_BY_CONTACT_COLLECTION + publicHealthCaseUID + dataAccessWhereClause + dataAccessWhereClause1; PHCcTContactNameByPatientSummDTColl = getPatientNamedAsContactSummDTColl(sql, false); return PHCcTContactNameByPatientSummDTColl; @@ -104,8 +100,7 @@ private Collection getPHCPatientOtherNamedAsContactSummDTColl(Long publi String dataAccessWhereClause = queryHelper.getDataAccessWhereClause(NBSBOLookup.INVESTIGATION, "VIEW", ""); if (dataAccessWhereClause == null) { dataAccessWhereClause = ""; - } - else { + } else { dataAccessWhereClause = " AND " + dataAccessWhereClause; dataAccessWhereClause = dataAccessWhereClause.replaceAll("program_jurisdiction_oid", "subject.program_jurisdiction_oid"); dataAccessWhereClause = dataAccessWhereClause.replaceAll("shared_ind", "subject.shared_ind"); @@ -114,25 +109,24 @@ private Collection getPHCPatientOtherNamedAsContactSummDTColl(Long publi if (dataAccessWhereClause1 == null) { dataAccessWhereClause1 = ""; - } - else { + } else { dataAccessWhereClause1 = " AND " + dataAccessWhereClause1; dataAccessWhereClause1 = dataAccessWhereClause1.replaceAll("program_jurisdiction_oid", "CT_CONTACT.program_jurisdiction_oid"); dataAccessWhereClause1 = dataAccessWhereClause1.replaceAll("shared_ind", "CT_CONTACT.shared_ind_cd"); } - Collection PHCcTContactNameByPatientSummDTColl; - String sql =SELECT_PHCPAT_OTHER_NAMED_BY_CONTACT_COLLECTION + publicHealthCaseUID - + dataAccessWhereClause+dataAccessWhereClause1; + Collection PHCcTContactNameByPatientSummDTColl; + String sql = SELECT_PHCPAT_OTHER_NAMED_BY_CONTACT_COLLECTION + publicHealthCaseUID + + dataAccessWhereClause + dataAccessWhereClause1; PHCcTContactNameByPatientSummDTColl = getPatientNamedAsContactSummDTColl(sql, true); return PHCcTContactNameByPatientSummDTColl; } @SuppressWarnings("java:S3776") - private Collection getContactNamedByPatientDTColl(String sql) { + private Collection getContactNamedByPatientDTColl(String sql) { CTContactSummaryDto cTContactSummaryDto = new CTContactSummaryDto(); - ArrayList cTContactNameByPatientSummDTColl ; - ArrayList returnCTContactNameByPatientSummDTColl = new ArrayList<> (); - cTContactNameByPatientSummDTColl = new ArrayList<>(customRepository.getContactByPatientInfo(sql)); + ArrayList cTContactNameByPatientSummDTColl; + ArrayList returnCTContactNameByPatientSummDTColl = new ArrayList<>(); + cTContactNameByPatientSummDTColl = new ArrayList<>(customRepository.getContactByPatientInfo(sql)); for (CTContactSummaryDto cTContactSumyDT : cTContactNameByPatientSummDTColl) { cTContactSumyDT.setContactNamedByPatient(true); Long contactEntityUid = cTContactSumyDT.getContactEntityUid(); @@ -152,7 +146,7 @@ private Collection getContactNamedByPatientDTColl(String sql) { if (contactNameColl.size() > 0) { for (Object o : contactNameColl) { - PersonNameDto personNameDT = new PersonNameDto( (PersonName) o); + PersonNameDto personNameDT = new PersonNameDto((PersonName) o); if (personNameDT.getNmUseCd().equalsIgnoreCase(NEDSSConstant.LEGAL_NAME)) { String lastName = (personNameDT.getLastNm() == null) ? "No Last" : personNameDT.getLastNm(); String firstName = (personNameDT.getFirstNm() == null) ? "No First" : personNameDT.getFirstNm(); @@ -190,13 +184,11 @@ private Collection getContactNamedByPatientDTColl(String sql) { if (cTContactSumyDT.getContactProcessingDecisionCd() != null && cTContactSumyDT.getDispositionCd() != null && (cTContactSumyDT.getContactProcessingDecisionCd().equals(CTConstants.RecordSearchClosure) - || cTContactSumyDT.getContactProcessingDecisionCd().equals(CTConstants.SecondaryReferral))) - { + || cTContactSumyDT.getContactProcessingDecisionCd().equals(CTConstants.SecondaryReferral))) { if (cTContactSumyDT.getDispositionCd().equals("A")) //preventative treatment { cTContactSumyDT.setDispositionCd("Z"); //prev preventative treated - } - else if (cTContactSumyDT.getDispositionCd().equals("C")) //infected brought to treat + } else if (cTContactSumyDT.getDispositionCd().equals("C")) //infected brought to treat { cTContactSumyDT.setDispositionCd("E"); //prev treated } @@ -206,11 +198,11 @@ else if (cTContactSumyDT.getDispositionCd().equals("C")) //infected brought to t } - private Collection getPatientNamedAsContactSummDTColl(String sql, boolean otherInfected) throws DataProcessingException { - ArrayList ctNameByPatientSummDTColl; - ArrayList returnCTNameByPatientSummDTColl = new ArrayList<> (); + private Collection getPatientNamedAsContactSummDTColl(String sql, boolean otherInfected) throws DataProcessingException { + ArrayList ctNameByPatientSummDTColl; + ArrayList returnCTNameByPatientSummDTColl = new ArrayList<>(); - ctNameByPatientSummDTColl = new ArrayList<>(customRepository.getContactByPatientInfo(sql)); + ctNameByPatientSummDTColl = new ArrayList<>(customRepository.getContactByPatientInfo(sql)); for (CTContactSummaryDto cTContactSumyDT : ctNameByPatientSummDTColl) { cTContactSumyDT.setContactNamedByPatient(false); cTContactSumyDT.setPatientNamedByContact(true); @@ -304,7 +296,4 @@ private Collection getPatientNamedAsContactSummDTColl(String sql, boolea } - - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationNotificationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationNotificationService.java index be0faf44e..a83613c44 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationNotificationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationNotificationService.java @@ -32,7 +32,7 @@ import java.util.*; @Service -public class InvestigationNotificationService implements IInvestigationNotificationService { +public class InvestigationNotificationService implements IInvestigationNotificationService { private final IInvestigationService investigationService; private final INotificationService notificationService; private final CustomNbsQuestionRepository customNbsQuestionRepository; @@ -104,9 +104,8 @@ public EDXActivityDetailLogDto sendNotification(Object pageObj, String nndCommen } - private EDXActivityDetailLogDto sendProxyToEJB(NotificationProxyContainer notificationProxyVO, Object pageObj) - { - HashMap nndRequiredMap = new HashMap<>(); + private EDXActivityDetailLogDto sendProxyToEJB(NotificationProxyContainer notificationProxyVO, Object pageObj) { + HashMap nndRequiredMap = new HashMap<>(); EDXActivityDetailLogDto eDXActivityDetailLogDT = new EDXActivityDetailLogDto(); eDXActivityDetailLogDT.setRecordType(EdxPHCRConstants.MSG_TYPE.Notification.name()); @@ -119,42 +118,42 @@ private EDXActivityDetailLogDto sendProxyToEJB(NotificationProxyContainer notif PublicHealthCaseDto phcDT = notificationProxyVO.getThePublicHealthCaseContainer().getThePublicHealthCaseDto(); Long publicHealthCaseUid = phcDT.getPublicHealthCaseUid(); - Map subMap = new HashMap<>(); + Map subMap = new HashMap<>(); TreeMap condAndFormCdTreeMap = SrteCache.investigationFormConditionCode; String investigationFormCd = condAndFormCdTreeMap.get(phcDT.getCd()); - Collection notifReqColl; + Collection notifReqColl; notifReqColl = customNbsQuestionRepository.retrieveQuestionRequiredNnd(investigationFormCd); - if(notifReqColl != null && notifReqColl.size() > 0) { + if (notifReqColl != null && notifReqColl.size() > 0) { for (QuestionRequiredNnd questionRequiredNnd : notifReqColl) { NbsQuestionMetadata metaData = new NbsQuestionMetadata(questionRequiredNnd); subMap.put(metaData.getNbsQuestionUid(), metaData); } } - Map result; - result= validatePAMNotficationRequiredFieldsGivenPageProxy(pageObj, publicHealthCaseUid, subMap,investigationFormCd); - StringBuilder errorText =new StringBuilder(20); - if(result!=null && result.size()>0){ - int i = result.size(); - Collection coll =result.values(); - Iterator it= coll.iterator(); - while(it.hasNext()){ - String label = (String)it.next(); + Map result; + result = validatePAMNotficationRequiredFieldsGivenPageProxy(pageObj, publicHealthCaseUid, subMap, investigationFormCd); + StringBuilder errorText = new StringBuilder(20); + if (result != null && result.size() > 0) { + int i = result.size(); + Collection coll = result.values(); + Iterator it = coll.iterator(); + while (it.hasNext()) { + String label = (String) it.next(); --i; errorText.append("[").append(label).append("]"); - if(it.hasNext()){ + if (it.hasNext()) { errorText.append("; and "); } - if(i==0) + if (i == 0) errorText.append("."); } formatErr = true; eDXActivityDetailLogDT.setLogType(EdxRuleAlgorothmManagerDto.STATUS_VAL.Failure.name()); - eDXActivityDetailLogDT.setComment(EdxELRConstant.MISSING_NOTF_REQ_FIELDS+ errorText); + eDXActivityDetailLogDT.setComment(EdxELRConstant.MISSING_NOTF_REQ_FIELDS + errorText); } String programAreaCd = notificationProxyVO.getThePublicHealthCaseContainer().getThePublicHealthCaseDto().getProgAreaCd(); @@ -165,9 +164,8 @@ private EDXActivityDetailLogDto sendProxyToEJB(NotificationProxyContainer notif notificationProxyVO.setTheNotificationContainer(notifVO); Long realNotificationUid = setNotificationProxy(notificationProxyVO); eDXActivityDetailLogDT.setRecordId(String.valueOf(realNotificationUid)); - if (!formatErr) - { - eDXActivityDetailLogDT.setComment("Notification created (UID: "+realNotificationUid+")"); + if (!formatErr) { + eDXActivityDetailLogDT.setComment("Notification created (UID: " + realNotificationUid + ")"); } } catch (Exception e) { @@ -176,7 +174,7 @@ private EDXActivityDetailLogDto sendProxyToEJB(NotificationProxyContainer notif StringWriter errors = new StringWriter(); e.printStackTrace(new PrintWriter(errors)); String exceptionMessage = errors.toString(); - exceptionMessage = exceptionMessage.substring(0,Math.min(exceptionMessage.length(), 2000)); + exceptionMessage = exceptionMessage.substring(0, Math.min(exceptionMessage.length(), 2000)); eDXActivityDetailLogDT.setComment(exceptionMessage); } return eDXActivityDetailLogDT; @@ -188,73 +186,58 @@ private EDXActivityDetailLogDto sendProxyToEJB(NotificationProxyContainer notif */ @SuppressWarnings({"java:S3776", "java:S6541"}) protected Map validatePAMNotficationRequiredFieldsGivenPageProxy(Object pageObj, Long publicHealthCaseUid, - Map reqFields, String formCd) throws DataProcessingException { + Map reqFields, String formCd) throws DataProcessingException { - Map missingFields = new TreeMap<>(); + Map missingFields = new TreeMap<>(); BasePamContainer pamVO; Collection participationDTCollection; PublicHealthCaseDto publicHealthCaseDto; Collection personVOCollection; - Map answerMap; - Collection actIdColl; + Map answerMap; + Collection actIdColl; - if(formCd.equalsIgnoreCase(NEDSSConstant.INV_FORM_RVCT)||formCd.equalsIgnoreCase(NEDSSConstant.INV_FORM_VAR)) - { + if (formCd.equalsIgnoreCase(NEDSSConstant.INV_FORM_RVCT) || formCd.equalsIgnoreCase(NEDSSConstant.INV_FORM_VAR)) { PamProxyContainer proxyVO = new PamProxyContainer(); - if(pageObj == null || pageObj instanceof PublicHealthCaseContainer) - { + if (pageObj == null || pageObj instanceof PublicHealthCaseContainer) { // proxyVO = pamproxy.getPamProxy(publicHealthCaseUid); - } - else - { + } else { proxyVO = (PamProxyContainer) pageObj; } pamVO = proxyVO.getPamVO(); answerMap = pamVO.getPamAnswerDTMap(); - if(pageObj == null || pageObj instanceof PublicHealthCaseContainer) - { + if (pageObj == null || pageObj instanceof PublicHealthCaseContainer) { participationDTCollection = new ArrayList<>(); - } - else - { + } else { participationDTCollection = proxyVO.getTheParticipationDTCollection(); } - personVOCollection = proxyVO.getThePersonVOCollection(); + personVOCollection = proxyVO.getThePersonVOCollection(); publicHealthCaseDto = proxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto(); actIdColl = proxyVO.getPublicHealthCaseContainer().getTheActIdDTCollection(); - } - else - { + } else { // HIT THIS PageActProxyContainer pageProxyVO; - if(pageObj == null || pageObj instanceof PublicHealthCaseContainer) - { - pageProxyVO = investigationService.getPageProxyVO(NEDSSConstant.CASE, publicHealthCaseUid); - } - else - { + if (pageObj == null || pageObj instanceof PublicHealthCaseContainer) { + pageProxyVO = investigationService.getPageProxyVO(NEDSSConstant.CASE, publicHealthCaseUid); + } else { pageProxyVO = (PageActProxyContainer) pageObj; } - PageActProxyContainer pageActProxyContainer =pageProxyVO; - pamVO= pageActProxyContainer.getPageVO(); + PageActProxyContainer pageActProxyContainer = pageProxyVO; + pamVO = pageActProxyContainer.getPageVO(); answerMap = (pageProxyVO).getPageVO().getPamAnswerDTMap(); - if(pageObj == null || pageObj instanceof PublicHealthCaseContainer) - { - participationDTCollection = pageActProxyContainer.getPublicHealthCaseContainer().getTheParticipationDTCollection(); - } - else - { + if (pageObj == null || pageObj instanceof PublicHealthCaseContainer) { + participationDTCollection = pageActProxyContainer.getPublicHealthCaseContainer().getTheParticipationDTCollection(); + } else { participationDTCollection = pageActProxyContainer.getTheParticipationDtoCollection(); } - personVOCollection = pageActProxyContainer.getThePersonContainerCollection(); + personVOCollection = pageActProxyContainer.getThePersonContainerCollection(); publicHealthCaseDto = pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto(); actIdColl = pageActProxyContainer.getPublicHealthCaseContainer().getTheActIdDTCollection(); } - PersonContainer personVO = getPersonVO(NEDSSConstant.PHC_PATIENT, participationDTCollection,personVOCollection ); + PersonContainer personVO = getPersonVO(NEDSSConstant.PHC_PATIENT, participationDTCollection, personVOCollection); PersonDto personDT = new PersonDto(); if (personVO != null) { personDT = personVO.getThePersonDto(); @@ -277,8 +260,7 @@ protected Map validatePAMNotficationRequiredFieldsGivenPageProxy if (answerMap.get(key) == null) { missingFields.put(metaData.getQuestionIdentifier(), metaData.getQuestionLabel()); } - } - else if (dLocation.toLowerCase().startsWith("public_health_case.")) { + } else if (dLocation.toLowerCase().startsWith("public_health_case.")) { String attrToChk = dLocation.substring(dLocation.indexOf(".") + 1); String getterNm = createGetterMethod(attrToChk); @@ -286,18 +268,14 @@ else if (dLocation.toLowerCase().startsWith("public_health_case.")) { Method method = (Method) methodMap.get(getterNm.toLowerCase()); Object obj = method.invoke(publicHealthCaseDto, (Object[]) null); checkObject(obj, missingFields, metaData); - } - else if (dLocation.toLowerCase().startsWith("person.")) - { + } else if (dLocation.toLowerCase().startsWith("person.")) { String attrToChk = dLocation.substring(dLocation.indexOf(".") + 1); String getterNm = createGetterMethod(attrToChk); Map methodMap = getMethods(personDT.getClass()); Method method = (Method) methodMap.get(getterNm.toLowerCase()); Object obj = method.invoke(personDT, (Object[]) null); checkObject(obj, missingFields, metaData); - } - else if (dLocation.toLowerCase().startsWith("postal_locator.")) - { + } else if (dLocation.toLowerCase().startsWith("postal_locator.")) { String attrToChk = dLocation.substring(dLocation.indexOf(".") + 1); String getterNm = createGetterMethod(attrToChk); PostalLocatorDto postalLocator = new PostalLocatorDto(); @@ -325,9 +303,7 @@ else if (dLocation.toLowerCase().startsWith("postal_locator.")) } else { checkObject(null, missingFields, metaData); } - } - else if (dLocation.toLowerCase().startsWith("person_race.")) - { + } else if (dLocation.toLowerCase().startsWith("person_race.")) { String attrToChk = dLocation.substring(dLocation.indexOf(".") + 1); String getterNm = createGetterMethod(attrToChk); PersonRaceDto personRace = new PersonRaceDto(); @@ -344,9 +320,7 @@ else if (dLocation.toLowerCase().startsWith("person_race.")) } else { checkObject(null, missingFields, metaData); } - } - else if (dLocation.toLowerCase().startsWith("act_id.")) - { + } else if (dLocation.toLowerCase().startsWith("act_id.")) { String attrToChk = dLocation.substring(dLocation.indexOf(".") + 1); String getterNm = createGetterMethod(attrToChk); if (actIdColl != null && actIdColl.size() > 0) { @@ -377,17 +351,13 @@ else if (dLocation.toLowerCase().startsWith("act_id.")) && (label.toLowerCase().contains("state"))) { missingFields.put(metaData.getQuestionIdentifier(), metaData.getQuestionLabel()); } - } - else if (dLocation.toLowerCase().startsWith("nbs_case_answer.") + } else if (dLocation.toLowerCase().startsWith("nbs_case_answer.") && !(formCd.equalsIgnoreCase(NEDSSConstant.INV_FORM_RVCT) - || formCd.equalsIgnoreCase(NEDSSConstant.INV_FORM_VAR))) - { + || formCd.equalsIgnoreCase(NEDSSConstant.INV_FORM_VAR))) { if (answerMap == null || answerMap.size() == 0 || (answerMap.get(nbsQueUid) == null && answerMap.get(metaData.getQuestionIdentifier()) == null)) { missingFields.put(metaData.getQuestionIdentifier(), metaData.getQuestionLabel()); } - } - else if (dLocation.toLowerCase().startsWith("nbs_case_answer.") && (formCd.equalsIgnoreCase(NEDSSConstant.INV_FORM_RVCT))) - { + } else if (dLocation.toLowerCase().startsWith("nbs_case_answer.") && (formCd.equalsIgnoreCase(NEDSSConstant.INV_FORM_RVCT))) { if (answerMap == null || answerMap.size() == 0 || (answerMap.get(nbsQueUid) == null && answerMap.get(metaData.getQuestionIdentifier()) == null)) { missingFields.put(metaData.getQuestionIdentifier(), metaData.getQuestionLabel()); } @@ -399,21 +369,18 @@ else if (dLocation.toLowerCase().startsWith("nbs_case_answer.") && (formCd.equal throw new DataProcessingException(e.getMessage()); } - if (missingFields.size() == 0) - { + if (missingFields.size() == 0) { return null; - } - else - { + } else { return missingFields; } } private String createGetterMethod(String attrToChk) { - StringTokenizer tokenizer = new StringTokenizer(attrToChk,"_"); + StringTokenizer tokenizer = new StringTokenizer(attrToChk, "_"); StringBuilder methodName = new StringBuilder(); - while (tokenizer.hasMoreTokens()){ + while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); methodName.append(Character.toUpperCase(token.charAt(0))).append(token.substring(1).toLowerCase()); @@ -422,47 +389,43 @@ private String createGetterMethod(String attrToChk) { } @SuppressWarnings("java:S3740") - private Map getMethods(Class beanClass) { + private Map getMethods(Class beanClass) { Method[] gettingMethods = beanClass.getMethods(); - Map resultMap = new HashMap<>(); + Map resultMap = new HashMap<>(); for (Method gettingMethod : gettingMethods) { - String methodName = ( gettingMethod).getName().toLowerCase(); - resultMap.put(methodName, gettingMethod); + String methodName = (gettingMethod).getName().toLowerCase(); + resultMap.put(methodName, gettingMethod); } return resultMap; } - private void checkObject(Object obj, Map missingFields, NbsQuestionMetadata metaData) { + private void checkObject(Object obj, Map missingFields, NbsQuestionMetadata metaData) { String value = obj == null ? "" : obj.toString(); - if(value == null || (value != null && value.trim().length() == 0)) { + if (value == null || (value != null && value.trim().length() == 0)) { missingFields.put(metaData.getQuestionIdentifier(), metaData.getQuestionLabel()); } } private PersonContainer getPersonVO(String type_cd, Collection participationDTCollection, - Collection personVOCollection) { + Collection personVOCollection) { ParticipationDto participationDT; PersonContainer personVO; - if (participationDTCollection != null) { + if (participationDTCollection != null) { Iterator anIterator1; - Iterator anIterator2 ; - for (anIterator1 = participationDTCollection.iterator(); anIterator1.hasNext();) { - participationDT = anIterator1.next(); + Iterator anIterator2; + for (anIterator1 = participationDTCollection.iterator(); anIterator1.hasNext(); ) { + participationDT = anIterator1.next(); if (participationDT.getTypeCd() != null && (participationDT.getTypeCd()).compareTo(type_cd) == 0) { - for (anIterator2 = personVOCollection.iterator(); anIterator2.hasNext();) { - personVO = anIterator2.next(); + for (anIterator2 = personVOCollection.iterator(); anIterator2.hasNext(); ) { + personVO = anIterator2.next(); if (personVO.getThePersonDto().getPersonUid().longValue() == participationDT .getSubjectEntityUid().longValue()) { return personVO; - } - else - { + } else { continue; } } - } - else - { + } else { continue; } } @@ -471,8 +434,7 @@ private PersonContainer getPersonVO(String type_cd, Collection } - private Long setNotificationProxy(NotificationProxyContainer notificationProxyVO) throws DataProcessingException - { + private Long setNotificationProxy(NotificationProxyContainer notificationProxyVO) throws DataProcessingException { return notificationService.setNotificationProxy(notificationProxyVO); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationService.java index 21eedc82d..8d19f1b90 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationService.java @@ -6,7 +6,6 @@ import gov.cdc.dataprocessing.exception.DataProcessingException; import gov.cdc.dataprocessing.model.container.base.BaseContainer; import gov.cdc.dataprocessing.model.container.base.BasePamContainer; -import gov.cdc.dataprocessing.model.container.interfaces.ReportSummaryInterface; import gov.cdc.dataprocessing.model.container.model.*; import gov.cdc.dataprocessing.model.dto.RootDtoInterface; import gov.cdc.dataprocessing.model.dto.act.ActRelationshipDto; @@ -48,19 +47,17 @@ @Service public class InvestigationService implements IInvestigationService { private static final Logger logger = LoggerFactory.getLogger(InvestigationService.class); - + private static final String AND_STRING = " AND "; + private static final String LAB_EVENT_LIST = "labEventList"; private final PublicHealthCaseRepositoryUtil publicHealthCaseRepositoryUtil; private final OrganizationRepositoryUtil organizationRepositoryUtil; private final PatientRepositoryUtil patientRepositoryUtil; - private final IMaterialService materialService; - private final PrepareAssocModelHelper prepareAssocModelHelper; private final ObservationRepositoryUtil observationRepositoryUtil; private final ObservationRepository observationRepository; private final IRetrieveSummaryService retrieveSummaryService; private final ActRelationshipService actRelationshipService; - private final INotificationService notificationService; private final IObservationSummaryService observationSummaryService; private final QueryHelper queryHelper; @@ -69,8 +66,6 @@ public class InvestigationService implements IInvestigationService { private final CachingValueService cachingValueService; private final ILdfService ldfService; private final LabTestRepository labTestRepository; - private static final String AND_STRING = " AND "; - private static final String LAB_EVENT_LIST = "labEventList"; public InvestigationService(PublicHealthCaseRepositoryUtil publicHealthCaseRepositoryUtil, @@ -111,25 +106,24 @@ public InvestigationService(PublicHealthCaseRepositoryUtil publicHealthCaseRepos @SuppressWarnings("java:S125") @Transactional public void setAssociations(Long investigationUID, - Collection reportSumVOCollection, - Collection vaccinationSummaryVOCollection, - Collection summaryDTColl, + Collection reportSumVOCollection, + Collection vaccinationSummaryVOCollection, + Collection summaryDTColl, Collection treatmentSumColl, Boolean isNNDResendCheckRequired) throws DataProcessingException { InvestigationContainer invVO = new InvestigationContainer(); try { - if(reportSumVOCollection!=null && !reportSumVOCollection.isEmpty() ){ + if (reportSumVOCollection != null && !reportSumVOCollection.isEmpty()) { setObservationAssociationsImpl(investigationUID, reportSumVOCollection); } - if(isNNDResendCheckRequired){ - invVO = getInvestigationProxy(investigationUID); + if (isNNDResendCheckRequired) { + invVO = getInvestigationProxy(investigationUID); updateAutoResendNotificationsAsync(invVO); } - if(reportSumVOCollection!=null && reportSumVOCollection.size()>0){ + if (reportSumVOCollection != null && reportSumVOCollection.size() > 0) { retrieveSummaryService.checkBeforeCreateAndStoreMessageLogDTCollection(investigationUID, reportSumVOCollection); } - } - catch (Exception e) { + } catch (Exception e) { // NNDActivityLogDto nndActivityLogDT = new NNDActivityLogDto(); // String phcLocalId = invVO.getThePublicHealthCaseContainer().getThePublicHealthCaseDto().getLocalId(); // nndActivityLogDT.setErrorMessageTxt(e.toString()); @@ -147,19 +141,17 @@ public void setAssociations(Long investigationUID, } /** - * This method Associates the observation(LAb or MORB) to Investigation + * This method Associates the observation(LAb or MORB) to Investigation + * * @param investigationUID -- The UID for the investigation to which observation is to be associated or disassociates - * @param invFromEvent - flag to indicates if lab or morb report is the reactor for investigation. + * @param invFromEvent - flag to indicates if lab or morb report is the reactor for investigation. */ @SuppressWarnings("java:S3776") - public void setObservationAssociationsImpl(Long investigationUID, Collection reportSumVOCollection, boolean invFromEvent) throws DataProcessingException - { - PublicHealthCaseDto phcDT = publicHealthCaseRepositoryUtil.findPublicHealthCase(investigationUID); - try - { + public void setObservationAssociationsImpl(Long investigationUID, Collection reportSumVOCollection, boolean invFromEvent) throws DataProcessingException { + PublicHealthCaseDto phcDT = publicHealthCaseRepositoryUtil.findPublicHealthCase(investigationUID); + try { //For each report summary vo - if(!reportSumVOCollection.isEmpty()) - { + if (!reportSumVOCollection.isEmpty()) { for (LabReportSummaryContainer reportSumVO : reportSumVOCollection) { ActRelationshipDto actRelationshipDT; RootDtoInterface rootDT = null; @@ -203,13 +195,10 @@ public void setObservationAssociationsImpl(Long investigationUID, Collection actRelColl = actRelationshipService.loadActRelationshipBySrcIdAndTypeCode(reportSumVO.getObservationUid(), "LabReport"); businessObjLookupName = NEDSSConstant.OBSERVATIONLABREPORT; - if (actRelColl != null && actRelColl.size() > 0) - { + if (actRelColl != null && !actRelColl.isEmpty()) { businessTriggerCd = NEDSSConstant.OBS_LAB_DIS_ASC; - } - else - { + } else { businessTriggerCd = NEDSSConstant.OBS_LAB_UNPROCESS; } rootDT = prepareAssocModelHelper.prepareVO(obsDT, businessObjLookupName, businessTriggerCd, tableName, moduleCd, obsDT.getVersionCtrlNbr()); } - return rootDT; + return rootDT; } - public void updateAutoResendNotificationsAsync(BaseContainer v) - { + public void updateAutoResendNotificationsAsync(BaseContainer v) { updateAutoResendNotifications(v); } - @SuppressWarnings("java:S6541") - public PageActProxyContainer getPageProxyVO(String typeCd, Long publicHealthCaseUID) throws DataProcessingException { - PageActProxyContainer pageProxyVO = new PageActProxyContainer(); - - PublicHealthCaseContainer thePublicHealthCaseContainer; - - ArrayList thePersonVOCollection = new ArrayList<>(); - ArrayList theOrganizationVOCollection = new ArrayList<>(); - ArrayList theMaterialVOCollection = new ArrayList<>(); - - // Summary Collections - ArrayList theInvestigationAuditLogSummaryVOCollection; - ArrayList theDocumentSummaryVOCollection; - - - thePublicHealthCaseContainer = publicHealthCaseRepositoryUtil.loadObject(publicHealthCaseUID); - - thePublicHealthCaseContainer.getThePublicHealthCaseDto().setAddUserName(AuthUtil.authUser.getUserId()); - thePublicHealthCaseContainer.getThePublicHealthCaseDto().setLastChgUserName(AuthUtil.authUser.getUserId()); - - - BasePamContainer pageVO = publicHealthCaseRepositoryUtil.getPamVO(publicHealthCaseUID); - pageProxyVO.setPageVO(pageVO); - String strTypeCd; - String strClassCd; - String recordStatusCd; - Long nEntityID; - ParticipationDto participationDT; - + protected void processingPageProxyParticipation(PublicHealthCaseContainer thePublicHealthCaseContainer, + ArrayList thePersonVOCollection, + ArrayList theOrganizationVOCollection, + ArrayList theMaterialVOCollection) throws DataProcessingException { Iterator participationIterator = thePublicHealthCaseContainer .getTheParticipationDTCollection().iterator(); logger.debug("ParticipationDTCollection() = " + thePublicHealthCaseContainer.getTheParticipationDTCollection()); - + Long nEntityID; + String strClassCd; + String recordStatusCd; + ParticipationDto participationDT; // Populate the Entity collections with the results while (participationIterator.hasNext()) { participationDT = participationIterator .next(); nEntityID = participationDT.getSubjectEntityUid(); strClassCd = participationDT.getSubjectClassCd(); - strTypeCd = participationDT.getTypeCd(); recordStatusCd = participationDT.getRecordStatusCd(); - if (strClassCd != null - && strClassCd.compareToIgnoreCase(NEDSSConstant.ORGANIZATION) == 0 - && recordStatusCd != null - && recordStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE)) - { - theOrganizationVOCollection.add(organizationRepositoryUtil.loadObject(nEntityID, null)); - - continue; - } - if (strClassCd != null - && strClassCd - .compareToIgnoreCase(NEDSSConstant.PERSON) == 0 - && recordStatusCd != null - && recordStatusCd - .equals(NEDSSConstant.RECORD_STATUS_ACTIVE)) { - thePersonVOCollection.add(patientRepositoryUtil.loadPerson(nEntityID)); - continue; - } - if (strClassCd != null - && strClassCd - .compareToIgnoreCase(NEDSSConstant.MATERIAL) == 0 - && recordStatusCd != null - && recordStatusCd - .equals(NEDSSConstant.RECORD_STATUS_ACTIVE)) { - theMaterialVOCollection.add(materialService.loadMaterialObject(nEntityID)); - } - } - pageProxyVO.setTheOrganizationContainerCollection(theOrganizationVOCollection); - pageProxyVO.setPublicHealthCaseContainer(thePublicHealthCaseContainer); - pageProxyVO.setThePersonContainerCollection(thePersonVOCollection); + if (strClassCd != null && recordStatusCd != null) { + if (strClassCd.compareToIgnoreCase(NEDSSConstant.ORGANIZATION) == 0 + && recordStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE)) { + theOrganizationVOCollection.add(organizationRepositoryUtil.loadObject(nEntityID, null)); - pageProxyVO.setTheNotificationSummaryVOCollection(retrieveSummaryService.notificationSummaryOnInvestigation(thePublicHealthCaseContainer, pageProxyVO)); + continue; + } + if (strClassCd.compareToIgnoreCase(NEDSSConstant.PERSON) == 0 + && recordStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE)) { + thePersonVOCollection.add(patientRepositoryUtil.loadPerson(nEntityID)); + continue; + } + if (strClassCd.compareToIgnoreCase(NEDSSConstant.MATERIAL) == 0 + && recordStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE)) { + theMaterialVOCollection.add(materialService.loadMaterialObject(nEntityID)); + } + } + } + } + + protected void processingPageProxySummary(PageActProxyContainer pageProxyVO) { if (pageProxyVO.getTheNotificationSummaryVOCollection() != null) { - for (Object o : pageProxyVO.getTheNotificationSummaryVOCollection()) - { + for (Object o : pageProxyVO.getTheNotificationSummaryVOCollection()) { NotificationSummaryContainer notifVO = (NotificationSummaryContainer) o; for (ActRelationshipDto actRelationDT : pageProxyVO .getPublicHealthCaseContainer() - .getTheActRelationshipDTCollection()) - { + .getTheActRelationshipDTCollection()) { if ((notifVO.getCdNotif().equalsIgnoreCase(NEDSSConstant.CLASS_CD_SHARE_NOTF) || notifVO.getCdNotif().equalsIgnoreCase(NEDSSConstant.CLASS_CD_SHARE_NOTF_PHDC)) && notifVO.getNotificationUid().compareTo(actRelationDT.getSourceActUid()) == 0) { @@ -383,16 +328,48 @@ public PageActProxyContainer getPageProxyVO(String typeCd, Long publicHealthCase } } - if(typeCd!=null && !typeCd.equals(NEDSSConstant.CASE_LITE)) { - ActRelationshipDto actRelationshipDT = null; - for (ActRelationshipDto actRelationshipDto : thePublicHealthCaseContainer.getTheActRelationshipDTCollection()) { - actRelationshipDT = actRelationshipDto; - Long nSourceActID = actRelationshipDT.getSourceActUid(); // NOSONAR - strClassCd = actRelationshipDT.getSourceClassCd(); // NOSONAR - strTypeCd = actRelationshipDT.getTypeCd(); // NOSONAR - recordStatusCd = actRelationshipDT.getRecordStatusCd(); // NOSONAR - } + } + + + @SuppressWarnings("java:S6541") + public PageActProxyContainer getPageProxyVO(String typeCd, Long publicHealthCaseUID) throws DataProcessingException { + PageActProxyContainer pageProxyVO = new PageActProxyContainer(); + + PublicHealthCaseContainer thePublicHealthCaseContainer; + + ArrayList thePersonVOCollection = new ArrayList<>(); + ArrayList theOrganizationVOCollection = new ArrayList<>(); + ArrayList theMaterialVOCollection = new ArrayList<>(); + + // Summary Collections + ArrayList theInvestigationAuditLogSummaryVOCollection; + ArrayList theDocumentSummaryVOCollection; + + + thePublicHealthCaseContainer = publicHealthCaseRepositoryUtil.loadObject(publicHealthCaseUID); + + thePublicHealthCaseContainer.getThePublicHealthCaseDto().setAddUserName(AuthUtil.authUser.getUserId()); + thePublicHealthCaseContainer.getThePublicHealthCaseDto().setLastChgUserName(AuthUtil.authUser.getUserId()); + + + BasePamContainer pageVO = publicHealthCaseRepositoryUtil.getPamVO(publicHealthCaseUID); + pageProxyVO.setPageVO(pageVO); + + processingPageProxyParticipation(thePublicHealthCaseContainer, + thePersonVOCollection, + theOrganizationVOCollection, + theMaterialVOCollection); + + pageProxyVO.setTheOrganizationContainerCollection(theOrganizationVOCollection); + pageProxyVO.setPublicHealthCaseContainer(thePublicHealthCaseContainer); + pageProxyVO.setThePersonContainerCollection(thePersonVOCollection); + + pageProxyVO.setTheNotificationSummaryVOCollection(retrieveSummaryService.notificationSummaryOnInvestigation(thePublicHealthCaseContainer, pageProxyVO)); + + processingPageProxySummary(pageProxyVO); + + if (typeCd != null && !typeCd.equals(NEDSSConstant.CASE_LITE)) { Collection labSumVOCol = new ArrayList<>(); HashMap labSumVOMap; @@ -403,7 +380,7 @@ public PageActProxyContainer getPageProxyVO(String typeCd, Long publicHealthCase labReportViewClause = labReportViewClause != null ? AND_STRING + labReportViewClause : ""; - Collection LabReportUidSummarVOs = observationSummaryService + Collection LabReportUidSummarVOs = observationSummaryService .findAllActiveLabReportUidListForManage( publicHealthCaseUID, labReportViewClause); @@ -412,19 +389,16 @@ public PageActProxyContainer getPageProxyVO(String typeCd, Long publicHealthCase LabReportSummaryContainer labReportSummaryVOs; if (LabReportUidSummarVOs != null && !LabReportUidSummarVOs.isEmpty()) { boolean isCDCFormPrintCase; - if(typeCd.equalsIgnoreCase(NEDSSConstant.PRINT_CDC_CASE)){ + if (typeCd.equalsIgnoreCase(NEDSSConstant.PRINT_CDC_CASE)) { isCDCFormPrintCase = true; - if(LabReportUidSummarVOs!=null && !LabReportUidSummarVOs.isEmpty()){ - for (UidSummaryContainer uidSummaryVO : LabReportUidSummarVOs) { - uidSummaryVO.setStatusTime(thePublicHealthCaseContainer.getThePublicHealthCaseDto().getAddTime()); - } + for (UidSummaryContainer uidSummaryVO : LabReportUidSummarVOs) { + uidSummaryVO.setStatusTime(thePublicHealthCaseContainer.getThePublicHealthCaseDto().getAddTime()); } - - }else{ - isCDCFormPrintCase= false; + } else { + isCDCFormPrintCase = false; } labSumVOMap = retrieveLabReportSummaryRevisited( - LabReportUidSummarVOs,isCDCFormPrintCase, + LabReportUidSummarVOs, isCDCFormPrintCase, uidType); if (labSumVOMap.containsKey(LAB_EVENT_LIST)) { @@ -437,16 +411,8 @@ public PageActProxyContainer getPageProxyVO(String typeCd, Long publicHealthCase } } - Map labMapfromDOC = new HashMap<>(); - - if(labMapfromDOC!=null && labMapfromDOC.size()>0) - { - labSumVOCol.addAll(labMapfromDOC.values()); - } - if (labSumVOCol != null) { - pageProxyVO.setTheLabReportSummaryVOCollection(labSumVOCol); + pageProxyVO.setTheLabReportSummaryVOCollection(labSumVOCol); - } theInvestigationAuditLogSummaryVOCollection = new ArrayList<>(); pageProxyVO.setTheInvestigationAuditLogSummaryVOCollection(theInvestigationAuditLogSummaryVOCollection); theDocumentSummaryVOCollection = new ArrayList<>(retrieveSummaryService.retrieveDocumentSummaryVOForInv(publicHealthCaseUID).values()); @@ -462,6 +428,7 @@ public PageActProxyContainer getPageProxyVO(String typeCd, Long publicHealthCase /** * This method Associates or disassociates the observation(LAb or MORB) to Investigation from * the manage observation page + * * @param investigationUID -- The UID for the investigation to which observation is to be associated or disassociates */ @@ -473,43 +440,38 @@ private void setObservationAssociationsImpl(Long investigationUID, Collection notSumVOColl =null; + Collection notSumVOColl = null; PublicHealthCaseDto phcDT = null; - if( + if ( vo instanceof InvestigationContainer || vo instanceof PamProxyContainer - || vo instanceof PageActProxyContainer - ){ - if(vo instanceof InvestigationContainer) - { - InvestigationContainer invVO = (InvestigationContainer)vo; + || vo instanceof PageActProxyContainer + ) { + if (vo instanceof InvestigationContainer invVO) { phcDT = invVO.thePublicHealthCaseContainer.getThePublicHealthCaseDto(); notSumVOColl = invVO.getTheNotificationSummaryVOCollection(); } - if( + if ( vo instanceof InvestigationContainer || vo instanceof PamProxyContainer || vo instanceof PageActProxyContainer - ) - { - if(notSumVOColl!=null && notSumVOColl.size()>0){ + ) { + if (notSumVOColl != null && notSumVOColl.size() > 0) { for (Object o : notSumVOColl) { NotificationSummaryContainer notSummaryVO = (NotificationSummaryContainer) o; if (notSummaryVO.getIsHistory().equals("F") && !notSummaryVO.getAutoResendInd().equals("F")) { @@ -536,15 +498,16 @@ protected void updateAutoResendNotifications(BaseContainer vo) } + @SuppressWarnings("java:S1172") - private void updateNotification(boolean isSummaryCase, Long notificationUid, String phcCd, - String phcClassCd, String progAreaCd, String jurisdictionCd, - String sharedInd, boolean caseStatusChange) throws DataProcessingException { + private void updateNotification(boolean isSummaryCase, Long notificationUid, String phcCd, + String phcClassCd, String progAreaCd, String jurisdictionCd, + String sharedInd, boolean caseStatusChange) throws DataProcessingException { boolean checkNotificationPermission1 = true;//nbsSecurityObj.getPermission(NBSBOLookup.NOTIFICATION, NBSOperationLookup.CREATENEEDSAPPROVAL,progAreaCd,jurisdictionCd,sharedInd); String businessTriggerCd; businessTriggerCd = NEDSSConstant.NOT_CR_APR; - Collection notificationVOCollection = null; + Collection notificationVOCollection = null; var notification = notificationService.getNotificationById(notificationUid); NotificationContainer notificationContainer = new NotificationContainer(); @@ -573,8 +536,8 @@ private void updateNotification(boolean isSummaryCase, Long notificationUid, St // is in AUTO_RESEND status, new record is created for review. // This record is visible in Updated Notifications Queue - if(checkNotificationPermission1 && - (notificationDT.getAutoResendInd().equalsIgnoreCase("T"))){ + if (checkNotificationPermission1 && + (notificationDT.getAutoResendInd().equalsIgnoreCase("T"))) { UpdatedNotificationDto updatedNotification = new UpdatedNotificationDto(); updatedNotification.setAddTime(new Timestamp(System.currentTimeMillis())); @@ -601,22 +564,22 @@ private InvestigationContainer getInvestigationProxyLite(Long publicHealthCaseUI var investigationProxyVO = new InvestigationContainer(); PublicHealthCaseDto thePublicHealthCaseDto; PublicHealthCaseContainer thePublicHealthCaseContainer; - ArrayList thePersonVOCollection = new ArrayList<> (); // Person (VO) - ArrayList theOrganizationVOCollection = new ArrayList<> (); // Organization (VO) - ArrayList theMaterialVOCollection = new ArrayList<> (); // Material (VO) - ArrayList theObservationVOCollection = new ArrayList<> (); // Observation (VO) - ArrayList theInterventionVOCollection = new ArrayList<> (); // Itervention (VO) - ArrayList theEntityGroupVOCollection = new ArrayList<> (); // Group (VO) - ArrayList theNonPersonLivingSubjectVOCollection = new ArrayList<> (); // NPLS (VO) - ArrayList thePlaceVOCollection = new ArrayList<> (); // Place (VO) - ArrayList theReferralVOCollection = new ArrayList<> (); // Referral (VO) - ArrayList thePatientEncounterVOCollection = new ArrayList<> (); // PatientEncounter (VO) - ArrayList theClinicalDocumentVOCollection = new ArrayList<> (); // Clinical Document (VO) + ArrayList thePersonVOCollection = new ArrayList<>(); // Person (VO) + ArrayList theOrganizationVOCollection = new ArrayList<>(); // Organization (VO) + ArrayList theMaterialVOCollection = new ArrayList<>(); // Material (VO) + ArrayList theObservationVOCollection = new ArrayList<>(); // Observation (VO) + ArrayList theInterventionVOCollection = new ArrayList<>(); // Itervention (VO) + ArrayList theEntityGroupVOCollection = new ArrayList<>(); // Group (VO) + ArrayList theNonPersonLivingSubjectVOCollection = new ArrayList<>(); // NPLS (VO) + ArrayList thePlaceVOCollection = new ArrayList<>(); // Place (VO) + ArrayList theReferralVOCollection = new ArrayList<>(); // Referral (VO) + ArrayList thePatientEncounterVOCollection = new ArrayList<>(); // PatientEncounter (VO) + ArrayList theClinicalDocumentVOCollection = new ArrayList<>(); // Clinical Document (VO) // Summary Collections - ArrayList theStateDefinedFieldDTCollection = new ArrayList<> (); - ArrayList theTreatmentSummaryVOCollection; - ArrayList theDocumentSummaryVOCollection; + ArrayList theStateDefinedFieldDTCollection = new ArrayList<>(); + ArrayList theTreatmentSummaryVOCollection; + ArrayList theDocumentSummaryVOCollection; try { thePublicHealthCaseContainer = publicHealthCaseRepositoryUtil.loadObject(publicHealthCaseUID); @@ -637,9 +600,9 @@ private InvestigationContainer getInvestigationProxyLite(Long publicHealthCaseUI String strClassCd; String recordStatusCd; Long nEntityID; - ParticipationDto participationDT ; + ParticipationDto participationDT; - Iterator participationIterator = thePublicHealthCaseContainer. + Iterator participationIterator = thePublicHealthCaseContainer. getTheParticipationDTCollection().iterator(); logger.debug("ParticipationDTCollection() = " + thePublicHealthCaseContainer.getTheParticipationDTCollection()); @@ -794,36 +757,31 @@ private InvestigationContainer getInvestigationProxyLite(Long publicHealthCaseUI theObservationVOCollection); try { - if(!lite) { - theStateDefinedFieldDTCollection = new ArrayList<>(ldfService.getLDFCollection(publicHealthCaseUID, investigationProxyVO.getBusinessObjectName())); + if (!lite) { + theStateDefinedFieldDTCollection = new ArrayList<>(ldfService.getLDFCollection(publicHealthCaseUID, investigationProxyVO.getBusinessObjectName())); } - } - catch (Exception e) { + } catch (Exception e) { logger.error("Exception occured while retrieving LDFCollection = " + e.getMessage()); //NOSONAR } - if (theStateDefinedFieldDTCollection != null) { - investigationProxyVO.setTheStateDefinedFieldDataDTCollection(theStateDefinedFieldDTCollection); - } + investigationProxyVO.setTheStateDefinedFieldDataDTCollection(theStateDefinedFieldDTCollection); - Collection labSumVOCol = new ArrayList<> (); - HashMap labSumVOMap; - if (!lite) - { + + Collection labSumVOCol = new ArrayList<>(); + HashMap labSumVOMap; + if (!lite) { String labReportViewClause = queryHelper.getDataAccessWhereClause(NBSBOLookup.OBSERVATIONLABREPORT, "VIEW", "obs"); - labReportViewClause = labReportViewClause != null? AND_STRING + labReportViewClause:""; + labReportViewClause = labReportViewClause != null ? AND_STRING + labReportViewClause : ""; - Collection LabReportUidSummarVOs = observationSummaryService.findAllActiveLabReportUidListForManage(publicHealthCaseUID,labReportViewClause); + Collection LabReportUidSummarVOs = observationSummaryService.findAllActiveLabReportUidListForManage(publicHealthCaseUID, labReportViewClause); String uidType = "LABORATORY_UID"; - Collection labReportSummaryVOCollection; + Collection labReportSummaryVOCollection; LabReportSummaryContainer labReportSummaryVOs; - if(LabReportUidSummarVOs != null && LabReportUidSummarVOs.size() > 0) - { - labSumVOMap = retrieveLabReportSummaryRevisited(LabReportUidSummarVOs,false, uidType); - if(labSumVOMap.containsKey(LAB_EVENT_LIST)) - { - labReportSummaryVOCollection = (ArrayList )labSumVOMap.get(LAB_EVENT_LIST); + if (LabReportUidSummarVOs != null && LabReportUidSummarVOs.size() > 0) { + labSumVOMap = retrieveLabReportSummaryRevisited(LabReportUidSummarVOs, false, uidType); + if (labSumVOMap.containsKey(LAB_EVENT_LIST)) { + labReportSummaryVOCollection = (ArrayList) labSumVOMap.get(LAB_EVENT_LIST); for (Object o : labReportSummaryVOCollection) { labReportSummaryVOs = (LabReportSummaryContainer) o; labSumVOCol.add(labReportSummaryVOs); @@ -832,44 +790,37 @@ private InvestigationContainer getInvestigationProxyLite(Long publicHealthCaseUI } logger.debug("Size of labreport Collection :" + labSumVOCol.size()); } - } - else { + } else { logger.debug("user has no permission to view ObservationSummaryVO collection"); } - if (labSumVOCol != null) { - investigationProxyVO.setTheLabReportSummaryVOCollection(labSumVOCol); + investigationProxyVO.setTheLabReportSummaryVOCollection(labSumVOCol); - } - processingInvestigationSummary( investigationProxyVO, - thePublicHealthCaseContainer, lite); + processingInvestigationSummary(investigationProxyVO, + thePublicHealthCaseContainer, lite); - if (!lite) - { + if (!lite) { logger.debug("About to get TreatmentSummaryList for Investigation"); - theTreatmentSummaryVOCollection = new ArrayList<> ((retrieveSummaryService.retrieveTreatmentSummaryVOForInv(publicHealthCaseUID)).values()); + theTreatmentSummaryVOCollection = new ArrayList<>((retrieveSummaryService.retrieveTreatmentSummaryVOForInv(publicHealthCaseUID)).values()); logger.debug("Number of treatments found: " + theTreatmentSummaryVOCollection.size()); investigationProxyVO.setTheTreatmentSummaryVOCollection( theTreatmentSummaryVOCollection); } - if (!lite) - { - theDocumentSummaryVOCollection = new ArrayList<> (retrieveSummaryService.retrieveDocumentSummaryVOForInv(publicHealthCaseUID).values()); + if (!lite) { + theDocumentSummaryVOCollection = new ArrayList<>(retrieveSummaryService.retrieveDocumentSummaryVOForInv(publicHealthCaseUID).values()); investigationProxyVO.setTheDocumentSummaryVOCollection(theDocumentSummaryVOCollection); } - if (!lite) - { - Collection contactCollection= contactSummaryService.getContactListForInvestigation(publicHealthCaseUID); + if (!lite) { + Collection contactCollection = contactSummaryService.getContactListForInvestigation(publicHealthCaseUID); investigationProxyVO.setTheCTContactSummaryDTCollection(contactCollection); } - } - catch (Exception e) { + } catch (Exception e) { throw new DataProcessingException(e.getMessage(), e); } @@ -877,13 +828,12 @@ private InvestigationContainer getInvestigationProxyLite(Long publicHealthCaseUI } private HashMap retrieveLabReportSummaryRevisited(Collection labReportUids, boolean isCDCFormPrintCase, String uidType) throws DataProcessingException { - HashMap labReportSummarMap = getObservationSummaryListForWorkupRevisited(labReportUids, isCDCFormPrintCase, uidType); - return labReportSummarMap; + return getObservationSummaryListForWorkupRevisited(labReportUids, isCDCFormPrintCase, uidType); } - private HashMap getObservationSummaryListForWorkupRevisited(Collection uidList,boolean isCDCFormPrintCase, String uidType) throws DataProcessingException { - ArrayList labSummList = new ArrayList<> (); - ArrayList labEventList = new ArrayList<> (); + private HashMap getObservationSummaryListForWorkupRevisited(Collection uidList, boolean isCDCFormPrintCase, String uidType) throws DataProcessingException { + ArrayList labSummList = new ArrayList<>(); + ArrayList labEventList = new ArrayList<>(); int count = 0; @@ -893,21 +843,20 @@ private HashMap getObservationSummaryListForWorkupRevisited(Coll String dataAccessWhereClause = queryHelper.getDataAccessWhereClause(NBSBOLookup.OBSERVATIONLABREPORT, "VIEW", ""); if (dataAccessWhereClause == null) { dataAccessWhereClause = ""; - } - else { + } else { dataAccessWhereClause = AND_STRING + dataAccessWhereClause; } LabReportSummaryContainer labVO = new LabReportSummaryContainer(); - Collection labList = new ArrayList<> (); + Collection labList = new ArrayList<>(); Long LabAsSourceForInvestigation = null; try { Timestamp fromTime = null; Iterator itLabId = uidList.iterator(); while (itLabId.hasNext()) { - if(uidType.equals("PERSON_PARENT_UID")){ + if (uidType.equals("PERSON_PARENT_UID")) { Long uid = itLabId.next().getUid(); var res = observationSummaryRepository.findLabSummaryForWorkupNew(uid, dataAccessWhereClause); if (res.isPresent()) { @@ -915,14 +864,12 @@ private HashMap getObservationSummaryListForWorkupRevisited(Coll count = count + 1; } - } - else if(uidType.equals("LABORATORY_UID")) - { - UidSummaryContainer vo = (UidSummaryContainer) itLabId.next(); + } else if (uidType.equals("LABORATORY_UID")) { + UidSummaryContainer vo = itLabId.next(); Long observationUid = vo.getUid(); fromTime = vo.getAddTime(); - if(vo.getStatusTime()!=null && vo.getStatusTime().compareTo(fromTime)==0){ - LabAsSourceForInvestigation=vo.getUid(); + if (vo.getStatusTime() != null && vo.getStatusTime().compareTo(fromTime) == 0) { + LabAsSourceForInvestigation = vo.getUid(); } var res = observationRepository.findById(observationUid); @@ -932,7 +879,7 @@ else if(uidType.equals("LABORATORY_UID")) count = count + 1; } } - if(labList != null) { + if (labList != null) { for (Observation_Lab_Summary_ForWorkUp_New observationLabSummaryForWorkUpNew : labList) { LabReportSummaryContainer labRepVO = new LabReportSummaryContainer(observationLabSummaryForWorkUpNew); labRepVO.setActivityFromTime(fromTime); @@ -960,31 +907,35 @@ else if(uidType.equals("LABORATORY_UID")) if (labRepSumm != null) { labRepSumm.setAssociationsMap(associationsMap); } - if (uidMap != null && uidMap.containsKey(NEDSSConstant.PAR111_TYP_CD) && labRepEvent != null) { - labRepEvent.setReportingFacility(observationSummaryService.getReportingFacilityName((Long) uidMap.get(NEDSSConstant.PAR111_TYP_CD))); - } - if (uidMap != null && uidMap.containsKey(NEDSSConstant.PAR111_TYP_CD) && labRepSumm != null) { - labRepSumm.setReportingFacility(observationSummaryService.getReportingFacilityName((Long) uidMap.get(NEDSSConstant.PAR111_TYP_CD))); - } - if (uidMap != null && uidMap.containsKey(NEDSSConstant.PAR101_TYP_CD) && labRepEvent != null) { - labRepEvent.setOrderingFacility(observationSummaryService.getReportingFacilityName((Long) uidMap.get(NEDSSConstant.PAR101_TYP_CD))); - } - if (uidMap != null && uidMap.containsKey(NEDSSConstant.PAR101_TYP_CD) && labRepSumm != null) { - labRepSumm.setOrderingFacility(observationSummaryService.getReportingFacilityName((Long) uidMap.get(NEDSSConstant.PAR101_TYP_CD))); - } + if (uidMap != null) { + if (uidMap.containsKey(NEDSSConstant.PAR111_TYP_CD) && labRepEvent != null) { + labRepEvent.setReportingFacility(observationSummaryService.getReportingFacilityName((Long) uidMap.get(NEDSSConstant.PAR111_TYP_CD))); + } + if (uidMap.containsKey(NEDSSConstant.PAR111_TYP_CD) && labRepSumm != null) { + labRepSumm.setReportingFacility(observationSummaryService.getReportingFacilityName((Long) uidMap.get(NEDSSConstant.PAR111_TYP_CD))); + } - if (uidMap != null && uidMap.containsKey(NEDSSConstant.PAR104_TYP_CD) && labRepEvent != null) { - var code = observationSummaryService.getSpecimanSource((Long) uidMap.get(NEDSSConstant.PAR104_TYP_CD)); - var tree = cachingValueService.getCodedValues("SPECMN_SRC", code); - labRepEvent.setSpecimenSource(tree.get(code)); - } - if (uidMap != null && uidMap.containsKey(NEDSSConstant.PAR104_TYP_CD) && labRepSumm != null) { - var code = observationSummaryService.getSpecimanSource((Long) uidMap.get(NEDSSConstant.PAR104_TYP_CD)); - var tree = cachingValueService.getCodedValues("SPECMN_SRC", code); - labRepSumm.setSpecimenSource(tree.get(code)); + if (uidMap.containsKey(NEDSSConstant.PAR101_TYP_CD) && labRepEvent != null) { + labRepEvent.setOrderingFacility(observationSummaryService.getReportingFacilityName((Long) uidMap.get(NEDSSConstant.PAR101_TYP_CD))); + } + if (uidMap.containsKey(NEDSSConstant.PAR101_TYP_CD) && labRepSumm != null) { + labRepSumm.setOrderingFacility(observationSummaryService.getReportingFacilityName((Long) uidMap.get(NEDSSConstant.PAR101_TYP_CD))); + } + + if (uidMap.containsKey(NEDSSConstant.PAR104_TYP_CD) && labRepEvent != null) { + var code = observationSummaryService.getSpecimanSource((Long) uidMap.get(NEDSSConstant.PAR104_TYP_CD)); + var tree = cachingValueService.getCodedValues("SPECMN_SRC", code); + labRepEvent.setSpecimenSource(tree.get(code)); + } + if (uidMap.containsKey(NEDSSConstant.PAR104_TYP_CD) && labRepSumm != null) { + var code = observationSummaryService.getSpecimanSource((Long) uidMap.get(NEDSSConstant.PAR104_TYP_CD)); + var tree = cachingValueService.getCodedValues("SPECMN_SRC", code); + labRepSumm.setSpecimenSource(tree.get(code)); + } } + providerUid = observationSummaryService.getProviderInformation(providerDetails, labRepEvent); if (isCDCFormPrintCase && providerUid != null && LabAsSourceForInvestigation != null) { @@ -999,18 +950,16 @@ else if(uidType.equals("LABORATORY_UID")) } if (orderingFacilityUid != null) { var org = organizationRepositoryUtil.loadObject(orderingFacilityUid, null); - if (org != null && !org.getTheOrganizationNameDtoCollection().isEmpty()) { - OrganizationNameDto dt = null; + if (org != null && !org.getTheOrganizationNameDtoCollection().isEmpty() && providerDataForPrintVO != null) { + OrganizationNameDto dt; dt = org.getTheOrganizationNameDtoCollection().stream().findFirst().get(); providerDataForPrintVO.setFacilityName(dt.getNmTxt()); } observationSummaryService.getOrderingFacilityAddress(providerDataForPrintVO, orderingFacilityUid); observationSummaryService.getOrderingFacilityPhone(providerDataForPrintVO, orderingFacilityUid); } - if (providerUid != null) { - observationSummaryService.getOrderingPersonAddress(providerDataForPrintVO, providerUid); - observationSummaryService.getOrderingPersonPhone(providerDataForPrintVO, providerUid); - } + observationSummaryService.getOrderingPersonAddress(providerDataForPrintVO, providerUid); + observationSummaryService.getOrderingPersonPhone(providerDataForPrintVO, providerUid); } observationSummaryService.getProviderInformation(providerDetails, labRepSumm); @@ -1040,8 +989,7 @@ else if(uidType.equals("LABORATORY_UID")) } } - } - catch (Exception ex) { + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } } @@ -1057,12 +1005,12 @@ else if(uidType.equals("LABORATORY_UID")) @SuppressWarnings("java:S3776") protected void processingInvestigationSummary(InvestigationContainer investigationProxyVO, - PublicHealthCaseContainer thePublicHealthCaseContainer, - boolean lite) throws DataProcessingException { - if(!lite) { + PublicHealthCaseContainer thePublicHealthCaseContainer, + boolean lite) throws DataProcessingException { + if (!lite) { investigationProxyVO.setTheNotificationSummaryVOCollection(retrieveSummaryService.notificationSummaryOnInvestigation(thePublicHealthCaseContainer, investigationProxyVO)); - if(investigationProxyVO.getTheNotificationSummaryVOCollection()!=null){ + if (investigationProxyVO.getTheNotificationSummaryVOCollection() != null) { for (Object o : investigationProxyVO.getTheNotificationSummaryVOCollection()) { NotificationSummaryContainer notifVO = (NotificationSummaryContainer) o; for (ActRelationshipDto actRelationDT : investigationProxyVO.getThePublicHealthCaseContainer().getTheActRelationshipDTCollection()) { @@ -1085,10 +1033,10 @@ protected void processingInvestigationSummary(InvestigationContainer investigati } } - @SuppressWarnings({"java:S3776","java:S6541"}) + @SuppressWarnings({"java:S3776", "java:S6541"}) protected void populateDescTxtFromCachedValues(Collection - reportSummaryVOCollection) throws DataProcessingException { - ReportSummaryInterface sumVO ; + reportSummaryVOCollection) throws DataProcessingException { + LabReportSummaryContainer sumVO; LabReportSummaryContainer labVO; LabReportSummaryContainer labMorbVO = null; ResultedTestSummaryContainer resVO; @@ -1096,14 +1044,14 @@ protected void populateDescTxtFromCachedValues(Collection Iterator labMorbItor = null; ResultedTestSummaryContainer susVO; Iterator susItor; - Collection susColl ; + Collection susColl; Collection labMorbColl = null; String tempStr = null; for (Object o : reportSummaryVOCollection) { sumVO = (LabReportSummaryContainer) o; - if (sumVO instanceof LabReportSummaryContainer) { - labVO = (LabReportSummaryContainer) sumVO; + if (sumVO != null) { + labVO = sumVO; labVO.setType(NEDSSConstant.LAB_REPORT_DESC); if (labVO.getProgramArea() != null) { tempStr = SrteCache.programAreaCodesMap.get(labVO.getProgramArea()); @@ -1123,7 +1071,7 @@ protected void populateDescTxtFromCachedValues(Collection labVO.getTheResultedTestSummaryVOCollection().size() > 0) { resItor = labVO.getTheResultedTestSummaryVOCollection().iterator(); while (resItor.hasNext()) { - resVO = (ResultedTestSummaryContainer) resItor.next(); + resVO = resItor.next(); if (resVO.getCtrlCdUserDefined1() != null) { @@ -1219,19 +1167,17 @@ protected void populateDescTxtFromCachedValues(Collection susVO.setCodedResultValue(tempStr); } if (susVO.getCdSystemCd() != null && - !susVO.getCdSystemCd().equals("")) { + !susVO.getCdSystemCd().equals("") && + susVO.getResultedTestCd() != null) { if (susVO.getCdSystemCd().equals("LN")) { - if (susVO.getResultedTestCd() != null && - !susVO.getResultedTestCd().equals("")) { + if (!susVO.getResultedTestCd().equals("")) { tempStr = SrteCache.loinCodeWithComponentNameMap.get(susVO.getResultedTestCd()); - if (tempStr != null && !tempStr.equals("")) { susVO.setResultedTest(tempStr); } } - } else if (!susVO.getCdSystemCd().equals("LN")) { - if (susVO.getResultedTestCd() != null && - !susVO.getResultedTestCd().equals("")) { + } else { + if (!susVO.getResultedTestCd().equals("")) { var res = labTestRepository.findLabTestByLabIdAndLabTestCode(resVO.getCdSystemCd(), resVO.getResultedTestCd()); if (res.isPresent()) { tempStr = res.get().get(0).getLabResultDescTxt(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/LdfService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/LdfService.java index 67ad43f37..c50bfbba5 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/LdfService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/LdfService.java @@ -26,8 +26,7 @@ public List getLDFCollection(Long busObjectUid, String StateDefinedFieldDataDto stateDefinedFieldDataDT = new StateDefinedFieldDataDto(); List pList; - try - { + try { StringBuilder query = new StringBuilder(SELECT_LDF); if (conditionCode != null) //only include this where clause when the cond code is not null { @@ -36,15 +35,11 @@ public List getLDFCollection(Long busObjectUid, String query.append(this.SELECT_LDF_ORDER_BY); pList = customRepository.getLdfCollection(busObjectUid, conditionCode, query.toString()); - } - catch(Exception ex) - { - throw new DataProcessingException( ex.getMessage()); + } catch (Exception ex) { + throw new DataProcessingException(ex.getMessage()); } return pList; }//end of selecting place - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/PublicHealthCaseService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/PublicHealthCaseService.java index 412ff5cba..6a258d859 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/PublicHealthCaseService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/PublicHealthCaseService.java @@ -19,6 +19,7 @@ public class PublicHealthCaseService implements IPublicHealthCaseService { private final EntityHelper entityHelper; private final PublicHealthCaseRepositoryUtil publicHealthCaseRepositoryUtil; + public PublicHealthCaseService(EntityHelper entityHelper, PublicHealthCaseRepositoryUtil publicHealthCaseRepositoryUtil) { @@ -30,8 +31,7 @@ public Long setPublicHealthCase(PublicHealthCaseContainer publicHealthCaseContai Long PubHealthCaseUid; - try - { + try { PublicHealthCaseDto publicHealthCase; @@ -40,41 +40,33 @@ public Long setPublicHealthCase(PublicHealthCaseContainer publicHealthCaseContai Collection pDTCol = publicHealthCaseContainer.getTheParticipationDTCollection(); Collection col; Collection colActRelationship; - Collection colParticipation ; + Collection colParticipation; - if (alpDTCol != null) - { + if (alpDTCol != null) { col = entityHelper.iterateALPDTActivityLocatorParticipation(alpDTCol); publicHealthCaseContainer.setTheActivityLocatorParticipationDTCollection(col); } - if (arDTCol != null) - { + if (arDTCol != null) { colActRelationship = entityHelper.iterateARDTActRelationship(arDTCol); publicHealthCaseContainer.setTheActRelationshipDTCollection(colActRelationship); } - if (pDTCol != null) - { + if (pDTCol != null) { colParticipation = entityHelper.iteratePDTForParticipation(pDTCol); publicHealthCaseContainer.setTheParticipationDTCollection(colParticipation); } - if (publicHealthCaseContainer.isItNew()) - { + if (publicHealthCaseContainer.isItNew()) { publicHealthCaseRepositoryUtil.create(publicHealthCaseContainer); - publicHealthCase = publicHealthCaseContainer.getThePublicHealthCaseDto(); + publicHealthCase = publicHealthCaseContainer.getThePublicHealthCaseDto(); PubHealthCaseUid = publicHealthCase.getPublicHealthCaseUid(); - } - else - { + } else { publicHealthCaseRepositoryUtil.update(publicHealthCaseContainer); PubHealthCaseUid = publicHealthCaseContainer.getThePublicHealthCaseDto().getPublicHealthCaseUid(); } - } - catch (Exception e) - { - throw new DataProcessingException(e.getMessage(), e); + } catch (Exception e) { + throw new DataProcessingException(e.getMessage(), e); } return PubHealthCaseUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/RetrieveSummaryService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/RetrieveSummaryService.java index ee775919e..c79c72805 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/RetrieveSummaryService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/public_health_case/RetrieveSummaryService.java @@ -43,14 +43,14 @@ public RetrieveSummaryService(PublicHealthCaseRepositoryUtil publicHealthCaseRep } public void checkBeforeCreateAndStoreMessageLogDTCollection(Long investigationUID, - Collection reportSumVOCollection){ + Collection reportSumVOCollection) { try { PublicHealthCaseDto publicHealthCaseDto; publicHealthCaseDto = publicHealthCaseRepositoryUtil.findPublicHealthCase(investigationUID); - if(publicHealthCaseDto.isStdHivProgramAreaCode()){ + if (publicHealthCaseDto.isStdHivProgramAreaCode()) { //TODO: LOGGING PIPELINE } } catch (Exception e) { @@ -61,28 +61,28 @@ public void checkBeforeCreateAndStoreMessageLogDTCollection(Long investigationUI /** * This method will access the HashMap of TreatmentSummaryVO for passed investigationUID * to papulate the Treatment summary on Investigation page + * * @param publicHealthUID -- UID for investigation to Access Treatment related to it - * @return HashMap -- HashMap of TreatmentSummaryVO for the passed investigationUID + * @return HashMap -- HashMap of TreatmentSummaryVO for the passed investigationUID */ @SuppressWarnings("java:S1135") - public Map retrieveTreatmentSummaryVOForInv(Long publicHealthUID) { + public Map retrieveTreatmentSummaryVOForInv(Long publicHealthUID) { String aQuery = null; String dataAccessWhereClause = queryHelper.getDataAccessWhereClause(NBSBOLookup.TREATMENT, "VIEW", "Treatment"); if (dataAccessWhereClause == null) { dataAccessWhereClause = ""; - } - else { + } else { dataAccessWhereClause = "AND " + dataAccessWhereClause; } aQuery = TREATMENTS_FOR_A_PHC_ORACLE + dataAccessWhereClause; - Map treatmentsSummaryVOHashMap = new HashMap<>(); + Map treatmentsSummaryVOHashMap = new HashMap<>(); //TreeMap treatmentsSummaryVOTreeMap = new TreeMap(); - Map map = null; + Map map = null; TreatmentContainer treatmentSummaryVO = new TreatmentContainer(); //TODO: DIFFER FLOW @@ -91,21 +91,20 @@ public Map retrieveTreatmentSummaryVOForInv(Long publicHealthUID) } // retrieveTreatmentSummaryList - public Map retrieveDocumentSummaryVOForInv(Long publicHealthUID) throws DataProcessingException { - Map documentSummaryVOColl; + public Map retrieveDocumentSummaryVOForInv(Long publicHealthUID) throws DataProcessingException { + Map documentSummaryVOColl; try { documentSummaryVOColl = customRepository.retrieveDocumentSummaryVOForInv(publicHealthUID); - } - catch (Exception rsuex) { + } catch (Exception rsuex) { throw new DataProcessingException(rsuex.toString()); } return documentSummaryVOColl; } // retrieveDocumentSummaryList - public Collection notificationSummaryOnInvestigation(PublicHealthCaseContainer publicHealthCaseContainer, Object object) throws DataProcessingException { + public Collection notificationSummaryOnInvestigation(PublicHealthCaseContainer publicHealthCaseContainer, Object object) throws DataProcessingException { - Collection theNotificationSummaryVOCollection; + Collection theNotificationSummaryVOCollection; Long publicHealthCaseUID = null; NotificationSummaryContainer notificationSummaryVO = null; @@ -115,12 +114,11 @@ public Collection notificationSummaryOnInvestigation(PublicHealthCaseCo } if (publicHealthCaseContainer != null && publicHealthCaseContainer.getThePublicHealthCaseDto().getCaseClassCd() != null) { - theNotificationSummaryVOCollection =retrieveNotificationSummaryListForInvestigation(publicHealthCaseUID); + theNotificationSummaryVOCollection = retrieveNotificationSummaryListForInvestigation(publicHealthCaseUID); + } else { + theNotificationSummaryVOCollection = retrieveNotificationSummaryListForInvestigation1(publicHealthCaseUID); } - else { - theNotificationSummaryVOCollection =retrieveNotificationSummaryListForInvestigation1(publicHealthCaseUID); - } - if (theNotificationSummaryVOCollection != null) { + if (theNotificationSummaryVOCollection != null) { Iterator anIterator = theNotificationSummaryVOCollection.iterator(); int count = 0; while (anIterator.hasNext()) { @@ -132,11 +130,9 @@ public Collection notificationSummaryOnInvestigation(PublicHealthCaseCo notificationSummaryVO.getRecordStatusCd().trim().equals( NEDSSConstant.NOTIFICATION_PENDING_CODE) || (notificationSummaryVO.getAutoResendInd() != null && notificationSummaryVO.getAutoResendInd().equalsIgnoreCase("T"))) { - if(object instanceof InvestigationContainer){ - InvestigationContainer investigationProxyVO = (InvestigationContainer)object; + if (object instanceof InvestigationContainer investigationProxyVO) { investigationProxyVO.setAssociatedNotificationsInd(true); - } else if(object instanceof PamProxyContainer) { - PamProxyContainer pamProxy = (PamProxyContainer) object; + } else if (object instanceof PamProxyContainer pamProxy) { pamProxy.setAssociatedNotificationsInd(true); } } @@ -156,20 +152,19 @@ public Collection notificationSummaryOnInvestigation(PublicHealthCaseCo } theNotificationSummaryVOCollection = notificationSummaryOnInvestigationProcessingNotificationCol(theNotificationSummaryVOCollection, - notificationSummaryVO, - object); + notificationSummaryVO, + object); return theNotificationSummaryVOCollection; } //end of observationAssociates() @SuppressWarnings("java:S3776") protected Collection notificationSummaryOnInvestigationProcessingNotificationCol(Collection theNotificationSummaryVOCollection, - NotificationSummaryContainer notificationSummaryVO, - Object object) { - if (theNotificationSummaryVOCollection != null) { + NotificationSummaryContainer notificationSummaryVO, + Object object) { + if (theNotificationSummaryVOCollection != null) { for (Object o : theNotificationSummaryVOCollection) { notificationSummaryVO = (NotificationSummaryContainer) o; //NOSONAR - if (object instanceof InvestigationContainer) { - InvestigationContainer investigationProxyVO = (InvestigationContainer) object; + if (object instanceof InvestigationContainer investigationProxyVO) { if (notificationSummaryVO.isCaseReport()) { if (notificationSummaryVO.getRecordStatusCd().trim().equals(NEDSSConstant.NOTIFICATION_APPROVED_CODE)) { investigationProxyVO.setOOSystemInd(true); @@ -181,15 +176,13 @@ protected Collection notificationSummaryOnInvestigationProcessingNotific (notificationSummaryVO.getCdNotif().equals(NEDSSConstant.CLASS_CD_EXP_NOTF) || notificationSummaryVO.getCdNotif().equals(NEDSSConstant.CLASS_CD_EXP_NOTF_PHDC)) && !(notificationSummaryVO.getRecordStatusCd().trim().equals(NEDSSConstant.NOTIFICATION_REJECTED_CODE) || - notificationSummaryVO.getRecordStatusCd().trim().equals(NEDSSConstant.NOTIFICATION_MESSAGE_FAILED))) { + notificationSummaryVO.getRecordStatusCd().trim().equals(NEDSSConstant.NOTIFICATION_MESSAGE_FAILED))) { investigationProxyVO.setOOSystemPendInd(true); } } - } - else if (object instanceof PamProxyContainer) // NOSONAR + } else if (object instanceof PamProxyContainer pamProxy) // NOSONAR { - PamProxyContainer pamProxy = (PamProxyContainer) object; if (notificationSummaryVO.isCaseReport()) { if (notificationSummaryVO.getRecordStatusCd().trim().equals(NEDSSConstant.NOTIFICATION_APPROVED_CODE)) { pamProxy.setOOSystemInd(true); @@ -204,10 +197,8 @@ else if (object instanceof PamProxyContainer) // NOSONAR pamProxy.setOOSystemPendInd(true); } } - } - else if (object instanceof PageActProxyContainer) // NOSONAR + } else if (object instanceof PageActProxyContainer pageProxy) // NOSONAR { - PageActProxyContainer pageProxy = (PageActProxyContainer) object; if (notificationSummaryVO.isCaseReport()) { if (notificationSummaryVO.getRecordStatusCd().trim().equals(NEDSSConstant.NOTIFICATION_APPROVED_CODE)) { pageProxy.setOOSystemInd(true); @@ -233,15 +224,16 @@ else if (object instanceof PageActProxyContainer) // NOSONAR /** * This method will access the Collection of NotificationSummaryList for passed * investigationUID to papulate the Notification summary on investigation page + * * @return Collection -- Collection of NotificationSummaryVO for the passed publicHealthCaseDT */ @SuppressWarnings("java:S3776") - protected Collection retrieveNotificationSummaryListForInvestigation(Long publicHealthUID) throws DataProcessingException { - ArrayList theNotificationSummaryVOCollection = new ArrayList<> (); + protected Collection retrieveNotificationSummaryListForInvestigation(Long publicHealthUID) throws DataProcessingException { + ArrayList theNotificationSummaryVOCollection = new ArrayList<>(); if (publicHealthUID != null) { - String statement[] = new String[2]; + String[] statement = new String[2]; statement[0] = SELECT_NOTIFICATION_FOR_INVESTIGATION_SQL; - statement[1] = SELECT_NOTIFICATION_HIST_FOR_INVESTIGATION_SQL +" ORDER BY notHist.version_ctrl_nbr DESC"; + statement[1] = SELECT_NOTIFICATION_HIST_FOR_INVESTIGATION_SQL + " ORDER BY notHist.version_ctrl_nbr DESC"; for (String s : statement) { List retval; @@ -287,9 +279,10 @@ protected Collection retrieveNotificationSummaryListForInvestigation(Lo } return theNotificationSummaryVOCollection; } - @SuppressWarnings({"unchecked","java:S3776"}) - protected Collection retrieveNotificationSummaryListForInvestigation1(Long publicHealthUID) throws DataProcessingException { - ArrayList theNotificationSummaryVOCollection = new ArrayList<> (); + + @SuppressWarnings({"unchecked", "java:S3776"}) + protected Collection retrieveNotificationSummaryListForInvestigation1(Long publicHealthUID) throws DataProcessingException { + ArrayList theNotificationSummaryVOCollection = new ArrayList<>(); if (publicHealthUID != null) { String dataAccessWhereClause = queryHelper.getDataAccessWhereClause( NBSBOLookup.INVESTIGATION, "VIEW", @@ -297,12 +290,11 @@ protected Collection retrieveNotificationSummaryListForInvestigation1(L if (dataAccessWhereClause == null) { dataAccessWhereClause = ""; - } - else { + } else { dataAccessWhereClause = " AND " + dataAccessWhereClause; } - String statement[] = new String[2]; + String[] statement = new String[2]; statement[0] = SELECT_NOTIFICATION_FOR_INVESTIGATION_SQL1 + dataAccessWhereClause; @@ -310,8 +302,8 @@ protected Collection retrieveNotificationSummaryListForInvestigation1(L dataAccessWhereClause + " ORDER BY notHist.version_ctrl_nbr DESC"; NotificationSummaryContainer notifVO = new NotificationSummaryContainer(); - TreeMap mapPhcClass = catchingValueService.getCodedValuesCallRepos("PHC_CLASS"); - TreeMap mapPhcType = catchingValueService.getCodedValuesCallRepos("PHC_TYPE"); + TreeMap mapPhcClass = catchingValueService.getCodedValuesCallRepos("PHC_CLASS"); + TreeMap mapPhcType = catchingValueService.getCodedValuesCallRepos("PHC_TYPE"); for (String s : statement) { @@ -363,22 +355,19 @@ protected Collection retrieveNotificationSummaryListForInvestigation1(L } - /* * getAssociatedInvList - from the act relationship retrieve any associated cases for the passed in class code * Note: This was modified for STD to also retrieve the Processing Decision stored in the add_reason_cd * Processing Decision is only stored for STD and only when associating a lab or morb to a closed case. */ - public Map getAssociatedDocumentList(Long uid, String targetClassCd, String sourceClassCd) throws DataProcessingException - { - Map assocoiatedDocMap; - try{ + public Map getAssociatedDocumentList(Long uid, String targetClassCd, String sourceClassCd) throws DataProcessingException { + Map assocoiatedDocMap; + try { String dataAccessWhereClause = queryHelper.getDataAccessWhereClause( NBSBOLookup.DOCUMENT, "VIEW", ""); if (dataAccessWhereClause == null) { dataAccessWhereClause = ""; - } - else { + } else { dataAccessWhereClause = " AND " + dataAccessWhereClause; } @@ -393,12 +382,10 @@ public Map getAssociatedDocumentList(Long uid, String targetClass "and target_class_cd = :TargetClassCd " + "and nbs_document.record_status_cd!='LOG_DEL' "; - ASSOCIATED_DOC_QUERY=ASSOCIATED_DOC_QUERY+dataAccessWhereClause; + ASSOCIATED_DOC_QUERY = ASSOCIATED_DOC_QUERY + dataAccessWhereClause; assocoiatedDocMap = customRepository.getAssociatedDocumentList(uid, targetClassCd, sourceClassCd, ASSOCIATED_DOC_QUERY); - } - catch(Exception ex) - { + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } @@ -406,16 +393,15 @@ public Map getAssociatedDocumentList(Long uid, String targetClass } public void updateNotification(Long notificationUid, - String businessTriggerCd, - String phcCd, - String phcClassCd, - String progAreaCd, - String jurisdictionCd, - String sharedInd) throws DataProcessingException { - - Collection notificationVOCollection = null; - try - { + String businessTriggerCd, + String phcCd, + String phcClassCd, + String progAreaCd, + String jurisdictionCd, + String sharedInd) throws DataProcessingException { + + Collection notificationVOCollection = null; + try { var resNotification = notificationRepositoryUtil.getNotificationContainer(notificationUid); NotificationContainer notificationContainer = resNotification; @@ -438,7 +424,7 @@ public void updateNotification(Long notificationUid, notificationContainer.setTheNotificationDT(newNotificationDT); Long newNotficationUid = notificationRepositoryUtil.setNotification(notificationContainer); - }catch (Exception e){ + } catch (Exception e) { throw new DataProcessingException("Error in calling ActControllerEJB.setNotification() " + e.getMessage()); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/role/RoleService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/role/RoleService.java index ca24251eb..2776dc7e1 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/role/RoleService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/role/RoleService.java @@ -27,7 +27,7 @@ public Collection findRoleScopedToPatient(Long uid) { Collection roleDtoCollection = new ArrayList<>(); var result = roleRepository.findRoleScopedToPatient(uid); if (result.isPresent()) { - for(var item: result.get()) { + for (var item : result.get()) { var elem = new RoleDto(item); elem.setItNew(false); elem.setItDirty(false); @@ -42,7 +42,7 @@ public Collection findRoleScopedToPatient(Long uid) { @Transactional public void storeRoleDTCollection(Collection roleDTColl) throws DataProcessingException { try { - if(roleDTColl == null || roleDTColl.isEmpty()) return; + if (roleDTColl == null || roleDTColl.isEmpty()) return; for (RoleDto roleDT : roleDTColl) { if (roleDT == null) { @@ -58,14 +58,12 @@ public void storeRoleDTCollection(Collection roleDTColl) throws DataPro } - @Transactional public void saveRole(RoleDto roleDto) { if (roleDto.isItNew() || roleDto.isItDirty()) { var data = new Role(roleDto); roleRepository.save(data); - } - else if (roleDto.isItDelete()) { + } else if (roleDto.isItDelete()) { removeRole(roleDto); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/uid_generator/UidService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/uid_generator/UidService.java index dcf29d919..799be7a5c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/uid_generator/UidService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/implementation/uid_generator/UidService.java @@ -29,78 +29,62 @@ public class UidService implements IUidService { * the investigationProxyVO(determined in the addInvestigation method). * As it has also got the actualUID (determined in the addInvestigation method) it replaces them accordingly. */ - public void setFalseToNewForObservation(BaseContainer proxyVO, Long falseUid, Long actualUid) - { + public void setFalseToNewForObservation(BaseContainer proxyVO, Long falseUid, Long actualUid) { Iterator participationDTIterator; - Iterator actRelationshipDTIterator; - Iterator roleDtoIterator; + Iterator actRelationshipDTIterator; + Iterator roleDtoIterator; ParticipationDto participationDto; ActRelationshipDto actRelationshipDto; RoleDto roleDT; Collection participationColl = null; - Collection actRelationShipColl = null; - Collection roleColl = null; + Collection actRelationShipColl = null; + Collection roleColl = null; - if (proxyVO instanceof LabResultProxyContainer) - { - participationColl = ((LabResultProxyContainer) proxyVO).getTheParticipationDtoCollection(); + if (proxyVO instanceof LabResultProxyContainer) { + participationColl = ((LabResultProxyContainer) proxyVO).getTheParticipationDtoCollection(); actRelationShipColl = ((LabResultProxyContainer) proxyVO).getTheActRelationshipDtoCollection(); roleColl = ((LabResultProxyContainer) proxyVO).getTheRoleDtoCollection(); } - if (participationColl != null) - { - for (participationDTIterator = participationColl.iterator(); participationDTIterator.hasNext(); ) - { + if (participationColl != null) { + for (participationDTIterator = participationColl.iterator(); participationDTIterator.hasNext(); ) { participationDto = participationDTIterator.next(); - if (participationDto != null && falseUid != null) - { - if (participationDto.getActUid().compareTo(falseUid) == 0) - { + if (participationDto != null && falseUid != null) { + if (participationDto.getActUid().compareTo(falseUid) == 0) { participationDto.setActUid(actualUid); } - if (participationDto.getSubjectEntityUid().compareTo(falseUid) == 0) - { + if (participationDto.getSubjectEntityUid().compareTo(falseUid) == 0) { participationDto.setSubjectEntityUid(actualUid); } } } } - if (actRelationShipColl != null) - { - for (actRelationshipDTIterator = actRelationShipColl.iterator(); actRelationshipDTIterator.hasNext(); ) - { + if (actRelationShipColl != null) { + for (actRelationshipDTIterator = actRelationShipColl.iterator(); actRelationshipDTIterator.hasNext(); ) { actRelationshipDto = actRelationshipDTIterator.next(); - if (falseUid != null && actRelationshipDto.getTargetActUid().compareTo(falseUid) == 0) - { + if (falseUid != null && actRelationshipDto.getTargetActUid().compareTo(falseUid) == 0) { actRelationshipDto.setTargetActUid(actualUid); } - if (falseUid != null && actRelationshipDto.getSourceActUid().compareTo(falseUid) == 0) - { + if (falseUid != null && actRelationshipDto.getSourceActUid().compareTo(falseUid) == 0) { actRelationshipDto.setSourceActUid(actualUid); } } } - if (roleColl != null && roleColl.size() != 0) - { - for (roleDtoIterator = roleColl.iterator(); roleDtoIterator.hasNext(); ) - { - roleDT = roleDtoIterator.next(); + if (roleColl != null && roleColl.size() != 0) { + for (roleDtoIterator = roleColl.iterator(); roleDtoIterator.hasNext(); ) { + roleDT = roleDtoIterator.next(); - if (falseUid != null && roleDT.getSubjectEntityUid().compareTo(falseUid) == 0) - { + if (falseUid != null && roleDT.getSubjectEntityUid().compareTo(falseUid) == 0) { roleDT.setSubjectEntityUid(actualUid); } - if (roleDT.getScopingEntityUid() != null) - { - if (falseUid != null && roleDT.getScopingEntityUid().compareTo(falseUid) == 0) - { + if (roleDT.getScopingEntityUid() != null) { + if (falseUid != null && roleDT.getScopingEntityUid().compareTo(falseUid) == 0) { roleDT.setScopingEntityUid(actualUid); } } @@ -116,15 +100,14 @@ public void setFalseToNewForObservation(BaseContainer proxyVO, Long falseUid, Lo * Act Relationship collection * Role collection * - This is crucial in Observation Flow - * */ - public void setFalseToNewPersonAndOrganization(LabResultProxyContainer labResultProxyContainer, Long falseUid, Long actualUid) - { + */ + public void setFalseToNewPersonAndOrganization(LabResultProxyContainer labResultProxyContainer, Long falseUid, Long actualUid) { Iterator participationIterator; Iterator actRelationshipIterator; Iterator roleIterator; ParticipationDto participationDto; - ActRelationshipDto actRelationshipDto ; + ActRelationshipDto actRelationshipDto; RoleDto roleDto; Collection participationColl = labResultProxyContainer.getTheParticipationDtoCollection(); @@ -190,7 +173,7 @@ public void setFalseToNewForPageAct(PageActProxyContainer pageProxyVO, Long fals Iterator anIteratorPat; if (participationColl != null) { for (anIteratorPat = participationColl.iterator(); anIteratorPat - .hasNext();) { + .hasNext(); ) { participationDT = anIteratorPat.next(); if (participationDT.getActUid().compareTo(falseUid) == 0) { participationDT.setActUid(actualUid); @@ -205,26 +188,26 @@ public void setFalseToNewForPageAct(PageActProxyContainer pageProxyVO, Long fals Iterator anIteratorActRe; if (actRelationShipColl != null) { for (anIteratorActRe = actRelationShipColl.iterator(); anIteratorActRe - .hasNext();) { - actRelationshipDT = anIteratorActRe.next(); + .hasNext(); ) { + actRelationshipDT = anIteratorActRe.next(); if (actRelationshipDT.getTargetActUid().compareTo(falseUid) == 0) { actRelationshipDT.setTargetActUid(actualUid); - eventUid=actRelationshipDT.getTargetActUid(); + eventUid = actRelationshipDT.getTargetActUid(); } if (actRelationshipDT.getSourceActUid().compareTo(falseUid) == 0) { actRelationshipDT.setSourceActUid(actualUid); } logger.debug("ActRelationShipDT: falseUid " - + falseUid+ " actualUid: " + actualUid); + + falseUid + " actualUid: " + actualUid); } } Iterator anIteratorNbsActEntity; if (pamCaseEntityColl != null) { for (anIteratorNbsActEntity = pamCaseEntityColl.iterator(); anIteratorNbsActEntity - .hasNext();) { - pamCaseEntityDT = anIteratorNbsActEntity.next(); + .hasNext(); ) { + pamCaseEntityDT = anIteratorNbsActEntity.next(); if (pamCaseEntityDT.getEntityUid().compareTo(falseUid) == 0) { pamCaseEntityDT.setEntityUid(actualUid); } @@ -236,15 +219,15 @@ public void setFalseToNewForPam(PamProxyContainer pamProxyVO, Long falseUid, Lon ParticipationDto participationDT; ActRelationshipDto actRelationshipDT; NbsActEntityDto pamCaseEntityDT; - Collection participationColl = pamProxyVO.getTheParticipationDTCollection(); - Collection actRelationShipColl = pamProxyVO + Collection participationColl = pamProxyVO.getTheParticipationDTCollection(); + Collection actRelationShipColl = pamProxyVO .getPublicHealthCaseContainer().getTheActRelationshipDTCollection(); - Collection pamCaseEntityColl = pamProxyVO.getPamVO().getActEntityDTCollection(); + Collection pamCaseEntityColl = pamProxyVO.getPamVO().getActEntityDTCollection(); - Iterator anIteratorPat; + Iterator anIteratorPat; if (participationColl != null) { - for (anIteratorPat = participationColl.iterator(); anIteratorPat.hasNext();) { - participationDT = anIteratorPat.next(); + for (anIteratorPat = participationColl.iterator(); anIteratorPat.hasNext(); ) { + participationDT = anIteratorPat.next(); if (participationDT.getActUid().compareTo(falseUid) == 0) { participationDT.setActUid(actualUid); } @@ -254,10 +237,10 @@ public void setFalseToNewForPam(PamProxyContainer pamProxyVO, Long falseUid, Lon } } - Iterator anIteratorAct; + Iterator anIteratorAct; if (actRelationShipColl != null) { - for (anIteratorAct = actRelationShipColl.iterator(); anIteratorAct.hasNext();) { + for (anIteratorAct = actRelationShipColl.iterator(); anIteratorAct.hasNext(); ) { actRelationshipDT = anIteratorAct.next(); if (actRelationshipDT.getTargetActUid().compareTo(falseUid) == 0) { @@ -269,11 +252,11 @@ public void setFalseToNewForPam(PamProxyContainer pamProxyVO, Long falseUid, Lon } } - Iterator anIteratorActEntity; + Iterator anIteratorActEntity; if (pamCaseEntityColl != null) { - for (anIteratorActEntity = pamCaseEntityColl.iterator(); anIteratorActEntity.hasNext();) { - pamCaseEntityDT = anIteratorActEntity.next(); + for (anIteratorActEntity = pamCaseEntityColl.iterator(); anIteratorActEntity.hasNext(); ) { + pamCaseEntityDT = anIteratorActEntity.next(); if (pamCaseEntityDT.getEntityUid().compareTo(falseUid) == 0) { pamCaseEntityDT.setEntityUid(actualUid); } @@ -289,11 +272,9 @@ public ActRelationshipDto setFalseToNewForNotification(NotificationProxyContaine Collection actRelationShipColl = notificationProxyVO.getTheActRelationshipDTCollection(); Collection act2 = new ArrayList<>(); - if (actRelationShipColl != null) - { + if (actRelationShipColl != null) { - for (anIterator = actRelationShipColl.iterator(); anIterator.hasNext();) - { + for (anIterator = actRelationShipColl.iterator(); anIterator.hasNext(); ) { actRelationshipDT = (ActRelationshipDto) anIterator.next(); actRelationshipDT.setSourceActUid(actualUid); act2.add(actRelationshipDT); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/act/IActRelationshipService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/act/IActRelationshipService.java index 4f1bcf7f5..b57276e06 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/act/IActRelationshipService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/act/IActRelationshipService.java @@ -7,5 +7,6 @@ public interface IActRelationshipService { Collection loadActRelationshipBySrcIdAndTypeCode(Long uid, String type); + void saveActRelationship(ActRelationshipDto actRelationshipDto) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/answer/IAnswerService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/answer/IAnswerService.java index 3d434daea..0a764b359 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/answer/IAnswerService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/answer/IAnswerService.java @@ -10,8 +10,11 @@ public interface IAnswerService { PageContainer getNbsAnswerAndAssociation(Long uid) throws DataProcessingException; + void storePageAnswer(PageContainer pageContainer, ObservationDto observationDto) throws DataProcessingException; + void insertPageVO(PageContainer pageContainer, ObservationDto rootDTInterface) throws DataProcessingException; + void storeActEntityDTCollectionWithPublicHealthCase(Collection pamDTCollection, PublicHealthCaseDto rootDTInterface) - throws DataProcessingException; + throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/cache/ICatchingValueService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/cache/ICatchingValueService.java index 4ca3ae490..575e54ad2 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/cache/ICatchingValueService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/cache/ICatchingValueService.java @@ -10,27 +10,48 @@ import java.util.TreeMap; public interface ICatchingValueService { - // TreeMap getCodedValues(String pType) throws DataProcessingException; + // TreeMap getCodedValues(String pType) throws DataProcessingException; TreeMap getRaceCodes() throws DataProcessingException; + String getCodeDescTxtForCd(String code, String codeSetNm) throws DataProcessingException; + String findToCode(String fromCodeSetNm, String fromCode, String toCodeSetNm) throws DataProcessingException; + String getCountyCdByDesc(String county, String stateCd) throws DataProcessingException; - TreeMap getAOELOINCCodes() throws DataProcessingException; + + TreeMap getAOELOINCCodes() throws DataProcessingException; + TreeMap getCodedValues(String pType, String key) throws DataProcessingException; + List findCodeValuesByCodeSetNmAndCode(String codeSetNm, String code); + StateCode findStateCodeByStateNm(String stateNm); + TreeMap getAllJurisdictionCode() throws DataProcessingException; + TreeMap getAllProgramAreaCodes() throws DataProcessingException; + TreeMap getAllProgramAreaCodesWithNbsUid() throws DataProcessingException; + TreeMap getAllJurisdictionCodeWithNbsUid() throws DataProcessingException; + List getAllElrXref() throws DataProcessingException; + TreeMap getAllOnInfectionConditionCode() throws DataProcessingException; + List getAllConditionCode() throws DataProcessingException; + TreeMap getCodedValue(String code) throws DataProcessingException; + List getGeneralCodedValue(String code); + TreeMap getCodedValuesCallRepos(String pType) throws DataProcessingException; + TreeMap getLabResultDesc() throws DataProcessingException; + TreeMap getAllSnomedCode() throws DataProcessingException; + TreeMap getAllLabResultJoinWithLabCodingSystemWithOrganismNameInd() throws DataProcessingException; + TreeMap getAllLoinCodeWithComponentName() throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/entity/IEntityLocatorParticipationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/entity/IEntityLocatorParticipationService.java index dfd7be0aa..7aabeaad2 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/entity/IEntityLocatorParticipationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/entity/IEntityLocatorParticipationService.java @@ -9,6 +9,8 @@ public interface IEntityLocatorParticipationService { void updateEntityLocatorParticipation(Collection locatorCollection, Long uid) throws DataProcessingException; + void createEntityLocatorParticipation(Collection locatorCollection, Long uid) throws DataProcessingException; + List findEntityLocatorById(Long uid); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/jurisdiction/IJurisdictionService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/jurisdiction/IJurisdictionService.java index c7eb6f299..27ed4a3e4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/jurisdiction/IJurisdictionService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/jurisdiction/IJurisdictionService.java @@ -13,6 +13,7 @@ public interface IJurisdictionService { String deriveJurisdictionCd(BaseContainer proxyVO, ObservationDto rootObsDT) throws DataProcessingException; + void assignJurisdiction(PersonContainer patientContainer, PersonContainer providerContainer, OrganizationContainer organizationContainer, ObservationContainer observationRequest) throws DataProcessingException; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/jurisdiction/IProgramAreaService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/jurisdiction/IProgramAreaService.java index f1982273f..695efce50 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/jurisdiction/IProgramAreaService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/jurisdiction/IProgramAreaService.java @@ -10,6 +10,8 @@ public interface IProgramAreaService { void getProgramArea(Collection observationResults, ObservationContainer observationRequest, String clia) throws DataProcessingException; + List getAllProgramAreaCode(); + String deriveProgramAreaCd(LabResultProxyContainer labResultProxyVO, ObservationContainer orderTest) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/log/IEdxLogService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/log/IEdxLogService.java index 19fc701fd..3f04f506c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/log/IEdxLogService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/log/IEdxLogService.java @@ -16,5 +16,6 @@ public interface IEdxLogService { void updateActivityLogDT(NbsInterfaceModel nbsInterfaceModel, EdxLabInformationDto edxLabInformationDto); void addActivityDetailLogs(EdxLabInformationDto edxLabInformationDto, String detailedMsg); + void addActivityDetailLogsForWDS(EdxLabInformationDto edxLabInformationDto, String detailedMsg); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/lookup_data/ILookupService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/lookup_data/ILookupService.java index 07ef64852..4f61da00f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/lookup_data/ILookupService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/lookup_data/ILookupService.java @@ -6,7 +6,10 @@ public interface ILookupService { TreeMap getToPrePopFormMapping(String formCd) throws DataProcessingException; - TreeMap getQuestionMap(); - TreeMap getDMBQuestionMapAfterPublish(); + + TreeMap getQuestionMap(); + + TreeMap getDMBQuestionMapAfterPublish(); + void fillPrePopMap(); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/lookup_data/ISrteCodeObsService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/lookup_data/ISrteCodeObsService.java index 31bb7979f..d792b383f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/lookup_data/ISrteCodeObsService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/lookup_data/ISrteCodeObsService.java @@ -10,15 +10,24 @@ public interface ISrteCodeObsService { Map getSnomed(String code, String type, String clia) throws DataProcessingException; + String getConditionForSnomedCode(String snomedCd); + String getConditionForLoincCode(String loinCd); + String getDefaultConditionForLocalResultCode(String labResultCd, String laboratoryId); + String getDefaultConditionForLabTest(String labTestCd, String laboratoryId); + ObservationContainer labLoincSnomedLookup(ObservationContainer obsVO, String labClia); + HashMap getProgramArea(String reportingLabCLIA, Collection observationContainerCollection, String electronicInd) throws DataProcessingException; String getPAFromSNOMEDCodes(String reportingLabCLIA, Collection obsValueCodedDtoColl) throws DataProcessingException; + String getPAFromLOINCCode(String reportingLabCLIA, ObservationContainer resultTestVO) throws DataProcessingException; + String getPAFromLocalResultCode(String reportingLabCLIA, Collection obsValueCodedDtoColl); + String getPAFromLocalTestCode(String reportingLabCLIA, ObservationContainer resultTestVO); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/manager/IManagerAggregationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/manager/IManagerAggregationService.java index 8df0ea7cd..4e27aa9f0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/manager/IManagerAggregationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/manager/IManagerAggregationService.java @@ -11,6 +11,6 @@ void serviceAggregationAsync(LabResultProxyContainer labResult, EdxLabInformatio EdxLabInformationDto processingObservationMatching(EdxLabInformationDto edxLabInformationDto, - LabResultProxyContainer labResultProxyContainer, - Long aPersonUid) throws DataProcessingException; + LabResultProxyContainer labResultProxyContainer, + Long aPersonUid) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/manager/IManagerService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/manager/IManagerService.java index e1e38a27a..d2e04079a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/manager/IManagerService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/manager/IManagerService.java @@ -3,9 +3,13 @@ import gov.cdc.dataprocessing.exception.DataProcessingConsumerException; import gov.cdc.dataprocessing.exception.DataProcessingException; import gov.cdc.dataprocessing.service.model.phc.PublicHealthCaseFlowContainer; +import org.springframework.stereotype.Service; +@Service public interface IManagerService { void processDistribution(String eventType, String data) throws DataProcessingConsumerException; + void initiatingInvestigationAndPublicHealthCase(PublicHealthCaseFlowContainer data) throws DataProcessingException; - void initiatingLabProcessing(PublicHealthCaseFlowContainer data) throws DataProcessingConsumerException; + + void initiatingLabProcessing(PublicHealthCaseFlowContainer data) throws DataProcessingConsumerException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/material/IMaterialService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/material/IMaterialService.java index 608ca6100..2301f1f51 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/material/IMaterialService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/material/IMaterialService.java @@ -5,5 +5,6 @@ public interface IMaterialService { MaterialContainer loadMaterialObject(Long materialUid); + Long saveMaterial(MaterialContainer materialContainer) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/notification/INotificationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/notification/INotificationService.java index 6c2ade67b..6bda00f7f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/notification/INotificationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/notification/INotificationService.java @@ -8,7 +8,10 @@ public interface INotificationService { boolean checkForExistingNotification(BaseContainer vo) throws DataProcessingException; + NotificationDto getNotificationById(Long uid); + Long saveNotification(NotificationContainer notificationContainer); + Long setNotificationProxy(NotificationProxyContainer notificationProxyVO) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IEdxDocumentService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IEdxDocumentService.java index fe8b5b699..f52ee1fa4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IEdxDocumentService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IEdxDocumentService.java @@ -7,5 +7,6 @@ public interface IEdxDocumentService { Collection selectEdxDocumentCollectionByActUid(Long uid); + EDXDocumentDto saveEdxDocument(EDXDocumentDto edxDocumentDto) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationCodeService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationCodeService.java index d0c688eef..5e2eb0989 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationCodeService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationCodeService.java @@ -10,5 +10,6 @@ public interface IObservationCodeService { ArrayList deriveTheConditionCodeList(LabResultProxyContainer labResultProxyVO, ObservationContainer orderTest) throws DataProcessingException; + String getReportingLabCLIA(BaseContainer proxy) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationMatchingService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationMatchingService.java index 5b24dd78b..650d19b1a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationMatchingService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationMatchingService.java @@ -9,6 +9,7 @@ public interface IObservationMatchingService { void processMatchedProxyVO(LabResultProxyContainer labResultProxyVO, LabResultProxyContainer matchedlabResultProxyVO, EdxLabInformationDto edxLabInformationDT); + ObservationDto checkingMatchingObservation(EdxLabInformationDto edxLabInformationDto) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationService.java index 53249ee49..d09818a6c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationService.java @@ -6,13 +6,15 @@ public interface IObservationService { ObservationDto processingLabResultContainer(LabResultProxyContainer labResultProxyContainer) throws DataProcessingException; + LabResultProxyContainer getObservationToLabResultContainer(Long observationUid) throws DataProcessingException; /** * Available for updating Observation in Mark As Reviewed Flow - * */ + */ boolean processObservation(Long observationUid) throws DataProcessingException; + void setLabInvAssociation(Long labUid, Long investigationUid) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationSummaryService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationSummaryService.java index 70289be1d..2ef29372f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationSummaryService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/observation/IObservationSummaryService.java @@ -11,17 +11,30 @@ public interface IObservationSummaryService { Collection findAllActiveLabReportUidListForManage(Long investigationUid, String whereClause) throws DataProcessingException; - Map getLabParticipations(Long observationUID) throws DataProcessingException; + + Map getLabParticipations(Long observationUID) throws DataProcessingException; + ArrayList getPatientPersonInfo(Long observationUID) throws DataProcessingException; - ArrayList getProviderInfo(Long observationUID,String partTypeCd) throws DataProcessingException; - ArrayList getActIdDetails(Long observationUID) throws DataProcessingException; + + ArrayList getProviderInfo(Long observationUID, String partTypeCd) throws DataProcessingException; + + ArrayList getActIdDetails(Long observationUID) throws DataProcessingException; + String getReportingFacilityName(Long organizationUid) throws DataProcessingException; + String getSpecimanSource(Long materialUid) throws DataProcessingException; + ProviderDataForPrintContainer getOrderingFacilityAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException; + ProviderDataForPrintContainer getOrderingFacilityPhone(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException; - ProviderDataForPrintContainer getOrderingPersonAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException; + + ProviderDataForPrintContainer getOrderingPersonAddress(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException; + ProviderDataForPrintContainer getOrderingPersonPhone(ProviderDataForPrintContainer providerDataForPrintVO, Long organizationUid) throws DataProcessingException; - Long getProviderInformation (ArrayList providerDetails, LabReportSummaryContainer labRep); + + Long getProviderInformation(ArrayList providerDetails, LabReportSummaryContainer labRep); + void getTestAndSusceptibilities(String typeCode, Long observationUid, LabReportSummaryContainer labRepEvent, LabReportSummaryContainer labRepSumm); - Map getAssociatedInvList(Long uid,String sourceClassCd) throws DataProcessingException; + + Map getAssociatedInvList(Long uid, String sourceClassCd) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/page_and_pam/IPamService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/page_and_pam/IPamService.java index 36ae5ad17..ef7dd10a2 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/page_and_pam/IPamService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/page_and_pam/IPamService.java @@ -8,5 +8,6 @@ public interface IPamService { Long setPamProxyWithAutoAssoc(PamProxyContainer pamProxyVO, Long observationUid, String observationTypeCd) throws DataProcessingException; + void insertPamVO(BasePamContainer pamVO, PublicHealthCaseContainer publichHealthCaseVO) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/paticipation/IParticipationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/paticipation/IParticipationService.java index f71ac0851..b3439ce06 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/paticipation/IParticipationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/paticipation/IParticipationService.java @@ -5,6 +5,8 @@ public interface IParticipationService { Long findPatientMprUidByObservationUid(String classCode, String typeCode, Long actUid); + void saveParticipation(ParticipationDto participationDto) throws DataProcessingException; + void saveParticipationHist(ParticipationDto participationDto) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/person/IPatientMatchingService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/person/IPatientMatchingService.java index 74fa88475..c7134fab6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/person/IPatientMatchingService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/person/IPatientMatchingService.java @@ -6,6 +6,8 @@ public interface IPatientMatchingService { EdxPatientMatchDto getMatchingPatient(PersonContainer personContainer) throws DataProcessingException; + boolean getMultipleMatchFound(); + Long updateExistingPerson(PersonContainer personContainer, String businessTriggerCd) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/person/IPersonService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/person/IPersonService.java index 4a5e88356..1557326f8 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/person/IPersonService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/person/IPersonService.java @@ -8,7 +8,9 @@ public interface IPersonService { PersonContainer processingPatient(LabResultProxyContainer labResultProxyContainer, EdxLabInformationDto edxLabInformationDto, PersonContainer personContainer) throws DataProcessingConsumerException, DataProcessingException; + PersonContainer processingNextOfKin(LabResultProxyContainer labResultProxyContainer, PersonContainer personContainer) throws DataProcessingException; + PersonContainer processingProvider(LabResultProxyContainer labResultProxyContainer, EdxLabInformationDto edxLabInformationDto, PersonContainer personContainer, boolean orderingProviderIndicator) throws DataProcessingConsumerException, DataProcessingException; Long getMatchedPersonUID(LabResultProxyContainer matchedlabResultProxyVO); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/person/IProviderMatchingService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/person/IProviderMatchingService.java index 1bead0d9f..00ce16b3b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/person/IProviderMatchingService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/person/IProviderMatchingService.java @@ -6,6 +6,7 @@ public interface IProviderMatchingService { EDXActivityDetailLogDto getMatchingProvider(PersonContainer personContainer) throws DataProcessingException; + Long setProvider(PersonContainer personContainer, String businessTriggerCd) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IAutoInvestigationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IAutoInvestigationService.java index 426f63085..7505856ef 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IAutoInvestigationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IAutoInvestigationService.java @@ -14,8 +14,9 @@ public interface IAutoInvestigationService { /** * Description: this method create either pageAct or pam; for object to Become PAM investigation type must be INV_FORM_VAR or INV_FORM_RVCT. * This investigation type is ultimately coming from WDS Algo - * */ + */ Object autoCreateInvestigation(ObservationContainer observationVO, EdxLabInformationDto edxLabInformationDT) throws DataProcessingException; + Object transferValuesTOActProxyVO(PageActProxyContainer pageActProxyContainer, PamProxyContainer pamActProxyVO, Collection personVOCollection, ObservationContainer rootObservationVO, diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IDecisionSupportService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IDecisionSupportService.java index 59c56d71a..38044d8f0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IDecisionSupportService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IDecisionSupportService.java @@ -6,5 +6,5 @@ public interface IDecisionSupportService { EdxLabInformationDto validateProxyContainer(LabResultProxyContainer labResultProxyVO, - EdxLabInformationDto edxLabInformationDT) throws DataProcessingException; + EdxLabInformationDto edxLabInformationDT) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IInvestigationService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IInvestigationService.java index cec39c12f..830e1fe0b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IInvestigationService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IInvestigationService.java @@ -9,12 +9,15 @@ public interface IInvestigationService { void updateAutoResendNotificationsAsync(BaseContainer v); + void setAssociations(Long investigationUID, Collection reportSumVOCollection, - Collection vaccinationSummaryVOCollection, - Collection summaryDTColl, + Collection vaccinationSummaryVOCollection, + Collection summaryDTColl, Collection treatmentSumColl, Boolean isNNDResendCheckRequired) throws DataProcessingException; + PageActProxyContainer getPageProxyVO(String typeCd, Long publicHealthCaseUID) throws DataProcessingException; - void setObservationAssociationsImpl(Long investigationUID, Collection reportSumVOCollection, boolean invFromEvent) throws DataProcessingException; + + void setObservationAssociationsImpl(Long investigationUID, Collection reportSumVOCollection, boolean invFromEvent) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IRetrieveSummaryService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IRetrieveSummaryService.java index 4b3fd9111..f052bcb14 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IRetrieveSummaryService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/public_health_case/IRetrieveSummaryService.java @@ -9,11 +9,16 @@ public interface IRetrieveSummaryService { void checkBeforeCreateAndStoreMessageLogDTCollection(Long investigationUID, - Collection reportSumVOCollection); - Collection notificationSummaryOnInvestigation(PublicHealthCaseContainer publicHealthCaseContainer, Object object) throws DataProcessingException; - Map retrieveTreatmentSummaryVOForInv(Long publicHealthUID) throws DataProcessingException; - Map retrieveDocumentSummaryVOForInv(Long publicHealthUID) throws DataProcessingException; - Map getAssociatedDocumentList(Long uid, String targetClassCd, String sourceClassCd) throws DataProcessingException; + Collection reportSumVOCollection); + + Collection notificationSummaryOnInvestigation(PublicHealthCaseContainer publicHealthCaseContainer, Object object) throws DataProcessingException; + + Map retrieveTreatmentSummaryVOForInv(Long publicHealthUID) throws DataProcessingException; + + Map retrieveDocumentSummaryVOForInv(Long publicHealthUID) throws DataProcessingException; + + Map getAssociatedDocumentList(Long uid, String targetClassCd, String sourceClassCd) throws DataProcessingException; + void updateNotification(Long notificationUid, String businessTriggerCd, String phcCd, diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/role/IRoleService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/role/IRoleService.java index 3420eaa5a..73d91ef2c 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/role/IRoleService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/role/IRoleService.java @@ -7,8 +7,12 @@ public interface IRoleService { Collection findRoleScopedToPatient(Long uid); + void saveRole(RoleDto roleDto); + void storeRoleDTCollection(Collection roleDTColl) throws DataProcessingException; + Integer loadCountBySubjectCdComb(RoleDto roleDto); + Integer loadCountBySubjectScpingCdComb(RoleDto roleDto); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/uid_generator/IUidService.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/uid_generator/IUidService.java index bd0058f2d..473bfbe69 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/uid_generator/IUidService.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/interfaces/uid_generator/IUidService.java @@ -23,10 +23,12 @@ public interface IUidService { * Act Relationship collection * Role collection * - This is crucial in Observation Flow - * */ + */ void setFalseToNewPersonAndOrganization(LabResultProxyContainer labResultProxyContainer, Long falseUid, Long actualUid) throws DataProcessingException; void setFalseToNewForPageAct(PageActProxyContainer pageProxyVO, Long falseUid, Long actualUid) throws DataProcessingException; + void setFalseToNewForPam(PamProxyContainer pamProxyVO, Long falseUid, Long actualUid) throws DataProcessingException; + ActRelationshipDto setFalseToNewForNotification(NotificationProxyContainer notificationProxyVO, Long falseUid, Long actualUid) throws DataProcessingException; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/action/PageActPatient.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/action/PageActPatient.java index 22922ad4f..09334da5b 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/action/PageActPatient.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/action/PageActPatient.java @@ -6,6 +6,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PageActPatient { Long patientRevisionUid; Long mprUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/action/PageActPhc.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/action/PageActPhc.java index 7048dcdcc..794922196 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/action/PageActPhc.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/action/PageActPhc.java @@ -5,6 +5,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PageActPhc { Long falsePublicHealthCaseUid; Long actualUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/auth_user/AuthUserProfileInfo.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/auth_user/AuthUserProfileInfo.java index 583ee6277..9b1fa7d8d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/auth_user/AuthUserProfileInfo.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/auth_user/AuthUserProfileInfo.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class AuthUserProfileInfo { private AuthUser authUser; private Collection authUserRealizedRoleCollection; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/DsmLabMatchHelper.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/DsmLabMatchHelper.java index 835f97435..aadc78636 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/DsmLabMatchHelper.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/DsmLabMatchHelper.java @@ -23,12 +23,13 @@ @Getter @Setter +@SuppressWarnings("all") public class DsmLabMatchHelper { static final String NULL_STRING = "null"; //hold quick access values for this Workflow Decision Support algorithm - private Map systemNameMap = new HashMap(); //name-OID - private Map systemOidMap = new HashMap(); //OID-name - private Map resultedTestCodeMap = new HashMap(); //test code/test desc + private Map systemNameMap = new HashMap(); //name-OID + private Map systemOidMap = new HashMap(); //OID-name + private Map resultedTestCodeMap = new HashMap(); //test code/test desc //these resulted test lists need to be collections and not maps because a test could repeat private List resultedTestCodedValueList = new ArrayList(); //coded values private List resultedTestNumericValueList = new ArrayList(); //numeric values @@ -47,15 +48,13 @@ public DsmLabMatchHelper() { /** * Constructor - expects algorithm payload (see DSMAlgorithm.xsd) * Get the values from the algorithm and populate class variables. + * * @param algorithmDocument */ public DsmLabMatchHelper(Algorithm algorithmDocument) throws DataProcessingException { - try { - this.algorithm =algorithmDocument; - this.algorithmDocument=algorithmDocument; - } catch (Exception e) { - throw new DataProcessingException("ELR to Algorithm Matching Failed: DSMLabMatchHelper.Constructor Unable to process Container Document",e); - } + this.algorithm = algorithmDocument; + this.algorithmDocument = algorithmDocument; + if (algorithm.getAlgorithmName() != null) { algorithmNm = algorithm.getAlgorithmName(); } @@ -69,46 +68,46 @@ public DsmLabMatchHelper(Algorithm algorithmDocument) throws DataProcessingExcep else this.algorithmIsAndLogic = true; //initialize maps; - this.systemNameMap = new HashMap();//name-OID - this.systemOidMap = new HashMap(); //OID-name + this.systemNameMap = new HashMap();//name-OID + this.systemOidMap = new HashMap(); //OID-name //populate receiving systems map if present - if(algorithm.getApplyToSendingSystems()!=null ){ + if (algorithm.getApplyToSendingSystems() != null) { try { - SendingSystemType sendingSystemType =algorithm.getApplyToSendingSystems(); - for(int i=0; i elrCriteriaArray = algorithm.getElrAdvancedCriteria().getElrCriteria(); //getElrCriteriaArray(). try { - for(ElrCriteriaType elrCriteria : elrCriteriaArray){ - CodedType elrResultTestCriteriaType= elrCriteria.getResultedTest(); - if(elrResultTestCriteriaType!=null && elrResultTestCriteriaType.getCode()!=null && elrResultTestCriteriaType.getCode().length()>0){ + for (ElrCriteriaType elrCriteria : elrCriteriaArray) { + CodedType elrResultTestCriteriaType = elrCriteria.getResultedTest(); + if (elrResultTestCriteriaType != null && elrResultTestCriteriaType.getCode() != null && elrResultTestCriteriaType.getCode().length() > 0) { String code = elrResultTestCriteriaType.getCode(); String codeDesc = elrResultTestCriteriaType.getCodeDescTxt(); - resultedTestCodeMap.put(code, codeDesc); + resultedTestCodeMap.put(code, codeDesc); if (elrCriteria.getElrCodedResultValue() != null) { TestCodedValue thisCodedValue = new TestCodedValue(); thisCodedValue.setTestCode(code); @@ -172,17 +171,18 @@ public DsmLabMatchHelper(Algorithm algorithmDocument) throws DataProcessingExcep } //elrResultTestCriteriaType not null } //for } catch (Exception e) { - throw new DataProcessingException("DSMMatchHelper.get criteria Exception thrown",e); + throw new DataProcessingException("DSMMatchHelper.get criteria Exception thrown", e); } } } //end Constructor /** * isThisLabAMatch + * * @param resultedTestCodeColl - test codes in the incoming lab - * @param resultedTestColl - lab results in the incoming lab - * @param sendingFacilityClia - Lab clia - * @param sendingFacilityName - Lab name + * @param resultedTestColl - lab results in the incoming lab + * @param sendingFacilityClia - Lab clia + * @param sendingFacilityName - Lab name * @return true if this algorithm is a match, false otherwise */ public WdsReport isThisLabAMatch(Collection resultedTestCodeColl, @@ -190,31 +190,27 @@ public WdsReport isThisLabAMatch(Collection resultedTestCodeColl, //Is this Decision Support Algorithm looking for the lab test(s) in these Lab results? WdsReport wdsReport = new WdsReport(); boolean testNotMatched = testsDoNotMatch(resultedTestCodeColl, resultedTestCodeMap, andOrLogic); - if (testNotMatched) - { + if (testNotMatched) { var report = new WdsReport(); report.setAlgorithmMatched(false); return report; } //Is this Decision Support Algorithm only for certain facilities? (Not ALL) - if (systemOidMap != null && !systemOidMap.isEmpty()) - { + if (systemOidMap != null && !systemOidMap.isEmpty()) { boolean nameMatched = true; boolean oidMatched = true; if (sendingFacilityClia != null && !sendingFacilityClia.isEmpty() && systemOidMap.containsKey(sendingFacilityClia)) { oidMatched = true; - } - else { + } else { oidMatched = false; } if (sendingFacilityName != null && !sendingFacilityName.isEmpty() && systemNameMap.containsKey(sendingFacilityName)) { nameMatched = true; - } - else { + } else { if (sendingFacilityName != null) { //logger.debug("Algorithm matches test code and Sending System OID but Sending System Name of " + sendingFacilityName +" not in list of Specified Sending Systems"); } @@ -225,9 +221,7 @@ public WdsReport isThisLabAMatch(Collection resultedTestCodeColl, ) //GST { //logger.debug("Algorithm matches either the Sending Facility Name or the Sending Facility Oid"); - } - else - { + } else { return wdsReport; //specified facility(s) do not match so this algorithm is not a match } } @@ -235,8 +229,7 @@ public WdsReport isThisLabAMatch(Collection resultedTestCodeColl, //test is in algorithm, check if value matches try { wdsReport = testIfAlgorthmMatchesLab(resultedTestColl, resultedTestCodedValueList, resultedTestTextValueList, resultedTestNumericValueList); - } - catch (Exception e) { + } catch (Exception e) { e.printStackTrace(); } return wdsReport; @@ -287,16 +280,14 @@ private WdsReport testIfAlgorthmMatchesLab( } catch (Exception e) { - throw new DataProcessingException("DSMMatchHelper.isThisLabAMatch Exception thrown",e); + throw new DataProcessingException("DSMMatchHelper.isThisLabAMatch Exception thrown", e); } ////All test complete! - if (algorithmIsOrLogic) - { + if (algorithmIsOrLogic) { wdsReport.setAlgorithmMatched(false); return wdsReport; //nothing matched } - if (algorithmIsAndLogic) - { + if (algorithmIsAndLogic) { wdsReport.setAlgorithmMatched(true); return wdsReport; //everything matched } @@ -310,37 +301,29 @@ private boolean checkingObsNumericMatched( List testNumericValueList, WdsReport wdsReport ) { - for (TestNumericValue algorithmNumericValue : testNumericValueList) - { + for (TestNumericValue algorithmNumericValue : testNumericValueList) { boolean numericAlgorithmMatched = false; for (ObservationContainer o : resultedTestColl) { ObservationContainer resultObsVO = o; String testCode = null; - if (resultObsVO.getTheObservationDto().getCd() != null) - { + if (resultObsVO.getTheObservationDto().getCd() != null) { testCode = resultObsVO.getTheObservationDto().getCd(); - } - else if (resultObsVO.getTheObservationDto().getAltCd() != null) - { + } else if (resultObsVO.getTheObservationDto().getAltCd() != null) { testCode = resultObsVO.getTheObservationDto().getAltCd(); } - if (algorithmNumericValue.getTestCode().equalsIgnoreCase(testCode)) - { + if (algorithmNumericValue.getTestCode().equalsIgnoreCase(testCode)) { if (resultObsVO.getTheObsValueNumericDtoCollection() != null) { var numericReport = new WdsValueNumericReport(); for (ObsValueNumericDto obsValueNumericDT : resultObsVO.getTheObsValueNumericDtoCollection()) { //check if the units match (if present) if (algorithmNumericValue.getUnitCode() != null) { String labUnits = obsValueNumericDT.getNumericUnitCd(); - if (labUnits == null) - { + if (labUnits == null) { continue; //no units match here - } - else if (algorithmNumericValue.getUnitCode().equals(labUnits.trim())) { + } else if (algorithmNumericValue.getUnitCode().equals(labUnits.trim())) { //logger.debug("Algorithm units match with lab units of " +labUnits); - } - else { + } else { //logger.debug("Algorithm units of " +algorithmNumericValue.getUnitCode() +"does not match with lab units of "+labUnits); continue; //no units match here } @@ -350,14 +333,12 @@ else if (algorithmNumericValue.getUnitCode().equals(labUnits.trim())) { String labComparator = obsValueNumericDT.getComparatorCd1().trim(); if (labComparator.equals(NEDSSConstant.LESS_THAN_LOGIC) || labComparator.equals(NEDSSConstant.LESS_THAN_OR_EQUAL_LOGIC) || labComparator.equals(NEDSSConstant.GREATER_THAN_LOGIC) || labComparator.equals(NEDSSConstant.GREATER_THAN_OR_EQUAL_LOGIC) - || labComparator.equals(NEDSSConstant.NOT_EQUAL_LOGIC2)) - { + || labComparator.equals(NEDSSConstant.NOT_EQUAL_LOGIC2)) { continue; //skip this result } } boolean isTiterLab = false; - if (obsValueNumericDT.getSeparatorCd() != null && !obsValueNumericDT.getSeparatorCd().trim().isEmpty()) - { + if (obsValueNumericDT.getSeparatorCd() != null && !obsValueNumericDT.getSeparatorCd().trim().isEmpty()) { String labSeparator = obsValueNumericDT.getSeparatorCd().trim(); //can't handle separators of /, -, or + if (!labSeparator.equals(NEDSSConstant.COLON)) { @@ -370,8 +351,7 @@ else if (algorithmNumericValue.getUnitCode().equals(labUnits.trim())) { } //numeric value 1 is 1 in the ratio i.e. =1:8, =1:16, =1:32 - if (obsValueNumericDT.getNumericValue1() != null) - { + if (obsValueNumericDT.getNumericValue1() != null) { BigDecimal bdOne = new BigDecimal(1); if (obsValueNumericDT.getNumericValue1().compareTo(bdOne) == 0) { //logger.debug("Lab has titer value"); @@ -383,14 +363,13 @@ else if (algorithmNumericValue.getUnitCode().equals(labUnits.trim())) { } } - if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.EQUAL_LOGIC)) - { + if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.EQUAL_LOGIC)) { //For BigDecimal must use CompareTo and not Equals (using Equals 5.0 is not equal to 5.00, using CompareTo they are equal) numericReport.setCodeType("OBS_NUMERIC_VALUE"); numericReport.setWdsCode(algorithmNumericValue.getValue1().toString()); - numericReport.setInputCode1(obsValueNumericDT.getNumericValue1()!= null ? obsValueNumericDT.getNumericValue1().toString(): ""); - numericReport.setInputCode2(obsValueNumericDT.getNumericValue2()!= null ? obsValueNumericDT.getNumericValue2().toString(): ""); + numericReport.setInputCode1(obsValueNumericDT.getNumericValue1() != null ? obsValueNumericDT.getNumericValue1().toString() : ""); + numericReport.setInputCode2(obsValueNumericDT.getNumericValue2() != null ? obsValueNumericDT.getNumericValue2().toString() : ""); numericReport.setOperator(NEDSSConstant.EQUAL_LOGIC); @@ -399,22 +378,19 @@ else if (algorithmNumericValue.getUnitCode().equals(labUnits.trim())) { && algorithmNumericValue.getValue1().compareTo(obsValueNumericDT.getNumericValue1()) == 0) { numericReport.setMatchedFound(true); numericAlgorithmMatched = true; - } - else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null + } else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null && algorithmNumericValue.getValue1() != null && algorithmNumericValue.getValue1().compareTo(obsValueNumericDT.getNumericValue2()) == 0) { numericReport.setMatchedFound(true); numericAlgorithmMatched = true; } - } - else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.GREATER_THAN_LOGIC)) - { + } else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.GREATER_THAN_LOGIC)) { //For BigDecimal must use CompareTo and not Equals (using Equals 5.0 is not equal to 5.00, using CompareTo they are equal) numericReport.setCodeType("OBS_NUMERIC_VALUE"); numericReport.setWdsCode(algorithmNumericValue.getValue1().toString()); numericReport.setInputCode1(obsValueNumericDT.getNumericValue1() != null ? obsValueNumericDT.getNumericValue1().toString() : ""); - numericReport.setInputCode2(obsValueNumericDT.getNumericValue2() != null ? obsValueNumericDT.getNumericValue2().toString(): ""); + numericReport.setInputCode2(obsValueNumericDT.getNumericValue2() != null ? obsValueNumericDT.getNumericValue2().toString() : ""); numericReport.setOperator(NEDSSConstant.GREATER_THAN_LOGIC); if (!isTiterLab && obsValueNumericDT.getNumericValue1() != null @@ -422,20 +398,17 @@ else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.GREATER_ numericReport.setMatchedFound(true); numericAlgorithmMatched = true; - } - else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null + } else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null && algorithmNumericValue.getValue1() != null && algorithmNumericValue.getValue1().compareTo(obsValueNumericDT.getNumericValue2()) == -1) { numericReport.setMatchedFound(true); numericAlgorithmMatched = true; } - } - else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.GREATER_THAN_OR_EQUAL_LOGIC)) - { + } else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.GREATER_THAN_OR_EQUAL_LOGIC)) { numericReport.setCodeType("OBS_NUMERIC_VALUE"); numericReport.setWdsCode(algorithmNumericValue.getValue1().toString()); numericReport.setInputCode1(obsValueNumericDT.getNumericValue1() != null ? obsValueNumericDT.getNumericValue1().toString() : ""); - numericReport.setInputCode2(obsValueNumericDT.getNumericValue2() != null ? obsValueNumericDT.getNumericValue2().toString(): ""); + numericReport.setInputCode2(obsValueNumericDT.getNumericValue2() != null ? obsValueNumericDT.getNumericValue2().toString() : ""); numericReport.setOperator(NEDSSConstant.GREATER_THAN_OR_EQUAL_LOGIC); if (!isTiterLab && obsValueNumericDT.getNumericValue1() != null @@ -444,8 +417,7 @@ else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.GREATER_ ) { numericReport.setMatchedFound(true); numericAlgorithmMatched = true; - } - else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null + } else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null && algorithmNumericValue.getValue1() != null && algorithmNumericValue.getValue1().compareTo(obsValueNumericDT.getNumericValue2()) == 0 || obsValueNumericDT.getNumericValue2() != null @@ -455,9 +427,7 @@ else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null numericReport.setMatchedFound(true); numericAlgorithmMatched = true; } - } - else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.LESS_THAN_LOGIC)) - { + } else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.LESS_THAN_LOGIC)) { numericReport.setCodeType("OBS_NUMERIC_VALUE"); numericReport.setWdsCode(algorithmNumericValue.getValue1().toString()); @@ -470,17 +440,14 @@ else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.LESS_THA ) { numericReport.setMatchedFound(true); numericAlgorithmMatched = true; - } - else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null + } else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null && algorithmNumericValue.getValue1() != null && algorithmNumericValue.getValue1().compareTo(obsValueNumericDT.getNumericValue2()) == 1 ) { numericReport.setMatchedFound(true); numericAlgorithmMatched = true; } - } - else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.LESS_THAN_OR_EQUAL_LOGIC)) - { + } else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.LESS_THAN_OR_EQUAL_LOGIC)) { numericReport.setCodeType("OBS_NUMERIC_VALUE"); numericReport.setWdsCode(algorithmNumericValue.getValue1().toString()); @@ -495,8 +462,7 @@ else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.LESS_THA numericReport.setMatchedFound(true); numericAlgorithmMatched = true; - } - else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null + } else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null && algorithmNumericValue.getValue1() != null && algorithmNumericValue.getValue1().compareTo(obsValueNumericDT.getNumericValue2()) == 0 || obsValueNumericDT.getNumericValue2() != null @@ -506,9 +472,7 @@ else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null numericReport.setMatchedFound(true); numericAlgorithmMatched = true; } - } - else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.NOT_EQUAL_LOGIC)) - { + } else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.NOT_EQUAL_LOGIC)) { numericReport.setCodeType("OBS_NUMERIC_VALUE"); numericReport.setWdsCode(algorithmNumericValue.getValue1().toString()); numericReport.setInputCode1(obsValueNumericDT.getNumericValue1() != null ? obsValueNumericDT.getNumericValue1().toString() : ""); @@ -516,21 +480,16 @@ else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.NOT_EQUA numericReport.setOperator(NEDSSConstant.NOT_EQUAL_LOGIC); if (!isTiterLab && obsValueNumericDT.getNumericValue1() != null - && obsValueNumericDT.getNumericValue1().compareTo(algorithmNumericValue.getValue1()) != 0) - { + && obsValueNumericDT.getNumericValue1().compareTo(algorithmNumericValue.getValue1()) != 0) { numericReport.setMatchedFound(true); numericAlgorithmMatched = true; - } - else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null + } else if (isTiterLab && obsValueNumericDT.getNumericValue2() != null && algorithmNumericValue.getValue1() != null - && algorithmNumericValue.getValue1().compareTo(obsValueNumericDT.getNumericValue2()) != 0) - { + && algorithmNumericValue.getValue1().compareTo(obsValueNumericDT.getNumericValue2()) != 0) { numericReport.setMatchedFound(true); numericAlgorithmMatched = true; } - } - else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.BETWEEN_LOGIC)) - { + } else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.BETWEEN_LOGIC)) { numericReport.setCodeType("OBS_NUMERIC_VALUE"); numericReport.setWdsCode(algorithmNumericValue.getValue1().toString()); numericReport.setInputCode1(obsValueNumericDT.getNumericValue1() != null ? obsValueNumericDT.getNumericValue1().toString() : ""); @@ -548,8 +507,7 @@ else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.BETWEEN_ numericAlgorithmMatched = true; } } - } - else { + } else { numericReport.setMatchedFound(false); numericReport.setCodeType("OBS_NUMERIC_VALUE"); numericReport.setWdsCode(algorithmNumericValue.getValue1().toString()); @@ -559,8 +517,7 @@ else if (algorithmNumericValue.getComparatorCode().equals(NEDSSConstant.BETWEEN_ wdsReport.getWdsValueNumericReportList().add(numericReport); if (numericAlgorithmMatched) { - if (algorithmIsOrLogic) - { + if (algorithmIsOrLogic) { wdsReport.setAlgorithmMatched(true); return true; } @@ -587,69 +544,46 @@ private boolean checkingObsTextMatched( List testTextValueList, WdsReport wdsReport ) { - for (TestTextValue algorithmTextValue : testTextValueList) - { + for (TestTextValue algorithmTextValue : testTextValueList) { boolean textAlgorithmMatched = false; for (ObservationContainer o : resultedTestColl) { ObservationContainer resultObsVO = o; String testCode = null; - if (resultObsVO.getTheObservationDto().getCd() != null) - { + if (resultObsVO.getTheObservationDto().getCd() != null) { testCode = resultObsVO.getTheObservationDto().getCd(); - } - else if (resultObsVO.getTheObservationDto().getAltCd() != null) - { + } else if (resultObsVO.getTheObservationDto().getAltCd() != null) { testCode = resultObsVO.getTheObservationDto().getAltCd(); } - if (algorithmTextValue.getTestCode().equalsIgnoreCase(testCode)) - { + if (algorithmTextValue.getTestCode().equalsIgnoreCase(testCode)) { if (resultObsVO.getTheObsValueTxtDtoCollection() != null) { - for (ObsValueTxtDto obsValueTxtDT : resultObsVO.getTheObsValueTxtDtoCollection()) - { + for (ObsValueTxtDto obsValueTxtDT : resultObsVO.getTheObsValueTxtDtoCollection()) { var wdsValueText = new WdsValueTextReport(); if (obsValueTxtDT.getTxtTypeCd() == null || obsValueTxtDT.getTxtTypeCd().trim().equals("") - || obsValueTxtDT.getTxtTypeCd().equalsIgnoreCase("O")) - {//NBSCentral #11984: to avoid comparing with the notes + || obsValueTxtDT.getTxtTypeCd().equalsIgnoreCase("O")) {//NBSCentral #11984: to avoid comparing with the notes wdsValueText.setMatchedFound(true); - if (algorithmTextValue.getComparatorCode().equals(NEDSSConstant.EQUAL_LOGIC)) - { - if (obsValueTxtDT.getValueTxt() != null && obsValueTxtDT.getValueTxt().equals(algorithmTextValue.getTextValue())) - { + if (algorithmTextValue.getComparatorCode().equals(NEDSSConstant.EQUAL_LOGIC)) { + if (obsValueTxtDT.getValueTxt() != null && obsValueTxtDT.getValueTxt().equals(algorithmTextValue.getTextValue())) { textAlgorithmMatched = true; } - } - else if (algorithmTextValue.getComparatorCode().equals(NEDSSConstant.CONTAINS_LOGIC)) - { - if (obsValueTxtDT.getValueTxt() != null && obsValueTxtDT.getValueTxt().contains(algorithmTextValue.getTextValue())) - { + } else if (algorithmTextValue.getComparatorCode().equals(NEDSSConstant.CONTAINS_LOGIC)) { + if (obsValueTxtDT.getValueTxt() != null && obsValueTxtDT.getValueTxt().contains(algorithmTextValue.getTextValue())) { textAlgorithmMatched = true; } - } - else if (algorithmTextValue.getComparatorCode().equals(NEDSSConstant.STARTS_WITH_LOGIC)) - { - if (obsValueTxtDT.getValueTxt() != null && obsValueTxtDT.getValueTxt().startsWith(algorithmTextValue.getTextValue())) - { + } else if (algorithmTextValue.getComparatorCode().equals(NEDSSConstant.STARTS_WITH_LOGIC)) { + if (obsValueTxtDT.getValueTxt() != null && obsValueTxtDT.getValueTxt().startsWith(algorithmTextValue.getTextValue())) { textAlgorithmMatched = true; } - } - else if (algorithmTextValue.getComparatorCode().equals(NEDSSConstant.NOT_EQUAL_LOGIC)) - { - if (obsValueTxtDT.getValueTxt() != null && obsValueTxtDT.getValueTxt().compareTo(algorithmTextValue.getTextValue()) != 0) - { + } else if (algorithmTextValue.getComparatorCode().equals(NEDSSConstant.NOT_EQUAL_LOGIC)) { + if (obsValueTxtDT.getValueTxt() != null && obsValueTxtDT.getValueTxt().compareTo(algorithmTextValue.getTextValue()) != 0) { textAlgorithmMatched = true; } - } - else if (algorithmTextValue.getComparatorCode().equals(NEDSSConstant.NOTNULL_LOGIC)) - { - if (obsValueTxtDT.getValueTxt() != null && (obsValueTxtDT.getValueTxt().length() > 0)) - { + } else if (algorithmTextValue.getComparatorCode().equals(NEDSSConstant.NOTNULL_LOGIC)) { + if (obsValueTxtDT.getValueTxt() != null && (obsValueTxtDT.getValueTxt().length() > 0)) { textAlgorithmMatched = true; } - } - else - { + } else { wdsValueText.setMatchedFound(false); } wdsValueText.setInputCode(obsValueTxtDT.getValueTxt()); @@ -659,8 +593,7 @@ else if (algorithmTextValue.getComparatorCode().equals(NEDSSConstant.NOTNULL_LOG } } //subObs has next if (textAlgorithmMatched) { - if (algorithmIsOrLogic) - { + if (algorithmIsOrLogic) { wdsReport.setAlgorithmMatched(true); return true; } @@ -680,41 +613,33 @@ else if (algorithmTextValue.getComparatorCode().equals(NEDSSConstant.NOTNULL_LOG return false; } + private boolean checkingObsValueMatched( Collection resultedTestColl, List testCodedValueList, WdsReport wdsReport ) { - for (TestCodedValue algorithmCodedValue : testCodedValueList) - { + for (TestCodedValue algorithmCodedValue : testCodedValueList) { boolean textAlgorithmMatched = false; - for (ObservationContainer o : resultedTestColl) - { + for (ObservationContainer o : resultedTestColl) { ObservationContainer resultObsVO = o; String testCode = null; - if (resultObsVO.getTheObservationDto().getCd() != null) - { + if (resultObsVO.getTheObservationDto().getCd() != null) { testCode = resultObsVO.getTheObservationDto().getCd(); - } - else if (resultObsVO.getTheObservationDto().getAltCd() != null) - { + } else if (resultObsVO.getTheObservationDto().getAltCd() != null) { testCode = resultObsVO.getTheObservationDto().getAltCd(); - } - else - { + } else { continue; //no test code? } - if (algorithmCodedValue.getTestCode().equalsIgnoreCase(testCode)) - { + if (algorithmCodedValue.getTestCode().equalsIgnoreCase(testCode)) { if (resultObsVO.getTheObsValueCodedDtoCollection() != null) { for (ObsValueCodedDto obsValueCodedDT : resultObsVO.getTheObsValueCodedDtoCollection()) { //Test code match? if (obsValueCodedDT.getCode() != null && algorithmCodedValue.getResultCode().equalsIgnoreCase(obsValueCodedDT.getCode())) { textAlgorithmMatched = true; - if (algorithmIsOrLogic) - { + if (algorithmIsOrLogic) { var valueCoded = new WdsValueCodedReport(); valueCoded.setCodeType("OBS_VALUE_CODED"); valueCoded.setInputCode(obsValueCodedDT.getCode()); @@ -724,8 +649,7 @@ else if (resultObsVO.getTheObservationDto().getAltCd() != null) wdsReport.setAlgorithmMatched(true); return true; } - } - else if (algorithmIsAndLogic) //result code did not match + } else if (algorithmIsAndLogic) //result code did not match { var valueCoded = new WdsValueCodedReport(); valueCoded.setCodeType("OBS_VALUE_CODED"); @@ -750,15 +674,15 @@ else if (algorithmIsAndLogic) //result code did not match * Note negative logic - testsDoNotMatch * Quickly rule out labs that don't have the tests the algorithm seeks. * If it is an OR, one must be there. If an AND, all must be there. + * * @param resultedTestCodeColl - resulted test codes in lab * @param resultedTestCodeMap2 - resulted test codes in Algorithm - * @param andOrLogic2 - algorithm and/or logic + * @param andOrLogic2 - algorithm and/or logic * @return boolean true if this algorithm is not a match */ private boolean testsDoNotMatch(Collection resultedTestCodeColl, Map resultedTestCodeMap2, String andOrLogic2) { - for (String resultedTest : resultedTestCodeMap2.keySet()) - { + for (String resultedTest : resultedTestCodeMap2.keySet()) { if (resultedTestCodeColl.contains(resultedTest)) { if (andOrLogic2.equals(DecisionSupportConstants.OR_AND_OR_LOGIC)) //OR { diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/TestCodedValue.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/TestCodedValue.java index b56a02b77..404dc6283 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/TestCodedValue.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/TestCodedValue.java @@ -5,6 +5,7 @@ @Getter @Setter +@SuppressWarnings("all") public class TestCodedValue { private String testCode; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/TestNumericValue.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/TestNumericValue.java index 51dae2767..75869033a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/TestNumericValue.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/TestNumericValue.java @@ -7,18 +7,17 @@ @Getter @Setter +@SuppressWarnings("all") public class TestNumericValue { - private String testCode; - private String testCodeDesc; - private String comparatorCode; - private String comparatorCodeDesc; - private BigDecimal value1; - private String separatorCode; - private BigDecimal value2; - private String unitCode; - private String unitCodeDesc; - - + private String testCode; + private String testCodeDesc; + private String comparatorCode; + private String comparatorCodeDesc; + private BigDecimal value1; + private String separatorCode; + private BigDecimal value2; + private String unitCode; + private String unitCodeDesc; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/TestTextValue.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/TestTextValue.java index 321f7e876..3315079da 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/TestTextValue.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/decision_support/TestTextValue.java @@ -6,6 +6,7 @@ @Getter @Setter +@SuppressWarnings("all") public class TestTextValue { private String testCode; private String testCodeDesc; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/lookup_data/MetaAndWaCommonAttribute.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/lookup_data/MetaAndWaCommonAttribute.java index 8d345e1fd..d3f470ca8 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/lookup_data/MetaAndWaCommonAttribute.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/lookup_data/MetaAndWaCommonAttribute.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class MetaAndWaCommonAttribute { private Long id; private Long questionUid; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/person/PersonAggContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/person/PersonAggContainer.java index 01e43a5e6..692db5a18 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/person/PersonAggContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/person/PersonAggContainer.java @@ -6,6 +6,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PersonAggContainer { PersonContainer personContainer; PersonContainer providerContainer; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/person/PersonId.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/person/PersonId.java index ecb0b760b..c51c35ab9 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/person/PersonId.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/person/PersonId.java @@ -5,6 +5,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PersonId { public Long personId; //NOSONAR public Long personParentId; //NOSONAR diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/phc/PublicHealthCaseFlowContainer.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/phc/PublicHealthCaseFlowContainer.java index 3ccc923eb..143921e91 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/phc/PublicHealthCaseFlowContainer.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/phc/PublicHealthCaseFlowContainer.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class PublicHealthCaseFlowContainer { LabResultProxyContainer labResultProxyContainer; EdxLabInformationDto edxLabInformationDto; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsReport.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsReport.java index 930ff9b5a..59eed0a1a 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsReport.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsReport.java @@ -9,6 +9,7 @@ @Getter @Setter +@SuppressWarnings("all") public class WdsReport { private WdsValueCodedReport wdsValueCodedReport; private List wdsValueTextReportList = new ArrayList<>(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsTrackerView.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsTrackerView.java index 1f2101473..189442cc8 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsTrackerView.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsTrackerView.java @@ -8,11 +8,12 @@ @Getter @Setter +@SuppressWarnings("all") public class WdsTrackerView { - private List wdsReport; PublicHealthCaseDto publicHealthCase; Long patientUid; Long patientParentUid; String patientFirstName; String patientLastName; + private List wdsReport; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsValueCodedReport.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsValueCodedReport.java index 98c677128..2bfa35a68 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsValueCodedReport.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsValueCodedReport.java @@ -6,6 +6,7 @@ @Getter @Setter +@SuppressWarnings("all") public class WdsValueCodedReport { private String codeType; private String inputCode; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsValueNumericReport.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsValueNumericReport.java index 46b91b68d..46728bafa 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsValueNumericReport.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsValueNumericReport.java @@ -5,6 +5,7 @@ @Getter @Setter +@SuppressWarnings("all") public class WdsValueNumericReport { private String codeType; private String inputCode1; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsValueTextReport.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsValueTextReport.java index 4b29532e9..d1c5d28a0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsValueTextReport.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/service/model/wds/WdsValueTextReport.java @@ -5,6 +5,7 @@ @Getter @Setter +@SuppressWarnings("all") public class WdsValueTextReport { private String codeType; private String inputCode; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/DataParserForSql.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/DataParserForSql.java index cd6283923..ab6b9d61d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/DataParserForSql.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/DataParserForSql.java @@ -7,7 +7,7 @@ @SuppressWarnings("java:S1118") public class DataParserForSql { - public static T parseValue(Object value, Class type) { + public static T parseValue(Object value, Class type) { if (value == null) { return null; } @@ -32,6 +32,6 @@ public static boolean dataNotNull(Object string) { } public static boolean resultValidCheck(List results) { - return results != null && !results.isEmpty(); + return results != null && !results.isEmpty(); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/DynamicBeanBinding.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/DynamicBeanBinding.java index 66d693921..5f982c162 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/DynamicBeanBinding.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/DynamicBeanBinding.java @@ -9,8 +9,7 @@ import java.util.StringTokenizer; public class DynamicBeanBinding { - private static Map beanMethodMap = new HashMap<>(); - + private static final Map beanMethodMap = new HashMap<>(); /** @@ -28,15 +27,15 @@ public static void populateBean(Object bean, String colNm, String colVal) Map methodMap = getMethods(bean.getClass()); Method method = (Method) methodMap.get(methodName); - if(method==null){ + if (method == null) { return; } Object[] parmTypes = method.getParameterTypes(); String pType = ((Class) parmTypes[0]).getName(); - Object[] arg = { "" }; + Object[] arg = {""}; Object[] nullArg = null; - if (colVal!=null && !colVal.equals("")) { + if (colVal != null && !colVal.equals("")) { if (pType.equalsIgnoreCase("java.sql.Timestamp")) { Timestamp ts = new Timestamp(new SimpleDateFormat("MM/dd/yyyy") @@ -56,65 +55,54 @@ public static void populateBean(Object bean, String colNm, String colVal) } else if (pType.equalsIgnoreCase("java.math.BigDecimal")) { arg[0] = BigDecimal.valueOf(Long.parseLong(colVal)); - } else if (pType.equalsIgnoreCase("boolean")) { - arg[0] = colVal; + } else if (pType.equalsIgnoreCase("boolean")|| pType.equalsIgnoreCase("java.lang.Boolean")) { + arg[0] = Boolean.parseBoolean(colVal);; } - }else { + } else { arg[0] = nullArg; } - try { - if(colVal==null) { - Object[] nullargs = { null }; - method.invoke(bean, nullargs); - }else - method.invoke(bean, arg); -// logger.debug("Successfully called methodName for bean " + bean -// + " with value " + colVal); - } catch (Exception e) { - throw new Exception(e); + if (colVal == null) { + Object[] nullargs = {null}; + method.invoke(bean, nullargs); + } else + { + method.invoke(bean, arg); } } catch (Exception e) { throw new Exception(e); } } - private static String getSetterName(String columnName) throws Exception { - try { - StringBuilder sb = new StringBuilder("set"); - StringTokenizer st = new StringTokenizer(columnName, "_"); - while (st.hasMoreTokens()) { - String s = st.nextToken(); - s = s.substring(0, 1).toUpperCase() - + s.substring(1).toLowerCase(); - sb.append(s); - } - return sb.toString(); - } catch (Exception e) { - throw new Exception(e); + protected static String getSetterName(String columnName) throws Exception { + StringBuilder sb = new StringBuilder("set"); + StringTokenizer st = new StringTokenizer(columnName, "_"); + while (st.hasMoreTokens()) { + String s = st.nextToken(); + s = s.substring(0, 1).toUpperCase() + + s.substring(1).toLowerCase(); + sb.append(s); } + return sb.toString(); + } @SuppressWarnings("unchecked") - private static Map getMethods(Class beanClass) - throws Exception { - try { - if (beanMethodMap.get(beanClass) == null) { - Method[] gettingMethods = beanClass.getMethods(); - Map resultMap = new HashMap<>(); - for (Method gettingMethod : gettingMethods) { - Method method = gettingMethod; - String methodName = method.getName(); - Object[] parmTypes = method.getParameterTypes(); - if (methodName.startsWith("set") && parmTypes.length == 1) - resultMap.put(methodName, method); - } - beanMethodMap.put(beanClass, resultMap); + protected static Map getMethods(Class beanClass){ + if (beanMethodMap.get(beanClass) == null) { + Method[] gettingMethods = beanClass.getMethods(); + Map resultMap = new HashMap<>(); + for (Method gettingMethod : gettingMethods) { + Method method = gettingMethod; + String methodName = method.getName(); + Object[] parmTypes = method.getParameterTypes(); + if (methodName.startsWith("set") && parmTypes.length == 1) + resultMap.put(methodName, method); } - return (Map) beanMethodMap.get(beanClass); - } catch (SecurityException e) { - throw new Exception(e); + beanMethodMap.put(beanClass, resultMap); } + return (Map) beanMethodMap.get(beanClass); + } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/RulesEngineUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/RulesEngineUtil.java index 96cdc6b23..d6296d110 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/RulesEngineUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/RulesEngineUtil.java @@ -5,13 +5,12 @@ import java.util.Date; public class RulesEngineUtil { - public static int[] CalcMMWR(String pDate) - { + public static int[] CalcMMWR(String pDate) { // Create return variable. - int[] r = {0,0}; - if(pDate == null || pDate.trim().equals("")) + int[] r = {0, 0}; + if (pDate == null || pDate.trim().equals("")) return r; - try{ + try { // Define constants. int SECOND = 1000; int MINUTE = 60 * SECOND; @@ -25,7 +24,7 @@ public static int[] CalcMMWR(String pDate) long varTime = cal.getTimeInMillis(); // Get January 1st of given year. - Date varJan1Date = new SimpleDateFormat("MM/dd/yyyy").parse("01/01/"+cal.get(Calendar.YEAR)); + Date varJan1Date = new SimpleDateFormat("MM/dd/yyyy").parse("01/01/" + cal.get(Calendar.YEAR)); Calendar calJan1 = Calendar.getInstance(); calJan1.setTime(varJan1Date); int varJan1Day = calJan1.get(Calendar.DAY_OF_WEEK); @@ -39,13 +38,11 @@ public static int[] CalcMMWR(String pDate) // MMWR Week. int w = 0; // Find first day of MMWR Year. - if(varJan1Day < 5) - { + if (varJan1Day < 5) { // If SUN, MON, TUE, or WED, go back to nearest Sunday. - t -= ((varJan1Day-1) * DAY); + t -= ((long) (varJan1Day - 1) * DAY); // Loop through each week until we reach the given date. - while(t < varTime) - { + while (t < varTime) { // Increment the week counter. w++; t += WEEK; @@ -54,37 +51,30 @@ public static int[] CalcMMWR(String pDate) Calendar cal1 = Calendar.getInstance(); cal1.setTime(d); h = cal1.get(Calendar.HOUR); - if(h == 1) - { + if (h == 1) { t -= HOUR; } - if(h == 23 || h == 11) - { + if (h == 23 || h == 11) { t += HOUR; } } // If at end of year, move on to next year if this week has // more days from next year than from this year. - if(w == 53) - { - Date varNextJan1Date = new SimpleDateFormat("MM/dd/yyyy").parse("01/01/"+(cal.get(Calendar.YEAR)+1)); + if (w == 53) { + Date varNextJan1Date = new SimpleDateFormat("MM/dd/yyyy").parse("01/01/" + (cal.get(Calendar.YEAR) + 1)); Calendar varNextJan1Cal = Calendar.getInstance(); varNextJan1Cal.setTime(varNextJan1Date); int varNextJan1Day = varNextJan1Cal.get(Calendar.DAY_OF_WEEK); - if(varNextJan1Day < 5) - { + if (varNextJan1Day < 5) { y++; w = 1; } } - } - else - { + } else { // If THU, FRI, or SAT, go forward to nearest Sunday. - t += ((7 - (varJan1Day-1)) * DAY); + t += ((long) (7 - (varJan1Day - 1)) * DAY); // Loop through each week until we reach the given date. - while(t <= varTime) - { + while (t <= varTime) { // Increment the week counter. w++; d = new Date(t); @@ -96,27 +86,23 @@ public static int[] CalcMMWR(String pDate) Calendar dCal = Calendar.getInstance(); dCal.setTime(d); h = dCal.get(Calendar.HOUR); - if(h == 1) - { + if (h == 1) { t -= HOUR; } - if(h == 23) - { + if (h == 23) { t += HOUR; } } // If at beginning of year, move back to previous year if this week has // more days from last year than from this year. - if(w == 0) - { + if (w == 0) { d = new Date(t); Calendar dCal1 = Calendar.getInstance(); dCal1.setTime(d); - if( (dCal1.get(Calendar.MONTH) == 0) && (dCal1.get(Calendar.DAY_OF_WEEK) <= 5) ) - { + if ((dCal1.get(Calendar.MONTH) == 0) && (dCal1.get(Calendar.DAY_OF_WEEK) <= 5)) { y--; - int a[] = CalcMMWR("12/31/" + y); + int[] a = CalcMMWR("12/31/" + y); w = a[0]; } } @@ -129,9 +115,7 @@ public static int[] CalcMMWR(String pDate) // Assemble result. r[0] = w; r[1] = y; - } - catch(Exception ex) - { + } catch (Exception ex) { ex.printStackTrace(); } // Return result. diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/StringUtils.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/StringUtils.java index 8c5ff3955..231645a19 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/StringUtils.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/StringUtils.java @@ -14,12 +14,10 @@ public static Timestamp stringToStrutsTimestamp(String strTime) { t = formatter.parse(input); java.sql.Timestamp ts = new java.sql.Timestamp(t.getTime()); return ts; - } - else { + } else { return null; } - } - catch (Exception e) { + } catch (Exception e) { return null; } } @@ -27,9 +25,8 @@ public static Timestamp stringToStrutsTimestamp(String strTime) { public static String formatDate(Date date) { java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("MM/dd/yyyy"); if (date == null) { - return new String(""); - } - else { + return ""; + } else { return formatter.format(date); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/act/ActIdRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/act/ActIdRepositoryUtil.java index 6fd210280..4b2db04a3 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/act/ActIdRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/act/ActIdRepositoryUtil.java @@ -20,8 +20,8 @@ public Collection GetActIdCollection(Long actUid) { var actIds = actIdRepository.findRecordsById(actUid); Collection actIdCollection = new ArrayList<>(); if (actIds.isPresent()) { - for(var item : actIds.get()) { - var dto = new ActIdDto(item); + for (var item : actIds.get()) { + var dto = new ActIdDto(item); dto.setItNew(false); dto.setItDirty(false); actIdCollection.add(dto); @@ -32,7 +32,7 @@ public Collection GetActIdCollection(Long actUid) { public void insertActIdCollection(Long uid, Collection actIdDtoCollection) { - for(var item: actIdDtoCollection){ + for (var item : actIdDtoCollection) { ActId data = new ActId(item); data.setActUid(uid); actIdRepository.save(data); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/act/ActLocatorParticipationRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/act/ActLocatorParticipationRepositoryUtil.java index 0df0f23c4..d9eff9a02 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/act/ActLocatorParticipationRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/act/ActLocatorParticipationRepositoryUtil.java @@ -20,8 +20,8 @@ public Collection getActLocatorParticipationCol var res = actLocatorParticipationRepository.findRecordsById(actUid); Collection dtoCollection = new ArrayList<>(); if (!res.isEmpty()) { - for(var item : res) { - var dto = new ActivityLocatorParticipationDto(item); + for (var item : res) { + var dto = new ActivityLocatorParticipationDto(item); dto.setItNew(false); dto.setItDirty(false); dtoCollection.add(dto); @@ -32,7 +32,7 @@ public Collection getActLocatorParticipationCol public void insertActLocatorParticipationCollection(Long uid, Collection activityLocatorParticipationDtoCollection) { - for(var item : activityLocatorParticipationDtoCollection) { + for (var item : activityLocatorParticipationDtoCollection) { ActLocatorParticipation data = new ActLocatorParticipation(item); data.setActUid(uid); actLocatorParticipationRepository.save(data); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/act/ActRelationshipRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/act/ActRelationshipRepositoryUtil.java index 25a824886..5955efc35 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/act/ActRelationshipRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/act/ActRelationshipRepositoryUtil.java @@ -28,8 +28,8 @@ public Collection getActRelationshipCollectionFromSourceId(L var res = actRelationshipRepository.findRecordsBySourceId(actUid); Collection dtoCollection = new ArrayList<>(); if (res.isPresent()) { - for(var item : res.get()) { - var dto = new ActRelationshipDto(item); + for (var item : res.get()) { + var dto = new ActRelationshipDto(item); dto.setItNew(false); dto.setItDirty(false); dtoCollection.add(dto); @@ -38,10 +38,8 @@ public Collection getActRelationshipCollectionFromSourceId(L return dtoCollection; } - public Collection selectActRelationshipDTCollectionFromActUid(long aUID) throws DataProcessingException - { - try - { + public Collection selectActRelationshipDTCollectionFromActUid(long aUID) throws DataProcessingException { + try { var col = actRelationshipRepository.findRecordsByActUid(aUID); Collection dtCollection = new ArrayList<>(); if (col.isPresent()) { @@ -53,9 +51,7 @@ public Collection selectActRelationshipDTCollectionFromActUi } } return dtCollection; - } - catch(Exception ndapex) - { + } catch (Exception ndapex) { throw new DataProcessingException(ndapex.toString()); } } @@ -67,26 +63,19 @@ public void insertActRelationshipHist(ActRelationshipDto actRelationshipDto) { } public void storeActRelationship(ActRelationshipDto dt) throws DataProcessingException { - if (dt == null) - { + if (dt == null) { throw new DataProcessingException("Error: try to store null ActRelationshipDT object."); } ActRelationship data = new ActRelationship(dt); - if (dt.isItNew()) - { + if (dt.isItNew()) { data.setLastChgUserId(AuthUtil.authUser.getNedssEntryId()); data.setLastChgTime(TimeStampUtil.getCurrentTimeStamp()); actRelationshipRepository.save(data); - } - else if (dt.isItDelete()) - { + } else if (dt.isItDelete()) { actRelationshipRepository.delete(data); - } - else if (dt.isItDirty()) - { + } else if (dt.isItDirty()) { if (dt.getTargetActUid() != null && - dt.getSourceActUid() != null && dt.getTypeCd() != null) - { + dt.getSourceActUid() != null && dt.getTypeCd() != null) { actRelationshipRepository.save(data); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/HL7PatientHandler.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/HL7PatientHandler.java index 6beb0a7d7..624b57699 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/HL7PatientHandler.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/HL7PatientHandler.java @@ -52,29 +52,29 @@ public HL7PatientHandler(ICatchingValueService checkingValueService, * This method porcess and parse HL7 Patient Result into Object * - Patient Identification * - Patient Next of Kin - * */ + */ public LabResultProxyContainer getPatientAndNextOfKin( HL7PATIENTRESULTType hl7PatientResult, LabResultProxyContainer labResultProxyContainer, EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { - if (hl7PatientResult != null && hl7PatientResult.getPATIENT() != null) { - // Processing Patient Identification - if (hl7PatientResult.getPATIENT().getPatientIdentification() != null) { - HL7PIDType patientInfo = hl7PatientResult.getPATIENT().getPatientIdentification(); - getPatient(patientInfo, labResultProxyContainer, edxLabInformationDto); - } - // Processing Next of kin - if (hl7PatientResult.getPATIENT().getNextofKinAssociatedParties() != null) { - List hl7NK1TypeList = hl7PatientResult.getPATIENT().getNextofKinAssociatedParties(); - // Only need the first index - if (!hl7NK1TypeList.isEmpty()) { - HL7NK1Type hl7NK1Type = hl7NK1TypeList.get(0); - if (hl7NK1Type.getName() != null && !hl7NK1Type.getName().isEmpty()) { - getNextOfKinVO(hl7NK1Type, labResultProxyContainer, edxLabInformationDto); - } + if (hl7PatientResult != null && hl7PatientResult.getPATIENT() != null) { + // Processing Patient Identification + if (hl7PatientResult.getPATIENT().getPatientIdentification() != null) { + HL7PIDType patientInfo = hl7PatientResult.getPATIENT().getPatientIdentification(); + getPatient(patientInfo, labResultProxyContainer, edxLabInformationDto); + } + // Processing Next of kin + if (hl7PatientResult.getPATIENT().getNextofKinAssociatedParties() != null) { + List hl7NK1TypeList = hl7PatientResult.getPATIENT().getNextofKinAssociatedParties(); + // Only need the first index + if (!hl7NK1TypeList.isEmpty()) { + HL7NK1Type hl7NK1Type = hl7NK1TypeList.get(0); + if (hl7NK1Type.getName() != null && !hl7NK1Type.getName().isEmpty()) { + getNextOfKinVO(hl7NK1Type, labResultProxyContainer, edxLabInformationDto); } } } + } return labResultProxyContainer; } @@ -82,296 +82,295 @@ public LabResultProxyContainer getPatient(HL7PIDType hl7PIDType, LabResultProxyContainer labResultProxyContainer, EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { - edxLabInformationDto.setRole(EdxELRConstant.ELR_PATIENT_CD); - PersonContainer personContainer = parseToPersonObject(labResultProxyContainer, edxLabInformationDto); + edxLabInformationDto.setRole(EdxELRConstant.ELR_PATIENT_CD); + PersonContainer personContainer = parseToPersonObject(labResultProxyContainer, edxLabInformationDto); - // Setting Entity ID for Patient Identifier - for (int i = 0; i < hl7PIDType.getPatientIdentifierList().size(); i++) { - HL7CXType hl7CXType = hl7PIDType.getPatientIdentifierList().get(i); + // Setting Entity ID for Patient Identifier + for (int i = 0; i < hl7PIDType.getPatientIdentifierList().size(); i++) { + HL7CXType hl7CXType = hl7PIDType.getPatientIdentifierList().get(i); - // Parsing Entity Id - EntityIdDto entityIdDto = entityIdUtil.processEntityData(hl7CXType, personContainer, null, i); + // Parsing Entity Id + EntityIdDto entityIdDto = entityIdUtil.processEntityData(hl7CXType, personContainer, null, i); - if( entityIdDto.getAssigningAuthorityIdType() == null) { - entityIdDto.setAssigningAuthorityIdType(edxLabInformationDto.getUniversalIdType()); - } - if( entityIdDto.getTypeCd()!=null && entityIdDto.getTypeCd().equals(EdxELRConstant.ELR_SS_TYPE)){ - String SSNNumberinit = entityIdDto.getRootExtensionTxt().replace("-", ""); - String SSNNumber =SSNNumberinit.replace(" ", ""); - try { - if(SSNNumber.length()!=9) { - edxLabInformationDto.setSsnInvalid(true); - } - Integer.parseInt(SSNNumber); - } - catch (NumberFormatException e) { + if (entityIdDto.getAssigningAuthorityIdType() == null) { + entityIdDto.setAssigningAuthorityIdType(edxLabInformationDto.getUniversalIdType()); + } + if (entityIdDto.getTypeCd() != null && entityIdDto.getTypeCd().equals(EdxELRConstant.ELR_SS_TYPE)) { + String SSNNumberinit = entityIdDto.getRootExtensionTxt().replace("-", ""); + String SSNNumber = SSNNumberinit.replace(" ", ""); + try { + if (SSNNumber.length() != 9) { edxLabInformationDto.setSsnInvalid(true); } - nbsObjectConverter.validateSSN(entityIdDto); - personContainer.getThePersonDto().setSSN(entityIdDto.getRootExtensionTxt()); - } - if(personContainer.getTheEntityIdDtoCollection()==null) { - personContainer.setTheEntityIdDtoCollection(new ArrayList<>()); - } - if(entityIdDto.getEntityUid()!=null) { - personContainer.getTheEntityIdDtoCollection().add(entityIdDto); + Integer.parseInt(SSNNumber); + } catch (NumberFormatException e) { + edxLabInformationDto.setSsnInvalid(true); } + nbsObjectConverter.validateSSN(entityIdDto); + personContainer.getThePersonDto().setSSN(entityIdDto.getRootExtensionTxt()); } - - // Setup Participant for LabResult - if (labResultProxyContainer.getTheParticipationDtoCollection() == null) { - labResultProxyContainer.setTheParticipationDtoCollection(new ArrayList<>()); + if (personContainer.getTheEntityIdDtoCollection() == null) { + personContainer.setTheEntityIdDtoCollection(new ArrayList<>()); } - ParticipationDto participationDto = new ParticipationDto(); - participationDto.setSubjectEntityUid(personContainer.getThePersonDto().getPersonUid()); - participationDto.setItNew(true); - participationDto.setItDirty(false); - participationDto.setCd(EdxELRConstant.ELR_PATIENT_CD); - //participationDto.setAddUserId(EdxELRConstant.ELR_ADD_USER_ID); - participationDto.setAddUserId(AuthUtil.authUser.getNedssEntryId()); - participationDto.setSubjectClassCd(EdxELRConstant.ELR_PERSON_CD); - participationDto.setTypeCd(EdxELRConstant.ELR_PATIENT_SUBJECT_CD); - participationDto.setStatusCd(EdxELRConstant.ELR_ACTIVE_CD); - participationDto.setRecordStatusCd(EdxELRConstant.ELR_ACTIVE); - - participationDto.setTypeDescTxt(EdxELRConstant.ELR_PATIENT_SUBJECT_DESC); - participationDto.setActUid(edxLabInformationDto.getRootObserbationUid()); - participationDto.setActClassCd(EdxELRConstant.ELR_OBS); - labResultProxyContainer.getTheParticipationDtoCollection().add(participationDto); - - - // Setup Person - personContainer.getThePersonDto().setAddReasonCd(EdxELRConstant.ELR_ADD_REASON_CD); - personContainer.getThePersonDto().setCurrSexCd(hl7PIDType.getAdministrativeSex()); - personContainer.getThePersonDto().setElectronicInd(ELRConstant.ELECTRONIC_IND); - - //Setup Person Lang - var langList = hl7PIDType.getPrimaryLanguage(); - if (!langList.isEmpty()) { - var primaryLang = langList.get(0); - personContainer.getThePersonDto().setPrimLangCd(primaryLang.getHL7Identifier()); - personContainer.getThePersonDto().setPrimLangDescTxt(primaryLang.getHL7Text()); + if (entityIdDto.getEntityUid() != null) { + personContainer.getTheEntityIdDtoCollection().add(entityIdDto); + } + } - if (personContainer.getThePersonDto().getPrimLangCd().equals("ENG")) { - personContainer.getThePersonDto().setSpeaksEnglishCd("Y"); - } else { - personContainer.getThePersonDto().setSpeaksEnglishCd("N"); - } + // Setup Participant for LabResult + if (labResultProxyContainer.getTheParticipationDtoCollection() == null) { + labResultProxyContainer.setTheParticipationDtoCollection(new ArrayList<>()); + } + ParticipationDto participationDto = new ParticipationDto(); + participationDto.setSubjectEntityUid(personContainer.getThePersonDto().getPersonUid()); + participationDto.setItNew(true); + participationDto.setItDirty(false); + participationDto.setCd(EdxELRConstant.ELR_PATIENT_CD); + //participationDto.setAddUserId(EdxELRConstant.ELR_ADD_USER_ID); + participationDto.setAddUserId(AuthUtil.authUser.getNedssEntryId()); + participationDto.setSubjectClassCd(EdxELRConstant.ELR_PERSON_CD); + participationDto.setTypeCd(EdxELRConstant.ELR_PATIENT_SUBJECT_CD); + participationDto.setStatusCd(EdxELRConstant.ELR_ACTIVE_CD); + participationDto.setRecordStatusCd(EdxELRConstant.ELR_ACTIVE); + + participationDto.setTypeDescTxt(EdxELRConstant.ELR_PATIENT_SUBJECT_DESC); + participationDto.setActUid(edxLabInformationDto.getRootObserbationUid()); + participationDto.setActClassCd(EdxELRConstant.ELR_OBS); + labResultProxyContainer.getTheParticipationDtoCollection().add(participationDto); + + + // Setup Person + personContainer.getThePersonDto().setAddReasonCd(EdxELRConstant.ELR_ADD_REASON_CD); + personContainer.getThePersonDto().setCurrSexCd(hl7PIDType.getAdministrativeSex()); + personContainer.getThePersonDto().setElectronicInd(ELRConstant.ELECTRONIC_IND); + + //Setup Person Lang + var langList = hl7PIDType.getPrimaryLanguage(); + if (!langList.isEmpty()) { + var primaryLang = langList.get(0); + personContainer.getThePersonDto().setPrimLangCd(primaryLang.getHL7Identifier()); + personContainer.getThePersonDto().setPrimLangDescTxt(primaryLang.getHL7Text()); + + if (personContainer.getThePersonDto().getPrimLangCd().equals("ENG")) { + personContainer.getThePersonDto().setSpeaksEnglishCd("Y"); + } else { + personContainer.getThePersonDto().setSpeaksEnglishCd("N"); } + } - // Setup Person Sex Code - ElrXref elrXref = new ElrXref(); - var result = findRecordForElrXrefsList("ELR_LCA_SEX", personContainer.getThePersonDto().getCurrSexCd(), "P_SEX"); + // Setup Person Sex Code + ElrXref elrXref = new ElrXref(); + var result = findRecordForElrXrefsList("ELR_LCA_SEX", personContainer.getThePersonDto().getCurrSexCd(), "P_SEX"); - if (result.isPresent()) { - elrXref = result.get(); - } - String toCode = elrXref.getToCode(); - if (toCode == null && personContainer.getThePersonDto().getCurrSexCd() != null) { - toCode = personContainer.getThePersonDto().getCurrSexCd(); - } - if (toCode != null && !toCode.trim().isEmpty()){ - personContainer.getThePersonDto().setCurrSexCd(toCode.trim()); - edxLabInformationDto.setSexTranslated(true); - }else{ - edxLabInformationDto.setSexTranslated(false); - } + if (result.isPresent()) { + elrXref = result.get(); + } + String toCode = elrXref.getToCode(); + if (toCode == null && personContainer.getThePersonDto().getCurrSexCd() != null) { + toCode = personContainer.getThePersonDto().getCurrSexCd(); + } + if (toCode != null && !toCode.trim().isEmpty()) { + personContainer.getThePersonDto().setCurrSexCd(toCode.trim()); + edxLabInformationDto.setSexTranslated(true); + } else { + edxLabInformationDto.setSexTranslated(false); + } - // Setup Person Birth Time - if (hl7PIDType.getDateTimeOfBirth() != null) { - Timestamp timestamp = nbsObjectConverter.processHL7TSTypeForDOBWithoutTime(hl7PIDType.getDateTimeOfBirth()); - personContainer.getThePersonDto().setBirthTime(timestamp); - personContainer.getThePersonDto().setBirthTimeCalc(timestamp); - } + // Setup Person Birth Time + if (hl7PIDType.getDateTimeOfBirth() != null) { + Timestamp timestamp = nbsObjectConverter.processHL7TSTypeForDOBWithoutTime(hl7PIDType.getDateTimeOfBirth()); + personContainer.getThePersonDto().setBirthTime(timestamp); + personContainer.getThePersonDto().setBirthTimeCalc(timestamp); + } - // Setup Person Birth Place - if(hl7PIDType.getBirthPlace()!=null && !hl7PIDType.getBirthPlace().trim().equals("")){ - nbsObjectConverter.setPersonBirthType(hl7PIDType.getBirthPlace(), personContainer); - } + // Setup Person Birth Place + if (hl7PIDType.getBirthPlace() != null && !hl7PIDType.getBirthPlace().trim().equals("")) { + nbsObjectConverter.setPersonBirthType(hl7PIDType.getBirthPlace(), personContainer); + } - // Setup Person Ethnic Group - Collection ethnicColl = new ArrayList<>(); - List ethnicArray = hl7PIDType.getEthnicGroup(); - for (HL7CWEType ethnicType : ethnicArray) { - PersonEthnicGroupDto personEthnicGroupDto = nbsObjectConverter.ethnicGroupType(ethnicType, personContainer); - ElrXref elrXrefForEthnic = new ElrXref(); - var res = findRecordForElrXrefsList("ELR_LCA_ETHN_GRP",personEthnicGroupDto.getEthnicGroupCd(), "P_ETHN_GRP"); - if (res.isPresent()) { - elrXrefForEthnic = res.get(); - } - String ethnicGroupCd = elrXrefForEthnic.getToCode(); - if (ethnicGroupCd != null && !ethnicGroupCd.trim().equals("")) { - personEthnicGroupDto.setEthnicGroupCd(ethnicGroupCd); - } - if (personEthnicGroupDto.getEthnicGroupCd() != null && !personEthnicGroupDto.getEthnicGroupCd().trim().equals("")) { - var map = checkingValueService.getCodedValues("P_ETHN_GRP", personEthnicGroupDto.getEthnicGroupCd()); - if (map.containsKey(personEthnicGroupDto.getEthnicGroupCd())) { - edxLabInformationDto.setEthnicityCodeTranslated(false); - } - } - if (personEthnicGroupDto.getEthnicGroupCd() != null - && !personEthnicGroupDto.getEthnicGroupCd().trim().equals("") - ) { - ethnicColl.add(personEthnicGroupDto); - personContainer.getThePersonDto().setEthnicGroupInd(personEthnicGroupDto.getEthnicGroupCd()); - } else { - logger.info("Blank value recived for PID-22, Ethinicity"); + // Setup Person Ethnic Group + Collection ethnicColl = new ArrayList<>(); + List ethnicArray = hl7PIDType.getEthnicGroup(); + for (HL7CWEType ethnicType : ethnicArray) { + PersonEthnicGroupDto personEthnicGroupDto = nbsObjectConverter.ethnicGroupType(ethnicType, personContainer); + ElrXref elrXrefForEthnic = new ElrXref(); + var res = findRecordForElrXrefsList("ELR_LCA_ETHN_GRP", personEthnicGroupDto.getEthnicGroupCd(), "P_ETHN_GRP"); + if (res.isPresent()) { + elrXrefForEthnic = res.get(); + } + String ethnicGroupCd = elrXrefForEthnic.getToCode(); + if (ethnicGroupCd != null && !ethnicGroupCd.trim().equals("")) { + personEthnicGroupDto.setEthnicGroupCd(ethnicGroupCd); + } + if (personEthnicGroupDto.getEthnicGroupCd() != null && !personEthnicGroupDto.getEthnicGroupCd().trim().equals("")) { + var map = checkingValueService.getCodedValues("P_ETHN_GRP", personEthnicGroupDto.getEthnicGroupCd()); + if (map.containsKey(personEthnicGroupDto.getEthnicGroupCd())) { + edxLabInformationDto.setEthnicityCodeTranslated(false); } - personContainer.setThePersonEthnicGroupDtoCollection(ethnicColl); } - - // Setup person Martial Status - HL7CEType maritalStatusType = hl7PIDType.getMaritalStatus(); - if(maritalStatusType!= null && maritalStatusType.getHL7Identifier()!=null){ - personContainer.getThePersonDto().setMaritalStatusCd(maritalStatusType.getHL7Identifier().toUpperCase()); - personContainer.getThePersonDto().setMaritalStatusDescTxt(maritalStatusType.getHL7Text()); + if (personEthnicGroupDto.getEthnicGroupCd() != null + && !personEthnicGroupDto.getEthnicGroupCd().trim().equals("") + ) { + ethnicColl.add(personEthnicGroupDto); + personContainer.getThePersonDto().setEthnicGroupInd(personEthnicGroupDto.getEthnicGroupCd()); + } else { + logger.info("Blank value recived for PID-22, Ethinicity"); } + personContainer.setThePersonEthnicGroupDtoCollection(ethnicColl); + } - // Setup Person Mothers - if(hl7PIDType.getMothersIdentifier() != null){ - for(int i=0; i < hl7PIDType.getMothersIdentifier().size(); i++){ - HL7CXType hl7CXType = hl7PIDType.getMothersIdentifier().get(i); - int j = i; - if(personContainer.getTheEntityIdDtoCollection()!=null ) { - j= personContainer.getTheEntityIdDtoCollection().size(); - } - EntityIdDto entityIdDto = nbsObjectConverter.processEntityData(hl7CXType, personContainer, EdxELRConstant.ELR_MOTHER_IDENTIFIER, j); - if(entityIdDto.getEntityUid() != null) { - personContainer.getTheEntityIdDtoCollection().add(entityIdDto); - } - } - } + // Setup person Martial Status + HL7CEType maritalStatusType = hl7PIDType.getMaritalStatus(); + if (maritalStatusType != null && maritalStatusType.getHL7Identifier() != null) { + personContainer.getThePersonDto().setMaritalStatusCd(maritalStatusType.getHL7Identifier().toUpperCase()); + personContainer.getThePersonDto().setMaritalStatusDescTxt(maritalStatusType.getHL7Text()); + } - //Setup Person Maiden Mother Name - if(hl7PIDType.getMothersMaidenName() != null && (hl7PIDType.getMothersMaidenName().size() > 0)){ - String surname = ""; - if(hl7PIDType.getMothersMaidenName().get(0).getHL7FamilyName()!=null) { - surname = hl7PIDType.getMothersMaidenName().get(0).getHL7FamilyName().getHL7Surname(); - } - String givenName = hl7PIDType.getMothersMaidenName().get(0).getHL7GivenName(); - String motherMaidenNm = ""; - if(surname!= null) { - motherMaidenNm = surname; + // Setup Person Mothers + if (hl7PIDType.getMothersIdentifier() != null) { + for (int i = 0; i < hl7PIDType.getMothersIdentifier().size(); i++) { + HL7CXType hl7CXType = hl7PIDType.getMothersIdentifier().get(i); + int j = i; + if (personContainer.getTheEntityIdDtoCollection() != null) { + j = personContainer.getTheEntityIdDtoCollection().size(); } - if(givenName!= null) { - motherMaidenNm = motherMaidenNm + " " + givenName; + EntityIdDto entityIdDto = nbsObjectConverter.processEntityData(hl7CXType, personContainer, EdxELRConstant.ELR_MOTHER_IDENTIFIER, j); + if (entityIdDto.getEntityUid() != null) { + personContainer.getTheEntityIdDtoCollection().add(entityIdDto); } - personContainer.getThePersonDto().setMothersMaidenNm(motherMaidenNm.trim()); } + } - //Setup Person Birth Order - if(hl7PIDType.getBirthOrder()!=null && hl7PIDType.getBirthOrder().getHL7Numeric() != null) { - personContainer.getThePersonDto().setBirthOrderNbr(hl7PIDType.getBirthOrder().getHL7Numeric().intValue()); + //Setup Person Maiden Mother Name + if (hl7PIDType.getMothersMaidenName() != null && (hl7PIDType.getMothersMaidenName().size() > 0)) { + String surname = ""; + if (hl7PIDType.getMothersMaidenName().get(0).getHL7FamilyName() != null) { + surname = hl7PIDType.getMothersMaidenName().get(0).getHL7FamilyName().getHL7Surname(); } - if(hl7PIDType.getMultipleBirthIndicator()!=null){ - personContainer.getThePersonDto().setMultipleBirthInd(hl7PIDType.getMultipleBirthIndicator()); + String givenName = hl7PIDType.getMothersMaidenName().get(0).getHL7GivenName(); + String motherMaidenNm = ""; + if (surname != null) { + motherMaidenNm = surname; } - - - //Setup Person Account Number - if(hl7PIDType.getPatientAccountNumber()!=null){ - int j = 1; - if(personContainer.getTheEntityIdDtoCollection()!=null ) { - j= personContainer.getTheEntityIdDtoCollection().size(); - } - EntityIdDto entityIdDto = nbsObjectConverter.processEntityData(hl7PIDType.getPatientAccountNumber(), personContainer, EdxELRConstant.ELR_ACCOUNT_IDENTIFIER, j); - if(entityIdDto.getEntityUid() != null) { - personContainer.getTheEntityIdDtoCollection().add(entityIdDto); - } + if (givenName != null) { + motherMaidenNm = motherMaidenNm + " " + givenName; } + personContainer.getThePersonDto().setMothersMaidenNm(motherMaidenNm.trim()); + } - //Setup Person Address - List addressArray = hl7PIDType.getPatientAddress(); - Collection addressCollection = new ArrayList<>(); + //Setup Person Birth Order + if (hl7PIDType.getBirthOrder() != null && hl7PIDType.getBirthOrder().getHL7Numeric() != null) { + personContainer.getThePersonDto().setBirthOrderNbr(hl7PIDType.getBirthOrder().getHL7Numeric().intValue()); + } + if (hl7PIDType.getMultipleBirthIndicator() != null) { + personContainer.getThePersonDto().setMultipleBirthInd(hl7PIDType.getMultipleBirthIndicator()); + } - if (!addressArray.isEmpty()) { - HL7XADType addressType = addressArray.get(0); - nbsObjectConverter.personAddressType(addressType, EdxELRConstant.ELR_PATIENT_CD, personContainer); + + //Setup Person Account Number + if (hl7PIDType.getPatientAccountNumber() != null) { + int j = 1; + if (personContainer.getTheEntityIdDtoCollection() != null) { + j = personContainer.getTheEntityIdDtoCollection().size(); } - //Setup Person Deceased Status - personContainer.getThePersonDto().setDeceasedIndCd(hl7PIDType.getPatientDeathIndicator()); - if (hl7PIDType.getPatientDeathDateAndTime() != null) { - personContainer.getThePersonDto().setDeceasedTime(nbsObjectConverter.processHL7TSType(hl7PIDType - .getPatientDeathDateAndTime(), EdxELRConstant.DATE_VALIDATION_PATIENT_DEATH_DATE_AND_TIME_MSG)); + EntityIdDto entityIdDto = nbsObjectConverter.processEntityData(hl7PIDType.getPatientAccountNumber(), personContainer, EdxELRConstant.ELR_ACCOUNT_IDENTIFIER, j); + if (entityIdDto.getEntityUid() != null) { + personContainer.getTheEntityIdDtoCollection().add(entityIdDto); } + } - //Setup Person Names - List nameArray = hl7PIDType.getPatientName(); - for (HL7XPNType hl7XPNType : nameArray) { - nbsObjectConverter.mapPersonNameType(hl7XPNType, personContainer); - } + //Setup Person Address + List addressArray = hl7PIDType.getPatientAddress(); + Collection addressCollection = new ArrayList<>(); - //Setup Person Business Phone Number - if(hl7PIDType.getPhoneNumberBusiness() != null){ - List phoneBusinessArray = hl7PIDType.getPhoneNumberBusiness(); - if (phoneBusinessArray != null && !phoneBusinessArray.isEmpty()) { - HL7XTNType phoneType = phoneBusinessArray.get(0); - EntityLocatorParticipationDto elpDT = nbsObjectConverter.personTelePhoneType(phoneType, EdxELRConstant.ELR_PATIENT_CD, personContainer); - elpDT.setUseCd(NEDSSConstant.WORK_PHONE); - addressCollection.add(elpDT); - } - } + if (!addressArray.isEmpty()) { + HL7XADType addressType = addressArray.get(0); + nbsObjectConverter.personAddressType(addressType, EdxELRConstant.ELR_PATIENT_CD, personContainer); + } + //Setup Person Deceased Status + personContainer.getThePersonDto().setDeceasedIndCd(hl7PIDType.getPatientDeathIndicator()); + if (hl7PIDType.getPatientDeathDateAndTime() != null) { + personContainer.getThePersonDto().setDeceasedTime(nbsObjectConverter.processHL7TSType(hl7PIDType + .getPatientDeathDateAndTime(), EdxELRConstant.DATE_VALIDATION_PATIENT_DEATH_DATE_AND_TIME_MSG)); + } - //Setup Person Home Phone Number - if(hl7PIDType.getPhoneNumberHome()!=null ){ - List phoneHomeArray = hl7PIDType.getPhoneNumberHome(); - if (!phoneHomeArray.isEmpty()) { - HL7XTNType phoneType = phoneHomeArray.get(0); - EntityLocatorParticipationDto elpDT = nbsObjectConverter.personTelePhoneType(phoneType, EdxELRConstant.ELR_PATIENT_CD, personContainer); - elpDT.setUseCd(NEDSSConstant.HOME); - addressCollection.add(elpDT); - } - } + //Setup Person Names + List nameArray = hl7PIDType.getPatientName(); + for (HL7XPNType hl7XPNType : nameArray) { + nbsObjectConverter.mapPersonNameType(hl7XPNType, personContainer); + } - //Setup Person Race - if(hl7PIDType.getRace() != null){ - Collection raceColl = new ArrayList<>(); - List raceArray = hl7PIDType.getRace(); - PersonRaceDto raceDT; - for (HL7CWEType hl7CWEType : raceArray) { - try { - raceDT = nbsObjectConverter.raceType(hl7CWEType, personContainer); - raceDT.setPersonUid(personContainer.getThePersonDto().getPersonUid()); - ElrXref elrXrefForRace = new ElrXref(); - var res = findRecordForElrXrefsList("ELR_LCA_RACE", raceDT.getRaceCategoryCd(), "P_RACE_CAT"); - if (res.isPresent()) { - elrXrefForRace = res.get(); - } - String newRaceCat = elrXrefForRace.getToCode(); - if (newRaceCat != null && !newRaceCat.trim().equals("")) { - raceDT.setRaceCd(newRaceCat); - raceDT.setRaceCategoryCd(newRaceCat); - } - var codeMap = SrteCache.raceCodesMap; - if (!codeMap.containsKey(raceDT.getRaceCd())) { - edxLabInformationDto.setRaceTranslated(false); - } - raceColl.add(raceDT); - } catch (Exception e) { - logger.error("Exception thrown by HL7PatientProcessor.getPatientVO getting race information" + e); - throw new DataProcessingException( - "Exception thrown at HL7PatientProcessor.getPatientVO getting race information:" + e); - }// end of catch - } - personContainer.setThePersonRaceDtoCollection(raceColl); + //Setup Person Business Phone Number + if (hl7PIDType.getPhoneNumberBusiness() != null) { + List phoneBusinessArray = hl7PIDType.getPhoneNumberBusiness(); + if (phoneBusinessArray != null && !phoneBusinessArray.isEmpty()) { + HL7XTNType phoneType = phoneBusinessArray.get(0); + EntityLocatorParticipationDto elpDT = nbsObjectConverter.personTelePhoneType(phoneType, EdxELRConstant.ELR_PATIENT_CD, personContainer); + elpDT.setUseCd(NEDSSConstant.WORK_PHONE); + addressCollection.add(elpDT); } + } - if(labResultProxyContainer.getThePersonContainerCollection()==null){ - labResultProxyContainer.setThePersonContainerCollection(new ArrayList<>()); + //Setup Person Home Phone Number + if (hl7PIDType.getPhoneNumberHome() != null) { + List phoneHomeArray = hl7PIDType.getPhoneNumberHome(); + if (!phoneHomeArray.isEmpty()) { + HL7XTNType phoneType = phoneHomeArray.get(0); + EntityLocatorParticipationDto elpDT = nbsObjectConverter.personTelePhoneType(phoneType, EdxELRConstant.ELR_PATIENT_CD, personContainer); + elpDT.setUseCd(NEDSSConstant.HOME); + addressCollection.add(elpDT); } - labResultProxyContainer.getThePersonContainerCollection().add(personContainer); + } + + //Setup Person Race + if (hl7PIDType.getRace() != null) { + Collection raceColl = new ArrayList<>(); + List raceArray = hl7PIDType.getRace(); + PersonRaceDto raceDT; + for (HL7CWEType hl7CWEType : raceArray) { + try { + raceDT = nbsObjectConverter.raceType(hl7CWEType, personContainer); + raceDT.setPersonUid(personContainer.getThePersonDto().getPersonUid()); + ElrXref elrXrefForRace = new ElrXref(); + var res = findRecordForElrXrefsList("ELR_LCA_RACE", raceDT.getRaceCategoryCd(), "P_RACE_CAT"); + if (res.isPresent()) { + elrXrefForRace = res.get(); + } + String newRaceCat = elrXrefForRace.getToCode(); + if (newRaceCat != null && !newRaceCat.trim().equals("")) { + raceDT.setRaceCd(newRaceCat); + raceDT.setRaceCategoryCd(newRaceCat); + } + var codeMap = SrteCache.raceCodesMap; + if (!codeMap.containsKey(raceDT.getRaceCd())) { + edxLabInformationDto.setRaceTranslated(false); + } + raceColl.add(raceDT); + } catch (Exception e) { + logger.error("Exception thrown by HL7PatientProcessor.getPatientVO getting race information" + e); + throw new DataProcessingException( + "Exception thrown at HL7PatientProcessor.getPatientVO getting race information:" + e); + }// end of catch + } + personContainer.setThePersonRaceDtoCollection(raceColl); + } + + if (labResultProxyContainer.getThePersonContainerCollection() == null) { + labResultProxyContainer.setThePersonContainerCollection(new ArrayList<>()); + } + labResultProxyContainer.getThePersonContainerCollection().add(personContainer); return labResultProxyContainer; } /** * This method process and parse data from EdxLabInformation to ParsonVO and LabResultProxyVO - * - Person Object - * - Role Object (part of Lab Result, this is a list) - * */ + * - Person Object + * - Role Object (part of Lab Result, this is a list) + */ public PersonContainer parseToPersonObject(LabResultProxyContainer labResultProxyContainer, - EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { + EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { PersonContainer personContainer = new PersonContainer(); try { PersonDto personDto = personContainer.getThePersonDto(); @@ -379,19 +378,17 @@ public PersonContainer parseToPersonObject(LabResultProxyContainer labResultProx // Check patient object ROLE: PAT, NOK, PROVIDER // Then parsing data to PersonVO and DTO - if (edxLabInformationDto.getRole().equalsIgnoreCase(NEDSSConstant.PAT) ) { + if (edxLabInformationDto.getRole().equalsIgnoreCase(NEDSSConstant.PAT)) { personContainer.getThePersonDto().setCd(NEDSSConstant.PAT); personDto.setCd(EdxELRConstant.ELR_PATIENT_CD); personDto.setCdDescTxt(EdxELRConstant.ELR_PATIENT_DESC); personDto.setPersonUid(edxLabInformationDto.getPatientUid()); - } - else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_NEXT_OF_KIN)){ + } else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_NEXT_OF_KIN)) { personContainer.setRole(EdxELRConstant.ELR_NEXT_OF_KIN); personDto.setCd(EdxELRConstant.ELR_PATIENT_CD); personDto.setCdDescTxt(EdxELRConstant.ELR_NOK_DESC); personDto.setPersonUid((long) edxLabInformationDto.getNextUid()); - } - else { + } else { personContainer.getThePersonDto().setCd(EdxELRConstant.ELR_PROVIDER_CD); personDto.setCd(EdxELRConstant.ELR_PROVIDER_CD); personDto.setCdDescTxt(EdxELRConstant.ELR_PROVIDER_DESC); @@ -428,35 +425,31 @@ else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_NEXT RoleDto roleDto = new RoleDto(); roleDto.setSubjectEntityUid(personDto.getPersonUid()); roleDto.setRecordStatusCd(EdxELRConstant.ELR_ACTIVE); - boolean addRole= false; + boolean addRole = false; if (edxLabInformationDto.getRole().equalsIgnoreCase(NEDSSConstant.PAT)) { roleDto.setCd(NEDSSConstant.PAT); roleDto.setCdDescTxt(EdxELRConstant.ELR_PATIENT); roleDto.setSubjectClassCd(EdxELRConstant.ELR_PATIENT); - addRole= true; - } - else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_NEXT_OF_KIN)) { + addRole = true; + } else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_NEXT_OF_KIN)) { roleDto.setSubjectClassCd(EdxELRConstant.ELR_CON); - if(edxLabInformationDto.getRelationship()!=null) { + if (edxLabInformationDto.getRelationship() != null) { roleDto.setCd(edxLabInformationDto.getRelationship()); - } - else { + } else { roleDto.setCd(EdxELRConstant.ELR_NEXT_F_KIN_ROLE_CD); } - if(edxLabInformationDto.getRelationshipDesc()!=null) { + if (edxLabInformationDto.getRelationshipDesc() != null) { roleDto.setCdDescTxt(edxLabInformationDto.getRelationshipDesc()); - } - else { + } else { roleDto.setCdDescTxt(EdxELRConstant.ELR_NEXT_F_KIN_ROLE_DESC); } roleDto.setScopingRoleSeq(1); roleDto.setScopingEntityUid(edxLabInformationDto.getPatientUid()); roleDto.setScopingClassCd(EdxELRConstant.ELR_PATIENT_CD); roleDto.setScopingRoleCd(EdxELRConstant.ELR_PATIENT_CD); - addRole= true; - } - else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_SPECIMEN_PROCURER_CD)) { + addRole = true; + } else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_SPECIMEN_PROCURER_CD)) { roleDto.setCd(EdxELRConstant.ELR_SPECIMEN_PROCURER_CD); roleDto.setSubjectClassCd(EdxELRConstant.ELR_PROVIDER_CD); roleDto.setCdDescTxt(EdxELRConstant.ELR_SPECIMEN_PROCURER_DESC); @@ -464,15 +457,13 @@ else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_SPEC roleDto.setScopingRoleCd(EdxELRConstant.ELR_PATIENT_CD); roleDto.setScopingEntityUid(edxLabInformationDto.getPatientUid()); roleDto.setScopingRoleSeq(1); - addRole= true; - } - else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_LAB_PROVIDER_CD) || - edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_LAB_VERIFIER_CD)|| + addRole = true; + } else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_LAB_PROVIDER_CD) || + edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_LAB_VERIFIER_CD) || edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_LAB_ASSISTANT_CD) || edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_LAB_PERFORMER_CD) || edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_LAB_ENTERER_CD) - ) - { + ) { roleDto.setCd(EdxELRConstant.ELR_LAB_PROVIDER_CD); roleDto.setSubjectClassCd(EdxELRConstant.ELR_PROVIDER_CD); roleDto.setCdDescTxt(EdxELRConstant.ELR_LAB_PROVIDER_DESC); @@ -480,9 +471,8 @@ else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_LAB_ roleDto.setScopingRoleCd(EdxELRConstant.ELR_PATIENT_CD); roleDto.setScopingEntityUid(edxLabInformationDto.getPatientUid()); roleDto.setScopingRoleSeq(1); - addRole= true; - } - else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_OP_CD)) { + addRole = true; + } else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_OP_CD)) { roleDto.setCd(EdxELRConstant.ELR_OP_CD); roleDto.setSubjectClassCd(EdxELRConstant.ELR_PROVIDER_CD); roleDto.setCdDescTxt(EdxELRConstant.ELR_OP_DESC); @@ -491,9 +481,8 @@ else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_OP_C roleDto.setScopingRoleSeq(1); roleDto.setScopingEntityUid(edxLabInformationDto.getPatientUid()); roleDto.setScopingRoleSeq(1); - addRole= true; - } - else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_COPY_TO_CD)) { + addRole = true; + } else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_COPY_TO_CD)) { roleDto.setCd(EdxELRConstant.ELR_COPY_TO_CD); roleDto.setSubjectClassCd(EdxELRConstant.ELR_PROV_CD); roleDto.setCdDescTxt(EdxELRConstant.ELR_COPY_TO_DESC); @@ -502,7 +491,7 @@ else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_COPY roleDto.setScopingRoleSeq(1); roleDto.setScopingEntityUid(edxLabInformationDto.getPatientUid()); roleDto.setScopingRoleSeq(1); - addRole= true; + addRole = true; } roleDto.setAddUserId(AuthUtil.authUser.getNedssEntryId()); @@ -513,13 +502,13 @@ else if (edxLabInformationDto.getRole().equalsIgnoreCase(EdxELRConstant.ELR_COPY roleDto.setItNew(true); roleDto.setItDirty(false); - if(addRole){ + if (addRole) { labResultProxyContainer.getTheRoleDtoCollection().add(roleDto); } } catch (Exception e) { logger.error("Exception thrown by HL7ORCProcessor.personVO " + e); - throw new DataProcessingException("Exception thrown at HL7PatientProcessor.personVO:"+ e); + throw new DataProcessingException("Exception thrown at HL7PatientProcessor.personVO:" + e); } return personContainer; } @@ -530,13 +519,12 @@ public LabResultProxyContainer getNextOfKinVO(HL7NK1Type hl7NK1Type, EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { try { edxLabInformationDto.setRole(EdxELRConstant.ELR_NEXT_OF_KIN); - if(hl7NK1Type.getRelationship()!=null){ + if (hl7NK1Type.getRelationship() != null) { edxLabInformationDto.setRelationship(hl7NK1Type.getRelationship().getHL7Identifier()); - String desc= checkingValueService.getCodeDescTxtForCd(edxLabInformationDto.getRelationship(), EdxELRConstant.ELR_NEXT_OF_KIN_RL_CLASS); - if(desc!=null && desc.trim().length()>0 && hl7NK1Type.getRelationship().getHL7Text()==null) { + String desc = checkingValueService.getCodeDescTxtForCd(edxLabInformationDto.getRelationship(), EdxELRConstant.ELR_NEXT_OF_KIN_RL_CLASS); + if (desc != null && desc.trim().length() > 0 && hl7NK1Type.getRelationship().getHL7Text() == null) { edxLabInformationDto.setRelationshipDesc(desc); - } - else if(hl7NK1Type.getRelationship().getHL7Text()!=null) { + } else if (hl7NK1Type.getRelationship().getHL7Text() != null) { edxLabInformationDto.setRelationshipDesc(hl7NK1Type.getRelationship().getHL7Text()); } } @@ -565,7 +553,7 @@ else if(hl7NK1Type.getRelationship().getHL7Text()!=null) { } catch (Exception e) { logger.error("Exception thrown by HL7PatientProcessor.getNextOfKinVO " + e); - throw new DataProcessingException("Exception thrown at HL7PatientProcessor.getNextOfKinVO:"+ e); + throw new DataProcessingException("Exception thrown at HL7PatientProcessor.getNextOfKinVO:" + e); } return labResultProxyContainer; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/NBSObjectConverter.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/NBSObjectConverter.java index 1ddc27242..54ee2d433 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/NBSObjectConverter.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/NBSObjectConverter.java @@ -45,7 +45,7 @@ public PersonContainer mapPersonNameType(HL7XPNType hl7XPNType, PersonContainer PersonNameDto personNameDto = new PersonNameDto(); HL7FNType hl7FamilyName = hl7XPNType.getHL7FamilyName(); /** Optional maxOccurs="1 */ - if(hl7FamilyName!=null){ + if (hl7FamilyName != null) { personNameDto.setLastNm(hl7FamilyName.getHL7Surname()); personNameDto.setLastNm2(hl7FamilyName.getHL7OwnSurname()); } @@ -73,7 +73,7 @@ public PersonContainer mapPersonNameType(HL7XPNType hl7XPNType, PersonContainer personNameDto.setNmUseCd(Objects.requireNonNullElse(hl7NameTypeCode, EdxELRConstant.ELR_LEGAL_NAME)); String toCode = checkingValueService.findToCode("ELR_LCA_NM_USE", personNameDto.getNmUseCd(), "P_NM_USE"); - if(toCode!=null && !toCode.isEmpty()){ + if (toCode != null && !toCode.isEmpty()) { personNameDto.setNmUseCd(toCode); } /** length"1 */ @@ -109,7 +109,7 @@ public PersonContainer mapPersonNameType(HL7XPNType hl7XPNType, PersonContainer personContainer.getThePersonNameDtoCollection().add(personNameDto); - if (personNameDto.getNmUseCd()!=null && personNameDto.getNmUseCd().equals(EdxELRConstant.ELR_LEGAL_NAME)) { + if (personNameDto.getNmUseCd() != null && personNameDto.getNmUseCd().equals(EdxELRConstant.ELR_LEGAL_NAME)) { personContainer.getThePersonDto().setLastNm(personNameDto.getLastNm()); personContainer.getThePersonDto().setFirstNm(personNameDto.getFirstNm()); personContainer.getThePersonDto().setNmPrefix(personNameDto.getNmPrefix()); @@ -121,12 +121,12 @@ public PersonContainer mapPersonNameType(HL7XPNType hl7XPNType, PersonContainer public EntityIdDto processEntityData(HL7CXType hl7CXType, PersonContainer personContainer, String indicator, int j) throws DataProcessingException { EntityIdDto entityIdDto = new EntityIdDto(); - if (hl7CXType != null ) { + if (hl7CXType != null) { entityIdDto.setEntityUid(personContainer.getThePersonDto().getPersonUid()); entityIdDto.setAddTime(personContainer.getThePersonDto().getAddTime()); entityIdDto.setEntityIdSeq(j + 1); entityIdDto.setRootExtensionTxt(hl7CXType.getHL7IDNumber()); - if(hl7CXType.getHL7AssigningAuthority()!=null){ + if (hl7CXType.getHL7AssigningAuthority() != null) { entityIdDto.setAssigningAuthorityCd(hl7CXType.getHL7AssigningAuthority().getHL7UniversalID()); entityIdDto.setAssigningAuthorityDescTxt(hl7CXType.getHL7AssigningAuthority().getHL7NamespaceID()); entityIdDto.setAssigningAuthorityIdType(hl7CXType.getHL7AssigningAuthority().getHL7UniversalIDType()); @@ -134,15 +134,13 @@ public EntityIdDto processEntityData(HL7CXType hl7CXType, PersonContainer person if (indicator != null && indicator.equals(EdxELRConstant.ELR_PATIENT_ALTERNATE_IND)) { entityIdDto.setTypeCd(EdxELRConstant.ELR_PATIENT_ALTERNATE_TYPE); entityIdDto.setTypeDescTxt(EdxELRConstant.ELR_PATIENT_ALTERNATE_DESC); - } - else if (indicator != null && indicator.equals(EdxELRConstant.ELR_MOTHER_IDENTIFIER)) { + } else if (indicator != null && indicator.equals(EdxELRConstant.ELR_MOTHER_IDENTIFIER)) { entityIdDto.setTypeCd(EdxELRConstant.ELR_MOTHER_IDENTIFIER); entityIdDto.setTypeDescTxt(EdxELRConstant.ELR_MOTHER_IDENTIFIER); } else if (indicator != null && indicator.equals(EdxELRConstant.ELR_ACCOUNT_IDENTIFIER)) { entityIdDto.setTypeCd(EdxELRConstant.ELR_ACCOUNT_IDENTIFIER); entityIdDto.setTypeDescTxt(EdxELRConstant.ELR_ACCOUNT_DESC); - } - else if (hl7CXType.getHL7IdentifierTypeCode() == null || hl7CXType.getHL7IdentifierTypeCode().trim().equals("")) { + } else if (hl7CXType.getHL7IdentifierTypeCode() == null || hl7CXType.getHL7IdentifierTypeCode().trim().equals("")) { entityIdDto.setTypeCd(EdxELRConstant.ELR_PERSON_TYPE); entityIdDto.setTypeDescTxt(EdxELRConstant.ELR_PERSON_TYPE_DESC); String typeCode = checkingValueService.getCodeDescTxtForCd(entityIdDto.getTypeCd(), EdxELRConstant.EI_TYPE); @@ -200,8 +198,8 @@ public EntityLocatorParticipationDto organizationAddressType(HL7XADType hl7XADTy /** * Parsing Entity Address into Object - * */ - private EntityLocatorParticipationDto addressType(HL7XADType hl7XADType, String role) { + */ + private EntityLocatorParticipationDto addressType(HL7XADType hl7XADType, String role) { EntityLocatorParticipationDto elp = new EntityLocatorParticipationDto(); try { @@ -215,20 +213,17 @@ private EntityLocatorParticipationDto addressType(HL7XADType hl7XADType, String /** Optional maxOccurs="1 */ /** length"3 */ - if (role.equalsIgnoreCase(EdxELRConstant.ELR_OP_CD)) - { + if (role.equalsIgnoreCase(EdxELRConstant.ELR_OP_CD)) { elp.setClassCd(EdxELRConstant.ELR_POSTAL_CD); elp.setUseCd(EdxELRConstant.ELR_WORKPLACE_CD); elp.setCd(EdxELRConstant.ELR_OFFICE_CD); elp.setCdDescTxt(EdxELRConstant.ELR_OFFICE_DESC); - } - else if (role.equalsIgnoreCase(EdxELRConstant.ELR_NEXT_OF_KIN)) { + } else if (role.equalsIgnoreCase(EdxELRConstant.ELR_NEXT_OF_KIN)) { elp.setClassCd(EdxELRConstant.ELR_POSTAL_CD); elp.setUseCd(EdxELRConstant.ELR_USE_EMERGENCY_CONTACT_CD); elp.setCd(EdxELRConstant.ELR_HOUSE_CD); elp.setCdDescTxt(EdxELRConstant.ELR_HOUSE_DESC); - } - else { + } else { elp.setCd(Objects.requireNonNullElse(addressType, EdxELRConstant.ELR_HOUSE_CD)); elp.setClassCd(NEDSSConstant.POSTAL); elp.setUseCd(NEDSSConstant.HOME); @@ -244,10 +239,10 @@ else if (role.equalsIgnoreCase(EdxELRConstant.ELR_NEXT_OF_KIN)) { HL7SADType HL7StreetAddress = hl7XADType.getHL7StreetAddress(); /** Optional maxOccurs="1 */ /** length"184 */ - if(HL7StreetAddress!=null){ + if (HL7StreetAddress != null) { pl = nbsStreetAddressType(HL7StreetAddress, pl); } - if(hl7XADType.getHL7OtherDesignation()!=null && (pl.getStreetAddr2()==null || pl.getStreetAddr2().trim().equalsIgnoreCase(""))) { + if (hl7XADType.getHL7OtherDesignation() != null && (pl.getStreetAddr2() == null || pl.getStreetAddr2().trim().equalsIgnoreCase(""))) { pl.setStreetAddr2(hl7XADType.getHL7OtherDesignation()); } @@ -259,9 +254,9 @@ else if (role.equalsIgnoreCase(EdxELRConstant.ELR_NEXT_OF_KIN)) { /** Optional maxOccurs="1 */ /** length"50 */ - String state=""; - if(stateOrProvince!=null) { - state= translateStateCd(stateOrProvince); + String state = ""; + if (stateOrProvince != null) { + state = translateStateCd(stateOrProvince); } pl.setStateCd(state); String zip = hl7XADType.getHL7ZipOrPostalCode(); @@ -270,23 +265,19 @@ else if (role.equalsIgnoreCase(EdxELRConstant.ELR_NEXT_OF_KIN)) { pl.setZipCd(formatZip(zip)); String country = hl7XADType.getHL7Country(); - if(country!=null && country.equalsIgnoreCase(EdxELRConstant.ELR_USA_DESC)) - { + if (country != null && country.equalsIgnoreCase(EdxELRConstant.ELR_USA_DESC)) { pl.setCntryCd(EdxELRConstant.ELR_USA_CD); - } - else - { + } else { pl.setCntryCd(country); } String countyParishCode = hl7XADType.getHL7CountyParishCode(); /** Optional maxOccurs="1 */ /** length"20 */ - String cnty = checkingValueService.getCountyCdByDesc(countyParishCode,pl.getStateCd()); - if(cnty==null) { + String cnty = checkingValueService.getCountyCdByDesc(countyParishCode, pl.getStateCd()); + if (cnty == null) { pl.setCntyCd(countyParishCode); - } - else { + } else { pl.setCntyCd(cnty); } String HL7CensusTract = hl7XADType.getHL7CensusTract(); @@ -296,7 +287,7 @@ else if (role.equalsIgnoreCase(EdxELRConstant.ELR_NEXT_OF_KIN)) { elp.setThePostalLocatorDto(pl); } catch (Exception e) { - logger.error("Hl7ToNBSObjectConverter. Error thrown: "+ e); + logger.error("Hl7ToNBSObjectConverter. Error thrown: " + e); } return elp; } @@ -314,31 +305,28 @@ private PostalLocatorDto nbsStreetAddressType(HL7SADType hl7SADType, PostalLocat /** Optional maxOccurs="1 */ /** length"12 */ - if(dwellingNumber==null) { - dwellingNumber=""; + if (dwellingNumber == null) { + dwellingNumber = ""; } - if(streetName==null) { - streetName=""; + if (streetName == null) { + streetName = ""; } pl.setStreetAddr2(dwellingNumber + " " + streetName); return pl; } private String translateStateCd(String msgInStateCd) { - if(msgInStateCd != null && !msgInStateCd.trim().isEmpty()) - { + if (msgInStateCd != null && !msgInStateCd.trim().isEmpty()) { StateCode stateCode = checkingValueService.findStateCodeByStateNm(msgInStateCd); return stateCode.getStateCd(); - } - else - { + } else { return null; } } private String formatZip(String zip) { if (zip != null) { - zip =zip.trim(); + zip = zip.trim(); // for zip code like: 12,123,1234,12345 if (zip.length() <= 5) { return zip; @@ -347,8 +335,7 @@ private String formatZip(String zip) { else if (zip.length() == 9 && !zip.contains("-")) { zip = zip.substring(0, 5) + "-" + zip.substring(5, 9); // for zip code like: 123456,1234567890: Will ignore 12345-6789 - } - else if (zip.length() > 5 && !zip.contains("-")) { + } else if (zip.length() > 5 && !zip.contains("-")) { zip = zip.substring(0, 5); } }// end of if @@ -356,27 +343,24 @@ else if (zip.length() > 5 && !zip.contains("-")) { } - public EntityIdDto validateSSN(EntityIdDto entityIdDto) { String ssn = entityIdDto.getRootExtensionTxt(); - if(ssn != null && !ssn.equals("") && !ssn.equals(" ")) { - ssn =ssn.trim(); + if (ssn != null && !ssn.equals("") && !ssn.equals(" ")) { + ssn = ssn.trim(); if (ssn.length() > 3) { String newSSN = ssn.substring(0, 3); newSSN = newSSN + "-"; if (ssn.length() > 5) { newSSN = newSSN + ssn.replace("-", "").substring(3, 5) + "-"; - newSSN = newSSN + ssn.replace("-", "").substring(5, (ssn.replace("-", "").length())); + newSSN = newSSN + ssn.replace("-", "").substring(5); ssn = newSSN; entityIdDto.setRootExtensionTxt(ssn); - } - else { + } else { newSSN = newSSN + ssn.replace("-", "").substring(3, ssn.length()) + "- "; ssn = newSSN; entityIdDto.setRootExtensionTxt(ssn); } - } - else { + } else { ssn = ssn + "- - "; entityIdDto.setRootExtensionTxt(ssn); } @@ -404,18 +388,18 @@ public Timestamp processHL7TSTypeForDOBWithoutTime(HL7TSType time) throws DataPr } if (year >= 0 && month >= 0 && date >= 0) { toTime = month + "/" + date + "/" + year; - logger.debug(" in processHL7TSTypeForDOBWithoutTime: Date string is: " +toTime); + logger.debug(" in processHL7TSTypeForDOBWithoutTime: Date string is: " + toTime); toTimestamp = entityIdUtil.stringToStrutsTimestamp(toTime); //if can't process returns null } } } catch (Exception e) { - logger.error("Hl7ToNBSObjectConverter.processHL7TSTypeForDOBWithoutTime failed as the date format is not right. Please check.!"+ toTime); - throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7TSTypeForDOBWithoutTime failed as the date format is not right."+ - EdxELRConstant.DATE_VALIDATION_PID_PATIENT_BIRTH_DATE_NO_TIME_MSG+toTime+"<--"); + logger.error("Hl7ToNBSObjectConverter.processHL7TSTypeForDOBWithoutTime failed as the date format is not right. Please check.!" + toTime); + throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7TSTypeForDOBWithoutTime failed as the date format is not right." + + EdxELRConstant.DATE_VALIDATION_PID_PATIENT_BIRTH_DATE_NO_TIME_MSG + toTime + "<--"); } if (entityIdUtil.isDateNotOkForDatabase(toTimestamp)) { - throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7TSTypeForDOBWithoutTime " +EdxELRConstant.DATE_VALIDATION_PID_PATIENT_BIRTH_DATE_NO_TIME_MSG +toTime + EdxELRConstant.DATE_INVALID_FOR_DATABASE); + throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7TSTypeForDOBWithoutTime " + EdxELRConstant.DATE_VALIDATION_PID_PATIENT_BIRTH_DATE_NO_TIME_MSG + toTime + EdxELRConstant.DATE_INVALID_FOR_DATABASE); } return toTimestamp; } @@ -432,7 +416,7 @@ public EntityLocatorParticipationDto setPersonBirthType(String countryOfBirth, P elp.setUseCd(NEDSSConstant.HOME); elp.setCd(EdxELRConstant.ELR_PHONE_CD); elp.setCdDescTxt(EdxELRConstant.ELR_PHONE_DESC); - elp.setClassCd("PST") ; + elp.setClassCd("PST"); elp.setUseCd("BIR"); elp.setCd("F"); elp.setAddUserId(personContainer.getThePersonDto().getAddUserId()); @@ -455,7 +439,7 @@ public EntityLocatorParticipationDto setPersonBirthType(String countryOfBirth, P } public PersonEthnicGroupDto ethnicGroupType(HL7CWEType hl7CWEType, - PersonContainer personContainer) { + PersonContainer personContainer) { PersonEthnicGroupDto ethnicGroupDT = new PersonEthnicGroupDto(); ethnicGroupDT.setItNew(true); ethnicGroupDT.setItDirty(false); @@ -497,18 +481,18 @@ public Timestamp processHL7TSType(HL7TSType time, String itemDescription) throws SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - timeStr = year+"-"+month+"-"+day+" "+hourOfDay+":"+minute+":"+second; - logger.debug(" in processHL7TSType: Date string is: " +timeStr); + timeStr = year + "-" + month + "-" + day + " " + hourOfDay + ":" + minute + ":" + second; + logger.debug(" in processHL7TSType: Date string is: " + timeStr); date2 = sdf.parse(timeStr); toTimestamp = new java.sql.Timestamp(date2.getTime()); if (entityIdUtil.isDateNotOkForDatabase(toTimestamp)) { - throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7TSType " +itemDescription +timeStr + EdxELRConstant.DATE_INVALID_FOR_DATABASE); + throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7TSType " + itemDescription + timeStr + EdxELRConstant.DATE_INVALID_FOR_DATABASE); } } return toTimestamp; } catch (Exception e) { - logger.error("Hl7ToNBSObjectConverter.processHL7TSType failed as the date format is not right. Please check.!"+ timeStr); - throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7TSType failed as the date format is not right. "+ itemDescription+timeStr); + logger.error("Hl7ToNBSObjectConverter.processHL7TSType failed as the date format is not right. Please check.!" + timeStr); + throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7TSType failed as the date format is not right. " + itemDescription + timeStr); } } @@ -549,7 +533,6 @@ public PersonRaceDto raceType(HL7CWEType hl7CEType, PersonContainer personContai } - raceDT.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_ACTIVE); raceDT.setAsOfDate(personContainer.getThePersonDto().getAddTime()); return raceDT; @@ -595,10 +578,10 @@ public EntityLocatorParticipationDto telePhoneType( ArrayList areaAndNumber = new ArrayList<>(); incorrectLength = checkIfAreaCodeMoreThan3Digits(areaAndNumber, hl7AreaCityCode); - if(!incorrectLength) + if (!incorrectLength) incorrectLength = checkIfNumberMoreThan10Digits(areaAndNumber, hl7LocalNumber); - if(!incorrectLength){ + if (!incorrectLength) { if (hl7AreaCityCode != null && hl7AreaCityCode.getHL7Numeric() != null) { areaCode = String.valueOf(hl7AreaCityCode.getHL7Numeric().intValue()); @@ -623,13 +606,12 @@ public EntityLocatorParticipationDto telePhoneType( number = hl7LocalNumber.getHL7Numeric().toString(); } - } - else{ + } else { areaCode = areaAndNumber.get(0); number = areaAndNumber.get(1); } - if(areaCode!=null && areaCode.equalsIgnoreCase("0")) + if (areaCode != null && areaCode.equalsIgnoreCase("0")) areaCode = ""; String phoneNbrTxt = areaCode + number; @@ -650,7 +632,7 @@ public EntityLocatorParticipationDto telePhoneType( return elp; } - public boolean checkIfNumberMoreThan10Digits(ArrayList areaAndNumber, HL7NMType HL7Type){ + public boolean checkIfNumberMoreThan10Digits(ArrayList areaAndNumber, HL7NMType HL7Type) { boolean incorrectLength = false; @@ -659,12 +641,12 @@ public boolean checkIfNumberMoreThan10Digits(ArrayList areaAndNumber, if (HL7Type != null && HL7Type.getHL7Numeric() != null) { String areaCodeString = HL7Type.getHL7Numeric().toString(); - if(areaCodeString.length()>10){//Phone number more than 10 digits + if (areaCodeString.length() > 10) {//Phone number more than 10 digits int length = areaCodeString.length(); - incorrectLength= true; + incorrectLength = true; - areaCode = areaCodeString.substring(0,length-10); - number = areaCodeString.substring(length-10); + areaCode = areaCodeString.substring(0, length - 10); + number = areaCodeString.substring(length - 10); areaAndNumber.add(areaCode); @@ -679,13 +661,14 @@ public boolean checkIfNumberMoreThan10Digits(ArrayList areaAndNumber, return incorrectLength; } + public String formatPhoneNbr(String phoneNbrTxt) { // Format numeric number into telephone format // eg, 1234567 -> 123-4567, 1234567890 -> 123-456-7890 String newFormatedNbr = ""; if (phoneNbrTxt != null) { // String phoneNbr = dt.getPhoneNbrTxt(); - phoneNbrTxt =phoneNbrTxt.trim(); + phoneNbrTxt = phoneNbrTxt.trim(); int nbrSize = phoneNbrTxt.length(); if (nbrSize > 4) { // Add first dash @@ -708,17 +691,17 @@ public String formatPhoneNbr(String phoneNbrTxt) { return newFormatedNbr; }// End of formatPhoneNbr - public boolean checkIfAreaCodeMoreThan3Digits(ArrayList areaAndNumber, HL7NMType HL7Type){ + public boolean checkIfAreaCodeMoreThan3Digits(ArrayList areaAndNumber, HL7NMType HL7Type) { boolean incorrectLength = false; String areaCode, number; if (HL7Type != null && HL7Type.getHL7Numeric() != null) { - String areaCodeString =HL7Type.getHL7Numeric().toString(); + String areaCodeString = HL7Type.getHL7Numeric().toString(); - if(areaCodeString.length()>3){//Area code more than 3 digits - incorrectLength= true; - areaCode = areaCodeString.substring(0,3); + if (areaCodeString.length() > 3) {//Area code more than 3 digits + incorrectLength = true; + areaCode = areaCodeString.substring(0, 3); number = areaCodeString.substring(3); areaAndNumber.add(areaCode); @@ -761,7 +744,7 @@ public EntityLocatorParticipationDto orgTelePhoneType(HL7XTNType hl7XTNType, Str } public PersonContainer processCNNPersonName(HL7CNNType hl7CNNType, - PersonContainer personContainer) { + PersonContainer personContainer) { PersonNameDto personNameDto = new PersonNameDto(); String lastName = hl7CNNType.getHL7FamilyName(); personNameDto.setLastNm(lastName); @@ -796,8 +779,9 @@ public PersonContainer processCNNPersonName(HL7CNNType hl7CNNType, personDtToPersonVO(personNameDto, personContainer); return personContainer; } + public PersonContainer personDtToPersonVO(PersonNameDto personNameDto, - PersonContainer personContainer) { + PersonContainer personContainer) { personContainer.getThePersonDto().setLastNm(personNameDto.getLastNm()); personContainer.getThePersonDto().setFirstNm(personNameDto.getFirstNm()); personContainer.getThePersonDto().setNmPrefix(personNameDto.getNmPrefix()); @@ -805,6 +789,7 @@ public PersonContainer personDtToPersonVO(PersonNameDto personNameDto, return personContainer; } + public Timestamp processHL7TSTypeWithMillis(HL7TSType time, String itemDescription) throws DataProcessingException { String dateStr = ""; try { @@ -835,19 +820,19 @@ public Timestamp processHL7TSTypeWithMillis(HL7TSType time, String itemDescripti SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); java.util.Date date2; - dateStr = year+"-"+month+"-"+day+" "+hourOfDay+":"+minute+":"+second+"."+millis; - logger.debug(" in processHL7TSTypeWithMillis: Date string is: " +dateStr); + dateStr = year + "-" + month + "-" + day + " " + hourOfDay + ":" + minute + ":" + second + "." + millis; + logger.debug(" in processHL7TSTypeWithMillis: Date string is: " + dateStr); date2 = sdf.parse(dateStr); toTimestamp = new java.sql.Timestamp(date2.getTime()); if (entityIdUtil.isDateNotOkForDatabase(toTimestamp)) { - throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7TSTypeWithMillis " +itemDescription + date2 + throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7TSTypeWithMillis " + itemDescription + date2 + EdxELRConstant.DATE_INVALID_FOR_DATABASE); } } return toTimestamp; } catch (Exception e) { - logger.error("Hl7ToNBSObjectConverter.processHL7TSTypeWithMillis failed as the date format is not right. Please check.!"+ dateStr); - throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7TSTypeWithMillis failed as the date format is not right."+ itemDescription+dateStr); + logger.error("Hl7ToNBSObjectConverter.processHL7TSTypeWithMillis failed as the date format is not right. Please check.!" + dateStr); + throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7TSTypeWithMillis failed as the date format is not right." + itemDescription + dateStr); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/ORCHandler.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/ORCHandler.java index 992a582f8..be8c79ea4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/ORCHandler.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/ORCHandler.java @@ -47,14 +47,14 @@ public void getORCProcessing(HL7ORCType hl7ORCType, hl7ORCType.getOrderEffectiveDateTime(), EdxELRConstant.DATE_VALIDATION_ORC_ORDER_EFFECTIVE_TIME_MSG)); } } catch (Exception e) { - logger.error("Exception thrown at HL7ORCProcessorget.getORCProcessing:"+ e.getMessage() ,e); - throw new DataProcessingException("Exception thrown at HL7ORCProcessorget.getORCProcessing:"+ e); + logger.error("Exception thrown at HL7ORCProcessorget.getORCProcessing:" + e.getMessage(), e); + throw new DataProcessingException("Exception thrown at HL7ORCProcessorget.getORCProcessing:" + e); } } /** * Get Ordering Provider - * */ + */ private LabResultProxyContainer getOrderingProvider(HL7ORCType hl7ORCType, LabResultProxyContainer labResultProxyContainer, EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { @@ -62,7 +62,7 @@ private LabResultProxyContainer getOrderingProvider(HL7ORCType hl7ORCType, HL7XADType address; List addressArray = hl7ORCType .getOrderingProviderAddress(); - if(addressArray!=null && !addressArray.isEmpty()){ + if (addressArray != null && !addressArray.isEmpty()) { edxLabInformationDto.setRole(EdxELRConstant.ELR_OP_CD); edxLabInformationDto.setOrderingProvider(true); PersonContainer personContainer = new PersonContainer(); @@ -77,12 +77,12 @@ private LabResultProxyContainer getOrderingProvider(HL7ORCType hl7ORCType, edxLabInformationDto.setOrderingProviderVO(personContainer); labResultProxyContainer.getThePersonContainerCollection().add(personContainer); edxLabInformationDto.setMissingOrderingProvider(false); - }else{ + } else { edxLabInformationDto.setMissingOrderingProvider(true); } } catch (Exception e) { logger.error("Exception thrown by HL7ORCProcessor.getOrderingProvider " + e.getMessage(), e); - throw new DataProcessingException("Exception thrown at HL7ORCProcessor.getOrderingProvider:"+ e); + throw new DataProcessingException("Exception thrown at HL7ORCProcessor.getOrderingProvider:" + e); } return labResultProxyContainer; @@ -95,7 +95,7 @@ private OrganizationContainer getOrderingFacility(HL7ORCType hl7ORCType, OrganizationContainer organizationContainer = new OrganizationContainer(); try { List addressArray = hl7ORCType.getOrderingFacilityAddress(); - if(addressArray!=null && addressArray.size() !=0){ + if (addressArray != null && addressArray.size() != 0) { OrganizationDto organizationDto = new OrganizationDto(); organizationContainer.setItNew(true); organizationContainer.setItDirty(false); @@ -174,13 +174,13 @@ private OrganizationContainer getOrderingFacility(HL7ORCType hl7ORCType, } organizationContainer.setTheOrganizationNameDtoCollection(orgNameColl); edxLabInformationDto.setMissingOrderingFacility(false); - }else{ + } else { edxLabInformationDto.setMissingOrderingFacility(true); } } catch (Exception e) { logger.error("Exception thrown by HL7ORCProcessorget.getOrderingFacility " + e.getMessage(), e); - throw new DataProcessingException("Exception thrown at HL7ORCProcessorget.getOrderingFacility:"+ e); + throw new DataProcessingException("Exception thrown at HL7ORCProcessorget.getOrderingFacility:" + e); } edxLabInformationDto.setMultipleOrderingFacility(false); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObsReqNoteHelper.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObsReqNoteHelper.java new file mode 100644 index 000000000..ac87f8a57 --- /dev/null +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObsReqNoteHelper.java @@ -0,0 +1,58 @@ +package gov.cdc.dataprocessing.utilities.component.data_parser; + +import gov.cdc.dataprocessing.constant.elr.EdxELRConstant; +import gov.cdc.dataprocessing.exception.DataProcessingException; +import gov.cdc.dataprocessing.model.container.model.ObservationContainer; +import gov.cdc.dataprocessing.model.dto.observation.ObsValueTxtDto; +import gov.cdc.dataprocessing.model.phdc.HL7NTEType; + +import java.util.ArrayList; +import java.util.List; + +public class ObsReqNoteHelper { + protected static ObservationContainer getObsReqNotes(List noteArray, ObservationContainer observationContainer) throws DataProcessingException { + try { + for (HL7NTEType notes : noteArray) { + if (notes.getHL7Comment() != null && notes.getHL7Comment().size() > 0) { + for (int j = 0; j < notes.getHL7Comment().size(); j++) { + String note = notes.getHL7Comment().get(j); + ObsValueTxtDto obsValueTxtDto = new ObsValueTxtDto(); + obsValueTxtDto.setItNew(true); + obsValueTxtDto.setItDirty(false); + obsValueTxtDto.setObservationUid(observationContainer.getTheObservationDto().getObservationUid()); + obsValueTxtDto.setTxtTypeCd(EdxELRConstant.ELR_OBX_COMMENT_TYPE); + + obsValueTxtDto.setValueTxt(note); + if (observationContainer.getTheObsValueTxtDtoCollection() == null) { + observationContainer.setTheObsValueTxtDtoCollection(new ArrayList<>()); + } + int seq = observationContainer.getTheObsValueTxtDtoCollection().size(); + obsValueTxtDto.setObsValueTxtSeq(++seq); + observationContainer.getTheObsValueTxtDtoCollection().add(obsValueTxtDto); + } + } else { + ObsValueTxtDto obsValueTxtDto = new ObsValueTxtDto(); + obsValueTxtDto.setItNew(true); + obsValueTxtDto.setItDirty(false); + obsValueTxtDto.setValueTxt("\r"); + obsValueTxtDto.setObservationUid(observationContainer.getTheObservationDto().getObservationUid()); + obsValueTxtDto.setTxtTypeCd(EdxELRConstant.ELR_OBX_COMMENT_TYPE); + + if (observationContainer.getTheObsValueTxtDtoCollection() == null) + observationContainer.setTheObsValueTxtDtoCollection(new ArrayList<>()); + int seq = observationContainer.getTheObsValueTxtDtoCollection().size(); + obsValueTxtDto.setObsValueTxtSeq(++seq); + observationContainer.getTheObsValueTxtDtoCollection().add(obsValueTxtDto); + + } + + } + } catch (Exception e) { + throw new DataProcessingException("Exception thrown at ObservationResultRequest.getObsReqNotes:" + e.getMessage()); + + } + return observationContainer; + + + } +} diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObservationRequestHandler.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObservationRequestHandler.java index 45559da39..aebe68320 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObservationRequestHandler.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObservationRequestHandler.java @@ -55,7 +55,7 @@ public ObservationRequestHandler(ICatchingValueService checkingValueService, /** * Description: This method parsing OBR and SPM into Lab result Object. * OBR & SPM. - * */ + */ @SuppressWarnings("java:S6541") public LabResultProxyContainer getObservationRequest(HL7OBRType hl7OBRType, HL7PatientResultSPMType hl7PatientResultSPMType, LabResultProxyContainer labResultProxyContainer, EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { @@ -65,19 +65,17 @@ public LabResultProxyContainer getObservationRequest(HL7OBRType hl7OBRType, HL7P observationDto.setObsDomainCd(EdxELRConstant.CTRL_CD_DISPLAY_FORM); observationDto.setCtrlCdDisplayForm(EdxELRConstant.CTRL_CD_DISPLAY_FORM); - if(hl7OBRType.getResultStatus()!=null){ + if (hl7OBRType.getResultStatus() != null) { String toCode = checkingValueService.findToCode("ELR_LCA_STATUS", hl7OBRType.getResultStatus(), "ACT_OBJ_ST"); - if (toCode != null && !toCode.equals("") && !toCode.equals(" ")){ + if (toCode != null && !toCode.equals("") && !toCode.equals(" ")) { observationDto.setStatusCd(toCode.trim()); - } - else{ + } else { edxLabInformationDto.setObsStatusTranslated(false); edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); throw new DataProcessingException(EdxELRConstant.TRANSLATE_OBS_STATUS); } - } - else{ + } else { edxLabInformationDto.setObsStatusTranslated(false); edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); throw new DataProcessingException(EdxELRConstant.TRANSLATE_OBS_STATUS); @@ -85,13 +83,12 @@ public LabResultProxyContainer getObservationRequest(HL7OBRType hl7OBRType, HL7P //observationDto.setStatusCd(EdxELRConstant.ELR_OBS_STATUS_CD); observationDto.setElectronicInd(EdxELRConstant.ELR_ELECTRONIC_IND); - if(hl7OBRType.getSetIDOBR()!=null && hl7OBRType.getSetIDOBR().getHL7SequenceID()!=null + if (hl7OBRType.getSetIDOBR() != null && hl7OBRType.getSetIDOBR().getHL7SequenceID() != null && hl7OBRType.getSetIDOBR().getHL7SequenceID().equalsIgnoreCase("1")) { observationDto.setObservationUid(edxLabInformationDto.getRootObserbationUid()); - } - else if(hl7OBRType.getSetIDOBR()!=null && !hl7OBRType.getSetIDOBR().getHL7SequenceID().equalsIgnoreCase("1")){ - observationDto.setObservationUid((long)(edxLabInformationDto.getNextUid())); - }else{ + } else if (hl7OBRType.getSetIDOBR() != null && !hl7OBRType.getSetIDOBR().getHL7SequenceID().equalsIgnoreCase("1")) { + observationDto.setObservationUid((long) (edxLabInformationDto.getNextUid())); + } else { observationDto.setObservationUid(edxLabInformationDto.getRootObserbationUid()); } observationDto.setItNew(true); @@ -100,7 +97,7 @@ else if(hl7OBRType.getSetIDOBR()!=null && !hl7OBRType.getSetIDOBR().getHL7Sequen observationContainer.setItDirty(false); observationDto.setObsDomainCdSt1(EdxELRConstant.ELR_ORDER_CD); - if(hl7OBRType.getDangerCode()!=null) { + if (hl7OBRType.getDangerCode() != null) { edxLabInformationDto.setDangerCode(hl7OBRType.getDangerCode().getHL7Identifier()); } @@ -120,7 +117,7 @@ else if(hl7OBRType.getSetIDOBR()!=null && !hl7OBRType.getSetIDOBR().getHL7Sequen } - Collection actIdDtoColl = new ArrayList<>(); + Collection actIdDtoColl = new ArrayList<>(); ActIdDto actIdDto = new ActIdDto(); actIdDto.setActIdSeq(1); actIdDto.setActUid(edxLabInformationDto.getRootObserbationUid()); @@ -132,14 +129,13 @@ else if(hl7OBRType.getSetIDOBR()!=null && !hl7OBRType.getSetIDOBR().getHL7Sequen actIdDto.setRecordStatusCd(EdxELRConstant.ELR_ACTIVE); actIdDtoColl.add(actIdDto); - HL7EIType fillerType =hl7OBRType.getFillerOrderNumber(); - if(hl7OBRType.getParent()==null ){ - if(fillerType == null || fillerType.getHL7EntityIdentifier() == null){ + HL7EIType fillerType = hl7OBRType.getFillerOrderNumber(); + if (hl7OBRType.getParent() == null) { + if (fillerType == null || fillerType.getHL7EntityIdentifier() == null) { edxLabInformationDto.setFillerNumberPresent(false); edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); throw new DataProcessingException(EdxELRConstant.FILLER_FAIL); - } - else{ + } else { edxLabInformationDto.setFillerNumber(fillerType.getHL7EntityIdentifier()); edxLabInformationDto.setFillerNumberPresent(true); } @@ -156,76 +152,72 @@ else if(hl7OBRType.getSetIDOBR()!=null && !hl7OBRType.getSetIDOBR().getHL7Sequen actIdDtoColl.add(act2IdDT); observationContainer.setTheActIdDtoCollection(actIdDtoColl); - if(hl7OBRType.getUniversalServiceIdentifier()==null){ + if (hl7OBRType.getUniversalServiceIdentifier() == null) { edxLabInformationDto.setUniversalServiceIdMissing(true); edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); throw new DataProcessingException(EdxELRConstant.UNIVSRVCID); - } - else{ + } else { - if(hl7OBRType.getUniversalServiceIdentifier()!= null - && hl7OBRType.getUniversalServiceIdentifier().getHL7NameofCodingSystem()!=null - && hl7OBRType.getUniversalServiceIdentifier().getHL7NameofCodingSystem().equals(EdxELRConstant.ELR_LOINC_CD)){ + if (hl7OBRType.getUniversalServiceIdentifier() != null + && hl7OBRType.getUniversalServiceIdentifier().getHL7NameofCodingSystem() != null + && hl7OBRType.getUniversalServiceIdentifier().getHL7NameofCodingSystem().equals(EdxELRConstant.ELR_LOINC_CD)) { observationDto.setCdSystemCd(EdxELRConstant.ELR_LOINC_CD); observationDto.setCdSystemDescTxt(EdxELRConstant.ELR_LOINC_DESC); } - if(hl7OBRType.getUniversalServiceIdentifier().getHL7Identifier()!=null) { + if (hl7OBRType.getUniversalServiceIdentifier().getHL7Identifier() != null) { observationDto.setCd(hl7OBRType.getUniversalServiceIdentifier().getHL7Identifier()); } - if(hl7OBRType.getUniversalServiceIdentifier().getHL7Text()!=null) { + if (hl7OBRType.getUniversalServiceIdentifier().getHL7Text() != null) { observationDto.setCdDescTxt(hl7OBRType.getUniversalServiceIdentifier().getHL7Text()); } - if(observationDto.getCd()!=null) { + if (observationDto.getCd() != null) { observationDto.setAltCd(hl7OBRType.getUniversalServiceIdentifier().getHL7AlternateIdentifier()); - } - else { + } else { observationDto.setCd(hl7OBRType.getUniversalServiceIdentifier().getHL7AlternateIdentifier()); } - if(observationDto.getCdDescTxt()!=null) { + if (observationDto.getCdDescTxt() != null) { observationDto.setAltCdDescTxt(hl7OBRType.getUniversalServiceIdentifier().getHL7AlternateText()); - } - else { + } else { observationDto.setCdDescTxt(hl7OBRType.getUniversalServiceIdentifier().getHL7AlternateText()); } - if(observationDto.getCdSystemCd()!=null + if (observationDto.getCdSystemCd() != null && observationDto.getCdSystemCd().equalsIgnoreCase(EdxELRConstant.ELR_LOINC_CD) - && (observationDto.getAltCd()!=null) ){ + && (observationDto.getAltCd() != null)) { observationDto.setAltCdSystemCd(EdxELRConstant.ELR_LOCAL_CD); observationDto.setAltCdSystemDescTxt(EdxELRConstant.ELR_LOCAL_DESC); - }else if((observationDto.getCd()!=null || observationDto.getCdDescTxt()!=null) && observationDto.getCdSystemCd()==null){ + } else if ((observationDto.getCd() != null || observationDto.getCdDescTxt() != null) && observationDto.getCdSystemCd() == null) { observationDto.setCdSystemCd(EdxELRConstant.ELR_LOCAL_CD); observationDto.setCdSystemDescTxt(EdxELRConstant.ELR_LOCAL_DESC); } - if( - ( - observationDto.getCd()==null - || observationDto.getCd().trim().equalsIgnoreCase("") - ) - && (observationDto.getAltCd()==null - || observationDto.getAltCd().trim().equalsIgnoreCase("") - ) - ) - { + if ( + ( + observationDto.getCd() == null + || observationDto.getCd().trim().equalsIgnoreCase("") + ) + && (observationDto.getAltCd() == null + || observationDto.getAltCd().trim().equalsIgnoreCase("") + ) + ) { edxLabInformationDto.setOrderTestNameMissing(true); edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_19); - String xmlElementName = commonLabUtil.getXMLElementNameForOBR(hl7OBRType)+".UniversalServiceIdentifier"; - throw new DataProcessingException(EdxELRConstant.NO_ORDTEST_NAME+" XMLElementName: "+xmlElementName); + String xmlElementName = commonLabUtil.getXMLElementNameForOBR(hl7OBRType) + ".UniversalServiceIdentifier"; + throw new DataProcessingException(EdxELRConstant.NO_ORDTEST_NAME + " XMLElementName: " + xmlElementName); } } observationDto.setPriorityCd(hl7OBRType.getPriorityOBR()); observationDto.setActivityFromTime(edxLabInformationDto.getOrderEffectiveDate()); observationDto.setActivityToTime(nbsObjectConverter.processHL7TSType(hl7OBRType.getResultsRptStatusChngDateTime(), EdxELRConstant.DATE_VALIDATION_OBR_RESULTS_RPT_STATUS_CHNG_TO_TIME_MSG)); - observationDto.setEffectiveFromTime(nbsObjectConverter.processHL7TSType(hl7OBRType.getObservationDateTime(),EdxELRConstant.DATE_VALIDATION_OBR_OBSERVATION_DATE_MSG)); - observationDto.setEffectiveToTime(nbsObjectConverter.processHL7TSType(hl7OBRType.getObservationEndDateTime(),EdxELRConstant.DATE_VALIDATION_OBR_OBSERVATION_END_DATE_MSG)); + observationDto.setEffectiveFromTime(nbsObjectConverter.processHL7TSType(hl7OBRType.getObservationDateTime(), EdxELRConstant.DATE_VALIDATION_OBR_OBSERVATION_DATE_MSG)); + observationDto.setEffectiveToTime(nbsObjectConverter.processHL7TSType(hl7OBRType.getObservationEndDateTime(), EdxELRConstant.DATE_VALIDATION_OBR_OBSERVATION_END_DATE_MSG)); - List reasonArray =hl7OBRType.getReasonforStudy(); + List reasonArray = hl7OBRType.getReasonforStudy(); Collection obsReasonDTColl = new ArrayList<>(); for (HL7CWEType hl7CWEType : reasonArray) { ObservationReasonDto obsReasonDT = new ObservationReasonDto(); @@ -247,37 +239,36 @@ else if(hl7OBRType.getSetIDOBR()!=null && !hl7OBRType.getSetIDOBR().getHL7Sequen obsReasonDTColl.add(obsReasonDT); } - if(edxLabInformationDto.getLastChgTime()==null) { + if (edxLabInformationDto.getLastChgTime() == null) { observationDto.setRptToStateTime(edxLabInformationDto.getAddTime()); - } - else { + } else { observationDto.setRptToStateTime(edxLabInformationDto.getLastChgTime()); } observationContainer.setTheObservationDto(observationDto); observationContainer.setTheObservationReasonDtoCollection(obsReasonDTColl); labResultProxyContainer.getTheObservationContainerCollection().add(observationContainer); - if(edxLabInformationDto.getRootObservationContainer()==null) { + if (edxLabInformationDto.getRootObservationContainer() == null) { edxLabInformationDto.setRootObservationContainer(observationContainer); } - if(hl7OBRType.getParent()==null){ + if (hl7OBRType.getParent() == null) { processRootOBR(hl7OBRType, observationDto, labResultProxyContainer, hl7PatientResultSPMType, edxLabInformationDto); } - if(hl7OBRType.getParent()!=null){ + if (hl7OBRType.getParent() != null) { processSusOBR(hl7OBRType, observationDto, labResultProxyContainer, edxLabInformationDto); } - if(hl7OBRType.getParentResult()==null){ + if (hl7OBRType.getParentResult() == null) { edxLabInformationDto.setParentObservationUid(0L); edxLabInformationDto.setParentObsInd(false); } - if(hl7OBRType.getResultCopiesTo()!=null){ - for(int i=0; i()); } obsVO.getTheObsValueCodedDtoCollection().add(obsValueCodedDto); @@ -373,7 +363,7 @@ private void processSusOBR(HL7OBRType hl7OBRType, ObservationDto observationDto, actRelationshipDto.setAddTime(edxLabInformationDto.getAddTime()); actRelationshipDto.setLastChgTime(edxLabInformationDto.getAddTime()); actRelationshipDto.setRecordStatusTime(edxLabInformationDto.getAddTime()); - if(labResultProxyContainer.getTheActRelationshipDtoCollection()==null) { + if (labResultProxyContainer.getTheActRelationshipDtoCollection() == null) { labResultProxyContainer.setTheActRelationshipDtoCollection(new ArrayList<>()); } labResultProxyContainer.getTheActRelationshipDtoCollection().add(actRelationshipDto); @@ -391,137 +381,132 @@ private void processSusOBR(HL7OBRType hl7OBRType, ObservationDto observationDto, arDT.setItNew(true); arDT.setItDirty(false); labResultProxyContainer.getTheActRelationshipDtoCollection().add(arDT); - if(hl7OBRType.getParent()!=null){ + if (hl7OBRType.getParent() != null) { labResultProxyContainer.getTheObservationContainerCollection().add(obsVO); } edxLabInformationDto.getEdxSusLabDTMap().put(parentObservation, obsVO.getTheObservationDto().getObservationUid()); } - if(parentObservation!=null){ + if (parentObservation != null) { Long uid = (Long) edxLabInformationDto.getEdxSusLabDTMap().get(parentObservation); - if(uid!=null){ + if (uid != null) { edxLabInformationDto.setParentObservationUid(uid); edxLabInformationDto.setParentObsInd(true); } } } catch (Exception e) { - logger.error("Exception thrown at ObservationRequest.processSusOBR:"+e.getMessage(), e); - throw new DataProcessingException("Exception thrown at ObservationRequest.processSusOBR:"+ e); + logger.error("Exception thrown at ObservationRequest.processSusOBR:" + e.getMessage(), e); + throw new DataProcessingException("Exception thrown at ObservationRequest.processSusOBR:" + e); } } /** * Processing - * PROVIDER info - * other obs info - * */ + * PROVIDER info + * other obs info + */ @SuppressWarnings("java:S6541") private void processRootOBR(HL7OBRType hl7OBRType, ObservationDto observationDto, - LabResultProxyContainer labResultProxyContainer, HL7PatientResultSPMType hl7PatientResultSPMType, - EdxLabInformationDto edxLabInformationDto) throws DataProcessingException{ + LabResultProxyContainer labResultProxyContainer, HL7PatientResultSPMType hl7PatientResultSPMType, + EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { try { PersonContainer collectorVO = null; List collectorArray = hl7OBRType.getCollectorIdentifier(); - if(collectorArray!=null && collectorArray.size() > 1) { + if (collectorArray != null && collectorArray.size() > 1) { edxLabInformationDto.setMultipleCollector(true); } - if(collectorArray!=null && !collectorArray.isEmpty()){ - HL7XCNType collector= collectorArray.get(0); + if (collectorArray != null && !collectorArray.isEmpty()) { + HL7XCNType collector = collectorArray.get(0); collectorVO = getCollectorVO(collector, labResultProxyContainer, edxLabInformationDto); labResultProxyContainer.getThePersonContainerCollection().add(collectorVO); } - if(hl7OBRType.getRelevantClinicalInformation()!=null) { + if (hl7OBRType.getRelevantClinicalInformation() != null) { observationDto.setTxt(hl7OBRType.getRelevantClinicalInformation()); } - if(hl7PatientResultSPMType!=null){ + if (hl7PatientResultSPMType != null) { logger.debug("ObservationRequest.getObservationRequest specimen is being processes for 2.5.1 message type"); - hl7SpecimenUtil.process251Specimen( hl7PatientResultSPMType, labResultProxyContainer, observationDto, collectorVO, edxLabInformationDto); + hl7SpecimenUtil.process251Specimen(hl7PatientResultSPMType, labResultProxyContainer, observationDto, collectorVO, edxLabInformationDto); } List orderingProviderArray = hl7OBRType.getOrderingProvider(); - if(orderingProviderArray!=null && orderingProviderArray.size() >1){ + if (orderingProviderArray != null && orderingProviderArray.size() > 1) { edxLabInformationDto.setMultipleOrderingProvider(true); } PersonContainer orderingProviderVO; - if(orderingProviderArray!=null && !orderingProviderArray.isEmpty()){ - HL7XCNType orderingProvider=orderingProviderArray.get(0); - Collection entitylocatorColl =null; + if (orderingProviderArray != null && !orderingProviderArray.isEmpty()) { + HL7XCNType orderingProvider = orderingProviderArray.get(0); + Collection entitylocatorColl = null; PersonContainer providerVO; - if(edxLabInformationDto.getOrderingProviderVO()!=null){ + if (edxLabInformationDto.getOrderingProviderVO() != null) { providerVO = edxLabInformationDto.getOrderingProviderVO(); - entitylocatorColl=providerVO.getTheEntityLocatorParticipationDtoCollection(); - if(labResultProxyContainer.getThePersonContainerCollection().contains(providerVO)) { - labResultProxyContainer.getThePersonContainerCollection().remove(providerVO); - } + entitylocatorColl = providerVO.getTheEntityLocatorParticipationDtoCollection(); + labResultProxyContainer.getThePersonContainerCollection().remove(providerVO); } edxLabInformationDto.setRole(EdxELRConstant.ELR_OP_CD); - orderingProviderVO= getProviderVO(orderingProvider,entitylocatorColl, labResultProxyContainer, edxLabInformationDto); + orderingProviderVO = getProviderVO(orderingProvider, entitylocatorColl, labResultProxyContainer, edxLabInformationDto); edxLabInformationDto.setOrderingProvider(true); - if(hl7OBRType.getOrderCallbackPhoneNumber()!=null && orderingProviderVO!=null && !hl7OBRType.getOrderCallbackPhoneNumber().isEmpty()){ - HL7XTNType orderingProvPhone =hl7OBRType.getOrderCallbackPhoneNumber().get(0); + if (hl7OBRType.getOrderCallbackPhoneNumber() != null && orderingProviderVO != null && !hl7OBRType.getOrderCallbackPhoneNumber().isEmpty()) { + HL7XTNType orderingProvPhone = hl7OBRType.getOrderCallbackPhoneNumber().get(0); EntityLocatorParticipationDto elpt = nbsObjectConverter.personTelePhoneType(orderingProvPhone, EdxELRConstant.ELR_PROVIDER_CD, orderingProviderVO); elpt.setUseCd(EdxELRConstant.ELR_WORKPLACE_CD); } - if(labResultProxyContainer.getThePersonContainerCollection()==null) { + if (labResultProxyContainer.getThePersonContainerCollection() == null) { labResultProxyContainer.setThePersonContainerCollection(new ArrayList<>()); } - if(orderingProviderVO!=null) { + if (orderingProviderVO != null) { labResultProxyContainer.getThePersonContainerCollection().add(orderingProviderVO); } - }else{ - if(edxLabInformationDto.getOrderingProviderVO()!=null){ + } else { + if (edxLabInformationDto.getOrderingProviderVO() != null) { edxLabInformationDto.setOrderingProvider(false); PersonContainer providerVO = edxLabInformationDto.getOrderingProviderVO(); - if(labResultProxyContainer.getThePersonContainerCollection().contains(providerVO)) { - labResultProxyContainer.getThePersonContainerCollection().remove(providerVO); - } + labResultProxyContainer.getThePersonContainerCollection().remove(providerVO); } } - if(edxLabInformationDto.isMissingOrderingProvider() && edxLabInformationDto.isMissingOrderingFacility()){ + if (edxLabInformationDto.isMissingOrderingProvider() && edxLabInformationDto.isMissingOrderingFacility()) { edxLabInformationDto.setMissingOrderingProviderandFacility(true); edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); throw new DataProcessingException("HL7ORCProcessorget.getORCProcessing: Both Ordering Provider and Ordering facility are null. Please check!!!"); } - HL7NDLType princResultInterpretor = hl7OBRType.getPrincipalResultInterpreter(); + HL7NDLType princResultInterpretor = hl7OBRType.getPrincipalResultInterpreter(); edxLabInformationDto.setMultiplePrincipalInterpreter(false); edxLabInformationDto.setRole(EdxELRConstant.ELR_LAB_PROVIDER_CD); - getOtherProviderVO( princResultInterpretor, labResultProxyContainer, edxLabInformationDto); - + getOtherProviderVO(princResultInterpretor, labResultProxyContainer, edxLabInformationDto); - if( hl7OBRType.getAssistantResultInterpreter() !=null){ - for(int i = 0; i entityColl = new ArrayList<>(); EntityIdDto entityIdDto = new EntityIdDto(); - entityIdDto.setEntityUid((long)(edxLabInformationDto.getNextUid())); + entityIdDto.setEntityUid((long) (edxLabInformationDto.getNextUid())); entityIdDto.setEntityIdSeq(1); entityIdDto.setAddTime(edxLabInformationDto.getAddTime()); entityIdDto.setRootExtensionTxt(providerType.getHL7Name().getHL7IDNumber()); @@ -624,7 +609,7 @@ private PersonContainer getOtherProviderVO(HL7NDLType providerType, LabResultPro entityIdDto.setItNew(true); entityIdDto.setItDirty(false); entityColl.add(entityIdDto); - if(entityIdDto.getEntityUid()!=null) { + if (entityIdDto.getEntityUid() != null) { personContainer.getTheEntityIdDtoCollection().add(entityIdDto); } } @@ -632,27 +617,23 @@ private PersonContainer getOtherProviderVO(HL7NDLType providerType, LabResultPro ParticipationDto participationDto = new ParticipationDto(); participationDto.setSubjectEntityUid(personContainer.getThePersonDto().getPersonUid()); - if(edxLabInformationDto.getRole().equals(EdxELRConstant.ELR_LAB_PROVIDER_CD)){ + if (edxLabInformationDto.getRole().equals(EdxELRConstant.ELR_LAB_PROVIDER_CD)) { participationDto.setCd(EdxELRConstant.ELR_LAB_PROVIDER_CD); participationDto.setTypeCd(EdxELRConstant.ELR_LAB_VERIFIER_CD); participationDto.setTypeDescTxt(EdxELRConstant.ELR_LAB_VERIFIER_DESC); - } - else if(edxLabInformationDto.getRole().equals(EdxELRConstant.ELR_LAB_VERIFIER_CD)){ + } else if (edxLabInformationDto.getRole().equals(EdxELRConstant.ELR_LAB_VERIFIER_CD)) { participationDto.setCd(EdxELRConstant.ELR_LAB_VERIFIER_CD); participationDto.setTypeCd(EdxELRConstant.ELR_LAB_VERIFIER_CD); participationDto.setTypeDescTxt(EdxELRConstant.ELR_LAB_VERIFIER_DESC); - } - else if(edxLabInformationDto.getRole().equals(EdxELRConstant.ELR_LAB_PERFORMER_CD)){ + } else if (edxLabInformationDto.getRole().equals(EdxELRConstant.ELR_LAB_PERFORMER_CD)) { participationDto.setCd(EdxELRConstant.ELR_LAB_PROVIDER_CD); participationDto.setTypeCd(EdxELRConstant.ELR_LAB_PERFORMER_CD); participationDto.setTypeDescTxt(EdxELRConstant.ELR_LAB_PERFORMER_DESC); - } - else if(edxLabInformationDto.getRole().equals(EdxELRConstant.ELR_LAB_ENTERER_CD)){ + } else if (edxLabInformationDto.getRole().equals(EdxELRConstant.ELR_LAB_ENTERER_CD)) { participationDto.setCd(EdxELRConstant.ELR_LAB_ENTERER_CD); participationDto.setTypeCd(EdxELRConstant.ELR_LAB_ENTERER_CD); participationDto.setTypeDescTxt(EdxELRConstant.ELR_LAB_ENTERER_DESC); - } - else if(edxLabInformationDto.getRole().equals(EdxELRConstant.ELR_LAB_ASSISTANT_CD)){ + } else if (edxLabInformationDto.getRole().equals(EdxELRConstant.ELR_LAB_ASSISTANT_CD)) { participationDto.setCd(EdxELRConstant.ELR_LAB_ASSISTANT_CD); participationDto.setTypeCd(EdxELRConstant.ELR_LAB_ASSISTANT_CD); participationDto.setTypeDescTxt(EdxELRConstant.ELR_LAB_ASSISTANT_DESC); @@ -666,13 +647,13 @@ else if(edxLabInformationDto.getRole().equals(EdxELRConstant.ELR_LAB_ASSISTANT_C labResultProxyContainer.getTheParticipationDtoCollection().add(participationDto); edxLabInformationDto.setRole(EdxELRConstant.ELR_PROVIDER_CD); nbsObjectConverter.processCNNPersonName(providerType.getHL7Name(), personContainer); - if(labResultProxyContainer.getThePersonContainerCollection()==null) { + if (labResultProxyContainer.getThePersonContainerCollection() == null) { labResultProxyContainer.setThePersonContainerCollection(new ArrayList<>()); } labResultProxyContainer.getThePersonContainerCollection().add(personContainer); } catch (Exception e) { - logger.error("Exception thrown at ObservationRequest.getCollectorVO:"+e.getMessage(), e); - throw new DataProcessingException("Exception thrown at ObservationRequest.getCollectorVO:"+ e); + logger.error("Exception thrown at ObservationRequest.getCollectorVO:" + e.getMessage(), e); + throw new DataProcessingException("Exception thrown at ObservationRequest.getCollectorVO:" + e); } return personContainer; } @@ -682,7 +663,7 @@ private PersonContainer getProviderVO(HL7XCNType orderingProvider, Collection observationRequestArray, LabResultProxyContainer labResultProxyContainer, - EdxLabInformationDto edxLabInformationDto) throws DataProcessingException{ + EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { try { for (HL7OBSERVATIONType hl7OBSERVATIONType : observationRequestArray) { try { ObservationContainer observationContainer = getObservationResult(hl7OBSERVATIONType.getObservationResult(), labResultProxyContainer, edxLabInformationDto); - getObsReqNotes(hl7OBSERVATIONType.getNotesAndComments(), observationContainer); + ObsReqNoteHelper.getObsReqNotes(hl7OBSERVATIONType.getNotesAndComments(), observationContainer); labResultProxyContainer.getTheObservationContainerCollection().add(observationContainer); } catch (Exception e) { logger.error("ObservationResultRequest.getObservationResultRequest Exception thrown while processing observationRequestArray. Please check!!!" + e.getMessage(), e); @@ -64,12 +64,152 @@ public LabResultProxyContainer getObservationResultRequest(List obsValueArray, HL7OBXType hl7OBXType, + ObservationContainer observationContainer, EdxLabInformationDto edxLabInformationDto, + String elementName) throws DataProcessingException { + for (String text : obsValueArray) { + formatValue(text, hl7OBXType, observationContainer, edxLabInformationDto, elementName); + if (!(hl7OBXType.getValueType().equals(EdxELRConstant.ELR_STRING_CD) + || hl7OBXType.getValueType().equals(EdxELRConstant.ELR_TEXT_CD) + || hl7OBXType.getValueType().equals(EdxELRConstant.ELR_TEXT_DT) + || hl7OBXType.getValueType().equals(EdxELRConstant.ELR_TEXT_TS))) { + break; + } + } + } + + protected void processingObsResult2(HL7OBXType hl7OBXType, ObservationDto observationDto, + EdxLabInformationDto edxLabInformationDto, + ObservationContainer observationContainer, + LabResultProxyContainer labResultProxyContainer) throws DataProcessingException { + if (hl7OBXType.getObservationResultStatus() != null) { + String toCode = checkingValueService.findToCode("ELR_LCA_STATUS", hl7OBXType.getObservationResultStatus(), "ACT_OBJ_ST"); + if (toCode != null && !toCode.equals("") && !toCode.equals(" ")) { + observationDto.setStatusCd(toCode.trim()); + + } else { + observationDto.setStatusCd(hl7OBXType.getObservationResultStatus()); + } + } + // It was decided to use only OBX19 for this field instead of OBX14(as in 2.3.1) - ER 1085 in Rel4.4 + if (hl7OBXType.getDateTimeOftheAnalysis() != null) { + observationDto.setActivityToTime(nbsObjectConverter.processHL7TSType(hl7OBXType.getDateTimeOftheAnalysis(), EdxELRConstant.DATE_VALIDATION_OBX_LAB_PERFORMED_DATE_MSG)); + } + + observationDto.setRptToStateTime(edxLabInformationDto.getLastChgTime()); + //2.3.1 to 2.5.1 translation copies this filed from OBX-15(CWE data type) to OBX-23(XON data type) which is required, so always reading it from OBX-23. + HL7XONType hl7XONTypeName = hl7OBXType.getPerformingOrganizationName(); + if (hl7XONTypeName != null) { + OrganizationContainer producerOrg = getPerformingFacility(hl7OBXType, observationContainer.getTheObservationDto().getObservationUid(), labResultProxyContainer, edxLabInformationDto); + labResultProxyContainer.getTheOrganizationContainerCollection().add(producerOrg); + } + } + @SuppressWarnings("java:S6541") private ObservationContainer getObservationResult(HL7OBXType hl7OBXType, LabResultProxyContainer labResultProxyContainer, @@ -82,11 +222,11 @@ private ObservationContainer getObservationResult(HL7OBXType hl7OBXType, ObservationDto observationDto = new ObservationDto(); observationDto.setCtrlCdDisplayForm(EdxELRConstant.CTRL_CD_DISPLAY_FORM); observationDto.setElectronicInd(EdxELRConstant.ELR_ELECTRONIC_IND); - observationDto.setObservationUid((long)(edxLabInformationDto.getNextUid())); + observationDto.setObservationUid((long) (edxLabInformationDto.getNextUid())); observationDto.setStatusCd(EdxELRConstant.ELR_ACTIVE_CD); - if(edxLabInformationDto.isParentObsInd()){ + if (edxLabInformationDto.isParentObsInd()) { observationDto.setObsDomainCdSt1(EdxELRConstant.ELR_REF_RESULT_CD); - }else{ + } else { observationDto.setObsDomainCdSt1(EdxELRConstant.ELR_RESULT_CD); } @@ -98,30 +238,25 @@ private ObservationContainer getObservationResult(HL7OBXType hl7OBXType, observationContainer.setTheObservationDto(observationDto); EdxLabIdentiferDto edxLabIdentiferDT = new EdxLabIdentiferDto(); - if(!edxLabInformationDto.isParentObsInd() && (hl7OBXType.getObservationIdentifier()== null - || (hl7OBXType.getObservationIdentifier().getHL7Identifier()==null && hl7OBXType.getObservationIdentifier().getHL7AlternateIdentifier()==null))){ + if (obsResultCheckParentObs(edxLabInformationDto, hl7OBXType) + ) { edxLabInformationDto.setResultedTestNameMissing(true); edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_19); - String xmlElementName = commonLabUtil.getXMLElementNameForOBX(hl7OBXType)+".ObservationIdentifier"; - throw new DataProcessingException(EdxELRConstant.NO_RESULT_NAME+" XMLElementName: "+xmlElementName); + String xmlElementName = commonLabUtil.getXMLElementNameForOBX(hl7OBXType) + ".ObservationIdentifier"; + throw new DataProcessingException(EdxELRConstant.NO_RESULT_NAME + " XMLElementName: " + xmlElementName); } - if(hl7OBXType.getObservationIdentifier().getHL7Identifier()!=null){ - edxLabIdentiferDT.setIdentifer(hl7OBXType.getObservationIdentifier().getHL7Identifier()); - } - else if(hl7OBXType.getObservationIdentifier().getHL7AlternateIdentifier()!=null) { - edxLabIdentiferDT.setIdentifer(hl7OBXType.getObservationIdentifier().getHL7AlternateIdentifier()); - } + edxLabIdentiferDT = processingObsIdentifier(hl7OBXType, edxLabIdentiferDT); edxLabIdentiferDT.setSubMapID(hl7OBXType.getObservationSubID()); - edxLabIdentiferDT.setObservationValues(hl7OBXType.getObservationValue()) ; + edxLabIdentiferDT.setObservationValues(hl7OBXType.getObservationValue()); edxLabIdentiferDT.setObservationUid(observationDto.getObservationUid()); - edxLabInformationDto.getEdxSusLabDTMap().put(edxLabIdentiferDT.getObservationUid(),edxLabIdentiferDT); - if(edxLabInformationDto.getEdxLabIdentiferDTColl()==null) { + edxLabInformationDto.getEdxSusLabDTMap().put(edxLabIdentiferDT.getObservationUid(), edxLabIdentiferDT); + if (edxLabInformationDto.getEdxLabIdentiferDTColl() == null) { edxLabInformationDto.setEdxLabIdentiferDTColl(new ArrayList<>()); } edxLabInformationDto.getEdxLabIdentiferDTColl().add(edxLabIdentiferDT); - Collection actIdDtoColl = new ArrayList<>(); + Collection actIdDtoColl = new ArrayList<>(); ActIdDto actIdDto = new ActIdDto(); actIdDto.setActIdSeq(1); actIdDto.setActUid(observationDto.getObservationUid()); @@ -148,7 +283,7 @@ else if(hl7OBXType.getObservationIdentifier().getHL7AlternateIdentifier()!=null) * ND-18349 HHS ELR Updates for COVID: Updates Required to Process OBX 18 */ List equipmentIdType = hl7OBXType.getEquipmentInstanceIdentifier(); - actIdDtoColl = setEquipments(equipmentIdType, observationDto, actIdDtoColl); + actIdDtoColl = setEquipments(equipmentIdType, observationDto, actIdDtoColl); observationContainer.setTheActIdDtoCollection(actIdDtoColl); @@ -162,12 +297,7 @@ else if(hl7OBXType.getObservationIdentifier().getHL7AlternateIdentifier()!=null) actRelationshipDto.setTypeCd(EdxELRConstant.ELR_COMP_CD); actRelationshipDto.setTypeDescTxt(EdxELRConstant.ELR_COMP_DESC); actRelationshipDto.setSourceActUid(observationContainer.getTheObservationDto().getObservationUid()); - if(edxLabInformationDto.isParentObsInd()){ - actRelationshipDto.setTargetActUid(edxLabInformationDto.getParentObservationUid()); - } - else { - actRelationshipDto.setTargetActUid(edxLabInformationDto.getRootObserbationUid()); - } + actRelationshipDto = processingObsTargetUid(edxLabInformationDto, actRelationshipDto); actRelationshipDto.setTargetClassCd(EdxELRConstant.ELR_OBS); actRelationshipDto.setSourceClassCd(EdxELRConstant.ELR_OBS); actRelationshipDto.setRecordStatusCd(EdxELRConstant.ELR_ACTIVE); @@ -175,143 +305,55 @@ else if(hl7OBXType.getObservationIdentifier().getHL7AlternateIdentifier()!=null) actRelationshipDto.setSequenceNbr(1); actRelationshipDto.setItNew(true); actRelationshipDto.setItDirty(false); - if(labResultProxyContainer.getTheActRelationshipDtoCollection()==null) { + if (labResultProxyContainer.getTheActRelationshipDtoCollection() == null) { labResultProxyContainer.setTheActRelationshipDtoCollection(new ArrayList<>()); } labResultProxyContainer.getTheActRelationshipDtoCollection().add(actRelationshipDto); - HL7CWEType obsIdentifier= hl7OBXType.getObservationIdentifier(); - if(obsIdentifier!=null){ - if(obsIdentifier.getHL7Identifier()!=null) - { - observationDto.setCd(obsIdentifier.getHL7Identifier()); - } - if(obsIdentifier.getHL7Text()!=null) - { - observationDto.setCdDescTxt(obsIdentifier.getHL7Text()); - } - - if(observationDto.getCd()==null && obsIdentifier.getHL7AlternateIdentifier()!=null) - { - observationDto.setCd(obsIdentifier.getHL7AlternateIdentifier()); - } - else if(observationDto.getCd()!=null && obsIdentifier.getHL7AlternateIdentifier()!=null) - { - observationDto.setAltCd(obsIdentifier.getHL7AlternateIdentifier()); - } - if(obsIdentifier.getHL7AlternateText()!=null && observationDto.getCdDescTxt()==null) - { - observationDto.setCdDescTxt(obsIdentifier.getHL7AlternateText()); - } - else if(obsIdentifier.getHL7AlternateText()!=null && observationDto.getCdDescTxt()!=null) - { - observationDto.setAltCdDescTxt(obsIdentifier.getHL7AlternateText()); - } - - - if(observationDto.getCd()!=null || observationDto.getCdDescTxt()!=null){ - observationDto.setCdSystemCd(obsIdentifier.getHL7NameofCodingSystem()); - observationDto.setCdSystemDescTxt(obsIdentifier.getHL7NameofCodingSystem()); - } - if(observationDto.getAltCd()!=null || observationDto.getAltCdDescTxt()!=null){ - observationDto.setAltCdSystemCd(obsIdentifier.getHL7NameofAlternateCodingSystem()); - observationDto.setAltCdSystemDescTxt(obsIdentifier.getHL7NameofAlternateCodingSystem()); - }else if(observationDto.getCdSystemCd()==null){ - observationDto.setCdSystemCd(obsIdentifier.getHL7NameofAlternateCodingSystem()); - observationDto.setCdSystemDescTxt(obsIdentifier.getHL7NameofAlternateCodingSystem()); - } - if (observationDto.getCdSystemCd() != null - && observationDto.getCdSystemCd().equals(EdxELRConstant.ELR_LOINC_CD)) { - observationDto.setCdSystemCd(EdxELRConstant.ELR_LOINC_CD); - observationDto.setCdSystemDescTxt(EdxELRConstant.ELR_LOINC_DESC); - - var aOELOINCs = SrteCache.loincCodesMap; - if (aOELOINCs != null && aOELOINCs.containsKey(observationDto.getCd())) { - observationDto.setMethodCd(NEDSSConstant.AOE_OBS); - } - }else if(observationDto.getCdSystemCd()!=null && observationDto.getCdSystemCd().equals(EdxELRConstant.ELR_SNOMED_CD)){ - observationDto.setCdSystemCd(EdxELRConstant.ELR_SNOMED_CD); - observationDto.setCdSystemDescTxt(EdxELRConstant.ELR_SNOMED_DESC); - }else if(observationDto.getCdSystemCd()!=null && observationDto.getCdSystemCd().equals(EdxELRConstant.ELR_LOCAL_CD)){ - observationDto.setCdSystemCd(EdxELRConstant.ELR_LOCAL_CD); - observationDto.setCdSystemDescTxt(EdxELRConstant.ELR_LOCAL_DESC); - } - - if(observationDto.getAltCd()!=null && observationDto.getAltCdSystemCd()!=null && observationDto.getAltCdSystemCd().equals(EdxELRConstant.ELR_SNOMED_CD)){ - observationDto.setAltCdSystemCd(EdxELRConstant.ELR_SNOMED_CD); - observationDto.setAltCdSystemDescTxt(EdxELRConstant.ELR_SNOMED_DESC); - }else if(observationDto.getAltCd()!=null){ - observationDto.setAltCdSystemCd(EdxELRConstant.ELR_LOCAL_CD); - observationDto.setAltCdSystemDescTxt(EdxELRConstant.ELR_LOCAL_DESC); - } + HL7CWEType obsIdentifier = hl7OBXType.getObservationIdentifier(); - if(edxLabInformationDto.isParentObsInd()){ - if(observationContainer.getTheObservationDto().getCd() == null || observationContainer.getTheObservationDto().getCd().trim().equals("")) { - edxLabInformationDto.setDrugNameMissing(true); - edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); - throw new DataProcessingException(EdxELRConstant.NO_DRUG_NAME); - } - } - } - else{ - logger.error("ObservationResultRequest.getObservationResult The Resulted Test ObservationCd can't be set to null. Please check." + observationDto.getCd()); - throw new DataProcessingException("ObservationResultRequest.getObservationResult The Resulted Test ObservationCd can't be set to null. Please check." + observationDto.getCd()); - } + processingObsResult1(obsIdentifier, observationDto, + edxLabInformationDto, + observationContainer); - - List obsValueArray =hl7OBXType.getObservationValue(); + List obsValueArray = hl7OBXType.getObservationValue(); String elementName = "ObservationValue"; - for (String text : obsValueArray) { - formatValue(text, hl7OBXType, observationContainer, edxLabInformationDto, elementName); - if (!(hl7OBXType.getValueType().equals(EdxELRConstant.ELR_STRING_CD) - || hl7OBXType.getValueType().equals(EdxELRConstant.ELR_TEXT_CD) - || hl7OBXType.getValueType().equals(EdxELRConstant.ELR_TEXT_DT) - || hl7OBXType.getValueType().equals(EdxELRConstant.ELR_TEXT_TS))) { - break; - } - } - + processingObsResultObsValueArray(obsValueArray, hl7OBXType, + observationContainer, edxLabInformationDto, + elementName); observationContainer = processingReferringRange(hl7OBXType, observationContainer); var abnormalFlag = hl7OBXType.getAbnormalFlags(); observationContainer = processingAbnormalFlag(abnormalFlag, observationDto, observationContainer); + processingObsResult2(hl7OBXType, observationDto, + edxLabInformationDto, observationContainer, + labResultProxyContainer); - if(hl7OBXType.getObservationResultStatus()!=null) - { - String toCode = checkingValueService.findToCode("ELR_LCA_STATUS", hl7OBXType.getObservationResultStatus(), "ACT_OBJ_ST"); - if (toCode != null && !toCode.equals("") && !toCode.equals(" ")){ - observationDto.setStatusCd(toCode.trim()); - - }else{ - observationDto.setStatusCd(hl7OBXType.getObservationResultStatus()); - } - } - // It was decided to use only OBX19 for this field instead of OBX14(as in 2.3.1) - ER 1085 in Rel4.4 - if(hl7OBXType.getDateTimeOftheAnalysis()!=null){ - observationDto.setActivityToTime(nbsObjectConverter.processHL7TSType(hl7OBXType.getDateTimeOftheAnalysis(),EdxELRConstant.DATE_VALIDATION_OBX_LAB_PERFORMED_DATE_MSG)); - } - - observationDto.setRptToStateTime(edxLabInformationDto.getLastChgTime()); - //2.3.1 to 2.5.1 translation copies this filed from OBX-15(CWE data type) to OBX-23(XON data type) which is required, so always reading it from OBX-23. - HL7XONType hl7XONTypeName = hl7OBXType.getPerformingOrganizationName(); - if(hl7XONTypeName!=null){ - OrganizationContainer producerOrg = getPerformingFacility(hl7OBXType, observationContainer.getTheObservationDto().getObservationUid(), labResultProxyContainer, edxLabInformationDto); - labResultProxyContainer.getTheOrganizationContainerCollection().add(producerOrg); - } List methodArray = hl7OBXType.getObservationMethod(); observationContainer = processingObservationMethod(methodArray, edxLabInformationDto, observationContainer); } catch (Exception e) { - logger.error("ObservationResultRequest.getObservationResult Exception thrown while parsing XML document. Please check!!!"+e.getMessage(), e); - throw new DataProcessingException("Exception thrown at ObservationResultRequest.getObservationResult:"+ e.getMessage()); + logger.error("ObservationResultRequest.getObservationResult Exception thrown while parsing XML document. Please check!!!" + e.getMessage(), e); + throw new DataProcessingException("Exception thrown at ObservationResultRequest.getObservationResult:" + e.getMessage()); } return observationContainer; } - private OrganizationContainer getPerformingFacility(HL7OBXType hl7OBXType, long observationUid, - LabResultProxyContainer labResultProxyContainer, EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { + protected void processingPeromAuthAssignAuth(HL7XONType hl7XONTypeName, EntityIdDto entityIdDto) { + if (hl7XONTypeName.getHL7AssigningAuthority() != null) { + entityIdDto.setAssigningAuthorityCd(hl7XONTypeName.getHL7AssigningAuthority().getHL7UniversalID()); + entityIdDto.setAssigningAuthorityIdType(hl7XONTypeName.getHL7AssigningAuthority().getHL7UniversalIDType()); + } + if (hl7XONTypeName.getHL7AssigningAuthority() != null && hl7XONTypeName.getHL7AssigningAuthority().getHL7NamespaceID() != null + && hl7XONTypeName.getHL7AssigningAuthority().getHL7NamespaceID().equals(EdxELRConstant.ELR_CLIA_CD)) { + entityIdDto.setAssigningAuthorityDescTxt(EdxELRConstant.ELR_CLIA_DESC); + } + } + + protected OrganizationContainer getPerformingFacility(HL7OBXType hl7OBXType, long observationUid, + LabResultProxyContainer labResultProxyContainer, EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { HL7XONType hl7XONTypeName = hl7OBXType.getPerformingOrganizationName(); @@ -328,12 +370,12 @@ private OrganizationContainer getPerformingFacility(HL7OBXType hl7OBXType, long organizationDto.setStandardIndustryClassCd(EdxELRConstant.ELR_STANDARD_INDUSTRY_CLASS_CD); organizationDto.setStandardIndustryDescTxt(EdxELRConstant.ELR_STANDARD_INDUSTRY_DESC_TXT); organizationDto.setElectronicInd(EdxELRConstant.ELR_ELECTRONIC_IND); - organizationDto.setOrganizationUid((long)(edxLabInformationDto.getNextUid())); + organizationDto.setOrganizationUid((long) (edxLabInformationDto.getNextUid())); organizationDto.setAddUserId(edxLabInformationDto.getUserId()); organizationDto.setItNew(true); organizationDto.setItDirty(false); organizationContainer.setTheOrganizationDto(organizationDto); - + EntityIdDto entityIdDto = new EntityIdDto(); entityIdDto.setEntityUid(organizationDto.getOrganizationUid()); entityIdDto.setRootExtensionTxt(hl7XONTypeName.getHL7OrganizationIdentifier()); @@ -344,15 +386,9 @@ private OrganizationContainer getPerformingFacility(HL7OBXType hl7OBXType, long entityIdDto.setAsOfDate(edxLabInformationDto.getAddTime()); entityIdDto.setEntityIdSeq(1); - if(hl7XONTypeName.getHL7AssigningAuthority()!=null){ - entityIdDto.setAssigningAuthorityCd(hl7XONTypeName.getHL7AssigningAuthority().getHL7UniversalID()); - entityIdDto.setAssigningAuthorityIdType(hl7XONTypeName.getHL7AssigningAuthority().getHL7UniversalIDType()); - } - if(hl7XONTypeName.getHL7AssigningAuthority()!=null && hl7XONTypeName.getHL7AssigningAuthority().getHL7NamespaceID()!=null - && hl7XONTypeName.getHL7AssigningAuthority().getHL7NamespaceID().equals(EdxELRConstant.ELR_CLIA_CD)) { - entityIdDto.setAssigningAuthorityDescTxt(EdxELRConstant.ELR_CLIA_DESC); - } - + + processingPeromAuthAssignAuth(hl7XONTypeName, entityIdDto); + organizationContainer.getTheEntityIdDtoCollection().add(entityIdDto); ParticipationDto participationDto = new ParticipationDto(); @@ -378,7 +414,7 @@ private OrganizationContainer getPerformingFacility(HL7OBXType hl7OBXType, long roleDto.setCdDescTxt(EdxELRConstant.ELR_REPORTING_ENTITY_DESC); roleDto.setScopingClassCd(EdxELRConstant.ELR_PATIENT_CD); roleDto.setScopingRoleCd(EdxELRConstant.ELR_PATIENT_CD); - roleDto.setRoleSeq((long)(1)); + roleDto.setRoleSeq((long) (1)); roleDto.setItNew(true); roleDto.setItDirty(false); roleDto.setAddReasonCd(""); @@ -413,135 +449,144 @@ private OrganizationContainer getPerformingFacility(HL7OBXType hl7OBXType, long } } catch (Exception e) { - logger.error("ObservationResultRequest.getPerformingFacility Exception thrown while parsing XML document. Please check!!!"+e.getMessage(), e); - throw new DataProcessingException("Exception thrown at ObservationResultRequest.getPerformingFacility:"+ e.getMessage()); + logger.error("ObservationResultRequest.getPerformingFacility Exception thrown while parsing XML document. Please check!!!" + e.getMessage(), e); + throw new DataProcessingException("Exception thrown at ObservationResultRequest.getPerformingFacility:" + e.getMessage()); } return organizationContainer; } + protected void formatValueTextValue(String[] textValue, String text, ObsValueCodedDto obsvalueDT) { + if (!text.isEmpty() && textValue.length > 0) { + obsvalueDT.setCode(textValue[0]); + obsvalueDT.setDisplayName(textValue[1]); + if (textValue.length == 2) { + obsvalueDT.setCodeSystemCd(EdxELRConstant.ELR_SNOMED_CD); + } else if (textValue.length == 3) { + obsvalueDT.setCodeSystemCd(textValue[2]); + } + + if (textValue.length >= 6) { + obsvalueDT.setAltCd(textValue[3]); + obsvalueDT.setAltCdDescTxt(textValue[4]); + /* + if(textValue.length==4){ + obsvalueDT.setAltCdSystemCd(EdxELRConstant.ELR_LOCAL_CD); + }else if(textValue.length==5 || textValue.length>5){ + obsvalueDT.setAltCdSystemCd(textValue[5]); + } + */ + } + } + } + + protected void formatValueTextValue2(ObsValueCodedDto obsvalueDT, + ObservationContainer observationContainer) { + if (obsvalueDT.getCodeSystemCd() != null && obsvalueDT.getCodeSystemCd().equalsIgnoreCase(EdxELRConstant.ELR_SNOMED_CD)) { + obsvalueDT.setCodeSystemDescTxt(EdxELRConstant.ELR_SNOMED_DESC); + } else if (obsvalueDT.getCodeSystemCd() != null && obsvalueDT.getCodeSystemCd().equalsIgnoreCase(EdxELRConstant.ELR_LOCAL_CD)) { + obsvalueDT.setCodeSystemDescTxt(EdxELRConstant.ELR_LOCAL_DESC); + } + if (obsvalueDT.getAltCdSystemCd() != null && obsvalueDT.getAltCdSystemCd().equalsIgnoreCase(EdxELRConstant.ELR_SNOMED_CD)) { + obsvalueDT.setAltCdSystemDescTxt(EdxELRConstant.ELR_SNOMED_DESC); + } else if (obsvalueDT.getAltCdSystemCd() != null && obsvalueDT.getAltCdSystemCd().equalsIgnoreCase(EdxELRConstant.ELR_LOCAL_CD)) { + obsvalueDT.setAltCdSystemDescTxt(EdxELRConstant.ELR_LOCAL_DESC); + } + + obsvalueDT.setObservationUid(observationContainer.getTheObservationDto().getObservationUid()); + + if (observationContainer.getTheObsValueCodedDtoCollection() == null) { + observationContainer.setTheObsValueCodedDtoCollection(new ArrayList<>()); + } + observationContainer.getTheObsValueCodedDtoCollection().add(obsvalueDT); + } + + protected void formatValueObsValueDt(ObsValueCodedDto obsvalueDT, EdxLabInformationDto edxLabInformationDto, + HL7OBXType hl7OBXType, String elementName) throws DataProcessingException { + if ((obsvalueDT.getCode() == null || obsvalueDT.getCode().trim().equals("")) + && (obsvalueDT.getAltCd() == null || obsvalueDT.getAltCd().trim().equals(""))) { + edxLabInformationDto.setReflexResultedTestCdMissing(true); + edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_19); + String xmlElementName = commonLabUtil.getXMLElementNameForOBX(hl7OBXType) + "." + elementName; + throw new DataProcessingException(EdxELRConstant.NO_REFLEX_RESULT_NM + " XMLElementName: " + xmlElementName); + } + + if (obsvalueDT.getCode() == null || obsvalueDT.getCode().trim().equals("")) { + obsvalueDT.setCode(obsvalueDT.getAltCd()); + obsvalueDT.setDisplayName(obsvalueDT.getAltCdDescTxt()); + obsvalueDT.setCodeSystemCd(obsvalueDT.getAltCdSystemCd()); + obsvalueDT.setAltCd(null); + obsvalueDT.setAltCdDescTxt(null); + obsvalueDT.setAltCdSystemCd(null); + } + } + + protected void formatValueNumeric(String text, int i, ObsValueNumericDto obsValueNumericDto, + ObservationContainer observationContainer, HL7CEType cEUnit, + StringTokenizer st) { + if (text.indexOf("^") == 0) { + i = 1; + } + while (st.hasMoreTokens()) { + i++; + String token = st.nextToken(); + if (i == 1) { + if (token != null && token.equals("<")) + obsValueNumericDto.setComparatorCd1("<"); + else if (token != null && token.equals(">")) + obsValueNumericDto.setComparatorCd1(">"); + else + obsValueNumericDto.setComparatorCd1(token); + } else if (i == 2) { + obsValueNumericDto.setNumericValue1(new BigDecimal(token)); + } else if (i == 3) { + obsValueNumericDto.setSeparatorCd(token); + } else if (i == 4) { + obsValueNumericDto.setNumericValue2(new BigDecimal(token)); + } + } + if (cEUnit != null) + obsValueNumericDto.setNumericUnitCd(cEUnit.getHL7Identifier()); + obsValueNumericDto.setObservationUid(observationContainer.getTheObservationDto().getObservationUid()); + if (observationContainer.getTheObsValueNumericDtoCollection() == null) { + observationContainer.setTheObsValueNumericDtoCollection(new ArrayList<>()); + } + observationContainer.getTheObsValueNumericDtoCollection().add(obsValueNumericDto); + } + @SuppressWarnings({"java:S3776", "java:S6541", "java:S125"}) - protected void formatValue(String text, HL7OBXType hl7OBXType, ObservationContainer observationContainer, EdxLabInformationDto edxLabInformationDto, String elementName) throws DataProcessingException{ + protected void formatValue(String text, HL7OBXType hl7OBXType, ObservationContainer observationContainer, EdxLabInformationDto edxLabInformationDto, String elementName) throws DataProcessingException { String type = ""; try { type = hl7OBXType.getValueType(); HL7CEType cEUnit = hl7OBXType.getUnits(); - if(type!=null){ - if(type.equals(EdxELRConstant.ELR_CODED_WITH_EXC_CD) ||type.equals(EdxELRConstant.ELR_CODED_EXEC_CD)) - { - if(text!=null){ - ObsValueCodedDto obsvalueDT= new ObsValueCodedDto(); + if (type != null) { + if (type.equals(EdxELRConstant.ELR_CODED_WITH_EXC_CD) || type.equals(EdxELRConstant.ELR_CODED_EXEC_CD)) { + if (text != null) { + ObsValueCodedDto obsvalueDT = new ObsValueCodedDto(); obsvalueDT.setItNew(true); obsvalueDT.setItDirty(false); String[] textValue = text.split("\\^"); - if (!text.isEmpty() && textValue.length>0) { - obsvalueDT.setCode(textValue[0]); - obsvalueDT.setDisplayName(textValue[1]); - if(textValue.length==2){ - obsvalueDT.setCodeSystemCd(EdxELRConstant.ELR_SNOMED_CD); - }else if(textValue.length==3){ - obsvalueDT.setCodeSystemCd(textValue[2]); - } - - if (textValue.length >= 6) { - obsvalueDT.setAltCd(textValue[3]); - obsvalueDT.setAltCdDescTxt(textValue[4]); - /* - if(textValue.length==4){ - obsvalueDT.setAltCdSystemCd(EdxELRConstant.ELR_LOCAL_CD); - }else if(textValue.length==5 || textValue.length>5){ - obsvalueDT.setAltCdSystemCd(textValue[5]); - } - */ - } - } - if((obsvalueDT.getCode()==null || obsvalueDT.getCode().trim().equals("")) - && (obsvalueDT.getAltCd()==null || obsvalueDT.getAltCd().trim().equals(""))) - { - edxLabInformationDto.setReflexResultedTestCdMissing(true); - edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_19); - String xmlElementName = commonLabUtil.getXMLElementNameForOBX(hl7OBXType)+"."+elementName; - throw new DataProcessingException(EdxELRConstant.NO_REFLEX_RESULT_NM+" XMLElementName: "+xmlElementName); - } - - if(obsvalueDT.getCode() == null || obsvalueDT.getCode().trim().equals("")) - { - obsvalueDT.setCode(obsvalueDT.getAltCd()); - obsvalueDT.setDisplayName(obsvalueDT.getAltCdDescTxt()); - obsvalueDT.setCodeSystemCd(obsvalueDT.getAltCdSystemCd()); - obsvalueDT.setAltCd(null); - obsvalueDT.setAltCdDescTxt(null); - obsvalueDT.setAltCdSystemCd(null); - } - - if(obsvalueDT.getCodeSystemCd()!=null && obsvalueDT.getCodeSystemCd().equalsIgnoreCase(EdxELRConstant.ELR_SNOMED_CD)) - { - obsvalueDT.setCodeSystemDescTxt(EdxELRConstant.ELR_SNOMED_DESC); - } - else if(obsvalueDT.getCodeSystemCd()!=null && obsvalueDT.getCodeSystemCd().equalsIgnoreCase(EdxELRConstant.ELR_LOCAL_CD)) - { - obsvalueDT.setCodeSystemDescTxt(EdxELRConstant.ELR_LOCAL_DESC); - } - if(obsvalueDT.getAltCdSystemCd()!=null && obsvalueDT.getAltCdSystemCd().equalsIgnoreCase(EdxELRConstant.ELR_SNOMED_CD)) - { - obsvalueDT.setAltCdSystemDescTxt(EdxELRConstant.ELR_SNOMED_DESC); - } - else if(obsvalueDT.getAltCdSystemCd()!=null && obsvalueDT.getAltCdSystemCd().equalsIgnoreCase(EdxELRConstant.ELR_LOCAL_CD)) - { - obsvalueDT.setAltCdSystemDescTxt(EdxELRConstant.ELR_LOCAL_DESC); - } - - obsvalueDT.setObservationUid(observationContainer.getTheObservationDto().getObservationUid()); - - if(observationContainer.getTheObsValueCodedDtoCollection()==null) { - observationContainer.setTheObsValueCodedDtoCollection(new ArrayList<>()); - } - observationContainer.getTheObsValueCodedDtoCollection().add(obsvalueDT); + + formatValueTextValue(textValue, text, obsvalueDT); + + formatValueObsValueDt(obsvalueDT, edxLabInformationDto, + hl7OBXType, elementName); + + formatValueTextValue2(obsvalueDT, observationContainer); } - } - else if (type.equals(EdxELRConstant.ELR_STUCTURED_NUMERIC_CD)) - { + } else if (type.equals(EdxELRConstant.ELR_STUCTURED_NUMERIC_CD)) { ObsValueNumericDto obsValueNumericDto = new ObsValueNumericDto(); obsValueNumericDto.setObsValueNumericSeq(1); StringTokenizer st = new StringTokenizer(text, "^"); obsValueNumericDto.setItNew(true); obsValueNumericDto.setItDirty(false); int i = 0; - if (text.indexOf("^") == 0) { - i = 1; - } - while (st.hasMoreTokens()) { - i++; - String token = st.nextToken(); - if (i == 1) { - if (token != null && token.equals("<")) - obsValueNumericDto.setComparatorCd1("<"); - else if (token != null && token.equals(">")) - obsValueNumericDto.setComparatorCd1(">"); - else - obsValueNumericDto.setComparatorCd1(token); - } else if (i == 2) { - obsValueNumericDto.setNumericValue1(new BigDecimal(token)); - } - else if (i == 3) { - obsValueNumericDto.setSeparatorCd(token); - } - else if (i == 4) { - obsValueNumericDto.setNumericValue2(new BigDecimal(token)); - } - } - if (cEUnit != null) - obsValueNumericDto.setNumericUnitCd(cEUnit.getHL7Identifier()); - obsValueNumericDto.setObservationUid(observationContainer.getTheObservationDto().getObservationUid()); - if (observationContainer.getTheObsValueNumericDtoCollection() == null) { - observationContainer.setTheObsValueNumericDtoCollection(new ArrayList<>()); - } - observationContainer.getTheObsValueNumericDtoCollection().add(obsValueNumericDto); - } - else if (type.equals(EdxELRConstant.ELR_NUMERIC_CD)) - { + formatValueNumeric(text, i, obsValueNumericDto, + observationContainer, cEUnit, st); + } else if (type.equals(EdxELRConstant.ELR_NUMERIC_CD)) { ObsValueNumericDto obsValueNumericDto = new ObsValueNumericDto(); obsValueNumericDto.setObsValueNumericSeq(1); obsValueNumericDto.setItNew(true); @@ -559,10 +604,8 @@ else if (type.equals(EdxELRConstant.ELR_NUMERIC_CD)) } observationContainer.getTheObsValueNumericDtoCollection().add(obsValueNumericDto); - } - else if (type.equals(EdxELRConstant.ELR_STRING_CD) || type.equals(EdxELRConstant.ELR_TEXT_CD) - || type.equals(EdxELRConstant.ELR_TEXT_DT) || type.equals(EdxELRConstant.ELR_TEXT_TS)) - { + } else if (type.equals(EdxELRConstant.ELR_STRING_CD) || type.equals(EdxELRConstant.ELR_TEXT_CD) + || type.equals(EdxELRConstant.ELR_TEXT_DT) || type.equals(EdxELRConstant.ELR_TEXT_TS)) { ObsValueTxtDto obsValueTxtDto = new ObsValueTxtDto(); StringTokenizer st = new StringTokenizer(text, "^"); int i; @@ -582,70 +625,19 @@ else if (type.equals(EdxELRConstant.ELR_STRING_CD) || type.equals(EdxELRConstant } observationContainer.getTheObsValueTxtDtoCollection().add(obsValueTxtDto); - } - else - { + } else { edxLabInformationDto.setUnexpectedResultType(true); edxLabInformationDto.setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); throw new DataProcessingException(EdxELRConstant.UNEXPECTED_RESULT_TYPE); } } } catch (Exception e) { - logger.error("ObservationResultRequest.formatValue Exception thrown while observation value. Please check!!!"+e.getMessage(), e); - throw new DataProcessingException("Exception thrown at ObservationResultRequest.formatValue for text:\""+text+"\" and for type:\""+ type+"\"."+e.getMessage()); + logger.error("ObservationResultRequest.formatValue Exception thrown while observation value. Please check!!!" + e.getMessage(), e); + throw new DataProcessingException("Exception thrown at ObservationResultRequest.formatValue for text:\"" + text + "\" and for type:\"" + type + "\"." + e.getMessage()); } } - @SuppressWarnings("java:S3776") - protected ObservationContainer getObsReqNotes(List noteArray, ObservationContainer observationContainer) throws DataProcessingException { - try { - for (HL7NTEType notes : noteArray) { - if (notes.getHL7Comment() != null && notes.getHL7Comment().size() > 0) { - for (int j = 0; j < notes.getHL7Comment().size(); j++) { - String note = notes.getHL7Comment().get(j); - ObsValueTxtDto obsValueTxtDto = new ObsValueTxtDto(); - obsValueTxtDto.setItNew(true); - obsValueTxtDto.setItDirty(false); - obsValueTxtDto.setObservationUid(observationContainer.getTheObservationDto().getObservationUid()); - obsValueTxtDto.setTxtTypeCd(EdxELRConstant.ELR_OBX_COMMENT_TYPE); - - obsValueTxtDto.setValueTxt(note); - if (observationContainer.getTheObsValueTxtDtoCollection() == null) - { - observationContainer.setTheObsValueTxtDtoCollection(new ArrayList<>()); - } - int seq = observationContainer.getTheObsValueTxtDtoCollection().size(); - obsValueTxtDto.setObsValueTxtSeq(++seq); - observationContainer.getTheObsValueTxtDtoCollection().add(obsValueTxtDto); - } - } else { - ObsValueTxtDto obsValueTxtDto = new ObsValueTxtDto(); - obsValueTxtDto.setItNew(true); - obsValueTxtDto.setItDirty(false); - obsValueTxtDto.setValueTxt("\r"); - obsValueTxtDto.setObservationUid(observationContainer.getTheObservationDto().getObservationUid()); - obsValueTxtDto.setTxtTypeCd(EdxELRConstant.ELR_OBX_COMMENT_TYPE); - - if (observationContainer.getTheObsValueTxtDtoCollection() == null) - observationContainer.setTheObsValueTxtDtoCollection(new ArrayList<>()); - int seq = observationContainer.getTheObsValueTxtDtoCollection().size(); - obsValueTxtDto.setObsValueTxtSeq(++seq); - observationContainer.getTheObsValueTxtDtoCollection().add(obsValueTxtDto); - - } - - } - } catch (Exception e) { - logger.error("ObservationResultRequest.getObsReqNotes Exception thrown while parsing XML document. Please check!!!"+e.getMessage(), e); - throw new DataProcessingException("Exception thrown at ObservationResultRequest.getObsReqNotes:"+ e.getMessage()); - - } - return observationContainer; - - - } - protected Collection setEquipments(List equipmentIdType, ObservationDto observationDto, Collection actIdDtoColl) { int seq = 3; for (HL7EIType equipmentId : equipmentIdType) { @@ -667,18 +659,16 @@ protected Collection setEquipments(List equipmentIdType, Ob } protected ObservationContainer processingAbnormalFlag(List abnormalFlag, ObservationDto observationDto, - ObservationContainer observationContainer) throws DataProcessingException { - if(abnormalFlag !=null && !abnormalFlag.isEmpty()) - { + ObservationContainer observationContainer) throws DataProcessingException { + if (abnormalFlag != null && !abnormalFlag.isEmpty()) { ObservationInterpDto observationIntrepDT = new ObservationInterpDto(); observationIntrepDT.setObservationUid(observationDto.getObservationUid()); observationIntrepDT.setInterpretationCd(abnormalFlag.get(0).getHL7Identifier()); - String str= checkingValueService.getCodeDescTxtForCd("OBS_INTRP",observationIntrepDT.getInterpretationCd()); - if(str==null || str.trim().length()==0) { + String str = checkingValueService.getCodeDescTxtForCd("OBS_INTRP", observationIntrepDT.getInterpretationCd()); + if (str == null || str.trim().length() == 0) { observationIntrepDT.setInterpretationDescTxt(abnormalFlag.get(0).getHL7Text()); - } - else { + } else { observationIntrepDT.setInterpretationDescTxt(str); } observationIntrepDT.setObservationUid(observationContainer.getTheObservationDto().getObservationUid()); @@ -687,18 +677,16 @@ protected ObservationContainer processingAbnormalFlag(List abnormalF } return observationContainer; } + @SuppressWarnings("java:S3776") protected ObservationContainer processingReferringRange(HL7OBXType hl7OBXType, ObservationContainer observationContainer) { - if(hl7OBXType.getReferencesRange()!=null){ - String range =hl7OBXType.getReferencesRange(); + if (hl7OBXType.getReferencesRange() != null) { + String range = hl7OBXType.getReferencesRange(); ObsValueNumericDto obsValueNumericDto; - if(observationContainer.getTheObsValueNumericDtoCollection()!=null) - { + if (observationContainer.getTheObsValueNumericDtoCollection() != null) { var arrlist = new ArrayList<>(observationContainer.getTheObsValueNumericDtoCollection()); obsValueNumericDto = arrlist.get(0); - } - else - { + } else { obsValueNumericDto = new ObsValueNumericDto(); obsValueNumericDto.setItNew(true); obsValueNumericDto.setItDirty(false); @@ -706,26 +694,23 @@ protected ObservationContainer processingReferringRange(HL7OBXType hl7OBXType, O obsValueNumericDto.setObservationUid(observationContainer.getTheObservationDto().getObservationUid()); } - if(range.contains("^")) - { - int i=0; - if(range.indexOf("^")==0){ - i=1; + if (range.contains("^")) { + int i = 0; + if (range.indexOf("^") == 0) { + i = 1; } StringTokenizer st = new StringTokenizer(range, "^"); while (st.hasMoreTokens()) { i++; String token = st.nextToken(); - if(i==1) + if (i == 1) obsValueNumericDto.setLowRange(token); - else if(i==2) + else if (i == 2) obsValueNumericDto.setHighRange(token); } - } - else - { + } else { obsValueNumericDto.setLowRange(range); - if(observationContainer.getTheObsValueNumericDtoCollection()==null){ + if (observationContainer.getTheObsValueNumericDtoCollection() == null) { observationContainer.setTheObsValueNumericDtoCollection(new ArrayList<>()); observationContainer.getTheObsValueNumericDtoCollection().add(obsValueNumericDto); } @@ -733,19 +718,17 @@ else if(i==2) } return observationContainer; } + @SuppressWarnings("java:S3776") - protected ObservationContainer processingObservationMethod(List methodArray , EdxLabInformationDto edxLabInformationDto, ObservationContainer observationContainer) throws DataProcessingException { + protected ObservationContainer processingObservationMethod(List methodArray, EdxLabInformationDto edxLabInformationDto, ObservationContainer observationContainer) throws DataProcessingException { StringBuilder methodCd = null; StringBuilder methodDescTxt = null; final String delimiter = "**"; for (HL7CEType method : methodArray) { if (method.getHL7Identifier() != null) { - if (methodCd == null) - { + if (methodCd == null) { methodCd = new StringBuilder(method.getHL7Identifier() + delimiter); - } - else - { + } else { methodCd.append(method.getHL7Identifier()).append(delimiter); } @@ -757,24 +740,19 @@ protected ObservationContainer processingObservationMethod(List metho edxLabInformationDto.setObsMethodTranslated(false); } if (method.getHL7Text() != null) { - if (methodDescTxt == null) - { + if (methodDescTxt == null) { methodDescTxt = new StringBuilder(method.getHL7Text() + delimiter); - } - else - { + } else { methodDescTxt.append(method.getHL7Text()).append(delimiter); } } } } - if (methodCd != null && methodCd.lastIndexOf(delimiter) > 0) - { + if (methodCd != null && methodCd.lastIndexOf(delimiter) > 0) { methodCd = new StringBuilder(methodCd.substring(0, methodCd.lastIndexOf(delimiter))); } - if (methodDescTxt != null && methodDescTxt.lastIndexOf(delimiter) > 0) - { + if (methodDescTxt != null && methodDescTxt.lastIndexOf(delimiter) > 0) { methodDescTxt = new StringBuilder(methodDescTxt.substring(0, methodDescTxt.lastIndexOf(delimiter))); } observationContainer.getTheObservationDto().setMethodCd(methodCd != null ? methodCd.toString() : ""); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/EntityIdUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/EntityIdUtil.java index a86b2b00a..1a514b0cc 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/EntityIdUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/EntityIdUtil.java @@ -27,7 +27,7 @@ public EntityIdUtil(ICatchingValueService catchingValueService) { /** * This method process then parse data from Person into EntityId Object - * */ + */ public EntityIdDto processEntityData(HL7CXType hl7CXType, PersonContainer personContainer, String indicator, int index) throws DataProcessingException { EntityIdDto entityIdDto = new EntityIdDto(); if (hl7CXType != null) { @@ -35,26 +35,23 @@ public EntityIdDto processEntityData(HL7CXType hl7CXType, PersonContainer person entityIdDto.setAddTime(personContainer.getThePersonDto().getAddTime()); entityIdDto.setEntityIdSeq(index + 1); entityIdDto.setRootExtensionTxt(hl7CXType.getHL7IDNumber()); - - if(hl7CXType.getHL7AssigningAuthority() != null){ + + if (hl7CXType.getHL7AssigningAuthority() != null) { entityIdDto.setAssigningAuthorityCd(hl7CXType.getHL7AssigningAuthority().getHL7UniversalID()); entityIdDto.setAssigningAuthorityDescTxt(hl7CXType.getHL7AssigningAuthority().getHL7NamespaceID()); entityIdDto.setAssigningAuthorityIdType(hl7CXType.getHL7AssigningAuthority().getHL7UniversalIDType()); } - + if (indicator != null && indicator.equals(EdxELRConstant.ELR_PATIENT_ALTERNATE_IND)) { entityIdDto.setTypeCd(EdxELRConstant.ELR_PATIENT_ALTERNATE_TYPE); entityIdDto.setTypeDescTxt(EdxELRConstant.ELR_PATIENT_ALTERNATE_DESC); - } - else if (indicator != null && indicator.equals(EdxELRConstant.ELR_MOTHER_IDENTIFIER)) { + } else if (indicator != null && indicator.equals(EdxELRConstant.ELR_MOTHER_IDENTIFIER)) { entityIdDto.setTypeCd(EdxELRConstant.ELR_MOTHER_IDENTIFIER); entityIdDto.setTypeDescTxt(EdxELRConstant.ELR_MOTHER_IDENTIFIER); - } - else if (indicator != null && indicator.equals(EdxELRConstant.ELR_ACCOUNT_IDENTIFIER)) { + } else if (indicator != null && indicator.equals(EdxELRConstant.ELR_ACCOUNT_IDENTIFIER)) { entityIdDto.setTypeCd(EdxELRConstant.ELR_ACCOUNT_IDENTIFIER); entityIdDto.setTypeDescTxt(EdxELRConstant.ELR_ACCOUNT_DESC); - } - else if (hl7CXType.getHL7IdentifierTypeCode() == null || hl7CXType.getHL7IdentifierTypeCode().trim().isEmpty()) { + } else if (hl7CXType.getHL7IdentifierTypeCode() == null || hl7CXType.getHL7IdentifierTypeCode().trim().isEmpty()) { entityIdDto.setTypeCd(EdxELRConstant.ELR_PERSON_TYPE); entityIdDto.setTypeDescTxt(EdxELRConstant.ELR_PERSON_TYPE_DESC); @@ -104,11 +101,11 @@ public Timestamp processHL7DTType(HL7DTType time, String itemDescription) throws if (year >= 0 && month >= 0 && date >= 0) { toTime = month + "/" + date + "/" + year; - logger.debug(" in processHL7DTType: Date string is: " +toTime); + logger.debug(" in processHL7DTType: Date string is: " + toTime); toTimestamp = stringToStrutsTimestamp(toTime); } if (isDateNotOkForDatabase(toTimestamp)) { - throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7DTType " +itemDescription +toTime + EdxELRConstant.DATE_INVALID_FOR_DATABASE); + throw new DataProcessingException("Hl7ToNBSObjectConverter.processHL7DTType " + itemDescription + toTime + EdxELRConstant.DATE_INVALID_FOR_DATABASE); } } @@ -123,12 +120,10 @@ public Timestamp stringToStrutsTimestamp(String strTime) { t = formatter.parse(strTime); logger.debug(String.valueOf(t)); return new Timestamp(t.getTime()); - } - else { + } else { return null; } - } - catch (Exception e) { + } catch (Exception e) { logger.info("string could not be parsed into time"); return null; } @@ -138,24 +133,22 @@ public Timestamp stringToStrutsTimestamp(String strTime) { * The earliest date that can be stored in SQL is Jan 1st, 1753 and the latest is Dec 31st, 9999 * Check the date so we don't get a SQL error. */ - public boolean isDateNotOkForDatabase (Timestamp dateVal) { + public boolean isDateNotOkForDatabase(Timestamp dateVal) { if (dateVal == null) return false; String earliestDate = "1753-01-01"; String latestDate = "9999-12-31"; - try{ + try { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); Date earliestDateAcceptable = dateFormat.parse(earliestDate); - if (dateVal.before(earliestDateAcceptable)) - { + if (dateVal.before(earliestDateAcceptable)) { return true; } Date lastAcceptableDate = dateFormat.parse(latestDate); - if (dateVal.after(lastAcceptableDate)) - { + if (dateVal.after(lastAcceptableDate)) { return true; } - }catch(Exception ex){//this generic but you can control another types of exception + } catch (Exception ex) {//this generic but you can control another types of exception logger.error("Unexpected exception in checkDateForDatabase() " + ex.getMessage()); } return false; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/HL7SpecimenUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/HL7SpecimenUtil.java index d568ff571..d431d9909 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/HL7SpecimenUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/HL7SpecimenUtil.java @@ -34,45 +34,45 @@ public HL7SpecimenUtil(NBSObjectConverter nbsObjectConverter) { public void process251Specimen(HL7PatientResultSPMType hL7PatientResultSPMType, LabResultProxyContainer labResultProxyContainer, ObservationDto observationDto, PersonContainer collectorVO, EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { try { - List hl7SPECIMENTypeArray =hL7PatientResultSPMType.getSPECIMEN(); - if(hl7SPECIMENTypeArray!=null && hl7SPECIMENTypeArray.size()>1) + List hl7SPECIMENTypeArray = hL7PatientResultSPMType.getSPECIMEN(); + if (hl7SPECIMENTypeArray != null && hl7SPECIMENTypeArray.size() > 1) edxLabInformationDto.setMultipleSpecimen(true); - if(hl7SPECIMENTypeArray!=null && !hl7SPECIMENTypeArray.isEmpty()){ + if (hl7SPECIMENTypeArray != null && !hl7SPECIMENTypeArray.isEmpty()) { - if(hl7SPECIMENTypeArray.size()>1) { + if (hl7SPECIMENTypeArray.size() > 1) { edxLabInformationDto.setMultipleSpecimen(true); } HL7SPECIMENType hl7SPECIMENType = hl7SPECIMENTypeArray.get(0); - if(hl7SPECIMENType!=null && hl7SPECIMENType.getSPECIMEN()!=null){ - HL7SPMType hl7SPMType =hl7SPECIMENType.getSPECIMEN(); + if (hl7SPECIMENType != null && hl7SPECIMENType.getSPECIMEN() != null) { + HL7SPMType hl7SPMType = hl7SPECIMENType.getSPECIMEN(); MaterialContainer materialContainer = new MaterialContainer(); MaterialDto materialDto = new MaterialDto(); materialContainer.setTheMaterialDto(materialDto); - materialDto.setMaterialUid((long)(edxLabInformationDto.getNextUid())); + materialDto.setMaterialUid((long) (edxLabInformationDto.getNextUid())); materialDto.setRiskCd(edxLabInformationDto.getDangerCode()); - if(hl7SPMType.getSpecimenCollectionAmount()!=null && hl7SPMType.getSpecimenCollectionAmount().getHL7Quantity()!=null){ + if (hl7SPMType.getSpecimenCollectionAmount() != null && hl7SPMType.getSpecimenCollectionAmount().getHL7Quantity() != null) { materialDto.setQty(String.valueOf(hl7SPMType.getSpecimenCollectionAmount().getHL7Quantity().getHL7Numeric())); - if(hl7SPMType.getSpecimenCollectionAmount().getHL7Units()!=null) + if (hl7SPMType.getSpecimenCollectionAmount().getHL7Units() != null) materialDto.setQtyUnitCd(hl7SPMType.getSpecimenCollectionAmount().getHL7Units().getHL7Identifier()); } - if(hl7SPMType.getSpecimenType()!=null){ + if (hl7SPMType.getSpecimenType() != null) { materialDto.setCd(hl7SPMType.getSpecimenType().getHL7Identifier()); materialDto.setCdDescTxt(hl7SPMType.getSpecimenType().getHL7Text()); } List specimenDec = hl7SPMType.getSpecimenDescription(); - if (specimenDec!=null && specimenDec.size()>0) { + if (specimenDec != null && specimenDec.size() > 0) { materialDto.setDescription(specimenDec.get(0)); } - if(hl7SPMType.getSpecimenSourceSite()!=null){ + if (hl7SPMType.getSpecimenSourceSite() != null) { observationDto.setTargetSiteCd(hl7SPMType.getSpecimenSourceSite().getHL7Identifier()); observationDto.setTargetSiteDescTxt(hl7SPMType.getSpecimenSourceSite().getHL7Text()); } - if(hl7SPMType.getSpecimenCollectionDateTime()!=null) { + if (hl7SPMType.getSpecimenCollectionDateTime() != null) { observationDto.setEffectiveFromTime(nbsObjectConverter.processHL7TSTypeWithMillis(hl7SPMType.getSpecimenCollectionDateTime().getHL7RangeStartDateTime(), EdxELRConstant.DATE_VALIDATION_SPM_SPECIMEN_COLLECTION_DATE_MSG)); } - processMaterialVO(labResultProxyContainer,collectorVO, materialContainer, edxLabInformationDto); + processMaterialVO(labResultProxyContainer, collectorVO, materialContainer, edxLabInformationDto); //use Filler Specimen ID (SPM.2.2.1) is present for specimen ID - Defect #14343 Jira if (hl7SPMType.getSpecimenID() != null && hl7SPMType.getSpecimenID().getHL7FillerAssignedIdentifier() != null @@ -100,18 +100,18 @@ public void process251Specimen(HL7PatientResultSPMType hL7PatientResultSPMType, } } } catch (Exception e) { - logger.error("HL7SpecimenProcessor.process251Specimen error thrown "+ e.getMessage(), e); - throw new DataProcessingException( "HL7SpecimenProcessor.process251Specimen error thrown "+ e.getMessage() + e); + logger.error("HL7SpecimenProcessor.process251Specimen error thrown " + e.getMessage(), e); + throw new DataProcessingException("HL7SpecimenProcessor.process251Specimen error thrown " + e.getMessage() + e); } } private void processMaterialVO(LabResultProxyContainer labResultProxyContainer, PersonContainer collectorVO, MaterialContainer materialContainer, - EdxLabInformationDto edxLabInformationDto) throws DataProcessingException{ + EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { try { EntityIdDto matEntityIdDto = new EntityIdDto(); matEntityIdDto.setAssigningAuthorityIdType(edxLabInformationDto.getUniversalIdType()); - matEntityIdDto.setEntityUid((long)(edxLabInformationDto.getNextUid())); + matEntityIdDto.setEntityUid((long) (edxLabInformationDto.getNextUid())); matEntityIdDto.setAddTime(edxLabInformationDto.getAddTime()); matEntityIdDto.setRootExtensionTxt(edxLabInformationDto.getFillerNumber()); matEntityIdDto.setTypeCd(EdxELRConstant.ELR_SPECIMEN_CD); @@ -127,13 +127,12 @@ private void processMaterialVO(LabResultProxyContainer labResultProxyContainer, edxLabInformationDto.setRole(EdxELRConstant.ELR_PROVIDER_CD); - RoleDto roleDto = new RoleDto(); roleDto.setSubjectEntityUid(materialContainer.getTheMaterialDto().getMaterialUid()); roleDto.setCd(EdxELRConstant.ELR_NO_INFO_CD); roleDto.setCdDescTxt(EdxELRConstant.ELR_NO_INFO_DESC); roleDto.setSubjectClassCd(EdxELRConstant.ELR_MAT_CD); - roleDto.setRoleSeq((long)(1)); + roleDto.setRoleSeq((long) (1)); roleDto.setScopingEntityUid(edxLabInformationDto.getPatientUid()); roleDto.setScopingClassCd(EdxELRConstant.ELR_PATIENT); roleDto.setScopingRoleCd(EdxELRConstant.ELR_PATIENT); @@ -144,7 +143,7 @@ private void processMaterialVO(LabResultProxyContainer labResultProxyContainer, roleDto.setItDirty(false); labResultProxyContainer.getTheRoleDtoCollection().add(roleDto); - if(collectorVO!=null){ + if (collectorVO != null) { RoleDto role2DT = new RoleDto(); role2DT.setSubjectEntityUid(materialContainer.getTheMaterialDto().getMaterialUid()); role2DT.setItNew(true); @@ -152,7 +151,7 @@ private void processMaterialVO(LabResultProxyContainer labResultProxyContainer, role2DT.setCd(EdxELRConstant.ELR_NO_INFO_CD); role2DT.setCdDescTxt(EdxELRConstant.ELR_NO_INFO_DESC); role2DT.setSubjectClassCd(EdxELRConstant.ELR_MAT_CD); - role2DT.setRoleSeq((long)(2)); + role2DT.setRoleSeq((long) (2)); role2DT.setRecordStatusCd(EdxELRConstant.ELR_ACTIVE); role2DT.setStatusCd(EdxELRConstant.ELR_ACTIVE_CD); role2DT.setScopingEntityUid(collectorVO.getThePersonDto().getPersonUid()); @@ -176,12 +175,11 @@ private void processMaterialVO(LabResultProxyContainer labResultProxyContainer, labResultProxyContainer.getTheParticipationDtoCollection().add(participationDto); labResultProxyContainer.getTheMaterialContainerCollection().add(materialContainer); } catch (Exception e) { - logger.error("HL7SpecimenProcessor.processSpecimen error thrown "+ e.getMessage(), e); - throw new DataProcessingException("HL7SpecimenProcessor.processSpecimen error thrown "+ e); + logger.error("HL7SpecimenProcessor.processSpecimen error thrown " + e.getMessage(), e); + throw new DataProcessingException("HL7SpecimenProcessor.processSpecimen error thrown " + e); } } - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/LabResultUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/LabResultUtil.java index ab1f53ab1..7dde05ff9 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/LabResultUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/LabResultUtil.java @@ -30,13 +30,13 @@ public class LabResultUtil { * 3 - Organization Dto * 4 - Organization Name Dto * 5 - Entity Id Dto - * */ + */ public LabResultProxyContainer getLabResultMessage(HL7MSHType hl7MSHType, EdxLabInformationDto edxLabInformationDto) { - LabResultProxyContainer labResultProxy = new LabResultProxyContainer(); + LabResultProxyContainer labResultProxy = new LabResultProxyContainer(); HL7HDType sendingFacility = hl7MSHType.getSendingFacility(); EdxELRLabMapDto edxELRLabMapDto = processingHL7SendingFacility(sendingFacility, edxLabInformationDto); - creatingOrganization( labResultProxy, edxELRLabMapDto, edxLabInformationDto); + creatingOrganization(labResultProxy, edxELRLabMapDto, edxLabInformationDto); edxLabInformationDto.setMessageControlID(hl7MSHType.getMessageControlID()); return labResultProxy; @@ -51,7 +51,7 @@ public LabResultProxyContainer getLabResultMessage(HL7MSHType hl7MSHType, EdxLab * 3 - Organization Dto * 4 - Organization Name Dto * 5 - Entity Id Dto - * */ + */ public EdxELRLabMapDto processingHL7SendingFacility(HL7HDType sendingFacility, EdxLabInformationDto edxLabInformationDto) { //ROLE, Sending Facility EdxELRLabMapDto edxELRLabMapDto = new EdxELRLabMapDto(); @@ -63,12 +63,12 @@ public EdxELRLabMapDto processingHL7SendingFacility(HL7HDType sendingFacility, E edxELRLabMapDto.setEntityStandardIndustryClassCd(EdxELRConstant.ELR_STANDARD_INDUSTRY_DESC_TXT); edxELRLabMapDto.setEntityStandardIndustryDescTxt(EdxELRConstant.ELR_STANDARD_INDUSTRY_DESC_TXT); edxELRLabMapDto.setEntityDisplayNm(sendingFacility.getHL7NamespaceID()); - + edxLabInformationDto.setSendingFacilityName(sendingFacility.getHL7NamespaceID()); edxLabInformationDto.setSendingFacilityClia(sendingFacility.getHL7UniversalID()); - + edxELRLabMapDto.setEntityUid((long) edxLabInformationDto.getNextUid()); - + edxLabInformationDto.setUniversalIdType(sendingFacility.getHL7UniversalIDType()); // ENTITY ID @@ -98,7 +98,7 @@ public EdxELRLabMapDto processingHL7SendingFacility(HL7HDType sendingFacility, E * 3 - Organization Dto * 4 - Organization Name Dto * 5 - Entity Id Dto - * */ + */ public LabResultProxyContainer creatingOrganization(LabResultProxyContainer labResultProxy, EdxELRLabMapDto edxELRLabMap, EdxLabInformationDto edxLabInformation) { OrganizationContainer organizationContainer = new OrganizationContainer(); @@ -107,7 +107,7 @@ public LabResultProxyContainer creatingOrganization(LabResultProxyContainer labR organizationContainer.setRole(edxELRLabMap.getRoleCd()); RoleDto role = new RoleDto(); role.setSubjectEntityUid(edxELRLabMap.getEntityUid()); - role.setRoleSeq( 1L); + role.setRoleSeq(1L); role.setCd(edxELRLabMap.getRoleCd()); role.setAddTime(edxELRLabMap.getAddTime()); role.setLastChgTime(edxELRLabMap.getAddTime()); @@ -123,7 +123,7 @@ public LabResultProxyContainer creatingOrganization(LabResultProxyContainer labR //PARTICIPANT Collection participationDtoCollection = new ArrayList<>(); ParticipationDto participationDto = new ParticipationDto(); - participationDto.setActClassCd( edxELRLabMap.getParticipationActClassCd()); + participationDto.setActClassCd(edxELRLabMap.getParticipationActClassCd()); participationDto.setCd(edxELRLabMap.getParticipationCd()); participationDto.setSubjectClassCd(edxELRLabMap.getParticipationSubjectClassCd()); participationDto.setTypeCd(edxELRLabMap.getParticipationTypeCd()); @@ -170,17 +170,16 @@ public LabResultProxyContainer creatingOrganization(LabResultProxyContainer labR EntityIdDto entityIdDto = new EntityIdDto(); entityIdDto.setEntityIdSeq(1); - if(edxELRLabMap.getEntityIdRootExtensionTxt()!=null && edxELRLabMap.getEntityIdRootExtensionTxt().trim().length()>0){ + if (edxELRLabMap.getEntityIdRootExtensionTxt() != null && edxELRLabMap.getEntityIdRootExtensionTxt().trim().length() > 0) { entityIdDto.setRootExtensionTxt(edxELRLabMap.getEntityIdRootExtensionTxt()); edxLabInformation.setSendingFacilityClia(edxELRLabMap.getEntityIdRootExtensionTxt()); - } - else { + } else { entityIdDto.setRootExtensionTxt(EdxELRConstant.ELR_DEFAULT_CLIA); edxLabInformation.setSendingFacilityClia(EdxELRConstant.ELR_DEFAULT_CLIA); } entityIdDto.setAssigningAuthorityCd(edxELRLabMap.getEntityIdAssigningAuthorityCd()); - if(entityIdDto.getAssigningAuthorityCd().equalsIgnoreCase(EdxELRConstant.ELR_CLIA_CD)) { + if (entityIdDto.getAssigningAuthorityCd().equalsIgnoreCase(EdxELRConstant.ELR_CLIA_CD)) { entityIdDto.setAssigningAuthorityDescTxt(EdxELRConstant.ELR_CLIA_DESC); } entityIdDto.setTypeCd(edxELRLabMap.getEntityIdTypeCd()); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/edx/EdxEventProcessRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/edx/EdxEventProcessRepositoryUtil.java index adae3a874..aff228cc0 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/edx/EdxEventProcessRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/edx/EdxEventProcessRepositoryUtil.java @@ -28,7 +28,7 @@ public void insertEventProcess(EDXEventProcessDto edxEventProcessDto) throws Dat var uidObj = odseIdGeneratorService.getLocalIdAndUpdateSeed(LocalIdClass.NBS_DOCUMENT); var uid = uidObj.getSeedValueNbr(); - actRepositoryUtil.insertActivityId(uid, edxEventProcessDto.getDocEventTypeCd(), NEDSSConstant.EVENT_MOOD_CODE ); + actRepositoryUtil.insertActivityId(uid, edxEventProcessDto.getDocEventTypeCd(), NEDSSConstant.EVENT_MOOD_CODE); EdxEventProcess data = new EdxEventProcess(edxEventProcessDto); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/edx/EdxPhcrDocumentUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/edx/EdxPhcrDocumentUtil.java index 5782bcc18..23e57dd62 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/edx/EdxPhcrDocumentUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/edx/EdxPhcrDocumentUtil.java @@ -18,83 +18,24 @@ public class EdxPhcrDocumentUtil { private final ILookupService lookupService; - public EdxPhcrDocumentUtil(ILookupService lookupService) - { + public EdxPhcrDocumentUtil(ILookupService lookupService) { this.lookupService = lookupService; } - public Map loadQuestions(String conditionCode) - { - Map questionMap; - String invFormCd = ""; - if (SrteCache.investigationFormConditionCode.containsKey(conditionCode)) - { - invFormCd = SrteCache.investigationFormConditionCode.get(conditionCode); - } - if(invFormCd==null || invFormCd.startsWith("INV_FORM")) - { - invFormCd= DecisionSupportConstants.CORE_INV_FORM; - } - ArrayList questionList = new ArrayList<> (); - Map tempMap = new HashMap<>(); - Map generalMap = new HashMap<>(); - - //Check to see if it is single condition or multiple conditions - if(invFormCd != null) - { - if(invFormCd.equals(NBSConstantUtil.INV_FORM_RVCT)|| invFormCd.equals(NBSConstantUtil.INV_FORM_VAR)) - { - if(lookupService.getQuestionMap()!=null && lookupService.getQuestionMap().containsKey(invFormCd)) - { - tempMap = (Map )lookupService.getQuestionMap().get(invFormCd); - } - } - else - { - if(OdseCache.dmbMap.containsKey(invFormCd)) - { - tempMap.putAll((Map ) OdseCache.dmbMap.get(invFormCd)); - } - else if(!OdseCache.dmbMap.containsKey(invFormCd)) - { - Map questions = (Map )lookupService.getDMBQuestionMapAfterPublish().get(invFormCd); - if(questions != null) - { - tempMap.putAll(questions); - } - } - } - - if(tempMap != null){ - for (Object o : tempMap.keySet()) { - String key = (String) o; - NbsQuestionMetadata metaData = (NbsQuestionMetadata) tempMap.get(key); - generalMap.put(key, metaData); - } - } - } - - - return generalMap; - - } - - - public static String requiredFieldCheck(Map requiredQuestionIdentifierMap, Map nbsCaseAnswerMap) { // String requireFieldError = null; Iterator iter = (requiredQuestionIdentifierMap.keySet()).iterator(); Collection errorTextColl = new ArrayList<>(); try { - while(iter.hasNext()){ + while (iter.hasNext()) { String reqdKey = (String) iter.next(); - if (reqdKey!=null) { - if (nbsCaseAnswerMap==null || nbsCaseAnswerMap.get(reqdKey) == null) { + if (reqdKey != null) { + if (nbsCaseAnswerMap == null || nbsCaseAnswerMap.get(reqdKey) == null) { NbsQuestionMetadata metaData = (NbsQuestionMetadata) requiredQuestionIdentifierMap .get(reqdKey); - if(metaData.getQuestionGroupSeqNbr()==null){ - errorTextColl.add("["+metaData.getQuestionLabel()+ "]"); + if (metaData.getQuestionGroupSeqNbr() == null) { + errorTextColl.add("[" + metaData.getQuestionLabel() + "]"); } @@ -104,32 +45,75 @@ public static String requiredFieldCheck(Map requiredQuestionIden } catch (Exception e) { e.printStackTrace(); } - if(errorTextColl!=null && errorTextColl.size()>0){ + if (errorTextColl != null && errorTextColl.size() > 0) { Iterator iterator = errorTextColl.iterator(); StringBuilder errorTextString = new StringBuilder(); - while(iterator.hasNext()){ - String errorText = (String)iterator.next(); - if(errorTextColl.size()==1){ + while (iterator.hasNext()) { + String errorText = (String) iterator.next(); + if (errorTextColl.size() == 1) { errorTextString = new StringBuilder(errorText); - }else{ - if(iterator.hasNext()){ + } else { + if (iterator.hasNext()) { errorTextString.append(errorText).append("; "); - }else{ + } else { errorTextString.append(" and ").append(errorText).append(". "); } } } - if(errorTextColl.size()==1){ - requireFieldError = "The following required field is missing: "+ errorTextString; - }else if(errorTextColl.size()>1){ - requireFieldError = "The following required field(s) are missing: "+ errorTextString; - }else - requireFieldError =null; + if (errorTextColl.size() == 1) { + requireFieldError = "The following required field is missing: " + errorTextString; + } else if (errorTextColl.size() > 1) { + requireFieldError = "The following required field(s) are missing: " + errorTextString; + } else + requireFieldError = null; } return requireFieldError; } + public Map loadQuestions(String conditionCode) { + Map questionMap; + String invFormCd = ""; + if (SrteCache.investigationFormConditionCode.containsKey(conditionCode)) { + invFormCd = SrteCache.investigationFormConditionCode.get(conditionCode); + } + if (invFormCd == null || invFormCd.startsWith("INV_FORM")) { + invFormCd = DecisionSupportConstants.CORE_INV_FORM; + } + ArrayList questionList = new ArrayList<>(); + Map tempMap = new HashMap<>(); + Map generalMap = new HashMap<>(); + + //Check to see if it is single condition or multiple conditions + if (invFormCd != null) { + if (invFormCd.equals(NBSConstantUtil.INV_FORM_RVCT) || invFormCd.equals(NBSConstantUtil.INV_FORM_VAR)) { + if (lookupService.getQuestionMap() != null && lookupService.getQuestionMap().containsKey(invFormCd)) { + tempMap = (Map) lookupService.getQuestionMap().get(invFormCd); + } + } else { + if (OdseCache.dmbMap.containsKey(invFormCd)) { + tempMap.putAll((Map) OdseCache.dmbMap.get(invFormCd)); + } else if (!OdseCache.dmbMap.containsKey(invFormCd)) { + Map questions = (Map) lookupService.getDMBQuestionMapAfterPublish().get(invFormCd); + if (questions != null) { + tempMap.putAll(questions); + } + } + } + + if (tempMap != null) { + for (Object o : tempMap.keySet()) { + String key = (String) o; + NbsQuestionMetadata metaData = (NbsQuestionMetadata) tempMap.get(key); + generalMap.put(key, metaData); + } + } + } + + + return generalMap; + + } public NbsCaseAnswerDto setStandardNBSCaseAnswerVals( PublicHealthCaseContainer publicHealthCaseContainer, @@ -159,7 +143,4 @@ public NbsCaseAnswerDto setStandardNBSCaseAnswerVals( } - - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/entity/EntityHelper.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/entity/EntityHelper.java index a39163e7a..d1f0b9618 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/entity/EntityHelper.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/entity/EntityHelper.java @@ -18,7 +18,7 @@ @Component public class EntityHelper { private static final Logger logger = LoggerFactory.getLogger(EntityHelper.class); - private final PrepareAssocModelHelper prepareAssocModel; + private final PrepareAssocModelHelper prepareAssocModel; public EntityHelper(PrepareAssocModelHelper prepareAssocModel) { this.prepareAssocModel = prepareAssocModel; @@ -28,11 +28,10 @@ public EntityHelper(PrepareAssocModelHelper prepareAssocModel) { * This private method is used to populate the system attributes on the * EntityLocatoryParticipation Collection * - * @param dtCol - * Collection - * NBSSecurityObj object + * @param dtCol Collection + * NBSSecurityObj object * @return Collection EntityLocatoryParticipation collection object - * populated with system attributes + * populated with system attributes */ public Collection iterateELPDTForEntityLocatorParticipation(Collection dtCol) throws DataProcessingException { Collection retCol = new ArrayList<>(); @@ -42,10 +41,10 @@ public Collection iterateELPDTForEntityLocatorPar logger.debug("Collection size before iteration in iterateELPDT " + collection.size()); try { for (anIterator = collection.iterator(); anIterator.hasNext(); ) { - EntityLocatorParticipationDto elpDT = anIterator.next(); + EntityLocatorParticipationDto elpDT = anIterator.next(); EntityLocatorParticipationDto assocDTInterface = elpDT; logger.debug("Iterating EntityLocatorParticipationDT"); - elpDT = prepareAssocModel.prepareAssocDTForEntityLocatorParticipation(assocDTInterface); + elpDT = prepareAssocModel.prepareAssocDTForEntityLocatorParticipation(assocDTInterface); logger.debug("Came back from PrepareVOUtils"); retCol.add(elpDT); } @@ -63,29 +62,28 @@ public Collection iterateELPDTForEntityLocatorPar * This private method is used to populate the system attributes on the * RoleDT Collection * - * @param dtCol - * Collection - * NBSSecurityObj object + * @param dtCol Collection + * NBSSecurityObj object * @return Collection RoleDT collection object populated with system - * attributes + * attributes */ public Collection iterateRDT(Collection dtCol) throws DataProcessingException { Collection retCol = new ArrayList<>(); Collection collection; - Iterator anIterator ; + Iterator anIterator; collection = dtCol; logger.debug("Collection size before iteration in iterateRDT " + collection.size()); if (collection != null) { try { - for (anIterator = collection.iterator(); anIterator.hasNext();) { - RoleDto rDT = anIterator.next(); + for (anIterator = collection.iterator(); anIterator.hasNext(); ) { + RoleDto rDT = anIterator.next(); if (rDT.isItDirty() || rDT.isItNew() || rDT.isItDelete()) { logger.debug("EntityController:rdT.IsItDelete" + rDT.isItDelete() + "rdt.IsItNew:" + rDT.isItNew() + "rdt.IsItDirty:" + rDT.isItDirty()); RoleDto assocDTInterface = rDT; - rDT = prepareAssocModel.prepareAssocDTForRole(assocDTInterface); + rDT = prepareAssocModel.prepareAssocDTForRole(assocDTInterface); retCol.add(rDT); } } @@ -100,16 +98,14 @@ public Collection iterateRDT(Collection dtCol) throws DataProc } - /** * This private method is used to populate the system attributes on the * ParticipationDto Collection * - * @param dtCol - * Collection - * NBSSecurityObj object + * @param dtCol Collection + * NBSSecurityObj object * @return Collection ParticipationDto collection object populated - * with system attributes + * with system attributes */ public Collection iteratePDTForParticipation(Collection dtCol) throws DataProcessingException { @@ -118,7 +114,7 @@ public Collection iteratePDTForParticipation(Collection anIterator; collection = dtCol; if (!collection.isEmpty()) { - for (anIterator = collection.iterator(); anIterator.hasNext();) { + for (anIterator = collection.iterator(); anIterator.hasNext(); ) { ParticipationDto pDT = anIterator.next(); if (pDT.isItDirty() || pDT.isItNew() || pDT.isItDelete()) { ParticipationDto assocDTInterface = pDT; @@ -133,16 +129,14 @@ public Collection iteratePDTForParticipation(Collection iterateActivityParticipation(Collection dtCol) throws DataProcessingException { - Collection retCol = new ArrayList<> (); + Collection retCol = new ArrayList<>(); Collection collection; collection = dtCol; Iterator anIterator; - if (collection != null) - { - for (anIterator = collection.iterator(); anIterator.hasNext();) - { + if (collection != null) { + for (anIterator = collection.iterator(); anIterator.hasNext(); ) { ActivityLocatorParticipationDto alpDT = anIterator.next(); ActivityLocatorParticipationDto assocDTInterface = alpDT; @@ -156,18 +150,15 @@ public Collection iterateActivityParticipation( public Collection iterateActRelationship(Collection dtCol) throws DataProcessingException { - Collection retCol = new ArrayList<> (); + Collection retCol = new ArrayList<>(); Collection collection; Iterator anIterator; collection = dtCol; - if (collection != null) - { - for (anIterator = collection.iterator(); anIterator.hasNext();) - { + if (collection != null) { + for (anIterator = collection.iterator(); anIterator.hasNext(); ) { ActRelationshipDto arDT = anIterator.next(); ActRelationshipDto assocDTInterface = arDT; - if(arDT.isItDirty() || arDT.isItNew() || arDT.isItDelete()) - { + if (arDT.isItDirty() || arDT.isItNew() || arDT.isItDelete()) { arDT = prepareAssocModel.prepareActRelationshipDT(assocDTInterface); retCol.add(arDT); } @@ -179,29 +170,24 @@ public Collection iterateActRelationship(Collection iterateALPDTActivityLocatorParticipation(Collection dtCol) throws DataProcessingException { - Collection retCol = new ArrayList<> (); + Collection retCol = new ArrayList<>(); Collection collection; collection = dtCol; Iterator anIterator; - if (collection != null) - { + if (collection != null) { - try - { + try { - for (anIterator = collection.iterator(); anIterator.hasNext();) - { + for (anIterator = collection.iterator(); anIterator.hasNext(); ) { ActivityLocatorParticipationDto alpDT = anIterator.next(); alpDT = prepareAssocModel.prepareAssocDTForActivityLocatorParticipation(alpDT); retCol.add(alpDT); } - } - catch (Exception e) - { - throw new DataProcessingException(e.getMessage(),e); + } catch (Exception e) { + throw new DataProcessingException(e.getMessage(), e); } } @@ -211,27 +197,21 @@ public Collection iterateALPDTActivityLocatorPa public Collection iterateARDTActRelationship(Collection dtCol) throws DataProcessingException { - Collection retCol = new ArrayList<> (); + Collection retCol = new ArrayList<>(); Collection collection; Iterator anIterator; collection = dtCol; - if (collection != null) - { - try - { - for (anIterator = collection.iterator(); anIterator.hasNext();) - { + if (collection != null) { + try { + for (anIterator = collection.iterator(); anIterator.hasNext(); ) { ActRelationshipDto arDT = anIterator.next(); - if(arDT.isItDirty() || arDT.isItNew() || arDT.isItDelete()) - { + if (arDT.isItDirty() || arDT.isItNew() || arDT.isItDelete()) { arDT = prepareAssocModel.prepareAssocDTForActRelationship(arDT); retCol.add(arDT); } } - } - catch (Exception e) - { - throw new DataProcessingException(e.getMessage(),e); + } catch (Exception e) { + throw new DataProcessingException(e.getMessage(), e); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/entity/EntityRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/entity/EntityRepositoryUtil.java index bb5d6577c..1df16035d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/entity/EntityRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/entity/EntityRepositoryUtil.java @@ -26,19 +26,16 @@ public EntityODSE preparingEntityReposCallForPerson(PersonDto personDto, Long en } else { if (entityValue.getClass().toString().equals("class java.sql.Timestamp")) { //TODO: Will get back to this - } - else { + } else { } } if (event.equals(NEDSSConstant.SELECT)) { - } - else if (event.equals(NEDSSConstant.SELECT_COUNT)) { + } else if (event.equals(NEDSSConstant.SELECT_COUNT)) { - } - else { + } else { return entityODSE; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/ConcurrentCheck.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/ConcurrentCheck.java index 2a26f2bec..45c2134ab 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/ConcurrentCheck.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/ConcurrentCheck.java @@ -14,53 +14,41 @@ public class ConcurrentCheck { public ConcurrentCheck() { } - public boolean dataConcurrenceCheck(RootDtoInterface theRootDTInterface, String tableName, Integer existingVersion) throws DataProcessingException - { - try - { - if(tableName.equalsIgnoreCase("Person")) - { - // PersonDto personDT = patientRepositoryUtil.loadPerson(theRootDTInterface.getUid()).getThePersonDto(); - if(theRootDTInterface.getVersionCtrlNbr() == null) - { - ((PersonDto)theRootDTInterface).setVersionCtrlNbr(1); + public boolean dataConcurrenceCheck(RootDtoInterface theRootDTInterface, String tableName, Integer existingVersion) throws DataProcessingException { + + try { + if (tableName.equalsIgnoreCase("Person")) { + // PersonDto personDT = patientRepositoryUtil.loadPerson(theRootDTInterface.getUid()).getThePersonDto(); + if (theRootDTInterface.getVersionCtrlNbr() == null) { + ((PersonDto) theRootDTInterface).setVersionCtrlNbr(1); } - if(existingVersion == null || existingVersion.equals(theRootDTInterface.getVersionCtrlNbr())) - { + if (existingVersion == null || existingVersion.equals(theRootDTInterface.getVersionCtrlNbr())) { return true; - }else{ - PersonDto newPersonDT= (PersonDto)theRootDTInterface; + } else { + PersonDto newPersonDT = (PersonDto) theRootDTInterface; - if(existingVersion.equals(theRootDTInterface.getVersionCtrlNbr() - 1) && newPersonDT.isReentrant()) { + if (existingVersion.equals(theRootDTInterface.getVersionCtrlNbr() - 1) && newPersonDT.isReentrant()) { return true; } } } - if(tableName.equalsIgnoreCase(DataTables.ORGANIZATION_TABLE)) - { - // OrganizationDto organizationDT = organizationRepositoryUtil.loadObject(theRootDTInterface.getUid(), null).getTheOrganizationDto(); - if(theRootDTInterface.getVersionCtrlNbr() == null) - { - ((OrganizationDto)theRootDTInterface).setVersionCtrlNbr(1); + if (tableName.equalsIgnoreCase(DataTables.ORGANIZATION_TABLE)) { + // OrganizationDto organizationDT = organizationRepositoryUtil.loadObject(theRootDTInterface.getUid(), null).getTheOrganizationDto(); + if (theRootDTInterface.getVersionCtrlNbr() == null) { + ((OrganizationDto) theRootDTInterface).setVersionCtrlNbr(1); } - if(existingVersion.equals(theRootDTInterface.getVersionCtrlNbr())) - { + if (existingVersion.equals(theRootDTInterface.getVersionCtrlNbr())) { return true; } } - if(tableName.equalsIgnoreCase("Observation")) - { + if (tableName.equalsIgnoreCase("Observation")) { //ObservationDto observationDT = observationRepositoryUtil.loadObject(theRootDTInterface.getUid()).getTheObservationDto(); - if(theRootDTInterface.getVersionCtrlNbr() == null) - { - ((ObservationDto)theRootDTInterface).setVersionCtrlNbr(1); - } - if(existingVersion.equals(theRootDTInterface.getVersionCtrlNbr())) - { - return true; + if (theRootDTInterface.getVersionCtrlNbr() == null) { + ((ObservationDto) theRootDTInterface).setVersionCtrlNbr(1); } + return existingVersion.equals(theRootDTInterface.getVersionCtrlNbr()); } // if(tableName.equalsIgnoreCase("Notification")) // { @@ -148,9 +136,7 @@ public boolean dataConcurrenceCheck(RootDtoInterface theRootDTInterface, String // } return false; - } - catch(Exception e) - { + } catch (Exception e) { throw new DataProcessingException(e.getMessage(), e); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/ManagerUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/ManagerUtil.java index 52f3b4462..20e7e41d8 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/ManagerUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/ManagerUtil.java @@ -27,10 +27,10 @@ public ManagerUtil(IPersonService patientService) { /** * Description: Assign person Uid to the Observation, This happen on the matched observation flow - * */ + */ public void setPersonUIDOnUpdate(Long aPersonUid, LabResultProxyContainer labResultProxyVO) { Collection personCollection = labResultProxyVO.getThePersonContainerCollection(); - if(personCollection!=null){ + if (personCollection != null) { for (PersonContainer personVO : personCollection) { String perDomainCdStr = personVO.getThePersonDto().getCdDescTxt(); if (perDomainCdStr != null && perDomainCdStr.equalsIgnoreCase(EdxELRConstant.ELR_PATIENT_DESC)) { @@ -47,7 +47,7 @@ public void setPersonUIDOnUpdate(Long aPersonUid, LabResultProxyContainer labRes /** * Original name: getOrderedTest - * */ + */ public ObservationContainer getObservationWithOrderDomainCode(LabResultProxyContainer labResultProxyVO) { for (ObservationContainer obsVO : labResultProxyVO.getTheObservationContainerCollection()) { String obsDomainCdSt1 = obsVO.getTheObservationDto().getObsDomainCdSt1(); @@ -59,13 +59,12 @@ public ObservationContainer getObservationWithOrderDomainCode(LabResultProxyCont } - public PersonAggContainer patientAggregation(LabResultProxyContainer labResult, EdxLabInformationDto edxLabInformationDto) throws DataProcessingConsumerException, DataProcessingException { PersonAggContainer container = new PersonAggContainer(); PersonContainer personContainerObj = null; PersonContainer providerVOObj = null; - if (labResult.getThePersonContainerCollection() != null && !labResult.getThePersonContainerCollection().isEmpty() ) { + if (labResult.getThePersonContainerCollection() != null && !labResult.getThePersonContainerCollection().isEmpty()) { Iterator it = labResult.getThePersonContainerCollection().iterator(); boolean orderingProviderIndicator = false; @@ -74,12 +73,10 @@ public PersonAggContainer patientAggregation(LabResultProxyContainer labResult, if (personContainer.getRole() != null && personContainer.getRole().equalsIgnoreCase(EdxELRConstant.ELR_NEXT_OF_KIN)) { patientService.processingNextOfKin(labResult, personContainer); - } - else { + } else { if (personContainer.thePersonDto.getCd().equalsIgnoreCase(EdxELRConstant.ELR_PATIENT_CD)) { - personContainerObj = patientService.processingPatient(labResult, edxLabInformationDto, personContainer); - } - else if (personContainer.thePersonDto.getCd().equalsIgnoreCase(EdxELRConstant.ELR_PROVIDER_CD)) { + personContainerObj = patientService.processingPatient(labResult, edxLabInformationDto, personContainer); + } else if (personContainer.thePersonDto.getCd().equalsIgnoreCase(EdxELRConstant.ELR_PROVIDER_CD)) { var prv = patientService.processingProvider(labResult, edxLabInformationDto, personContainer, orderingProviderIndicator); if (prv != null) { providerVOObj = prv; @@ -98,7 +95,7 @@ else if (personContainer.thePersonDto.getCd().equalsIgnoreCase(EdxELRConstant.EL /** * This wont work in this @Transactional architecture * As we update the person and its assoc tables serveral time, so we must keep the @Transactional as synchronous flow - * */ + */ public PersonAggContainer personAggregationAsync(LabResultProxyContainer labResult, EdxLabInformationDto edxLabInformationDto) throws DataProcessingException { PersonAggContainer container = new PersonAggContainer(); CompletableFuture patientFuture = null; @@ -191,6 +188,4 @@ else if (personContainer.thePersonDto.getCd().equalsIgnoreCase(EdxELRConstant.EL } - - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PrepareAssocModelHelper.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PrepareAssocModelHelper.java index 9eff288ba..bce8fd3dd 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PrepareAssocModelHelper.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PrepareAssocModelHelper.java @@ -42,40 +42,34 @@ public PrepareAssocModelHelper(PrepareEntityStoredProcRepository prepareEntitySt */ public EntityLocatorParticipationDto prepareAssocDTForEntityLocatorParticipation(EntityLocatorParticipationDto assocDTInterface) throws DataProcessingException { try { - EntityLocatorParticipationDto aDTInterface ; + EntityLocatorParticipationDto aDTInterface; String recStatusCd = assocDTInterface.getRecordStatusCd(); String statusCd = assocDTInterface.getStatusCd(); - logger.debug("AssocDTInterface.Statuscode = "+statusCd); - logger.debug("AssocDTInterface.recStatusCd = "+recStatusCd); + logger.debug("AssocDTInterface.Statuscode = " + statusCd); + logger.debug("AssocDTInterface.recStatusCd = " + recStatusCd); boolean isRealDirty = assocDTInterface.isItDirty(); - if(recStatusCd == null) - { + if (recStatusCd == null) { logger.debug("RecordStatusCd is null"); - throw new DataProcessingException("RecordStatusCd -----2----"+recStatusCd+" statusCode--------"+statusCd); - } - - else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE))) - { + throw new DataProcessingException("RecordStatusCd -----2----" + recStatusCd + " statusCode--------" + statusCd); + } else if (!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE))) { logger.debug("RecordStatusCd is not active or inactive"); throw new DataProcessingException("RecordStatusCd is not active or inactive"); - } - else - { - logger.debug("RecordStatusCd or statusCode is not null"); - assocDTInterface.setAddUserId(null); - assocDTInterface.setAddTime(null); - java.util.Date dateTime = new java.util.Date(); - Timestamp systemTime = new Timestamp(dateTime.getTime()); - assocDTInterface.setRecordStatusTime(systemTime); - assocDTInterface.setStatusTime(systemTime); - assocDTInterface.setLastChgTime(systemTime); + } else { + logger.debug("RecordStatusCd or statusCode is not null"); + assocDTInterface.setAddUserId(null); + assocDTInterface.setAddTime(null); + java.util.Date dateTime = new java.util.Date(); + Timestamp systemTime = new Timestamp(dateTime.getTime()); + assocDTInterface.setRecordStatusTime(systemTime); + assocDTInterface.setStatusTime(systemTime); + assocDTInterface.setLastChgTime(systemTime); assocDTInterface.setLastChgReasonCd(null); aDTInterface = assocDTInterface; logger.debug("DT Prepared"); } - if(!isRealDirty) { + if (!isRealDirty) { aDTInterface.setItDirty(false); } return aDTInterface; @@ -84,28 +78,20 @@ else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd. } } - public ActRelationshipDto prepareAssocDTForActRelationship(ActRelationshipDto assocDTInterface) throws DataProcessingException - { + public ActRelationshipDto prepareAssocDTForActRelationship(ActRelationshipDto assocDTInterface) throws DataProcessingException { try { ActRelationshipDto aDTInterface; String recStatusCd = assocDTInterface.getRecordStatusCd(); String statusCd = assocDTInterface.getStatusCd(); boolean isRealDirty = assocDTInterface.isItDirty(); - if(recStatusCd == null) - { + if (recStatusCd == null) { logger.debug("RecordStatusCd is null"); - throw new DataProcessingException("RecordStatusCd -----2----"+recStatusCd+" statusCode--------"+statusCd); - } - - else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE))) - { + throw new DataProcessingException("RecordStatusCd -----2----" + recStatusCd + " statusCode--------" + statusCd); + } else if (!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE))) { logger.debug("RecordStatusCd is not active or inactive"); throw new DataProcessingException("RecordStatusCd is not active or inactive"); - } - else - { - try - { + } else { + try { logger.debug("RecordStatusCd or statusCode is not null"); assocDTInterface.setAddUserId(null); @@ -115,9 +101,7 @@ else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd. assocDTInterface.setRecordStatusTime(systemTime); assocDTInterface.setStatusTime(systemTime); assocDTInterface.setLastChgTime(systemTime); - } - catch(Exception e) - { + } catch (Exception e) { e.printStackTrace(); } @@ -127,7 +111,7 @@ else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd. aDTInterface = assocDTInterface; logger.debug("DT Prepared"); } - if(!isRealDirty) aDTInterface.setItDirty(false);//Re-set the flag to original value if necessary + if (!isRealDirty) aDTInterface.setItDirty(false);//Re-set the flag to original value if necessary return aDTInterface; } catch (Exception e) { throw new DataProcessingException(e.getMessage(), e); @@ -142,21 +126,14 @@ public RoleDto prepareAssocDTForRole(RoleDto assocDTInterface) throws DataProces String statusCd = assocDTInterface.getStatusCd(); boolean isRealDirty = assocDTInterface.isItDirty(); - if(recStatusCd == null) - { + if (recStatusCd == null) { logger.debug("RecordStatusCd is null"); - throw new DataProcessingException("RecordStatusCd -----2----"+recStatusCd+" statusCode--------"+statusCd); - } - - else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE))) - { + throw new DataProcessingException("RecordStatusCd -----2----" + recStatusCd + " statusCode--------" + statusCd); + } else if (!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE))) { logger.debug("RecordStatusCd is not active or inactive"); throw new DataProcessingException("RecordStatusCd is not active or inactive"); - } - else - { - try - { + } else { + try { logger.debug("RecordStatusCd or statusCode is not null"); assocDTInterface.setAddUserId(null); @@ -166,9 +143,7 @@ else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd. assocDTInterface.setRecordStatusTime(systemTime); assocDTInterface.setStatusTime(systemTime); assocDTInterface.setLastChgTime(systemTime); - } - catch(Exception e) - { + } catch (Exception e) { e.printStackTrace(); } // if(!nbsSecurityObj.getEntryID().equals("")) @@ -185,7 +160,7 @@ else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd. aDTInterface = assocDTInterface; logger.debug("DT Prepared"); } - if(!isRealDirty) { + if (!isRealDirty) { aDTInterface.setItDirty(false);//Re-set the flag to original value if necessary } return aDTInterface; @@ -201,21 +176,15 @@ public ParticipationDto prepareAssocDTForParticipation(ParticipationDto assocDTI String statusCd = assocDTInterface.getStatusCd(); boolean isRealDirty = assocDTInterface.isItDirty(); - if(recStatusCd == null) - { - throw new DataProcessingException("RecordStatusCd -----2----"+recStatusCd+" statusCode--------"+statusCd); - } - else if( + if (recStatusCd == null) { + throw new DataProcessingException("RecordStatusCd -----2----" + recStatusCd + " statusCode--------" + statusCd); + } else if ( !(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) - || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE)) - ) - { + || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE)) + ) { throw new DataProcessingException("RecordStatusCd is not active or inactive"); - } - else - { - try - { + } else { + try { logger.debug("RecordStatusCd or statusCode is not null"); assocDTInterface.setAddUserId(null); @@ -225,16 +194,14 @@ else if( assocDTInterface.setRecordStatusTime(systemTime); assocDTInterface.setStatusTime(systemTime); assocDTInterface.setLastChgTime(systemTime); - } - catch(Exception e) - { + } catch (Exception e) { e.printStackTrace(); } assocDTInterface.setLastChgUserId(AuthUtil.authUser.getNedssEntryId()); assocDTInterface.setLastChgReasonCd(null); aDTInterface = assocDTInterface; } - if(!isRealDirty) { + if (!isRealDirty) { aDTInterface.setItDirty(false);//Re-set the flag to original value if necessary } return aDTInterface; @@ -249,24 +216,18 @@ else if( * tables (ActRelationship, Participation, Role, EntityLocatoryParticipation, and * ActLocatorParticipation). */ - public ActivityLocatorParticipationDto prepareActivityLocatorParticipationDT(ActivityLocatorParticipationDto assocDTInterface) throws DataProcessingException - { + public ActivityLocatorParticipationDto prepareActivityLocatorParticipationDT(ActivityLocatorParticipationDto assocDTInterface) throws DataProcessingException { try { ActivityLocatorParticipationDto aDTInterface; String recStatusCd = assocDTInterface.getRecordStatusCd(); String statusCd = assocDTInterface.getStatusCd(); boolean isRealDirty = assocDTInterface.isItDirty(); - if(recStatusCd == null) - { - throw new DataProcessingException("RecordStatusCd -----2----"+recStatusCd+" statusCode--------"+statusCd); - } - else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE))) - { + if (recStatusCd == null) { + throw new DataProcessingException("RecordStatusCd -----2----" + recStatusCd + " statusCode--------" + statusCd); + } else if (!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE))) { throw new DataProcessingException("RecordStatusCd is not active or inactive"); - } - else - { + } else { assocDTInterface.setAddUserId(null); assocDTInterface.setAddTime(null); java.util.Date dateTime = new java.util.Date(); @@ -278,7 +239,7 @@ else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd. assocDTInterface.setLastChgReasonCd(null); aDTInterface = assocDTInterface; } - if(!isRealDirty) { + if (!isRealDirty) { aDTInterface.setItDirty(false); } return aDTInterface; @@ -294,18 +255,11 @@ public ActRelationshipDto prepareActRelationshipDT(ActRelationshipDto assocDTInt String statusCd = assocDTInterface.getStatusCd(); boolean isRealDirty = assocDTInterface.isItDirty(); - if(recStatusCd == null) - { - throw new DataProcessingException("RecordStatusCd -----2----"+recStatusCd+" statusCode--------"+statusCd); - } - - else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE))) - { + if (recStatusCd == null) { + throw new DataProcessingException("RecordStatusCd -----2----" + recStatusCd + " statusCode--------" + statusCd); + } else if (!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE))) { throw new DataProcessingException("RecordStatusCd is not active or inactive"); - } - - else - { + } else { assocDTInterface.setAddUserId(null); assocDTInterface.setAddTime(null); java.util.Date dateTime = new java.util.Date(); @@ -317,7 +271,7 @@ else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd. assocDTInterface.setLastChgReasonCd(null); aDTInterface = assocDTInterface; } - if(!isRealDirty) { + if (!isRealDirty) { aDTInterface.setItDirty(false);//Re-set the flag to original value if necessary } return aDTInterface; @@ -331,49 +285,37 @@ else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd. * you want to edit,delete or create records */ public RootDtoInterface prepareVO(RootDtoInterface theRootDTInterface, String businessObjLookupName, - String businessTriggerCd, String tableName, String moduleCd, - Integer existingVersion) throws DataProcessingException - { - if(!theRootDTInterface.isItNew() && !theRootDTInterface.isItDirty() && !theRootDTInterface.isItDelete()) { - throw new DataProcessingException("Error while calling prepareVO method in PrepareVOUtils"); + String businessTriggerCd, String tableName, String moduleCd, + Integer existingVersion) throws DataProcessingException { + if (!theRootDTInterface.isItNew() && !theRootDTInterface.isItDirty() && !theRootDTInterface.isItDelete()) { + throw new DataProcessingException("Error while calling prepareVO method in PrepareVOUtils"); + } + if (theRootDTInterface.isItDirty() && !theRootDTInterface.isItNew()) { + // CONCURRENCE CHECK + boolean result = concurrentCheck.dataConcurrenceCheck(theRootDTInterface, tableName, existingVersion); + if (result) { + logger.debug("result in prepareVOUtil is :" + result); + //no concurrent dataAccess has occured, hence can continue! + } else { + throw new DataProcessingException("NEDSSConcurrentDataException occurred in PrepareVOUtils.Person"); } - if(theRootDTInterface.isItDirty() && !theRootDTInterface.isItNew()) - { - // CONCURRENCE CHECK - boolean result = concurrentCheck.dataConcurrenceCheck(theRootDTInterface, tableName, existingVersion); - if(result) - { - logger.debug("result in prepareVOUtil is :" + result); - //no concurrent dataAccess has occured, hence can continue! - } - else - { - throw new DataProcessingException("NEDSSConcurrentDataException occurred in PrepareVOUtils.Person"); - } - } + } - if(theRootDTInterface.isItNew() && (theRootDTInterface.getSuperclass().equalsIgnoreCase(NEDSSConstant.CLASSTYPE_ACT))) - { - logger.debug("new act"); - theRootDTInterface = prepareNewActVO(theRootDTInterface, businessObjLookupName, businessTriggerCd, tableName, moduleCd); - } - else if(theRootDTInterface.isItNew() && (theRootDTInterface.getSuperclass().equalsIgnoreCase(NEDSSConstant.CLASSTYPE_ENTITY))) - { - logger.debug("new entity"); - theRootDTInterface = prepareNewEntityVO(theRootDTInterface, businessObjLookupName, businessTriggerCd, tableName, moduleCd); - } - else if(theRootDTInterface.isItDirty() && (theRootDTInterface.getSuperclass().equalsIgnoreCase(NEDSSConstant.CLASSTYPE_ACT))) - { - logger.debug("dirty act"); - theRootDTInterface = prepareDirtyActVO(theRootDTInterface, businessObjLookupName, businessTriggerCd, tableName, moduleCd); - } - else if(theRootDTInterface.isItDirty() && (theRootDTInterface.getSuperclass().equalsIgnoreCase(NEDSSConstant.CLASSTYPE_ENTITY))) - { - logger.debug("dirty entity"); - theRootDTInterface = prepareDirtyEntityVO(theRootDTInterface, businessObjLookupName, businessTriggerCd, tableName, moduleCd); - } - return theRootDTInterface; + if (theRootDTInterface.isItNew() && (theRootDTInterface.getSuperclass().equalsIgnoreCase(NEDSSConstant.CLASSTYPE_ACT))) { + logger.debug("new act"); + theRootDTInterface = prepareNewActVO(theRootDTInterface, businessObjLookupName, businessTriggerCd, tableName, moduleCd); + } else if (theRootDTInterface.isItNew() && (theRootDTInterface.getSuperclass().equalsIgnoreCase(NEDSSConstant.CLASSTYPE_ENTITY))) { + logger.debug("new entity"); + theRootDTInterface = prepareNewEntityVO(theRootDTInterface, businessObjLookupName, businessTriggerCd, tableName, moduleCd); + } else if (theRootDTInterface.isItDirty() && (theRootDTInterface.getSuperclass().equalsIgnoreCase(NEDSSConstant.CLASSTYPE_ACT))) { + logger.debug("dirty act"); + theRootDTInterface = prepareDirtyActVO(theRootDTInterface, businessObjLookupName, businessTriggerCd, tableName, moduleCd); + } else if (theRootDTInterface.isItDirty() && (theRootDTInterface.getSuperclass().equalsIgnoreCase(NEDSSConstant.CLASSTYPE_ENTITY))) { + logger.debug("dirty entity"); + theRootDTInterface = prepareDirtyEntityVO(theRootDTInterface, businessObjLookupName, businessTriggerCd, tableName, moduleCd); + } + return theRootDTInterface; } /** @@ -381,26 +323,22 @@ else if(theRootDTInterface.isItDirty() && (theRootDTInterface.getSuperclass().eq * and check null for record Status State and set the System attributes in the rootDTInterface */ protected RootDtoInterface prepareNewActVO(RootDtoInterface theRootDTInterface, String businessObjLookupName, String businessTriggerCd, String tableName, String moduleCd) - throws DataProcessingException - { - try - { + throws DataProcessingException { + try { Long uid = theRootDTInterface.getUid(); logger.debug("prepareNewActVO uid = " + uid); PrepareEntity prepareVOUtilsHelper = prepareEntityStoredProcRepository.getPrepareEntity(businessTriggerCd, moduleCd, uid, tableName); String localId = prepareVOUtilsHelper.getLocalId();//7 - Long addUserId =prepareVOUtilsHelper.getAddUserId();//8 + Long addUserId = prepareVOUtilsHelper.getAddUserId();//8 Timestamp addUserTime = prepareVOUtilsHelper.getAddUserTime();//9 String recordStatusState = prepareVOUtilsHelper.getRecordStatusState();//12 String objectStatusState = prepareVOUtilsHelper.getObjectStatusState();//13 - if(recordStatusState==null) - { + if (recordStatusState == null) { throw new DataProcessingException("prepareNewActVO - recordStatusState = " + recordStatusState + "- objectStatusState = " + objectStatusState); } - if(!(theRootDTInterface.getProgAreaCd()==null) && !(theRootDTInterface.getJurisdictionCd()==null)) - { + if (!(theRootDTInterface.getProgAreaCd() == null) && !(theRootDTInterface.getJurisdictionCd() == null)) { String progAreaCd = theRootDTInterface.getProgAreaCd(); String jurisdictionCd = theRootDTInterface.getJurisdictionCd(); long pajHash = progAreaJurisdictionUtil.getPAJHash(progAreaCd, jurisdictionCd); @@ -425,37 +363,31 @@ protected RootDtoInterface prepareNewActVO(RootDtoInterface theRootDTInterface, theRootDTInterface.setLastChgReasonCd(null); return theRootDTInterface; - } - catch(Exception e) - { + } catch (Exception e) { throw new DataProcessingException(e.getMessage(), e); } } - /** * This method prepares the Entity value object if it is New(Create) */ protected RootDtoInterface prepareNewEntityVO(RootDtoInterface theRootDTInterface, String businessObjLookupName, - String businessTriggerCd, String tableName, String moduleCd) - throws DataProcessingException - { - try - { + String businessTriggerCd, String tableName, String moduleCd) + throws DataProcessingException { + try { logger.debug("prepareNewEntityVO uid = " + theRootDTInterface.getUid()); Long uid = theRootDTInterface.getUid(); logger.debug("prepareDirtyEntityVO uid = " + uid); PrepareEntity prepareVOUtilsHelper = prepareEntityStoredProcRepository.getPrepareEntity(businessTriggerCd, moduleCd, uid, tableName); String localId = prepareVOUtilsHelper.getLocalId();//7 - Long addUserId =prepareVOUtilsHelper.getAddUserId();//8 + Long addUserId = prepareVOUtilsHelper.getAddUserId();//8 Timestamp addUserTime = prepareVOUtilsHelper.getAddUserTime();//9 String recordStatusState = prepareVOUtilsHelper.getRecordStatusState();//12 String objectStatusState = prepareVOUtilsHelper.getObjectStatusState();//13 //We decided to set the status_cd and status_time also for entities 08/01/2005 - if(recordStatusState==null ||objectStatusState==null) - { + if (recordStatusState == null || objectStatusState == null) { throw new DataProcessingException("NEDSSConcurrentDataException: The data has been modified by other user, please verify!"); } @@ -474,29 +406,23 @@ protected RootDtoInterface prepareNewEntityVO(RootDtoInterface theRootDTInterfac theRootDTInterface.setLastChgUserId(AuthUtil.authUser.getNedssEntryId()); theRootDTInterface.setLastChgReasonCd(null); - if(tableName.equals(NEDSSConstant.PATIENT) && (!businessTriggerCd.equals("PAT_NO_MERGE"))) - { - if(theRootDTInterface instanceof PersonDto) - { - ((PersonDto)theRootDTInterface).setDedupMatchInd(null); - ((PersonDto)theRootDTInterface).setGroupNbr(null); - ((PersonDto)theRootDTInterface).setGroupTime(null); + if (tableName.equals(NEDSSConstant.PATIENT) && (!businessTriggerCd.equals("PAT_NO_MERGE"))) { + if (theRootDTInterface instanceof PersonDto) { + ((PersonDto) theRootDTInterface).setDedupMatchInd(null); + ((PersonDto) theRootDTInterface).setGroupNbr(null); + ((PersonDto) theRootDTInterface).setGroupTime(null); } } - if(tableName.equals(NEDSSConstant.PATIENT) && businessTriggerCd.equals("PAT_NO_MERGE")) - { - if(theRootDTInterface instanceof PersonDto) - { - ((PersonDto)theRootDTInterface).setGroupNbr(null); - ((PersonDto)theRootDTInterface).setGroupTime(null); + if (tableName.equals(NEDSSConstant.PATIENT) && businessTriggerCd.equals("PAT_NO_MERGE")) { + if (theRootDTInterface instanceof PersonDto) { + ((PersonDto) theRootDTInterface).setGroupNbr(null); + ((PersonDto) theRootDTInterface).setGroupTime(null); } } return theRootDTInterface; - } - catch(Exception e) - { + } catch (Exception e) { e.printStackTrace(); throw new DataProcessingException(e.getMessage(), e); } @@ -507,32 +433,26 @@ protected RootDtoInterface prepareNewEntityVO(RootDtoInterface theRootDTInterfac * and check null for record Status State and set the System attribures in the rootDTInterface */ protected RootDtoInterface prepareDirtyActVO(RootDtoInterface theRootDTInterface, - String businessObjLookupName, String businessTriggerCd, String tableName, - String moduleCd) - throws DataProcessingException - - - { - try - { + String businessObjLookupName, String businessTriggerCd, String tableName, + String moduleCd) + throws DataProcessingException { + try { Long uid = theRootDTInterface.getUid(); PrepareEntity prepareVOUtilsHelper = prepareEntityStoredProcRepository.getPrepareEntity(businessTriggerCd, moduleCd, uid, tableName); String localId = prepareVOUtilsHelper.getLocalId();//7 - Long addUserId =prepareVOUtilsHelper.getAddUserId();//8 + Long addUserId = prepareVOUtilsHelper.getAddUserId();//8 Timestamp addUserTime = prepareVOUtilsHelper.getAddUserTime();//9 String recordStatusState = prepareVOUtilsHelper.getRecordStatusState();//12 String objectStatusState = prepareVOUtilsHelper.getObjectStatusState();//13 - if(recordStatusState==null) - { + if (recordStatusState == null) { throw new DataProcessingException("NEDSSConcurrentDataException: The data has been modified by other user, please verify!"); } - if(!(theRootDTInterface.getProgAreaCd()==null) && !(theRootDTInterface.getJurisdictionCd()==null)) - { + if (!(theRootDTInterface.getProgAreaCd() == null) && !(theRootDTInterface.getJurisdictionCd() == null)) { String progAreaCd = theRootDTInterface.getProgAreaCd(); String jurisdictionCd = theRootDTInterface.getJurisdictionCd(); @@ -554,9 +474,7 @@ protected RootDtoInterface prepareDirtyActVO(RootDtoInterface theRootDTInterface theRootDTInterface.setLastChgUserId(AuthUtil.authUser.getNedssEntryId()); theRootDTInterface.setLastChgReasonCd(null); return theRootDTInterface; - } - catch(Exception e) - { + } catch (Exception e) { e.printStackTrace(); throw new DataProcessingException(e.getMessage(), e); } @@ -568,23 +486,20 @@ protected RootDtoInterface prepareDirtyActVO(RootDtoInterface theRootDTInterface * and check null for record Status State and set the System attribures in the rootDTInterface */ protected RootDtoInterface prepareDirtyEntityVO(RootDtoInterface theRootDTInterface, - String businessObjLookupName, String businessTriggerCd, - String tableName, String moduleCd) - throws DataProcessingException - { - try - { + String businessObjLookupName, String businessTriggerCd, + String tableName, String moduleCd) + throws DataProcessingException { + try { Long uid = theRootDTInterface.getUid(); PrepareEntity prepareVOUtilsHelper = prepareEntityStoredProcRepository.getPrepareEntity(businessTriggerCd, moduleCd, uid, tableName); String localId = prepareVOUtilsHelper.getLocalId();//7 - Long addUserId =prepareVOUtilsHelper.getAddUserId();//8 + Long addUserId = prepareVOUtilsHelper.getAddUserId();//8 Timestamp addUserTime = prepareVOUtilsHelper.getAddUserTime();//9 String recordStatusState = prepareVOUtilsHelper.getRecordStatusState();//12 String objectStatusState = prepareVOUtilsHelper.getObjectStatusState();//13 - if(recordStatusState==null ||objectStatusState==null) - { + if (recordStatusState == null || objectStatusState == null) { throw new DataProcessingException("NEDSSConcurrentDataException: The data has been modified by other user, please verify!"); } @@ -601,29 +516,23 @@ protected RootDtoInterface prepareDirtyEntityVO(RootDtoInterface theRootDTInterf theRootDTInterface.setLastChgUserId(AuthUtil.authUser.getNedssEntryId()); theRootDTInterface.setLastChgReasonCd(null); - if(tableName.equals(NEDSSConstant.PATIENT) && (!businessTriggerCd.equals("PAT_NO_MERGE"))) - { - if(theRootDTInterface instanceof PersonDto) - { - ((PersonDto)theRootDTInterface).setDedupMatchInd(null); - ((PersonDto)theRootDTInterface).setGroupNbr(null); - ((PersonDto)theRootDTInterface).setGroupTime(null); + if (tableName.equals(NEDSSConstant.PATIENT) && (!businessTriggerCd.equals("PAT_NO_MERGE"))) { + if (theRootDTInterface instanceof PersonDto) { + ((PersonDto) theRootDTInterface).setDedupMatchInd(null); + ((PersonDto) theRootDTInterface).setGroupNbr(null); + ((PersonDto) theRootDTInterface).setGroupTime(null); } } - if(tableName.equals(NEDSSConstant.PATIENT) && businessTriggerCd.equals("PAT_NO_MERGE")) - { - if(theRootDTInterface instanceof PersonDto) - { - ((PersonDto)theRootDTInterface).setGroupNbr(null); - ((PersonDto)theRootDTInterface).setGroupTime(null); + if (tableName.equals(NEDSSConstant.PATIENT) && businessTriggerCd.equals("PAT_NO_MERGE")) { + if (theRootDTInterface instanceof PersonDto) { + ((PersonDto) theRootDTInterface).setGroupNbr(null); + ((PersonDto) theRootDTInterface).setGroupTime(null); } } return theRootDTInterface; - } - catch(Exception e) - { + } catch (Exception e) { throw new DataProcessingException(e.getMessage(), e); } } @@ -636,22 +545,14 @@ public ActivityLocatorParticipationDto prepareAssocDTForActivityLocatorParticipa String statusCd = assocDTInterface.getStatusCd(); boolean isRealDirty = assocDTInterface.isItDirty(); - if(recStatusCd == null) - { + if (recStatusCd == null) { logger.debug("RecordStatusCd is null"); - throw new DataProcessingException("RecordStatusCd -----2----"+recStatusCd+" statusCode--------"+statusCd); - } - - else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE))) - { + throw new DataProcessingException("RecordStatusCd -----2----" + recStatusCd + " statusCode--------" + statusCd); + } else if (!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd.equals(NEDSSConstant.RECORD_STATUS_INACTIVE))) { logger.debug("RecordStatusCd is not active or inactive"); throw new DataProcessingException("RecordStatusCd is not active or inactive"); - } - - else - { - try - { + } else { + try { logger.debug("RecordStatusCd or statusCode is not null"); assocDTInterface.setAddUserId(null); @@ -661,9 +562,7 @@ else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd. assocDTInterface.setRecordStatusTime(systemTime); assocDTInterface.setStatusTime(systemTime); assocDTInterface.setLastChgTime(systemTime); - } - catch(Exception e) - { + } catch (Exception e) { e.printStackTrace(); } assocDTInterface.setLastChgUserId(AuthUtil.authUser.getNedssEntryId()); @@ -671,7 +570,7 @@ else if(!(recStatusCd.equals(NEDSSConstant.RECORD_STATUS_ACTIVE) || recStatusCd. aDTInterface = assocDTInterface; logger.debug("DT Prepared"); } - if(!isRealDirty) aDTInterface.setItDirty(false);//Re-set the flag to original value if necessary + if (!isRealDirty) aDTInterface.setItDirty(false);//Re-set the flag to original value if necessary return aDTInterface; } catch (Exception e) { throw new DataProcessingException(e.getMessage(), e); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PropertyUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PropertyUtil.java index 6b4d61659..b406d403f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PropertyUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PropertyUtil.java @@ -13,21 +13,21 @@ public class PropertyUtil { private String hivProgArea = ""; public boolean isHIVProgramArea(String pa) { - if(!hivProgArea.isEmpty() && PropertyUtilCache.cachedHivList.isEmpty()){ + if (!hivProgArea.isEmpty() && PropertyUtilCache.cachedHivList.isEmpty()) { cachedHivProgramArea(); } - if(pa==null){ + if (pa == null) { return false; - } - else return !PropertyUtilCache.cachedHivList.isEmpty() && PropertyUtilCache.cachedHivList.contains(pa.toUpperCase()); + } else + return !PropertyUtilCache.cachedHivList.isEmpty() && PropertyUtilCache.cachedHivList.contains(pa.toUpperCase()); } - private void cachedHivProgramArea(){ + private void cachedHivProgramArea() { try { - String delim=","; - String line= hivProgArea; + String delim = ","; + String line = hivProgArea; StringTokenizer tokens = new StringTokenizer(line, delim, true); while (tokens.hasMoreTokens()) { String token = tokens.nextToken(); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/jurisdiction/ProgAreaJurisdictionUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/jurisdiction/ProgAreaJurisdictionUtil.java index a92bfee75..1416d78fb 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/jurisdiction/ProgAreaJurisdictionUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/jurisdiction/ProgAreaJurisdictionUtil.java @@ -9,19 +9,15 @@ @Component public class ProgAreaJurisdictionUtil { - public long getPAJHash(String programAreaCode, String jurisdictionCode) - { + public long getPAJHash(String programAreaCode, String jurisdictionCode) { long hashCode = 0; - if(!((programAreaCode==null || programAreaCode.isEmpty()) || (jurisdictionCode==null || jurisdictionCode.isEmpty()))){ - try - { + if (!((programAreaCode == null || programAreaCode.isEmpty()) || (jurisdictionCode == null || jurisdictionCode.isEmpty()))) { + try { Integer programAreaNumericID = SrteCache.programAreaCodesMapWithNbsUid.get(programAreaCode); Integer jurisdictionNumericID = SrteCache.jurisdictionCodeMapWithNbsUid.get(jurisdictionCode); hashCode = (jurisdictionNumericID.longValue() * 100000L) + programAreaNumericID.longValue(); - } - catch(Exception e) - { + } catch (Exception e) { e.printStackTrace(); } } @@ -34,19 +30,15 @@ public long getPAJHash(String programAreaCode, String jurisdictionCode) * code, but when the jurisdiction code is ALL, a hash code for each jurisdiction * in the jurisdictionMap is created. */ - public Collection getPAJHashList(String programAreaCode, String jurisdictionCode) - { - ArrayList arrayList = new ArrayList<>(); - if(jurisdictionCode.equals("ALL")) - { + public Collection getPAJHashList(String programAreaCode, String jurisdictionCode) { + ArrayList arrayList = new ArrayList<>(); + if (jurisdictionCode.equals("ALL")) { //get key set Set jurisdictionKeys = SrteCache.jurisdictionCodeMapWithNbsUid.keySet(); for (String jCode : jurisdictionKeys) { arrayList.add(getPAJHash(programAreaCode, jCode)); } - } - else - { + } else { arrayList.add(getPAJHash(programAreaCode, jurisdictionCode)); } return arrayList; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsDocumentRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsDocumentRepositoryUtil.java index dbdea694e..c88f88730 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsDocumentRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsDocumentRepositoryUtil.java @@ -17,6 +17,7 @@ import gov.cdc.dataprocessing.utilities.component.participation.ParticipationRepositoryUtil; import gov.cdc.dataprocessing.utilities.component.patient.PatientRepositoryUtil; import org.springframework.stereotype.Component; + @Component public class NbsDocumentRepositoryUtil { private final CustomRepository customRepository; @@ -41,11 +42,11 @@ public NbsDocumentRepositoryUtil(CustomRepository customRepository, this.nbsDocumentHistRepository = nbsDocumentHistRepository; } - public NbsDocumentContainer getNBSDocumentWithoutActRelationship(Long nbsDocUid) throws DataProcessingException { + public NbsDocumentContainer getNBSDocumentWithoutActRelationship(Long nbsDocUid) throws DataProcessingException { try { NbsDocumentContainer nbsDocumentVO; - PersonContainer personVO ; - ParticipationDto participationDt ; + PersonContainer personVO; + ParticipationDto participationDt; nbsDocumentVO = customRepository.getNbsDocument(nbsDocUid); Long personUid = nbsDocumentVO.getPatientVO().getThePersonDto().getPersonUid(); @@ -72,22 +73,20 @@ public Long updateDocumentWithOutthePatient(NbsDocumentContainer nbsDocVO) throw nbsDocumentDT.setSuperclass("ACT"); RootDtoInterface rootDTInterface = nbsDocVO.getNbsDocumentDT(); String businessObjLookupName = NBSBOLookup.DOCUMENT; - String businessTriggerCd ; + String businessTriggerCd; businessTriggerCd = "DOC_PROCESS"; if (nbsDocumentDT.getRecordStatusCd() != null && nbsDocumentDT.getRecordStatusCd().equals( - NEDSSConstant.RECORD_STATUS_LOGICAL_DELETE)) - { + NEDSSConstant.RECORD_STATUS_LOGICAL_DELETE)) { businessTriggerCd = "DOC_DEL"; } - if (nbsDocVO.isFromSecurityQueue()) - { + if (nbsDocVO.isFromSecurityQueue()) { businessTriggerCd = "DOC_IN_PROCESS"; } String tableName = "NBS_DOCUMENT"; String moduleCd = "BASE"; - nbsDocumentDT = (NBSDocumentDto) prepareAssocModelHelper.prepareVO( + nbsDocumentDT = (NBSDocumentDto) prepareAssocModelHelper.prepareVO( rootDTInterface, businessObjLookupName, businessTriggerCd, tableName, moduleCd, rootDTInterface.getVersionCtrlNbr()); @@ -109,6 +108,7 @@ public void insertNBSDocumentHist(NBSDocumentDto nbsDocumentDto) { var nbs = new NbsDocumentHist(nbsDocumentDto); nbsDocumentHistRepository.save(nbs); } + public Long updateNbsDocument(NBSDocumentDto nbsDocumentDto) { var nbs = new NbsDocument(nbsDocumentDto); nbsDocumentRepository.save(nbs); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsNoteRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsNoteRepositoryUtil.java index a09e1a0a8..e88465a44 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsNoteRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsNoteRepositoryUtil.java @@ -17,7 +17,7 @@ public NbsNoteRepositoryUtil(NbsNoteRepository nbsNoteRepository) { } public void storeNotes(Long phcUid, Collection coll) { - for(var item: coll) { + for (var item : coll) { NbsNote data = new NbsNote(item); data.setNoteParentUid(phcUid); nbsNoteRepository.save(data); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/notification/NotificationRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/notification/NotificationRepositoryUtil.java index dfbf79455..780613fc6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/notification/NotificationRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/notification/NotificationRepositoryUtil.java @@ -32,7 +32,7 @@ public class NotificationRepositoryUtil { private final ActRelationshipRepositoryUtil actRelationshipRepositoryUtil; private final ParticipationRepositoryUtil participationRepositoryUtil; private final EntityHelper entityHelper; - private final ActRepositoryUtil actRepositoryUtil; + private final ActRepositoryUtil actRepositoryUtil; private final OdseIdGeneratorService odseIdGeneratorService; public NotificationRepositoryUtil(NotificationRepository notificationRepository, @@ -69,17 +69,17 @@ public NotificationContainer getNotificationContainer(Long uid) { notificationContainer.setTheActIdDTCollection(actIdCollection); } - var actPatCollection = actLocatorParticipationRepositoryUtil.getActLocatorParticipationCollection(uid); + var actPatCollection = actLocatorParticipationRepositoryUtil.getActLocatorParticipationCollection(uid); if (!actPatCollection.isEmpty()) { notificationContainer.setTheActivityLocatorParticipationDTCollection(actPatCollection); } - var actReCollection = actRelationshipRepositoryUtil.getActRelationshipCollectionFromSourceId(uid); + var actReCollection = actRelationshipRepositoryUtil.getActRelationshipCollectionFromSourceId(uid); if (!actReCollection.isEmpty()) { notificationContainer.setTheActRelationshipDTCollection(actReCollection); } - var patCollection = participationRepositoryUtil.getParticipationCollection(uid); + var patCollection = participationRepositoryUtil.getParticipationCollection(uid); if (!patCollection.isEmpty()) { notificationContainer.setTheParticipationDTCollection(patCollection); } @@ -92,48 +92,38 @@ public NotificationContainer getNotificationContainer(Long uid) { @Transactional - public Long setNotification(NotificationContainer notificationContainer) throws DataProcessingException - { + public Long setNotification(NotificationContainer notificationContainer) throws DataProcessingException { Long notificationUid; - try - { + try { Collection alpDTCol = notificationContainer.getTheActivityLocatorParticipationDTCollection(); Collection arDTCol = notificationContainer.getTheActRelationshipDTCollection(); Collection pDTCol = notificationContainer.getTheParticipationDTCollection(); - if (alpDTCol != null) - { + if (alpDTCol != null) { var col1 = entityHelper.iterateALPDTActivityLocatorParticipation(alpDTCol); notificationContainer.setTheActivityLocatorParticipationDTCollection(col1); } - if (arDTCol != null) - { + if (arDTCol != null) { var col2 = entityHelper.iterateARDTActRelationship(arDTCol); notificationContainer.setTheActRelationshipDTCollection(col2); } - if (pDTCol != null) - { + if (pDTCol != null) { var col3 = entityHelper.iteratePDTForParticipation(pDTCol); notificationContainer.setTheParticipationDTCollection(col3); } - if (notificationContainer.isItNew()) - { + if (notificationContainer.isItNew()) { notificationUid = createNotification(notificationContainer); - } - else - { - var notification = getNotificationContainer(notificationContainer.getTheNotificationDT().getNotificationUid()); + } else { + var notification = getNotificationContainer(notificationContainer.getTheNotificationDT().getNotificationUid()); updateNotification(notification); notificationUid = notification.getTheNotificationDT().getNotificationUid(); } - } - catch (Exception e) - { - throw new DataProcessingException(e.getMessage(),e); + } catch (Exception e) { + throw new DataProcessingException(e.getMessage(), e); } return notificationUid; } @@ -143,7 +133,7 @@ private Long createNotification(NotificationContainer notificationContainer) thr var uid = uidData.getSeedValueNbr(); var localId = uidData.getUidPrefixCd() + uid + uidData.getUidSuffixCd(); - actRepositoryUtil.insertActivityId(uid,NEDSSConstant.NOTIFICATION_CLASS_CODE, NEDSSConstant.EVENT_MOOD_CODE); + actRepositoryUtil.insertActivityId(uid, NEDSSConstant.NOTIFICATION_CLASS_CODE, NEDSSConstant.EVENT_MOOD_CODE); Notification notification = new Notification(notificationContainer.getTheNotificationDT()); notification.setNotificationUid(uid); @@ -166,7 +156,7 @@ private Long updateNotification(NotificationContainer notificationContainer) { var uid = notificationContainer.getTheNotificationDT().getNotificationUid(); var localId = notificationContainer.getTheNotificationDT().getLocalId(); - actRepositoryUtil.insertActivityId(uid,NEDSSConstant.NOTIFICATION_CLASS_CODE, NEDSSConstant.EVENT_MOOD_CODE); + actRepositoryUtil.insertActivityId(uid, NEDSSConstant.NOTIFICATION_CLASS_CODE, NEDSSConstant.EVENT_MOOD_CODE); Notification notification = new Notification(notificationContainer.getTheNotificationDT()); notification.setNotificationUid(uid); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationRepositoryUtil.java index 9b7285088..430f055e4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationRepositoryUtil.java @@ -86,10 +86,9 @@ public ObservationRepositoryUtil(ObservationRepository observationRepository, } - public ObservationContainer loadObject(long obUID) throws DataProcessingException - { + public ObservationContainer loadObject(long obUID) throws DataProcessingException { ObservationContainer obVO; - try{ + try { obVO = new ObservationContainer(); /** @@ -165,7 +164,7 @@ public ObservationContainer loadObject(long obUID) throws DataProcessingExceptio obVO.setItNew(false); obVO.setItDirty(false); return obVO; - }catch(Exception ex){ + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } } @@ -186,31 +185,25 @@ public Long saveObservation(ObservationContainer observationContainer) throws Da Collection colActLocatorParticipation; - if (alpDTCol != null) - { + if (alpDTCol != null) { colActLocatorParticipation = entityHelper.iterateActivityParticipation(alpDTCol); observationContainer.setTheActivityLocatorParticipationDtoCollection(colActLocatorParticipation); } - if (arDTCol != null) - { + if (arDTCol != null) { colAct = entityHelper.iterateActRelationship(arDTCol); observationContainer.setTheActRelationshipDtoCollection(colAct); } - if (pDTCol != null) - { + if (pDTCol != null) { colParticipation = entityHelper.iteratePDTForParticipation(pDTCol); observationContainer.setTheParticipationDtoCollection(colParticipation); } - if (observationContainer.isItNew()) - { + if (observationContainer.isItNew()) { //observation = home.create(observationContainer); observationUid = createNewObservation(observationContainer); - } - else - { + } else { if (observationContainer.getTheObservationDto() != null) // make sure it is not null { updateObservation(observationContainer); @@ -301,19 +294,14 @@ public void saveActRelationship(ActRelationshipDto actRelationshipDto) { ActRelationship actRelationship = new ActRelationship(actRelationshipDto); - if (actRelationshipDto.isItNew()) - { + if (actRelationshipDto.isItNew()) { actRelationshipRepository.save(actRelationship); - } - else if (actRelationshipDto.isItDelete()) - { + } else if (actRelationshipDto.isItDelete()) { actRelationshipRepository.delete(actRelationship); - } - else if (actRelationshipDto.isItDirty() && + } else if (actRelationshipDto.isItDirty() && (actRelationshipDto.getTargetActUid() != null && actRelationshipDto.getSourceActUid() != null && actRelationshipDto.getTypeCd() != null) - ) - { + ) { actRelationshipRepository.save(actRelationship); } @@ -332,8 +320,7 @@ public void setObservationInfo(ObservationDto observationDto) throws DataProcess if (observationVO != null) observationVO.setTheObservationDto(observationDto); - if (observationVO == null) - { + if (observationVO == null) { observationVO = new ObservationContainer(); observationVO.setTheObservationDto(observationDto); } @@ -345,7 +332,7 @@ public void setObservationInfo(ObservationDto observationDto) throws DataProcess public Collection retrieveObservationQuestion(Long targetActUid) { - ArrayList theObservationQuestionColl = new ArrayList<> (); + ArrayList theObservationQuestionColl = new ArrayList<>(); var observationQuestion = observationRepository.retrieveObservationQuestion(targetActUid); if (observationQuestion.isPresent()) { Long previousTargetActUid = null; @@ -358,8 +345,7 @@ public Collection retrieveObservationQuestion(Long targetA for (Observation_Question observation_question : observationQuestion.get()) { if (previousTargetActUid == null || - !previousTargetActUid.equals(observation_question.getTargetActUid())) - { + !previousTargetActUid.equals(observation_question.getTargetActUid())) { if (previousObservationUid == null || !previousObservationUid.equals(observation_question.getObservationUid())) { obsVO = new ObservationContainer(); @@ -455,10 +441,8 @@ public Collection retrieveObservationQuestion(Long targetA actColl.add(ar); obsVO.setTheActRelationshipDtoCollection(actColl); } - } - else - { - ObservationContainer innerObs = theObservationQuestionColl. + } else { + ObservationContainer innerObs = theObservationQuestionColl. get(theObservationQuestionColl.size() - 1); Collection actColl; if ((actColl = innerObs.getTheActRelationshipDtoCollection()) == null) { @@ -483,7 +467,7 @@ public Collection retrieveObservationQuestion(Long targetA } - private ObservationDto selectObservation(long obUID) throws DataProcessingException { + private ObservationDto selectObservation(long obUID) throws DataProcessingException { try { // QUERY OBS var result = observationRepository.findById(obUID); @@ -491,7 +475,7 @@ private ObservationDto selectObservation(long obUID) throws DataProcessingExcep ObservationDto item = new ObservationDto(result.get()); item.setItNew(false); item.setItDirty(false); - return item; + return item; } else { throw new DataProcessingException("NO OBS FOUND"); } @@ -502,10 +486,8 @@ private ObservationDto selectObservation(long obUID) throws DataProcessingExcep } - private Collection selectObservationReasons(long aUID) throws DataProcessingException - { - try - { + private Collection selectObservationReasons(long aUID) throws DataProcessingException { + try { Collection observationReasons = observationReasonRepository.findRecordsById(aUID); Collection dtCollection = new ArrayList<>(); for (var observationReason : observationReasons) { @@ -515,18 +497,14 @@ private Collection selectObservationReasons(long aUID) thr dtCollection.add(dt); } return dtCollection; - } - catch(Exception ndapex) - { + } catch (Exception ndapex) { throw new DataProcessingException(ndapex.toString()); } } - private Collection selectActivityIDs(long aUID) throws DataProcessingException - { - try - { - var result = actIdRepository.findRecordsById(aUID); + private Collection selectActivityIDs(long aUID) throws DataProcessingException { + try { + var result = actIdRepository.findRecordsById(aUID); Collection dtCollection = new ArrayList<>(); if (result.isPresent()) { Collection col = result.get(); @@ -539,18 +517,14 @@ private Collection selectActivityIDs(long aUID) throws DataProcessing } return dtCollection; - } - catch(Exception ndapex) - { + } catch (Exception ndapex) { throw new DataProcessingException(ndapex.toString()); } } - private Collection selectObservationInterps(long aUID) throws DataProcessingException - { - try - { + private Collection selectObservationInterps(long aUID) throws DataProcessingException { + try { Collection col = observationInterpRepository.findRecordsById(aUID); Collection dtCollection = new ArrayList<>(); for (var item : col) { @@ -560,17 +534,13 @@ private Collection selectObservationInterps(long aUID) thr dtCollection.add(dt); } return dtCollection; - } - catch(Exception ndapex) - { + } catch (Exception ndapex) { throw new DataProcessingException(ndapex.toString()); } } - private Collection selectObsValueCodeds(long aUID) throws DataProcessingException - { - try - { + private Collection selectObsValueCodeds(long aUID) throws DataProcessingException { + try { Collection col = obsValueCodedRepository.findRecordsById(aUID); Collection dtCollection = new ArrayList<>(); for (var item : col) { @@ -580,17 +550,13 @@ private Collection selectObsValueCodeds(long aUID) throws Data dtCollection.add(dt); } return dtCollection; - } - catch(Exception ndapex) - { + } catch (Exception ndapex) { throw new DataProcessingException(ndapex.toString()); } } - private Collection selectObsValueTxts(long aUID) throws DataProcessingException - { - try - { + private Collection selectObsValueTxts(long aUID) throws DataProcessingException { + try { Collection col = obsValueTxtRepository.findRecordsById(aUID); Collection dtCollection = new ArrayList<>(); for (var item : col) { @@ -600,17 +566,13 @@ private Collection selectObsValueTxts(long aUID) throws DataProc dtCollection.add(dt); } return dtCollection; - } - catch(Exception ndapex) - { + } catch (Exception ndapex) { throw new DataProcessingException(ndapex.toString()); } } - private Collection selectObsValueDates(long aUID) throws DataProcessingException - { - try - { + private Collection selectObsValueDates(long aUID) throws DataProcessingException { + try { Collection col = obsValueDateRepository.findRecordsById(aUID); Collection dtCollection = new ArrayList<>(); for (var item : col) { @@ -620,17 +582,13 @@ private Collection selectObsValueDates(long aUID) throws DataPr dtCollection.add(dt); } return dtCollection; - } - catch(Exception ndapex) - { + } catch (Exception ndapex) { throw new DataProcessingException(ndapex.toString()); } } - private Collection selectObsValueNumerics(long aUID) throws DataProcessingException - { - try - { + private Collection selectObsValueNumerics(long aUID) throws DataProcessingException { + try { Collection col = obsValueNumericRepository.findRecordsById(aUID); Collection dtCollection = new ArrayList<>(); for (var item : col) { @@ -640,17 +598,13 @@ private Collection selectObsValueNumerics(long aUID) throws dtCollection.add(dt); } return dtCollection; - } - catch(Exception ndapex) - { + } catch (Exception ndapex) { throw new DataProcessingException(ndapex.toString()); } } - private Collection selectActivityLocatorParticipations(long aUID) throws DataProcessingException - { - try - { + private Collection selectActivityLocatorParticipations(long aUID) throws DataProcessingException { + try { Collection col = actLocatorParticipationRepository.findRecordsById(aUID); Collection dtCollection = new ArrayList<>(); for (var item : col) { @@ -660,18 +614,14 @@ private Collection selectActivityLocatorPartici dtCollection.add(dt); } return dtCollection; - } - catch(Exception ndapex) - { + } catch (Exception ndapex) { throw new DataProcessingException(ndapex.toString()); } } - private Collection selectParticipationDTCollection(long aUID) throws DataProcessingException - { - try - { + private Collection selectParticipationDTCollection(long aUID) throws DataProcessingException { + try { var col = participationRepository.findByActUid(aUID); Collection dtCollection = new ArrayList<>(); if (col.isPresent()) { @@ -684,9 +634,7 @@ private Collection selectParticipationDTCollection(long aUID) } return dtCollection; - } - catch(Exception ndapex) - { + } catch (Exception ndapex) { throw new DataProcessingException(ndapex.toString()); } } @@ -727,11 +675,11 @@ private Long saveObservation(ObservationDto observationDto) { } // private void insertObservationReasons(ObservationContainer obVO) throws NEDSSSystemException - private void addObservationReasons(Long obsUid, Collection observationReasonDtoCollection) throws DataProcessingException { + private void addObservationReasons(Long obsUid, Collection observationReasonDtoCollection) throws DataProcessingException { try { if (observationReasonDtoCollection != null) { ArrayList arr = new ArrayList<>(observationReasonDtoCollection); - for(var item: arr) { + for (var item : arr) { item.setObservationUid(obsUid); item.setItNew(false); item.setItDirty(false); @@ -753,7 +701,7 @@ private void saveObservationReason(ObservationReasonDto item) { private void updateObservationReason(Long obsUid, Collection observationReasonDtoCollection) throws DataProcessingException { try { ArrayList arr = new ArrayList<>(observationReasonDtoCollection); - for(var item: arr) { + for (var item : arr) { if (!item.isItDelete()) { item.setObservationUid(obsUid); saveObservationReason(item); @@ -780,7 +728,7 @@ private void addActivityId(Long obsUid, Collection actIdDtoCollection, } ArrayList arr = new ArrayList<>(actIdDtoCollection); - for(var item: arr) { + for (var item : arr) { item.setItNew(false); item.setItDirty(false); item.setItDelete(false); @@ -800,7 +748,7 @@ private void addObservationInterps(Long obsUid, Collection try { if (observationInterpDtoCollection != null) { ArrayList arr = new ArrayList<>(observationInterpDtoCollection); - for(var item: arr) { + for (var item : arr) { item.setItNew(false); item.setItDirty(false); item.setItDelete(false); @@ -822,7 +770,7 @@ private void saveObservationInterp(ObservationInterpDto item) { private void updateObservationInterps(Long obsUid, Collection collection) throws DataProcessingException { try { ArrayList arr = new ArrayList<>(collection); - for(var item: arr) { + for (var item : arr) { if (!item.isItDelete()) { item.setObservationUid(obsUid); saveObservationInterp(item); @@ -839,7 +787,7 @@ private void addObsValueCoded(Long obsUid, Collection obsValue try { if (obsValueCodedDtoCollection != null) { ArrayList arr = new ArrayList<>(obsValueCodedDtoCollection); - for(var item: arr) { + for (var item : arr) { item.setItNew(false); item.setItDirty(false); item.setItDelete(false); @@ -861,7 +809,7 @@ private void saveObsValueCoded(ObsValueCodedDto item) { private void updateObsValueCoded(Long obsUid, Collection collection) throws DataProcessingException { try { ArrayList arr = new ArrayList<>(collection); - for(var item: arr) { + for (var item : arr) { if (!item.isItDelete()) { item.setObservationUid(obsUid); saveObsValueCoded(item); @@ -877,9 +825,9 @@ private void updateObsValueCoded(Long obsUid, Collection colle private void addObsValueTxts(Long obsUid, Collection obsValueTxtDtoCollection) throws DataProcessingException { try { - if (obsValueTxtDtoCollection != null) { + if (obsValueTxtDtoCollection != null) { ArrayList arr = new ArrayList<>(obsValueTxtDtoCollection); - for(var item: arr) { + for (var item : arr) { item.setItNew(false); item.setItDirty(false); item.setItDelete(false); @@ -902,7 +850,7 @@ private void saveObsValueTxt(ObsValueTxtDto item) { private void updateObsValueTxts(Long obsUid, Collection collection) throws DataProcessingException { try { ArrayList arr = new ArrayList<>(collection); - for(var item: arr) { + for (var item : arr) { if (!item.isItDelete()) { item.setObservationUid(obsUid); saveObsValueTxt(item); @@ -921,7 +869,7 @@ private void addObsValueDates(Long obsUid, Collection obsValueD try { if (obsValueDateDtoCollection != null) { ArrayList arr = new ArrayList<>(obsValueDateDtoCollection); - for(var item: arr) { + for (var item : arr) { item.setItNew(false); item.setItDirty(false); item.setItDelete(false); @@ -944,7 +892,7 @@ private void saveObsValueDate(ObsValueDateDto item) { private void updateObsValueDates(Long obsUid, Collection collection) throws DataProcessingException { try { ArrayList arr = new ArrayList<>(collection); - for(var item: arr) { + for (var item : arr) { if (!item.isItDelete()) { item.setObservationUid(obsUid); saveObsValueDate(item); @@ -963,7 +911,7 @@ private void addObsValueNumeric(Long obsUid, Collection obsV try { if (obsValueNumericDtoCollection != null) { ArrayList arr = new ArrayList<>(obsValueNumericDtoCollection); - for(var item: arr) { + for (var item : arr) { item.setItNew(false); item.setItDirty(false); item.setItDelete(false); @@ -972,13 +920,13 @@ private void addObsValueNumeric(Long obsUid, Collection obsV } } } catch (Exception e) { - throw new DataProcessingException(e.getMessage(), e); + throw new DataProcessingException(e.getMessage(), e); } } - private void saveObsValueNumeric(ObsValueNumericDto item) { + private void saveObsValueNumeric(ObsValueNumericDto item) { var reason = new ObsValueNumeric(item); obsValueNumericRepository.save(reason); } @@ -986,7 +934,7 @@ private void saveObsValueNumeric(ObsValueNumericDto item) { private void updateObsValueNumerics(Long obsUid, Collection collection) throws DataProcessingException { try { ArrayList arr = new ArrayList<>(collection); - for(var item: arr) { + for (var item : arr) { if (!item.isItDelete()) { item.setObservationUid(obsUid); saveObsValueNumeric(item); @@ -1005,7 +953,7 @@ protected void addActivityLocatorParticipations(Long obsUid, Collection arr = new ArrayList<>(activityLocatorParticipationDtoCollection); - for(var item: arr) { + for (var item : arr) { item.setItNew(false); item.setItDirty(false); item.setItDelete(false); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationUtil.java index 6d81da00f..7b4b23f10 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationUtil.java @@ -22,9 +22,9 @@ public ObservationUtil() { } public Long getUid(Collection participationDtoCollection, - Collection actRelationshipDtoCollection, - String uidListType, String uidClassCd, String uidTypeCd, - String uidActClassCd, String uidRecordStatusCd) throws DataProcessingException { + Collection actRelationshipDtoCollection, + String uidListType, String uidClassCd, String uidTypeCd, + String uidActClassCd, String uidRecordStatusCd) throws DataProcessingException { Long anUid = null; try { if (participationDtoCollection != null) { @@ -42,13 +42,11 @@ public Long getUid(Collection participationDtoCollection, && (partDT.getRecordStatusCd() != null && partDT.getRecordStatusCd().equalsIgnoreCase(uidRecordStatusCd)) ) - ) - { + ) { anUid = partDT.getSubjectEntityUid(); } } - } - else if (actRelationshipDtoCollection != null) { + } else if (actRelationshipDtoCollection != null) { for (ActRelationshipDto actRelDT : actRelationshipDtoCollection) { if ( ( @@ -88,16 +86,15 @@ else if (actRelationshipDtoCollection != null) { /** * Description: * Root OBS are one of these following - * - Ctrl Code Display Form = LabReport; - * - Obs Domain Code St 1 = Order; - * - Ctrl Code Display Form = MorbReport; - - * Original Name: getRootDT + * - Ctrl Code Display Form = LabReport; + * - Obs Domain Code St 1 = Order; + * - Ctrl Code Display Form = MorbReport; + *

+ * Original Name: getRootDT **/ public ObservationDto getRootObservationDto(BaseContainer proxyVO) throws DataProcessingException { ObservationContainer rootVO = getRootObservationContainer(proxyVO); - if (rootVO != null) - { + if (rootVO != null) { return rootVO.getTheObservationDto(); } return null; @@ -107,26 +104,23 @@ public ObservationDto getRootObservationDto(BaseContainer proxyVO) throws DataPr /** * Description: * Root OBS are one of these following - * - Ctrl Code Display Form = LabReport; - * - Obs Domain Code St 1 = Order; - * - Ctrl Code Display Form = MorbReport; + * - Ctrl Code Display Form = LabReport; + * - Obs Domain Code St 1 = Order; + * - Ctrl Code Display Form = MorbReport; * Original Name: getRootObservationContainer **/ - public ObservationContainer getRootObservationContainer(BaseContainer proxy) throws DataProcessingException - { - Collection obsColl = null; + public ObservationContainer getRootObservationContainer(BaseContainer proxy) throws DataProcessingException { + Collection obsColl = null; boolean isLabReport = false; - if (proxy instanceof LabResultProxyContainer) - { - obsColl = ( (LabResultProxyContainer) proxy).getTheObservationContainerCollection(); + if (proxy instanceof LabResultProxyContainer) { + obsColl = ((LabResultProxyContainer) proxy).getTheObservationContainerCollection(); isLabReport = true; } ObservationContainer rootVO = getRootObservationContainerFromObsCollection(obsColl, isLabReport); - if( rootVO == null) - { + if (rootVO == null) { throw new DataProcessingException("Expected the proxyVO containing a root observation(e.g., ordered test)"); } return rootVO; @@ -137,37 +131,35 @@ public ObservationContainer getRootObservationContainer(BaseContainer proxy) thr /** * Description: * Root OBS are one of these following - * - Ctrl Code Display Form = LabReport; - * - Obs Domain Code St 1 = Order; - * - Ctrl Code Display Form = MorbReport; + * - Ctrl Code Display Form = LabReport; + * - Obs Domain Code St 1 = Order; + * - Ctrl Code Display Form = MorbReport; **/ private ObservationContainer getRootObservationContainerFromObsCollection(Collection obsColl, boolean isLabReport) { - if(obsColl == null){ + if (obsColl == null) { return null; } Iterator iterator; - for (iterator = obsColl.iterator(); iterator.hasNext(); ) - { + for (iterator = obsColl.iterator(); iterator.hasNext(); ) { ObservationContainer observationContainer = iterator.next(); if ( - observationContainer.getTheObservationDto() != null - && ( - ( - observationContainer.getTheObservationDto().getCtrlCdDisplayForm() != null - && observationContainer.getTheObservationDto().getCtrlCdDisplayForm().equalsIgnoreCase(NEDSSConstant.LAB_CTRLCD_DISPLAY) - ) - || ( - observationContainer.getTheObservationDto().getObsDomainCdSt1() != null - && observationContainer.getTheObservationDto().getObsDomainCdSt1().equalsIgnoreCase(NEDSSConstant.ORDERED_TEST_OBS_DOMAIN_CD) - && isLabReport - ) || ( - observationContainer.getTheObservationDto().getCtrlCdDisplayForm() != null && - observationContainer.getTheObservationDto().getCtrlCdDisplayForm().equalsIgnoreCase(NEDSSConstant.MOB_CTRLCD_DISPLAY) - ) - ) - ) - { + observationContainer.getTheObservationDto() != null + && ( + ( + observationContainer.getTheObservationDto().getCtrlCdDisplayForm() != null + && observationContainer.getTheObservationDto().getCtrlCdDisplayForm().equalsIgnoreCase(NEDSSConstant.LAB_CTRLCD_DISPLAY) + ) + || ( + observationContainer.getTheObservationDto().getObsDomainCdSt1() != null + && observationContainer.getTheObservationDto().getObsDomainCdSt1().equalsIgnoreCase(NEDSSConstant.ORDERED_TEST_OBS_DOMAIN_CD) + && isLabReport + ) || ( + observationContainer.getTheObservationDto().getCtrlCdDisplayForm() != null && + observationContainer.getTheObservationDto().getCtrlCdDisplayForm().equalsIgnoreCase(NEDSSConstant.MOB_CTRLCD_DISPLAY) + ) + ) + ) { return observationContainer; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/organization/OrganizationRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/organization/OrganizationRepositoryUtil.java index 5e57cdb9d..268a662f5 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/organization/OrganizationRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/organization/OrganizationRepositoryUtil.java @@ -52,11 +52,11 @@ @Component public class OrganizationRepositoryUtil { - private static final Logger logger = LoggerFactory.getLogger(OrganizationRepositoryUtil.class); /** * Organization Entity Code */ public final static String ORG = "ORG"; + private static final Logger logger = LoggerFactory.getLogger(OrganizationRepositoryUtil.class); private final OrganizationRepository organizationRepository; private final OrganizationNameRepository organizationNameRepository; private final EntityRepository entityRepository; @@ -112,10 +112,10 @@ public Organization findOrganizationByUid(Long orgUid) { @Transactional public long createOrganization(OrganizationContainer organizationContainer) throws DataProcessingException { - Long organizationUid ; + Long organizationUid; long oldOrgUid = organizationContainer.getTheOrganizationDto().getOrganizationUid(); try { - String localUid ; + String localUid; LocalUidGenerator localIdModel = odseIdGeneratorService.getLocalIdAndUpdateSeed(LocalIdClass.ORGANIZATION); organizationUid = localIdModel.getSeedValueNbr(); localUid = localIdModel.getUidPrefixCd() + organizationUid + localIdModel.getUidSuffixCd(); @@ -318,15 +318,15 @@ private void createRole(OrganizationContainer ovo) throws DataProcessingExceptio /** * Sets the organization values in the databse based on the businessTrigger -<<<<<<< HEAD -======= + * <<<<<<< HEAD + * ======= * * @param organizationContainer the OrganizationContainer * @param businessTriggerCd the String * @return organizationUID the Long * @roseuid 3E6E4E05003E * @J2EE_METHOD -- setOrganization ->>>>>>> main + * >>>>>>> main */ @Transactional public Long setOrganization(OrganizationContainer organizationContainer, @@ -504,7 +504,6 @@ public OrganizationContainer loadObject(Long organizationUID, Long actUid) throw ovo.setTheRoleDTCollection(roleColl); - //SelectsParticipationDTCollection Collection parColl = selectParticipationDTCollection(organizationUID, actUid); ovo.setTheParticipationDtoCollection(parColl); @@ -540,7 +539,7 @@ private Collection selectOrganizationNames(long organizatio try { Optional> listOptional = organizationNameRepository.findByOrganizationUid(organizationUID); List organizationNameList = new ArrayList<>(); - if(listOptional.isPresent()) { + if (listOptional.isPresent()) { organizationNameList = listOptional.get(); } for (OrganizationName organizationNameModel : organizationNameList) { @@ -589,7 +588,7 @@ private Collection selectEntityLocatorParticipati throws DataProcessingException { Collection entityLocatorParticipationList = new ArrayList<>(); try { - var res = entityLocatorParticipationRepository.findByParentUid(organizationUID); + var res = entityLocatorParticipationRepository.findByParentUid(organizationUID); List entityLocatorParticipations = new ArrayList<>(); if (res.isPresent()) { entityLocatorParticipations = res.get(); @@ -679,10 +678,10 @@ private Collection selectEntityLocatorParticipati private Collection selectRoleDTCollection(long uid) throws DataProcessingException { Collection retval = new ArrayList<>(); try { - var res = roleRepository.findBySubjectEntityUid(uid); + var res = roleRepository.findBySubjectEntityUid(uid); List roleList = new ArrayList<>(); if (res.isPresent()) { - roleList =res.get(); + roleList = res.get(); } for (Role roleModel : roleList) { RoleDto newdt = new RoleDto(roleModel); @@ -736,20 +735,19 @@ private Collection selectParticipationDTCollection(Long uid, L /** * This method is used to prepare Dirty Acts,Dirty Entities,New Acts And New Entities depending * you want to edit,delete or create records -<<<<<<< HEAD -======= + * <<<<<<< HEAD + * ======= * * @param organizationDto -- The DT to be prepared * @param businessTriggerCd * @param tableName * @param moduleCd * @return RootDTInterface -- the prepared DT(System attribute Set) - * @throws DataProcessingException ->>>>>>> main + * @throws DataProcessingException >>>>>>> main */ public OrganizationDto prepareVO(OrganizationDto organizationDto, String businessTriggerCd, String tableName, String moduleCd) throws DataProcessingException { try { - if (organizationDto.isItNew() == false && organizationDto.isItDirty() == false && organizationDto.isItDelete() == false) { + if (!organizationDto.isItNew() && !organizationDto.isItDirty() && !organizationDto.isItDelete()) { throw new DataProcessingException("Error while calling prepareVO method in PrepareVOUtils"); } logger.debug("(Boolean.FALSE).equals(new Boolean(theRootDTInterface.tableName)?:" + tableName + ":theRootDTInterface.moduleCd:" + moduleCd + ":businessTriggerCd:" + businessTriggerCd); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/page_and_pam/PageRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/page_and_pam/PageRepositoryUtil.java index 6ec623459..f9a13b456 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/page_and_pam/PageRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/page_and_pam/PageRepositoryUtil.java @@ -42,8 +42,9 @@ @Component public class PageRepositoryUtil { + private static final Logger logger = LoggerFactory.getLogger(PageRepositoryUtil.class); private final IInvestigationService investigationService; - private final PatientRepositoryUtil patientRepositoryUtil; + private final PatientRepositoryUtil patientRepositoryUtil; private final IUidService uidService; private final PamRepositoryUtil pamRepositoryUtil; private final PrepareAssocModelHelper prepareAssocModelHelper; @@ -54,12 +55,10 @@ public class PageRepositoryUtil { private final NbsDocumentRepositoryUtil nbsDocumentRepositoryUtil; private final ParticipationRepositoryUtil participationRepositoryUtil; private final NbsNoteRepositoryUtil nbsNoteRepositoryUtil; - private final CustomRepository customRepository; + private final CustomRepository customRepository; private final IPamService pamService; private final PatientMatchingBaseService patientMatchingBaseService; - private static final Logger logger = LoggerFactory.getLogger(PageRepositoryUtil.class); - public PageRepositoryUtil(IInvestigationService investigationService, PatientRepositoryUtil patientRepositoryUtil, IUidService uidService, PamRepositoryUtil pamRepositoryUtil, @@ -102,8 +101,7 @@ public Long setPageActProxyVO(PageActProxyContainer pageProxyVO) throws DataProc } - if (pageActProxyContainer.isItDirty() && !pageActProxyContainer.isConversionHasModified()) - { + if (pageActProxyContainer.isItDirty() && !pageActProxyContainer.isConversionHasModified()) { try { // update auto resend notifications investigationService.updateAutoResendNotificationsAsync(pageActProxyContainer); @@ -128,10 +126,9 @@ public Long setPageActProxyVO(PageActProxyContainer pageProxyVO) throws DataProc Long actualUid; - Long falsePublicHealthCaseUid ; + Long falsePublicHealthCaseUid; - try - { + try { Long patientRevisionUid; Long phcUid; @@ -148,25 +145,20 @@ public Long setPageActProxyVO(PageActProxyContainer pageProxyVO) throws DataProc //TODO: LOGGING - if (pageActProxyContainer.getMessageLogDTMap() != null && !pageActProxyContainer.getMessageLogDTMap().isEmpty()) - { + if (pageActProxyContainer.getMessageLogDTMap() != null && !pageActProxyContainer.getMessageLogDTMap().isEmpty()) { Set set = pageActProxyContainer.getMessageLogDTMap().keySet(); for (String key : set) { - if (key.contains(MessageConstants.DISPOSITION_SPECIFIED_KEY)) - { + if (key.contains(MessageConstants.DISPOSITION_SPECIFIED_KEY)) { //Investigator of Named by contact will get message for Named by contact and contact's investigation id. continue; } MessageLogDto messageLogDT = pageActProxyContainer.getMessageLogDTMap().get(key); messageLogDT.setPersonUid(patientRevisionUid); - if (messageLogDT.getEventUid() != null && messageLogDT.getEventUid() > 0) - { + if (messageLogDT.getEventUid() != null && messageLogDT.getEventUid() > 0) { continue; - } - else - { + } else { messageLogDT.setEventUid(phcUid); } @@ -201,7 +193,7 @@ public Long setPageActProxyVO(PageActProxyContainer pageProxyVO) throws DataProc processingParticipationForPageAct(pageActProxyContainer); - if( pageActProxyContainer.isUnsavedNote() && pageActProxyContainer.getNbsNoteDTColl()!=null && pageActProxyContainer.getNbsNoteDTColl().size()>0){ + if (pageActProxyContainer.isUnsavedNote() && pageActProxyContainer.getNbsNoteDTColl() != null && pageActProxyContainer.getNbsNoteDTColl().size() > 0) { nbsNoteRepositoryUtil.storeNotes(actualUid, pageActProxyContainer.getNbsNoteDTColl()); } @@ -211,15 +203,12 @@ public Long setPageActProxyVO(PageActProxyContainer pageProxyVO) throws DataProc } else if (pageActProxyContainer.getPageVO() != null && pageActProxyContainer.isItDirty()) { //pamRootDAO.editPamVO(pageActProxyContainer.getPageVO(), pageActProxyContainer.getPublicHealthCaseContainer()); //NOSONAR logger.info("test"); - } else - { + } else { logger.error("There is error in setPageActProxyVO as pageProxyVO.getPageVO() is null"); } - } - catch (Exception e) - { - throw new DataProcessingException("ActControllerEJB Create : "+e.getMessage(), e); + } catch (Exception e) { + throw new DataProcessingException("ActControllerEJB Create : " + e.getMessage(), e); } handlingCoInfectionAndContactDisposition(pageActProxyContainer, mprUid, actualUid); @@ -233,19 +222,19 @@ public Long setPageActProxyVO(PageActProxyContainer pageProxyVO) throws DataProc public void updatForConInfectionId(PageActProxyContainer pageActProxyContainer, Long mprUid, Long currentPhclUid) throws DataProcessingException { - try{ - updateForConInfectionId(pageActProxyContainer, null, mprUid, null, currentPhclUid, null, null); - }catch (Exception ex) { + try { + updateForConInfectionId(pageActProxyContainer, null, mprUid, null, currentPhclUid, null, null); + } catch (Exception ex) { throw new DataProcessingException(ex.getMessage(), ex); } } /** - * @param pageActProxyContainer: PageActProxyContainer that will update the other investigations that are part of co-infection group - * @param mprUid: MPR UId for the cases tied to co-infection group - * @param currentPhclUid: PHC_UID tied to pageActProxyContainer + * @param pageActProxyContainer: PageActProxyContainer that will update the other investigations that are part of co-infection group + * @param mprUid: MPR UId for the cases tied to co-infection group + * @param currentPhclUid: PHC_UID tied to pageActProxyContainer * @param coinfectionSummaryVOCollection - Used for Merge Investigation - * @param coinfectionIdToUpdate - coinfectionId Used for Merge Investigation + * @param coinfectionIdToUpdate - coinfectionId Used for Merge Investigation */ @SuppressWarnings("java:S125") public void updateForConInfectionId(PageActProxyContainer pageActProxyContainer, PageActProxyContainer supersededProxyVO, Long mprUid, @@ -253,23 +242,23 @@ public void updateForConInfectionId(PageActProxyContainer pageActProxyContainer, Collection coinfectionSummaryVOCollection, String coinfectionIdToUpdate) throws DataProcessingException { try { - String coninfectionId= pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getCoinfectionId(); - if(coinfectionSummaryVOCollection==null) - coinfectionSummaryVOCollection = getInvListForCoInfectionId(mprUid,coninfectionId); + String coninfectionId = pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getCoinfectionId(); + if (coinfectionSummaryVOCollection == null) + coinfectionSummaryVOCollection = getInvListForCoInfectionId(mprUid, coninfectionId); PageActProxyContainer pageActProxyCopyVO = (PageActProxyContainer) pageActProxyContainer.deepCopy(); - Map answermapMap =pageActProxyCopyVO.getPageVO().getPamAnswerDTMap(); //NOSONAR + Map answermapMap = pageActProxyCopyVO.getPageVO().getPamAnswerDTMap(); //NOSONAR - Map repeatingAnswermapMap =pageActProxyCopyVO.getPageVO().getPageRepeatingAnswerDTMap(); //NOSONAR + Map repeatingAnswermapMap = pageActProxyCopyVO.getPageVO().getPageRepeatingAnswerDTMap(); //NOSONAR String investigationFormCd = SrteCache.investigationFormConditionCode.get(pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getCd()); Map mapFromQuestions = new HashMap<>(); //Collection nbsQuestionUidCollection = getCoinfectionQuestionListForFormCd(investigationFormCd); //NOSONAR Collection nbsQuestionUidCollection = new ArrayList<>(); //NOSONAR - Map updatedValuesMap = new HashMap<>(); + Map updatedValuesMap = new HashMap<>(); - Map updateValueInOtherTablesMap = new HashMap<>(); // Map is to update values in other table then NBS_CASE_Answer + Map updateValueInOtherTablesMap = new HashMap<>(); // Map is to update values in other table then NBS_CASE_Answer // if(nbsQuestionUidCollection!=null) { // for (Object o : nbsQuestionUidCollection) { @@ -304,7 +293,7 @@ public void updateForConInfectionId(PageActProxyContainer pageActProxyContainer, // } // } //} - if(coinfectionSummaryVOCollection!=null && coinfectionSummaryVOCollection.size()>0) { + if (coinfectionSummaryVOCollection != null && coinfectionSummaryVOCollection.size() > 0) { /**Update for closed/open cases that are part of any co-infection groups */ for (Object o : coinfectionSummaryVOCollection) { CoinfectionSummaryContainer coninfectionSummaryVO = (CoinfectionSummaryContainer) o; @@ -323,36 +312,36 @@ public void updateForConInfectionId(PageActProxyContainer pageActProxyContainer, } } } catch (Exception e) { - throw new DataProcessingException(e.getMessage(), e); + throw new DataProcessingException(e.getMessage(), e); } } - private ArrayList getInvListForCoInfectionId(Long mprUid,String coInfectionId) throws DataProcessingException { + private ArrayList getInvListForCoInfectionId(Long mprUid, String coInfectionId) throws DataProcessingException { ArrayList coinfectionInvList; coinfectionInvList = customRepository.getInvListForCoInfectionId(mprUid, coInfectionId); return coinfectionInvList; } - @SuppressWarnings({"java:S1172","java:S1854", "java:S1481", "java:S125"}) - private void updateCoInfectionInvest(Map mappedCoInfectionQuestions, Map fromMapQuestions, - PageActProxyContainer pageActProxyContainer, PublicHealthCaseContainer publicHealthCaseContainer, - PublicHealthCaseContainer supersededPublicHealthCaseContainer, - Map coInSupersededEpliLinkIdMap, - CoinfectionSummaryContainer coninfectionSummaryVO, - String coinfectionIdToUpdate, - Map updateValueInOtherTablesMap) + @SuppressWarnings({"java:S1172", "java:S1854", "java:S1481", "java:S125"}) + private void updateCoInfectionInvest(Map mappedCoInfectionQuestions, Map fromMapQuestions, + PageActProxyContainer pageActProxyContainer, PublicHealthCaseContainer publicHealthCaseContainer, + PublicHealthCaseContainer supersededPublicHealthCaseContainer, + Map coInSupersededEpliLinkIdMap, + CoinfectionSummaryContainer coninfectionSummaryVO, + String coinfectionIdToUpdate, + Map updateValueInOtherTablesMap) throws DataProcessingException { Long publicHealthCaseUid; try { String investigationFormCd = SrteCache.investigationFormConditionCode.get(coninfectionSummaryVO.getConditionCd()); //Collection toNbsQuestionUidCollection = getCoinfectionQuestionListForFormCd(investigationFormCd); //NOSONAR Collection toNbsQuestionUidCollection = new ArrayList<>(); - publicHealthCaseUid=coninfectionSummaryVO.getPublicHealthCaseUid(); + publicHealthCaseUid = coninfectionSummaryVO.getPublicHealthCaseUid(); java.util.Date dateTime = new java.util.Date(); Timestamp lastChgTime = new Timestamp(dateTime.getTime()); - Long lastChgUserId= AuthUtil.authUser.getNedssEntryId(); - PageActProxyContainer proxyVO = investigationService.getPageProxyVO(NEDSSConstant.CASE, publicHealthCaseUid); + Long lastChgUserId = AuthUtil.authUser.getNedssEntryId(); + PageActProxyContainer proxyVO = investigationService.getPageProxyVO(NEDSSConstant.CASE, publicHealthCaseUid); //if (!proxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getInvestigationStatusCd().equalsIgnoreCase(NEDSSConstant.STATUS_OPEN)){ //} //else{ @@ -568,11 +557,11 @@ else if(pageVO.getPageRepeatingAnswerDTMap().get(toDropDownCodeDT.getLongKey())= * */ //Set the winning investigation's coinfectionId to losing investigation's related co-infection investigations. - if(coinfectionIdToUpdate!=null){ + if (coinfectionIdToUpdate != null) { String survivingEpiLinkId = publicHealthCaseContainer.getTheCaseManagementDto().getEpiLinkId(); String supersededEpiLinkId = supersededPublicHealthCaseContainer.getTheCaseManagementDto().getEpiLinkId(); - if(coInSupersededEpliLinkIdMap.get(proxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getPublicHealthCaseUid()) !=null) { + if (coInSupersededEpliLinkIdMap.get(proxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getPublicHealthCaseUid()) != null) { proxyVO.getPublicHealthCaseContainer().getTheCaseManagementDto().setEpiLinkId(survivingEpiLinkId); } proxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto().setCoinfectionId(coinfectionIdToUpdate); @@ -582,18 +571,17 @@ else if(pageVO.getPageRepeatingAnswerDTMap().get(toDropDownCodeDT.getLongKey())= // Updates coinfection question's values in tables other than NBS_Case_Answer updateCoInfectionInvestForOtherTables(proxyVO, updateValueInOtherTablesMap, pageActProxyContainer, publicHealthCaseContainer); - if(coinfectionIdToUpdate==null + if (coinfectionIdToUpdate == null || (supersededPublicHealthCaseContainer != null // NOSONAR - && publicHealthCaseUid.compareTo(supersededPublicHealthCaseContainer.getThePublicHealthCaseDto().getPublicHealthCaseUid())!=0)) - { - updatePageProxyVOInterface(proxyVO,lastChgTime,lastChgUserId); - setPageActProxyVO( proxyVO); - logger.debug("updateCoInfectionInvest method call completed for coinfectionIdToUpdate:"+ coinfectionIdToUpdate); + && publicHealthCaseUid.compareTo(supersededPublicHealthCaseContainer.getThePublicHealthCaseDto().getPublicHealthCaseUid()) != 0)) { + updatePageProxyVOInterface(proxyVO, lastChgTime, lastChgUserId); + setPageActProxyVO(proxyVO); + logger.debug("updateCoInfectionInvest method call completed for coinfectionIdToUpdate:" + coinfectionIdToUpdate); } - }catch(Exception e) { + } catch (Exception e) { - throw new DataProcessingException(e.toString() ,e); + throw new DataProcessingException(e.toString(), e); } } @@ -621,14 +609,14 @@ private void updatePageProxyVOInterface(PageActProxyContainer proxyActVO, Timest if (proxyActVO.getPageVO() != null) { Map map = proxyActVO.getPageVO().getPamAnswerDTMap(); - if(map!=null) { + if (map != null) { updateNbsCaseAnswerInterfaceValues(map, lastChgTime, lastChgUserId); } Map repeatingMap = proxyActVO.getPageVO().getPageRepeatingAnswerDTMap(); - if(repeatingMap!=null) { + if (repeatingMap != null) { updateNbsCaseAnswerInterfaceValues(repeatingMap, lastChgTime, lastChgUserId); } - if(proxyActVO.getPageVO().getActEntityDTCollection()!=null) { + if (proxyActVO.getPageVO().getActEntityDTCollection() != null) { for (NbsActEntityDto actEntityDT : proxyActVO.getPageVO().getActEntityDTCollection()) { actEntityDT.setLastChgTime(lastChgTime); actEntityDT.setLastChgUserId(lastChgUserId); @@ -686,20 +674,19 @@ private Map updateNbsCaseAnswerInterfaceValues( /** - * * Updates coinfection question's values in tables other than NBS_Case_Answer */ - private void updateCoInfectionInvestForOtherTables(PageActProxyContainer pageActProxyVOofCoinfection, - Map updateValueInOtherTablesMap, - PageActProxyContainer pageActProxyContainer, - PublicHealthCaseContainer publicHealthCaseContainer) throws DataProcessingException { + private void updateCoInfectionInvestForOtherTables(PageActProxyContainer pageActProxyVOofCoinfection, + Map updateValueInOtherTablesMap, + PageActProxyContainer pageActProxyContainer, + PublicHealthCaseContainer publicHealthCaseContainer) throws DataProcessingException { try { for (Object key : updateValueInOtherTablesMap.keySet()) { String dbLocation = (String) updateValueInOtherTablesMap.get(key); - if(dbLocation!=null && dbLocation.contains("PERSON.")){ + if (dbLocation != null && dbLocation.contains("PERSON.")) { //Commented out as its tries to update MPR concurrently within same transaction. // First for current investigation's patient and then coinfection investigation's patient. - }else if(dbLocation!=null && dbLocation.contains("CASE_MANAGEMENT.")){ + } else if (dbLocation != null && dbLocation.contains("CASE_MANAGEMENT.")) { // String columnName = dbLocation.substring(dbLocation.indexOf(".")+1,dbLocation.length()); // String getterMethod = DynamicBeanBinding.getGetterName(columnName); // @@ -718,27 +705,23 @@ private void updateCoInfectionInvestForOtherTables(PageActProxyContainer pageAc } } - }catch(Exception ex){ + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } } private void processingParticipationPatTypeForPageAct(PageActProxyContainer pageActProxyContainer) throws DataProcessingException { - if (pageActProxyContainer.isItNew() && (!pageActProxyContainer.isItDirty())) - { + if (pageActProxyContainer.isItNew() && (!pageActProxyContainer.isItDirty())) { // changes according to new Analysis String classCd; String recordStatusCd; - for (ParticipationDto participationDto : pageActProxyContainer.getTheParticipationDtoCollection()) - { + for (ParticipationDto participationDto : pageActProxyContainer.getTheParticipationDtoCollection()) { - if (participationDto.getSubjectEntityUid() != null && participationDto.getSubjectEntityUid().intValue() > 0) - { + if (participationDto.getSubjectEntityUid() != null && participationDto.getSubjectEntityUid().intValue() > 0) { classCd = participationDto.getSubjectClassCd(); - if (classCd != null && classCd.compareToIgnoreCase(NEDSSConstant.PERSON) == 0) - { + if (classCd != null && classCd.compareToIgnoreCase(NEDSSConstant.PERSON) == 0) { // Now, get PersonVO from Entity Controller and check if // Person is active, if not throw PersonContainer personVO = patientRepositoryUtil.loadPerson(participationDto.getSubjectEntityUid()); @@ -755,8 +738,7 @@ private void processingParticipationPatTypeForPageAct(PageActProxyContainer page @SuppressWarnings("java:S6541") private PageActPatient processingPersonContainerForPageAct(PageActProxyContainer pageActProxyContainer, - PublicHealthCaseDto phcDT) throws DataProcessingException - { + PublicHealthCaseDto phcDT) throws DataProcessingException { PersonContainer personVO; Iterator anIterator; Long falseUid; @@ -765,38 +747,31 @@ private PageActPatient processingPersonContainerForPageAct(PageActProxyContainer Long patientRevisionUid = null; PageActPatient pageActPatient = new PageActPatient(); - if (pageActProxyContainer.getThePersonContainerCollection() != null) - { - for (anIterator = pageActProxyContainer.getThePersonContainerCollection().iterator(); anIterator.hasNext();) - { + if (pageActProxyContainer.getThePersonContainerCollection() != null) { + for (anIterator = pageActProxyContainer.getThePersonContainerCollection().iterator(); anIterator.hasNext(); ) { personVO = anIterator.next(); - if (personVO.getThePersonDto().getCd()!=null - && personVO.getThePersonDto().getCd().equals(NEDSSConstant.PAT)) - { - mprUid=personVO.getThePersonDto().getPersonParentUid(); + if (personVO.getThePersonDto().getCd() != null + && personVO.getThePersonDto().getCd().equals(NEDSSConstant.PAT)) { + mprUid = personVO.getThePersonDto().getPersonParentUid(); pageActPatient.setMprUid(mprUid); } - if (personVO.isItNew()) - { - if (personVO.getThePersonDto().getCd() != null && personVO.getThePersonDto().getCd().equals(NEDSSConstant.PAT)) - { + if (personVO.isItNew()) { + if (personVO.getThePersonDto().getCd() != null && personVO.getThePersonDto().getCd().equals(NEDSSConstant.PAT)) { // Patient String businessTriggerCd = NEDSSConstant.PAT_CR; try { var fakeId = personVO.getThePersonDto().getPersonUid(); personVO.getThePersonDto().setPersonUid(personVO.getThePersonDto().getPersonParentUid()); - patientRevisionUid= patientMatchingBaseService.setPatientRevision(personVO, businessTriggerCd, NEDSSConstant.PAT); + patientRevisionUid = patientMatchingBaseService.setPatientRevision(personVO, businessTriggerCd, NEDSSConstant.PAT); realUid = patientRevisionUid; pageActPatient.setPatientRevisionUid(patientRevisionUid); personVO.getThePersonDto().setPersonUid(fakeId); } catch (Exception ex) { throw new DataProcessingException("Error in entityController.setPatientRevision : " + ex.getMessage(), ex); } - } - else if (personVO.getThePersonDto().getCd() != null && personVO.getThePersonDto().getCd().equals(NEDSSConstant.PRV)) - { + } else if (personVO.getThePersonDto().getCd() != null && personVO.getThePersonDto().getCd().equals(NEDSSConstant.PRV)) { // Provider String businessTriggerCd = NEDSSConstant.PRV_CR; try { @@ -811,32 +786,26 @@ else if (personVO.getThePersonDto().getCd() != null && personVO.getThePersonDto( falseUid = personVO.getThePersonDto().getPersonUid(); // replace the falseId with the realId - if (falseUid.intValue() < 0) - { + if (falseUid.intValue() < 0) { uidService.setFalseToNewForPageAct(pageActProxyContainer, falseUid, realUid); } - } - else if (personVO.isItDirty()) - { - if (personVO.getThePersonDto().getCd() != null && personVO.getThePersonDto().getCd().equals(NEDSSConstant.PAT)) - { + } else if (personVO.isItDirty()) { + if (personVO.getThePersonDto().getCd() != null && personVO.getThePersonDto().getCd().equals(NEDSSConstant.PAT)) { String businessTriggerCd = NEDSSConstant.PAT_EDIT; try { realUid = patientMatchingBaseService.setPatientRevision(personVO, businessTriggerCd, NEDSSConstant.PAT); - patientRevisionUid= realUid; + patientRevisionUid = realUid; pageActPatient.setPatientRevisionUid(patientRevisionUid); - } catch (Exception ex) { + } catch (Exception ex) { throw new DataProcessingException("Error in entityController.setPatientRevision : " + ex.getMessage(), ex); } - } - else if (personVO.getThePersonDto().getCd() != null && personVO.getThePersonDto().getCd().equals(NEDSSConstant.PRV)) - { + } else if (personVO.getThePersonDto().getCd() != null && personVO.getThePersonDto().getCd().equals(NEDSSConstant.PRV)) { String businessTriggerCd = NEDSSConstant.PRV_EDIT; try { patientRepositoryUtil.updateExistingPerson(personVO); realUid = personVO.getThePersonDto().getPersonParentUid(); - } catch (Exception ex) { + } catch (Exception ex) { throw new DataProcessingException("Error in entityController.setProvider : " + ex.getMessage(), ex); } } @@ -849,47 +818,39 @@ else if (personVO.getThePersonDto().getCd() != null && personVO.getThePersonDto( return pageActPatient; } + @SuppressWarnings("java:S3457") private PageActPhc processingPhcContainerForPageAct( PageActProxyContainer pageActProxyContainer, - boolean isCoInfectionCondition) throws DataProcessingException - { + boolean isCoInfectionCondition) throws DataProcessingException { PageActPhc pageActPhc = new PageActPhc(); Long falsePublicHealthCaseUid = null; Long actualUid = null; Long phcUid = null; - if (pageActProxyContainer.getPublicHealthCaseContainer() != null) - { + if (pageActProxyContainer.getPublicHealthCaseContainer() != null) { String businessTriggerCd = null; PublicHealthCaseContainer publicHealthCaseContainer = pageActProxyContainer.getPublicHealthCaseContainer(); publicHealthCaseContainer.getThePublicHealthCaseDto().setPageCase(true); - if(pageActProxyContainer.isItDirty()) - { + if (pageActProxyContainer.isItDirty()) { pamRepositoryUtil.getPamHistory(pageActProxyContainer.getPublicHealthCaseContainer()); } PublicHealthCaseDto publicHealthCaseDto = publicHealthCaseContainer.getThePublicHealthCaseDto(); - if(publicHealthCaseContainer.getNbsAnswerCollection()!=null) - { - logger.debug("********#publicHealthCaseContainer.getNbsAnswerCollection() size from history table: "+ publicHealthCaseContainer.getNbsAnswerCollection().size()); + if (publicHealthCaseContainer.getNbsAnswerCollection() != null) { + logger.debug("********#publicHealthCaseContainer.getNbsAnswerCollection() size from history table: " + publicHealthCaseContainer.getNbsAnswerCollection().size()); } - if(publicHealthCaseDto.getPublicHealthCaseUid()!=null && publicHealthCaseDto.getVersionCtrlNbr()!=null) - { - logger.debug("********#Public Health Case Uid: "+ publicHealthCaseDto.getPublicHealthCaseUid() +" Version: "+ publicHealthCaseDto.getVersionCtrlNbr()); + if (publicHealthCaseDto.getPublicHealthCaseUid() != null && publicHealthCaseDto.getVersionCtrlNbr() != null) { + logger.debug("********#Public Health Case Uid: " + publicHealthCaseDto.getPublicHealthCaseUid() + " Version: " + publicHealthCaseDto.getVersionCtrlNbr()); } RootDtoInterface rootDTInterface = publicHealthCaseDto; String businessObjLookupName = NBSBOLookup.INVESTIGATION; - if (pageActProxyContainer.isItNew()) - { + if (pageActProxyContainer.isItNew()) { businessTriggerCd = "INV_CR"; - if(isCoInfectionCondition && pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getCoinfectionId()==null) - { + if (isCoInfectionCondition && pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getCoinfectionId() == null) { logger.debug("AssociatedInvestigationUpdateUtil.updatForConInfectionId created an new coinfection id for the case"); pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().setCoinfectionId(NEDSSConstant.COINFCTION_GROUP_ID_NEW_CODE); } - } - else if (pageActProxyContainer.isItDirty()) - { + } else if (pageActProxyContainer.isItDirty()) { businessTriggerCd = "INV_EDIT"; } @@ -900,10 +861,9 @@ else if (pageActProxyContainer.isItDirty()) falsePublicHealthCaseUid = publicHealthCaseContainer.getThePublicHealthCaseDto().getPublicHealthCaseUid(); actualUid = publicHealthCaseService.setPublicHealthCase(publicHealthCaseContainer); - phcUid= actualUid; + phcUid = actualUid; logger.debug("actualUid.intValue() = " + actualUid.intValue()); - if (falsePublicHealthCaseUid.intValue() < 0) - { + if (falsePublicHealthCaseUid.intValue() < 0) { logger.debug("falsePublicHealthCaseUid.intValue() = " + falsePublicHealthCaseUid.intValue()); uidService.setFalseToNewForPageAct(pageActProxyContainer, falsePublicHealthCaseUid, actualUid); publicHealthCaseContainer.getThePublicHealthCaseDto().setPublicHealthCaseUid(actualUid); @@ -921,13 +881,10 @@ else if (pageActProxyContainer.isItDirty()) private Long processingPhcActRelationshipForPageAct(PageActProxyContainer pageActProxyContainer) throws DataProcessingException { Long docUid = null; Iterator anIteratorActRelationship; - if (pageActProxyContainer.getPublicHealthCaseContainer().getTheActRelationshipDTCollection() != null) - { - for (anIteratorActRelationship = pageActProxyContainer.getPublicHealthCaseContainer().getTheActRelationshipDTCollection().iterator(); anIteratorActRelationship.hasNext();) - { + if (pageActProxyContainer.getPublicHealthCaseContainer().getTheActRelationshipDTCollection() != null) { + for (anIteratorActRelationship = pageActProxyContainer.getPublicHealthCaseContainer().getTheActRelationshipDTCollection().iterator(); anIteratorActRelationship.hasNext(); ) { ActRelationshipDto actRelationshipDT = anIteratorActRelationship.next(); - if (actRelationshipDT.getTypeCd() != null && actRelationshipDT.getTypeCd().equals(NEDSSConstant.DocToPHC)) - { + if (actRelationshipDT.getTypeCd() != null && actRelationshipDT.getTypeCd().equals(NEDSSConstant.DocToPHC)) { docUid = actRelationshipDT.getSourceActUid(); } logger.debug("the actRelationshipDT statusTime is " + actRelationshipDT.getStatusTime()); @@ -950,10 +907,8 @@ private Long processingPhcActRelationshipForPageAct(PageActProxyContainer pageAc } private void processingParticipationForPageAct(PageActProxyContainer pageActProxyContainer) throws DataProcessingException { - if (pageActProxyContainer.getTheParticipationDtoCollection() != null) - { - for (var item : pageActProxyContainer.getTheParticipationDtoCollection()) - { + if (pageActProxyContainer.getTheParticipationDtoCollection() != null) { + for (var item : pageActProxyContainer.getTheParticipationDtoCollection()) { try { if (item.isItDelete()) { participationRepositoryUtil.insertParticipationHist(item); @@ -967,8 +922,7 @@ private void processingParticipationForPageAct(PageActProxyContainer pageActProx } private void processingNotificationSummaryForPageAct(PageActProxyContainer pageActProxyContainer, PublicHealthCaseDto phcDT) throws DataProcessingException { - if (pageActProxyContainer.getTheNotificationSummaryVOCollection() != null) - { + if (pageActProxyContainer.getTheNotificationSummaryVOCollection() != null) { Collection notSumVOColl = pageActProxyContainer.getTheNotificationSummaryVOCollection(); for (Object o : notSumVOColl) { NotificationSummaryContainer notSummaryVO = (NotificationSummaryContainer) o; @@ -976,8 +930,7 @@ private void processingNotificationSummaryForPageAct(PageActProxyContainer pageA // in auto-resend status. // for auto resend, it'll be handled separately. xz defect // 11861 (10/07/04) - if (notSummaryVO.getIsHistory().equals("F") && notSummaryVO.getAutoResendInd().equals("F")) - { + if (notSummaryVO.getIsHistory().equals("F") && notSummaryVO.getAutoResendInd().equals("F")) { Long notificationUid = notSummaryVO.getNotificationUid(); String phcCd = phcDT.getCd(); String phcClassCd = phcDT.getCaseClassCd(); @@ -992,19 +945,16 @@ private void processingNotificationSummaryForPageAct(PageActProxyContainer pageA * The notification status remains same when the * Investigation or Associated objects are changed */ - if (notificationRecordStatusCode.equalsIgnoreCase(NEDSSConstant.APPROVED_STATUS)) - { + if (notificationRecordStatusCode.equalsIgnoreCase(NEDSSConstant.APPROVED_STATUS)) { trigCd = NEDSSConstant.NOT_CR_APR; } // change from pending approval to approved - if (notificationRecordStatusCode.equalsIgnoreCase(NEDSSConstant.PENDING_APPROVAL_STATUS)) - { + if (notificationRecordStatusCode.equalsIgnoreCase(NEDSSConstant.PENDING_APPROVAL_STATUS)) { trigCd = NEDSSConstant.NOT_CR_PEND_APR; } - if (trigCd != null) - { + if (trigCd != null) { // we only need to update notification when // trigCd is not null retrieveSummaryService.updateNotification( @@ -1020,12 +970,9 @@ private void processingNotificationSummaryForPageAct(PageActProxyContainer pageA } private void processingEventProcessForPageAct(PageActProxyContainer pageActProxyContainer, Long phcUid) throws DataProcessingException { - if (pageActProxyContainer.getPublicHealthCaseContainer().getEdxEventProcessDtoCollection() != null) - { - for (EDXEventProcessDto processDT : pageActProxyContainer.getPublicHealthCaseContainer().getEdxEventProcessDtoCollection()) - { - if(processDT.getDocEventTypeCd()!=null && processDT.getDocEventTypeCd().equals(NEDSSConstant.CASE)) - { + if (pageActProxyContainer.getPublicHealthCaseContainer().getEdxEventProcessDtoCollection() != null) { + for (EDXEventProcessDto processDT : pageActProxyContainer.getPublicHealthCaseContainer().getEdxEventProcessDtoCollection()) { + if (processDT.getDocEventTypeCd() != null && processDT.getDocEventTypeCd().equals(NEDSSConstant.CASE)) { processDT.setNbsEventUid(phcUid); } edxEventProcessRepositoryUtil.insertEventProcess(processDT); @@ -1035,39 +982,35 @@ private void processingEventProcessForPageAct(PageActProxyContainer pageActProxy } private void processingNbsDocumentForPageAct(PageActProxyContainer pageActProxyContainer, Long docUid) throws DataProcessingException { - if (docUid != null) - { + if (docUid != null) { try { // get the NbsDocumentContainer nbsDocVO = nbsDocumentRepositoryUtil.getNBSDocumentWithoutActRelationship(docUid); - if (nbsDocVO.getNbsDocumentDT()!= null + if (nbsDocVO.getNbsDocumentDT() != null && (nbsDocVO.getNbsDocumentDT().getJurisdictionCd() == null || nbsDocVO.getNbsDocumentDT().getJurisdictionCd().equals("")) - ) - { + ) { nbsDocVO.getNbsDocumentDT().setJurisdictionCd(pageActProxyContainer.getPublicHealthCaseContainer() .getThePublicHealthCaseDto() .getJurisdictionCd()); } nbsDocumentRepositoryUtil.updateDocumentWithOutthePatient(nbsDocVO); - } - catch (Exception e) { + } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } } } - private void handlingCoInfectionAndContactDisposition(PageActProxyContainer pageActProxyContainer, Long mprUid, Long actualUid) throws DataProcessingException { - if( !pageActProxyContainer.isRenterant() && pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getCoinfectionId()!=null - && !pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getCoinfectionId().equalsIgnoreCase(NEDSSConstant.COINFCTION_GROUP_ID_NEW_CODE) && mprUid!=null - && !pageActProxyContainer.isMergeCase() && !NEDSSConstant.INVESTIGATION_STATUS_CODE_CLOSED.equals(pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getInvestigationStatusCd())) - { + private void handlingCoInfectionAndContactDisposition(PageActProxyContainer pageActProxyContainer, Long mprUid, Long actualUid) throws DataProcessingException { + if (!pageActProxyContainer.isRenterant() && pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getCoinfectionId() != null + && !pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getCoinfectionId().equalsIgnoreCase(NEDSSConstant.COINFCTION_GROUP_ID_NEW_CODE) && mprUid != null + && !pageActProxyContainer.isMergeCase() && !NEDSSConstant.INVESTIGATION_STATUS_CODE_CLOSED.equals(pageActProxyContainer.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getInvestigationStatusCd())) { updatForConInfectionId(pageActProxyContainer, mprUid, actualUid); } - if(pageActProxyContainer.getPublicHealthCaseContainer().getTheCaseManagementDto()!=null) { + if (pageActProxyContainer.getPublicHealthCaseContainer().getTheCaseManagementDto() != null) { //TODO: NBS STD OR HIV PROG // boolean isStdHivProgramAreaCode =PropertyUtil.isStdOrHivProgramArea(pageProxyVO.getPublicHealthCaseContainer().getThePublicHealthCaseDto().getProgAreaCd()); // if(isStdHivProgramAreaCode) @@ -1079,5 +1022,4 @@ private void handlingCoInfectionAndContactDisposition(PageActProxyContainer pag } - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/page_and_pam/PamRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/page_and_pam/PamRepositoryUtil.java index a97462681..6331b03c1 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/page_and_pam/PamRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/page_and_pam/PamRepositoryUtil.java @@ -22,20 +22,21 @@ public PamRepositoryUtil(NbsActEntityRepository nbsActEntityRepository, this.nbsActEntityRepository = nbsActEntityRepository; this.nbsCaseAnswerRepository = nbsCaseAnswerRepository; } + public PublicHealthCaseContainer getPamHistory(PublicHealthCaseContainer publicHealthCaseContainer) throws DataProcessingException { - Collection pamEntityColl = getPamCaseEntityDTCollection(publicHealthCaseContainer.getThePublicHealthCaseDto()); - publicHealthCaseContainer.setNbsCaseEntityCollection(pamEntityColl); - Collection pamAnswerColl = getPamAnswerDTCollection(publicHealthCaseContainer.getThePublicHealthCaseDto()); - publicHealthCaseContainer.setNbsAnswerCollection(pamAnswerColl); - return publicHealthCaseContainer; + Collection pamEntityColl = getPamCaseEntityDTCollection(publicHealthCaseContainer.getThePublicHealthCaseDto()); + publicHealthCaseContainer.setNbsCaseEntityCollection(pamEntityColl); + Collection pamAnswerColl = getPamAnswerDTCollection(publicHealthCaseContainer.getThePublicHealthCaseDto()); + publicHealthCaseContainer.setNbsAnswerCollection(pamAnswerColl); + return publicHealthCaseContainer; } - private Collection getPamCaseEntityDTCollection(RootDtoInterface rootDTInterface) throws DataProcessingException { - ArrayList pamEntityDTCollection = new ArrayList<> (); + private Collection getPamCaseEntityDTCollection(RootDtoInterface rootDTInterface) throws DataProcessingException { + ArrayList pamEntityDTCollection = new ArrayList<>(); try { - var res = nbsActEntityRepository.getNbsActEntitiesByActUid(rootDTInterface.getUid()); + var res = nbsActEntityRepository.getNbsActEntitiesByActUid(rootDTInterface.getUid()); if (res.isPresent()) { - for(var item : res.get()) { + for (var item : res.get()) { var nbsItem = new NbsActEntityDto(item); pamEntityDTCollection.add(nbsItem); } @@ -46,13 +47,13 @@ private Collection getPamCaseEntityDTCollection(RootDtoInterfa return pamEntityDTCollection; } - private Collection getPamAnswerDTCollection(RootDtoInterface rootDTInterface) throws DataProcessingException { - ArrayList nbsAnswerDTCollection = new ArrayList<> (); + private Collection getPamAnswerDTCollection(RootDtoInterface rootDTInterface) throws DataProcessingException { + ArrayList nbsAnswerDTCollection = new ArrayList<>(); try { - var res = nbsCaseAnswerRepository.getNbsCaseAnswerByActUid(rootDTInterface.getUid()); + var res = nbsCaseAnswerRepository.getNbsCaseAnswerByActUid(rootDTInterface.getUid()); if (res.isPresent()) { - for(var item : res.get()) { + for (var item : res.get()) { var nbsItem = new NbsCaseAnswerDto(item); nbsAnswerDTCollection.add(nbsItem); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/participation/ParticipationRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/participation/ParticipationRepositoryUtil.java index da1194db4..cc0f72823 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/participation/ParticipationRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/participation/ParticipationRepositoryUtil.java @@ -27,8 +27,8 @@ public Collection getParticipationCollection(Long actUid) { var res = participationRepository.findByActUid(actUid); Collection dtoCollection = new ArrayList<>(); if (res.isPresent()) { - for(var item : res.get()) { - var dto = new ParticipationDto(item); + for (var item : res.get()) { + var dto = new ParticipationDto(item); dto.setItNew(false); dto.setItDirty(false); dtoCollection.add(dto); @@ -44,7 +44,7 @@ public void insertParticipationHist(ParticipationDto participationDto) { } public void storeParticipation(ParticipationDto dt) throws DataProcessingException { - try{ + try { if (dt == null) throw new DataProcessingException("Error: try to store null ParticipationDT object."); @@ -56,26 +56,26 @@ else if (dt.isItDelete()) participationRepository.delete(data); else if (dt.isItDirty()) participationRepository.save(data); - }catch(Exception ex){ + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } } public ParticipationDto getParticipation(Long subjectEntityUid, Long actUid) { var items = getParticipations(subjectEntityUid); - for(var item : items) { + for (var item : items) { if (Objects.equals(item.getActUid(), actUid)) { return item; } } - return null; + return null; } public Collection getParticipations(Long subjectEntityUid) { Collection col = new ArrayList<>(); var res = participationRepository.findByParentUid(subjectEntityUid); if (res.isPresent()) { - for(var item : res.get()) { + for (var item : res.get()) { var pat = new ParticipationDto(item); col.add(pat); } @@ -87,7 +87,7 @@ public Collection getParticipationsByActUid(Long actUid) { Collection col = new ArrayList<>(); var res = participationRepository.findByActUid(actUid); if (res.isPresent()) { - for(var item : res.get()) { + for (var item : res.get()) { var pat = new ParticipationDto(item); col.add(pat); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/patient/PatientRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/patient/PatientRepositoryUtil.java index 6ef2032c0..49c0ca9e4 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/patient/PatientRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/patient/PatientRepositoryUtil.java @@ -40,22 +40,18 @@ @Component public class PatientRepositoryUtil { private static final Logger logger = LoggerFactory.getLogger(PatientRepositoryUtil.class); - + private static final String ERROR_DELETE_MSG = "Error Delete Patient Entity: "; + private static final String ERROR_UPDATE_MSG = "Error Updating Existing Patient Entity: "; private final PersonRepository personRepository; private final EntityRepositoryUtil entityRepositoryUtil; private final PersonNameRepository personNameRepository; private final PersonRaceRepository personRaceRepository; private final PersonEthnicRepository personEthnicRepository; private final EntityIdRepository entityIdRepository; - private final RoleRepository roleRepository; private final IOdseIdGeneratorService odseIdGeneratorService; - private final IEntityLocatorParticipationService entityLocatorParticipationService; - private static final String ERROR_DELETE_MSG = "Error Delete Patient Entity: "; - private static final String ERROR_UPDATE_MSG = "Error Updating Existing Patient Entity: "; - public PatientRepositoryUtil( PersonRepository personRepository, @@ -98,13 +94,13 @@ public Person createPerson(PersonContainer personContainer) throws DataProcessin localUid = localIdModel.getUidPrefixCd() + personUid + localIdModel.getUidSuffixCd(); - ArrayList arrayList = new ArrayList<>(); + ArrayList arrayList = new ArrayList<>(); - if(personContainer.getThePersonDto().getLocalId() == null || personContainer.getThePersonDto().getLocalId().trim().length() == 0) { + if (personContainer.getThePersonDto().getLocalId() == null || personContainer.getThePersonDto().getLocalId().trim().length() == 0) { personContainer.getThePersonDto().setLocalId(localUid); } - if(personContainer.getThePersonDto().getPersonParentUid() == null) { + if (personContainer.getThePersonDto().getPersonParentUid() == null) { personContainer.getThePersonDto().setPersonParentUid(personUid); } @@ -122,27 +118,27 @@ public Person createPerson(PersonContainer personContainer) throws DataProcessin personRepository.save(person); //NOTE: Create Person Name - if (personContainer.getThePersonNameDtoCollection() != null && !personContainer.getThePersonNameDtoCollection().isEmpty()) { + if (personContainer.getThePersonNameDtoCollection() != null && !personContainer.getThePersonNameDtoCollection().isEmpty()) { createPersonName(personContainer); } //NOTE: Create Person Race - if (personContainer.getThePersonRaceDtoCollection() != null && !personContainer.getThePersonRaceDtoCollection().isEmpty()) { + if (personContainer.getThePersonRaceDtoCollection() != null && !personContainer.getThePersonRaceDtoCollection().isEmpty()) { createPersonRace(personContainer); } //NOTE: Create Person Ethnic - if (personContainer.getThePersonEthnicGroupDtoCollection() != null && !personContainer.getThePersonEthnicGroupDtoCollection().isEmpty()) { + if (personContainer.getThePersonEthnicGroupDtoCollection() != null && !personContainer.getThePersonEthnicGroupDtoCollection().isEmpty()) { createPersonEthnic(personContainer); } //NOTE: Create EntityID - if (personContainer.getTheEntityIdDtoCollection() != null && !personContainer.getTheEntityIdDtoCollection().isEmpty()) { + if (personContainer.getTheEntityIdDtoCollection() != null && !personContainer.getTheEntityIdDtoCollection().isEmpty()) { createEntityId(personContainer); } //NOTE: Create Entity Locator Participation - if (personContainer.getTheEntityLocatorParticipationDtoCollection() != null && !personContainer.getTheEntityLocatorParticipationDtoCollection().isEmpty()) { + if (personContainer.getTheEntityLocatorParticipationDtoCollection() != null && !personContainer.getTheEntityLocatorParticipationDtoCollection().isEmpty()) { entityLocatorParticipationService.createEntityLocatorParticipation(personContainer.getTheEntityLocatorParticipationDtoCollection(), personContainer.getThePersonDto().getPersonUid()); } //NOTE: Create Role - if (personContainer.getTheRoleDtoCollection() != null && !personContainer.getTheRoleDtoCollection().isEmpty()) { + if (personContainer.getTheRoleDtoCollection() != null && !personContainer.getTheRoleDtoCollection().isEmpty()) { createRole(personContainer); } @@ -152,7 +148,7 @@ public Person createPerson(PersonContainer personContainer) throws DataProcessin @SuppressWarnings("java:S3776") @Transactional public void updateExistingPerson(PersonContainer personContainer) throws DataProcessingException { - ArrayList arrayList = new ArrayList<>(); + ArrayList arrayList = new ArrayList<>(); arrayList.add(NEDSSConstant.PERSON); @@ -163,34 +159,33 @@ public void updateExistingPerson(PersonContainer personContainer) throws DataPro personRepository.save(person); - //NOTE: Create Person Name - if (personContainer.getThePersonNameDtoCollection() != null && !personContainer.getThePersonNameDtoCollection().isEmpty()) { + if (personContainer.getThePersonNameDtoCollection() != null && !personContainer.getThePersonNameDtoCollection().isEmpty()) { updatePersonName(personContainer); } //NOTE: Create Person Race - if (personContainer.getThePersonRaceDtoCollection() != null && !personContainer.getThePersonRaceDtoCollection().isEmpty()) { + if (personContainer.getThePersonRaceDtoCollection() != null && !personContainer.getThePersonRaceDtoCollection().isEmpty()) { updatePersonRace(personContainer); } //NOTE: Create Person Ethnic - if (personContainer.getThePersonEthnicGroupDtoCollection() != null && !personContainer.getThePersonEthnicGroupDtoCollection().isEmpty()) { + if (personContainer.getThePersonEthnicGroupDtoCollection() != null && !personContainer.getThePersonEthnicGroupDtoCollection().isEmpty()) { updatePersonEthnic(personContainer); } //NOTE: Upsert EntityID - if (personContainer.getTheEntityIdDtoCollection() != null && !personContainer.getTheEntityIdDtoCollection().isEmpty()) { + if (personContainer.getTheEntityIdDtoCollection() != null && !personContainer.getTheEntityIdDtoCollection().isEmpty()) { updateEntityId(personContainer); } //NOTE: Create Entity Locator Participation - if (personContainer.getTheEntityLocatorParticipationDtoCollection() != null && !personContainer.getTheEntityLocatorParticipationDtoCollection().isEmpty()) { + if (personContainer.getTheEntityLocatorParticipationDtoCollection() != null && !personContainer.getTheEntityLocatorParticipationDtoCollection().isEmpty()) { entityLocatorParticipationService.updateEntityLocatorParticipation(personContainer.getTheEntityLocatorParticipationDtoCollection(), personContainer.getThePersonDto().getPersonUid()); } //NOTE: Upsert Role - if (personContainer.getTheRoleDtoCollection() != null && !personContainer.getTheRoleDtoCollection().isEmpty()) { + if (personContainer.getTheRoleDtoCollection() != null && !personContainer.getTheRoleDtoCollection().isEmpty()) { createRole(personContainer); } @@ -226,7 +221,7 @@ public PersonContainer loadPerson(Long personUid) { Collection personNameDtoCollection = new ArrayList<>(); var personNameResult = personNameRepository.findByParentUid(personUid); if (personResult.isPresent() && personNameResult.isPresent()) { - for(var item : personNameResult.get()) { + for (var item : personNameResult.get()) { var elem = new PersonNameDto(item); elem.setItDirty(false); elem.setItNew(false); @@ -238,7 +233,7 @@ public PersonContainer loadPerson(Long personUid) { Collection personRaceDtoCollection = new ArrayList<>(); var personRaceResult = personRaceRepository.findByParentUid(personUid); if (personRaceResult.isPresent()) { - for(var item : personRaceResult.get()) { + for (var item : personRaceResult.get()) { var elem = new PersonRaceDto(item); elem.setItDirty(false); elem.setItNew(false); @@ -250,7 +245,7 @@ public PersonContainer loadPerson(Long personUid) { Collection personEthnicGroupDtoCollection = new ArrayList<>(); var personEthnic = personEthnicRepository.findByParentUid(personUid); if (personEthnic.isPresent()) { - for(var item : personEthnic.get()) { + for (var item : personEthnic.get()) { var elem = new PersonEthnicGroupDto(item); elem.setItDirty(false); elem.setItNew(false); @@ -262,7 +257,7 @@ public PersonContainer loadPerson(Long personUid) { Collection entityIdDtoCollection = new ArrayList<>(); var entityIdResult = entityIdRepository.findByParentUid(personUid); if (entityIdResult.isPresent()) { - for(var item : entityIdResult.get()) { + for (var item : entityIdResult.get()) { var elem = new EntityIdDto(item); elem.setItDirty(false); elem.setItNew(false); @@ -273,7 +268,7 @@ public PersonContainer loadPerson(Long personUid) { Collection entityLocatorParticipationDtoCollection = new ArrayList<>(); var entityLocatorResult = entityLocatorParticipationService.findEntityLocatorById(personUid); - for(var item : entityLocatorResult) { + for (var item : entityLocatorResult) { var elem = new EntityLocatorParticipationDto(item); elem.setItDirty(false); elem.setItNew(false); @@ -286,7 +281,7 @@ public PersonContainer loadPerson(Long personUid) { Collection roleDtoCollection = new ArrayList<>(); var roleResult = roleRepository.findByParentUid(personUid); if (roleResult.isPresent()) { - for(var item : roleResult.get()) { + for (var item : roleResult.get()) { var elem = new RoleDto(item); elem.setItDirty(false); elem.setItNew(false); @@ -305,9 +300,10 @@ public Long findPatientParentUidByUid(Long personUid) { var result = personRepository.findPatientParentUidByUid(personUid); return result.map(longs -> longs.get(0)).orElse(null); } - @SuppressWarnings({"java:S3776","java:S1141"}) + + @SuppressWarnings({"java:S3776", "java:S1141"}) private void updatePersonName(PersonContainer personContainer) throws DataProcessingException { - ArrayList personList = (ArrayList ) personContainer.getThePersonNameDtoCollection(); + ArrayList personList = (ArrayList) personContainer.getThePersonNameDtoCollection(); try { var pUid = personContainer.getThePersonDto().getPersonUid(); List persons = personNameRepository.findBySeqIdByParentUid(pUid); @@ -323,14 +319,14 @@ private void updatePersonName(PersonContainer personContainer) throws DataProces List personNameForComparing = new ArrayList<>(); - for(PersonName item : persons) { + for (PersonName item : persons) { StringBuilder sb = new StringBuilder(); sb.append(item.getFirstNm()); sb.append(item.getLastNm()); sb.append(item.getMiddleNm()); sb.append(item.getNmPrefix()); sb.append(item.getNmSuffix()); - if(!personNameForComparing.contains(sb.toString().toUpperCase())) { + if (!personNameForComparing.contains(sb.toString().toUpperCase())) { personNameForComparing.add(sb.toString().toUpperCase()); } } @@ -366,7 +362,7 @@ private void updatePersonName(PersonContainer personContainer) throws DataProces personName.setAddReasonCd("Add"); personNameRepository.save(new PersonName(personName)); - var mprRecord = SerializationUtils.clone(personName); + var mprRecord = SerializationUtils.clone(personName); mprRecord.setPersonUid(personContainer.getThePersonDto().getPersonParentUid()); personNameRepository.save(new PersonName(mprRecord)); } @@ -385,7 +381,7 @@ private void updatePersonName(PersonContainer personContainer) throws DataProces } private void createPersonName(PersonContainer personContainer) throws DataProcessingException { - ArrayList personList = (ArrayList ) personContainer.getThePersonNameDtoCollection(); + ArrayList personList = (ArrayList) personContainer.getThePersonNameDtoCollection(); try { var pUid = personContainer.getThePersonDto().getPersonUid(); for (PersonNameDto personNameDto : personList) { @@ -407,7 +403,7 @@ private void createPersonName(PersonContainer personContainer) throws DataProces @SuppressWarnings({"java:S3776", "java:S1141"}) private void updateEntityId(PersonContainer personContainer) throws DataProcessingException { - ArrayList personList = (ArrayList ) personContainer.getTheEntityIdDtoCollection(); + ArrayList personList = (ArrayList) personContainer.getTheEntityIdDtoCollection(); try { for (EntityIdDto entityIdDto : personList) { @@ -420,8 +416,7 @@ private void updateEntityId(PersonContainer personContainer) throws DataProcessi } catch (Exception e) { logger.error(ERROR_DELETE_MSG + e.getMessage()); //NOSONAR } - } - else { + } else { if (entityIdDto.getAddUserId() == null) { entityIdDto.setAddUserId(AuthUtil.authUser.getNedssEntryId()); } @@ -429,7 +424,7 @@ private void updateEntityId(PersonContainer personContainer) throws DataProcessi entityIdDto.setLastChgUserId(AuthUtil.authUser.getNedssEntryId()); } - var mprRecord = SerializationUtils.clone(entityIdDto); + var mprRecord = SerializationUtils.clone(entityIdDto); mprRecord.setEntityUid(personContainer.getThePersonDto().getPersonParentUid()); mprRecord.setAddReasonCd("Add"); entityIdRepository.save(new EntityId(mprRecord)); @@ -448,9 +443,9 @@ private void updateEntityId(PersonContainer personContainer) throws DataProcessi } } - @SuppressWarnings({"java:S1141","java:S3776"}) + @SuppressWarnings({"java:S1141", "java:S3776"}) private void updatePersonRace(PersonContainer personContainer) throws DataProcessingException { - ArrayList personList = (ArrayList ) personContainer.getThePersonRaceDtoCollection(); + ArrayList personList = (ArrayList) personContainer.getThePersonRaceDtoCollection(); var parentUid = personContainer.getThePersonDto().getPersonParentUid(); Long patientUid = -1L; try { @@ -463,8 +458,7 @@ private void updatePersonRace(PersonContainer personContainer) throws DataProces } catch (Exception e) { logger.error(ERROR_DELETE_MSG + e.getMessage()); //NOSONAR } - } - else { + } else { // Edge case, happen when there are race exist, and we try to remove the second race from the list if (personRaceDto.isItDirty() && !Objects.equals(personRaceDto.getPersonUid(), parentUid)) { retainingRaceCodeList.add(personRaceDto.getRaceCd()); @@ -486,7 +480,7 @@ private void updatePersonRace(PersonContainer personContainer) throws DataProces // This executes after the update process, whatever race not it the retain list and not direct assoc with parent uid will be deleted if (!retainingRaceCodeList.isEmpty() && patientUid > 0) { try { - personRaceRepository.deletePersonRaceByUid(patientUid,retainingRaceCodeList); + personRaceRepository.deletePersonRaceByUid(patientUid, retainingRaceCodeList); } catch (Exception e) { logger.error(ERROR_DELETE_MSG + e.getMessage()); //NOSONAR } @@ -498,7 +492,7 @@ private void updatePersonRace(PersonContainer personContainer) throws DataProces private void createPersonRace(PersonContainer personContainer) throws DataProcessingException { - ArrayList personList = (ArrayList ) personContainer.getThePersonRaceDtoCollection(); + ArrayList personList = (ArrayList) personContainer.getThePersonRaceDtoCollection(); try { for (PersonRaceDto personRaceDto : personList) { var pUid = personContainer.getThePersonDto().getPersonUid(); @@ -512,7 +506,7 @@ private void createPersonRace(PersonContainer personContainer) throws DataProces } private void createPersonEthnic(PersonContainer personContainer) throws DataProcessingException { - ArrayList personList = (ArrayList ) personContainer.getThePersonEthnicGroupDtoCollection(); + ArrayList personList = (ArrayList) personContainer.getThePersonEthnicGroupDtoCollection(); try { for (PersonEthnicGroupDto personEthnicGroupDto : personList) { var pUid = personContainer.getThePersonDto().getPersonUid(); @@ -529,7 +523,7 @@ private void updatePersonEthnic(PersonContainer personContainer) throws DataProc var parentUid = personContainer.getThePersonDto().getPersonParentUid(); for (PersonEthnicGroupDto personEthnicGroupDto : personContainer.getThePersonEthnicGroupDtoCollection()) { - var mprRecord = SerializationUtils.clone(personEthnicGroupDto); + var mprRecord = SerializationUtils.clone(personEthnicGroupDto); mprRecord.setPersonUid(parentUid); personEthnicRepository.save(new PersonEthnicGroup(mprRecord)); @@ -545,7 +539,7 @@ private void updatePersonEthnic(PersonContainer personContainer) throws DataProc } private void createEntityId(PersonContainer personContainer) throws DataProcessingException { - ArrayList personList = (ArrayList ) personContainer.getTheEntityIdDtoCollection(); + ArrayList personList = (ArrayList) personContainer.getTheEntityIdDtoCollection(); try { for (EntityIdDto entityIdDto : personList) { var pUid = personContainer.getThePersonDto().getPersonUid(); @@ -565,9 +559,8 @@ private void createEntityId(PersonContainer personContainer) throws DataProcessi } - private void createRole(PersonContainer personContainer) throws DataProcessingException { - ArrayList personList = (ArrayList ) personContainer.getTheRoleDtoCollection(); + ArrayList personList = (ArrayList) personContainer.getTheRoleDtoCollection(); try { for (RoleDto obj : personList) { roleRepository.save(new Role(obj)); @@ -594,26 +587,21 @@ public PersonContainer preparePersonNameBeforePersistence(PersonContainer person Iterator namesIter = namesCollection.iterator(); PersonNameDto selectedNameDT = null; while (namesIter.hasNext()) { - PersonNameDto thePersonNameDto = namesIter.next(); + PersonNameDto thePersonNameDto = namesIter.next(); if (thePersonNameDto.getNmUseCd() != null - && !thePersonNameDto.getNmUseCd().trim().equals("L")) - { + && !thePersonNameDto.getNmUseCd().trim().equals("L")) { continue; } if (thePersonNameDto.getAsOfDate() != null) { - if (selectedNameDT == null) - { + if (selectedNameDT == null) { selectedNameDT = thePersonNameDto; - } - else if (selectedNameDT.getAsOfDate()!=null - && thePersonNameDto.getAsOfDate()!=null - && thePersonNameDto.getAsOfDate().after(selectedNameDT.getAsOfDate())) - { + } else if (selectedNameDT.getAsOfDate() != null + && thePersonNameDto.getAsOfDate() != null + && thePersonNameDto.getAsOfDate().after(selectedNameDT.getAsOfDate())) { selectedNameDT = thePersonNameDto; } } else { - if (selectedNameDT == null) - { + if (selectedNameDT == null) { selectedNameDT = thePersonNameDto; } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/patient/PersonUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/patient/PersonUtil.java index 9850e575d..b7254194f 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/patient/PersonUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/patient/PersonUtil.java @@ -70,12 +70,12 @@ public Long processLabPersonContainerCollection(Collection pers boolean isExternal = false; String electronicInd = rootDT.getElectronicInd(); if ( - electronicInd != null - && ( - isMorbReport - && electronicInd.equals(NEDSSConstant.EXTERNAL_USER_IND) - || electronicInd.equals(NEDSSConstant.YES) - ) + electronicInd != null + && ( + isMorbReport + && electronicInd.equals(NEDSSConstant.EXTERNAL_USER_IND) + || electronicInd.equals(NEDSSConstant.YES) + ) ) { isExternal = true; } @@ -110,33 +110,22 @@ public Long processLabPersonContainerCollection(Collection pers } - /** * Description: determine person is PAT or PROVIDER, then create or update based on isNEW arg - * */ - private Long setPersonForObservationFlow(String personType, PersonContainer personVO, boolean isNew, boolean isExternal) throws DataProcessingException - { - try - { - if (personType.equalsIgnoreCase(NEDSSConstant.PAT)) - { + */ + private Long setPersonForObservationFlow(String personType, PersonContainer personVO, boolean isNew, boolean isExternal) throws DataProcessingException { + try { + if (personType.equalsIgnoreCase(NEDSSConstant.PAT)) { return patientMatchingService.updateExistingPerson(personVO, isNew ? NEDSSConstant.PAT_CR : NEDSSConstant.PAT_EDIT); - } - else if (personType.equalsIgnoreCase(NEDSSConstant.PRV) && (!isNew || (isNew && isExternal))) - { + } else if (personType.equalsIgnoreCase(NEDSSConstant.PRV) && (!isNew || (isNew && isExternal))) { return providerMatchingService.setProvider(personVO, isNew ? NEDSSConstant.PRV_CR : NEDSSConstant.PRV_EDIT); - } - else - { + } else { throw new IllegalArgumentException("Expected a valid person type: " + personType); } - } - catch (Exception rex) - { + } catch (Exception rex) { throw new DataProcessingException(rex.getMessage(), rex); } } - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/AdvancedCriteria.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/AdvancedCriteria.java index a682efe29..3f5445097 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/AdvancedCriteria.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/AdvancedCriteria.java @@ -17,7 +17,7 @@ public class AdvancedCriteria { public Map getAdvancedInvCriteriaMap(Algorithm algorithmDocument) throws DataProcessingException { Map advanceInvCriteriaMap = new HashMap<>(); - try{ + try { InvCriteriaType advanceInvCriteriaType = algorithmDocument.getElrAdvancedCriteria().getInvCriteria(); /* Create the advanced Criteria map to compare against matched PHCs */ if (advanceInvCriteriaType != null) { @@ -60,8 +60,8 @@ public Map getAdvancedInvCriteriaMap(Algorithm algorithmDocument } } } - }catch(Exception ex){ - throw new DataProcessingException ("Exception while creating advanced Investigation Criteria Map: ", ex); + } catch (Exception ex) { + throw new DataProcessingException("Exception while creating advanced Investigation Criteria Map: ", ex); } return advanceInvCriteriaMap; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/CdaPhcProcessor.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/CdaPhcProcessor.java index e0bad1343..239ca4bb7 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/CdaPhcProcessor.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/CdaPhcProcessor.java @@ -15,16 +15,15 @@ public static void setStandardNBSCaseAnswerVals(PublicHealthCaseDto phcDT, nbsCaseAnswerDT.setAddUserId(phcDT.getAddUserId()); nbsCaseAnswerDT.setLastChgUserId(phcDT.getLastChgUserId()); nbsCaseAnswerDT.setRecordStatusCd(NEDSSConstant.OPEN_INVESTIGATION); - if (nbsCaseAnswerDT.getSeqNbr() != null && nbsCaseAnswerDT.getSeqNbr() < 0) - { + if (nbsCaseAnswerDT.getSeqNbr() != null && nbsCaseAnswerDT.getSeqNbr() < 0) { nbsCaseAnswerDT.setSeqNbr(0); } nbsCaseAnswerDT.setRecordStatusTime(phcDT.getRecordStatusTime()); nbsCaseAnswerDT.setItNew(true); } catch (Exception ex) { - String errorString = "Exception occured while setting standard values for NBS Case Answer DT. "+ex.getMessage(); + String errorString = "Exception occured while setting standard values for NBS Case Answer DT. " + ex.getMessage(); ex.printStackTrace(); - throw new DataProcessingException(errorString,ex); + throw new DataProcessingException(errorString, ex); } } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/ConfirmationMethodRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/ConfirmationMethodRepositoryUtil.java index bf423ca3c..d9bc845fe 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/ConfirmationMethodRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/ConfirmationMethodRepositoryUtil.java @@ -22,7 +22,7 @@ public Collection getConfirmationMethodByPhc(Long phcUid) if (res.isEmpty()) { return new ArrayList<>(); } else { - for(var item : res.get()) { + for (var item : res.get()) { ConfirmationMethodDto data = new ConfirmationMethodDto(item); lst.add(data); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/PublicHealthCaseRepositoryUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/PublicHealthCaseRepositoryUtil.java index 29253a154..7760a7516 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/PublicHealthCaseRepositoryUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/public_health_case/PublicHealthCaseRepositoryUtil.java @@ -114,8 +114,7 @@ public PublicHealthCaseContainer update(PublicHealthCaseContainer phcVO) throws * Inserts ConfirmationMethodDT collection */ - if (phcVO.getTheConfirmationMethodDTCollection() != null) - { + if (phcVO.getTheConfirmationMethodDTCollection() != null) { insertConfirmationMethods(phcVO.getThePublicHealthCaseDto().getUid(), phcVO.getTheConfirmationMethodDTCollection()); } /** @@ -123,16 +122,14 @@ public PublicHealthCaseContainer update(PublicHealthCaseContainer phcVO) throws */ if (phcVO.getTheCaseManagementDto() != null - && phcVO.getTheCaseManagementDto().isCaseManagementDTPopulated) - { + && phcVO.getTheCaseManagementDto().isCaseManagementDTPopulated) { insertCaseManagementDT(phcVO.getThePublicHealthCaseDto().getUid(), phcVO.getTheCaseManagementDto()); } /** * Inserts ActIdDT collection */ - if (phcVO.getTheActIdDTCollection() != null) - { + if (phcVO.getTheActIdDTCollection() != null) { insertActivityIDs(phcVO.getThePublicHealthCaseDto().getUid(), phcVO.getTheActIdDTCollection()); } @@ -140,9 +137,8 @@ public PublicHealthCaseContainer update(PublicHealthCaseContainer phcVO) throws * Inserts ActivityLocatorParticipationDT collection */ - if (phcVO.getTheActivityLocatorParticipationDTCollection() != null) - { - insertActivityLocatorParticipations(phcVO.getThePublicHealthCaseDto().getUid() ,phcVO.getTheActivityLocatorParticipationDTCollection()); + if (phcVO.getTheActivityLocatorParticipationDTCollection() != null) { + insertActivityLocatorParticipations(phcVO.getThePublicHealthCaseDto().getUid(), phcVO.getTheActivityLocatorParticipationDTCollection()); } phcVO.setItNew(false); @@ -155,8 +151,7 @@ public PublicHealthCaseContainer update(PublicHealthCaseContainer phcVO) throws public PublicHealthCaseContainer create(PublicHealthCaseContainer phcVO) throws DataProcessingException { long phcUid; phcVO.getThePublicHealthCaseDto().setVersionCtrlNbr(1); - if(phcVO.getThePublicHealthCaseDto().getSharedInd() == null) - { + if (phcVO.getThePublicHealthCaseDto().getSharedInd() == null) { phcVO.getThePublicHealthCaseDto().setSharedInd("T"); } phcUid = insertPublicHealthCase(phcVO); @@ -169,24 +164,21 @@ public PublicHealthCaseContainer create(PublicHealthCaseContainer phcVO) throws * Inserts ConfirmationMethodDT collection */ - if (phcVO.getTheConfirmationMethodDTCollection() != null) - { + if (phcVO.getTheConfirmationMethodDTCollection() != null) { insertConfirmationMethods(phcUid, phcVO.getTheConfirmationMethodDTCollection()); } /** * Inserts CaseManagementDto */ - if (phcVO.getTheCaseManagementDto() != null && phcVO.getTheCaseManagementDto().isCaseManagementDTPopulated) - { + if (phcVO.getTheCaseManagementDto() != null && phcVO.getTheCaseManagementDto().isCaseManagementDTPopulated) { insertCaseManagementDT(phcUid, phcVO.getTheCaseManagementDto()); } /** * Inserts ActIdDT collection */ - if (phcVO.getTheActIdDTCollection() != null) - { + if (phcVO.getTheActIdDTCollection() != null) { insertActivityIDs(phcUid, phcVO.getTheActIdDTCollection()); } @@ -194,9 +186,8 @@ public PublicHealthCaseContainer create(PublicHealthCaseContainer phcVO) throws * Inserts ActivityLocatorParticipationDT collection */ - if (phcVO.getTheActivityLocatorParticipationDTCollection() != null) - { - insertActivityLocatorParticipations(phcUid ,phcVO.getTheActivityLocatorParticipationDTCollection()); + if (phcVO.getTheActivityLocatorParticipationDTCollection() != null) { + insertActivityLocatorParticipations(phcUid, phcVO.getTheActivityLocatorParticipationDTCollection()); } phcVO.setItNew(false); @@ -206,39 +197,34 @@ public PublicHealthCaseContainer create(PublicHealthCaseContainer phcVO) throws } private void insertActivityLocatorParticipations(Long phcUid, Collection activityIDs) throws DataProcessingException { - ArrayList activityLocatorArray = (ArrayList )activityIDs; - Iterator iterator = activityLocatorArray.iterator(); - try{ - while (iterator.hasNext()) - { - ActivityLocatorParticipationDto activityLocatorVO = iterator.next(); - - if (activityLocatorVO.getLocatorUid() != null && activityLocatorVO.getEntityUid() != null) - { + ArrayList activityLocatorArray = (ArrayList) activityIDs; + Iterator iterator = activityLocatorArray.iterator(); + try { + while (iterator.hasNext()) { + ActivityLocatorParticipationDto activityLocatorVO = iterator.next(); + + if (activityLocatorVO.getLocatorUid() != null && activityLocatorVO.getEntityUid() != null) { ActLocatorParticipation data = new ActLocatorParticipation(activityLocatorVO); data.setActUid(phcUid); actLocatorParticipationRepository.save(data); } } - }catch(Exception ex){ + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } } private void insertActivityIDs(Long phcUid, Collection activityIDs) throws DataProcessingException { Iterator anIterator; - ArrayList activityList = (ArrayList )activityIDs; + ArrayList activityList = (ArrayList) activityIDs; - try - { + try { anIterator = activityList.iterator(); - while(anIterator.hasNext()) - { + while (anIterator.hasNext()) { ActIdDto activityID = anIterator.next(); - if (activityID != null) - { + if (activityID != null) { ActId data = new ActId(activityID); data.setActUid(phcUid); actIdRepository.save(data); @@ -249,10 +235,8 @@ private void insertActivityIDs(Long phcUid, Collection activityIDs) th activityID.setActUid(phcUid); } } - } - catch(Exception ex) - { - throw new DataProcessingException( ex.toString() ); + } catch (Exception ex) { + throw new DataProcessingException(ex.toString()); } } @@ -269,36 +253,33 @@ protected void updateCaseManagementWithEPIIDandFRNum(CaseManagementDto caseManag // generate EPI Link Id (Lot Nbr) and field record number if not present try { - if (caseManagementDto.getEpiLinkId() == null && caseManagementDto.getFieldRecordNumber() == null) - { + if (caseManagementDto.getEpiLinkId() == null && caseManagementDto.getFieldRecordNumber() == null) { SimpleDateFormat sdf = new SimpleDateFormat("yy"); // Just the year, with 2 digits String twoDigitYear = sdf.format(Calendar.getInstance() .getTime()); var epicUid = odseIdGeneratorService.getLocalIdAndUpdateSeed(EPILINK); - String epiLinkId = epicUid.getUidPrefixCd() + epicUid.getSeedValueNbr() + epicUid.getUidSuffixCd(); + String epiLinkId = epicUid.getUidPrefixCd() + epicUid.getSeedValueNbr() + epicUid.getUidSuffixCd(); // TODO: ENV VARIABLE // String lotNum = PropertyUtil.getInstance().getNBS_STATE_CODE() // + epiLinkId.substring(2, epiLinkId.length()-2) // + twoDigitYear; String lotNum = "NBS_STATE_CODE" - + epiLinkId.substring(2, epiLinkId.length()-2) + + epiLinkId.substring(2, epiLinkId.length() - 2) + twoDigitYear; caseManagementDto.setEpiLinkId(lotNum); caseManagementDto.setFieldRecordNumber(lotNum); - } - else if (caseManagementDto.getEpiLinkId() != null && caseManagementDto.getFieldRecordNumber() == null) - { + } else if (caseManagementDto.getEpiLinkId() != null && caseManagementDto.getFieldRecordNumber() == null) { SimpleDateFormat sdf = new SimpleDateFormat("yy"); // Just the year, with 2 digits String twoDigitYear = sdf.format(Calendar.getInstance() .getTime()); var epicUid = odseIdGeneratorService.getLocalIdAndUpdateSeed(EPILINK); - String epiLinkId = epicUid.getUidPrefixCd() + epicUid.getSeedValueNbr() + epicUid.getUidSuffixCd(); + String epiLinkId = epicUid.getUidPrefixCd() + epicUid.getSeedValueNbr() + epicUid.getUidSuffixCd(); // TODO: ENV VARIABLE // String lotNum = PropertyUtil.getInstance().getNBS_STATE_CODE() // + epiLinkId.substring(2, epiLinkId.length()-2) // + twoDigitYear; - String fieldRecordNumber = "NBS_STATE_CODE" - + epiLinkId.substring(2, epiLinkId.length()-2) + String fieldRecordNumber = "NBS_STATE_CODE" + + epiLinkId.substring(2, epiLinkId.length() - 2) + twoDigitYear; caseManagementDto.setFieldRecordNumber(fieldRecordNumber); } @@ -354,28 +335,23 @@ private Long insertPublicHealthCase(PublicHealthCaseContainer phcVO) throws Data } private void insertConfirmationMethods(Long phcUid, Collection coll) throws DataProcessingException { - if(!coll.isEmpty()) - { + if (!coll.isEmpty()) { Iterator anIterator; - ArrayList methodList = (ArrayList )coll; + ArrayList methodList = (ArrayList) coll; - try - { + try { /** * Inserts confirmation methods */ anIterator = methodList.iterator(); - while(anIterator.hasNext()) - { + while (anIterator.hasNext()) { ConfirmationMethodDto confirmationMethod = anIterator.next(); - if (confirmationMethod != null) - { + if (confirmationMethod != null) { ConfirmationMethod data = new ConfirmationMethod(confirmationMethod); data.setPublicHealthCaseUid(phcUid); - if(confirmationMethod.getConfirmationMethodCd() == null) - { + if (confirmationMethod.getConfirmationMethodCd() == null) { data.setConfirmationMethodCd("Unknown"); } confirmationMethodRepository.save(data); @@ -383,16 +359,12 @@ private void insertConfirmationMethods(Long phcUid, Collection pamAnswerDTReturnMap = getPamAnswerDTMaps(publicHealthCaseUID); - Map nbsAnswerMap =new HashMap<>(); - Map nbsRepeatingAnswerMap =new HashMap<>(); - if(pamAnswerDTReturnMap.get(NEDSSConstant.NON_REPEATING_QUESTION)!=null){ - nbsAnswerMap=(HashMap)pamAnswerDTReturnMap.get(NEDSSConstant.NON_REPEATING_QUESTION); + try { + Map pamAnswerDTReturnMap = getPamAnswerDTMaps(publicHealthCaseUID); + Map nbsAnswerMap = new HashMap<>(); + Map nbsRepeatingAnswerMap = new HashMap<>(); + if (pamAnswerDTReturnMap.get(NEDSSConstant.NON_REPEATING_QUESTION) != null) { + nbsAnswerMap = (HashMap) pamAnswerDTReturnMap.get(NEDSSConstant.NON_REPEATING_QUESTION); } - if(pamAnswerDTReturnMap.get(NEDSSConstant.REPEATING_QUESTION)!=null){ - nbsRepeatingAnswerMap=(HashMap)pamAnswerDTReturnMap.get(NEDSSConstant.REPEATING_QUESTION); + if (pamAnswerDTReturnMap.get(NEDSSConstant.REPEATING_QUESTION) != null) { + nbsRepeatingAnswerMap = (HashMap) pamAnswerDTReturnMap.get(NEDSSConstant.REPEATING_QUESTION); } pamVO.setPamAnswerDTMap(nbsAnswerMap); pamVO.setPageRepeatingAnswerDTMap(nbsRepeatingAnswerMap); - Collection pamCaseEntityDTCollection= getActEntityDTCollection(publicHealthCaseUID); + Collection pamCaseEntityDTCollection = getActEntityDTCollection(publicHealthCaseUID); pamVO.setActEntityDTCollection(pamCaseEntityDTCollection); - }catch(Exception ex){ + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } return pamVO; } - private Collection getActEntityDTCollection(Long actUid){ + private Collection getActEntityDTCollection(Long actUid) { Collection lst = new ArrayList<>(); var res = actEntityRepository.getNbsActEntitiesByActUid(actUid); if (res.isEmpty()) { @@ -541,14 +513,14 @@ private Collection getActEntityDTCollection(Long actUid){ } return lst; } + private Map getPamAnswerDTMaps(Long publicHealthCaseUID) throws DataProcessingException { NbsCaseAnswerDto nbsAnswerDT = new NbsCaseAnswerDto(); ArrayList PamAnswerDTCollection; Map nbsReturnAnswerMap = new HashMap<>(); Map nbsAnswerMap = new HashMap<>(); Map nbsRepeatingAnswerMap = new HashMap<>(); - try - { + try { var pamAnsCol = nbsCaseAnswerRepository.getNbsCaseAnswerByActUid(publicHealthCaseUID); if (pamAnsCol.isEmpty()) { @@ -560,9 +532,8 @@ private Map getPamAnswerDTMaps(Long publicHealthCaseUID) throws Iterator it = PamAnswerDTCollection.iterator(); Long nbsQuestionUid = 0L; Collection coll = new ArrayList<>(); - while (it.hasNext()) - { - NbsCaseAnswerDto pamAnsDT = new NbsCaseAnswerDto ((NbsCaseAnswer) it.next()); + while (it.hasNext()) { + NbsCaseAnswerDto pamAnsDT = new NbsCaseAnswerDto((NbsCaseAnswer) it.next()); if (pamAnsDT.getNbsQuestionUid() != null && nbsQuestionUid != 0 @@ -572,58 +543,43 @@ private Map getPamAnswerDTMaps(Long publicHealthCaseUID) throws coll = new ArrayList<>(); } - if (pamAnsDT.getAnswerGroupSeqNbr() != null && pamAnsDT.getAnswerGroupSeqNbr() > -1) - { - if (nbsRepeatingAnswerMap.get(pamAnsDT.getNbsQuestionUid()) == null) - { + if (pamAnsDT.getAnswerGroupSeqNbr() != null && pamAnsDT.getAnswerGroupSeqNbr() > -1) { + if (nbsRepeatingAnswerMap.get(pamAnsDT.getNbsQuestionUid()) == null) { Collection collection = new ArrayList(); collection.add(pamAnsDT); nbsRepeatingAnswerMap.put(pamAnsDT.getNbsQuestionUid(), collection); - } - else - { + } else { Collection collection = (Collection) nbsRepeatingAnswerMap.get(pamAnsDT.getNbsQuestionUid()); collection.add(pamAnsDT); nbsRepeatingAnswerMap.put(pamAnsDT.getNbsQuestionUid(), collection); } - } - else if ( + } else if ( (pamAnsDT.getNbsQuestionUid() != null && pamAnsDT.getNbsQuestionUid().compareTo(nbsQuestionUid) == 0 ) - && pamAnsDT.getSeqNbr() != null - && pamAnsDT.getSeqNbr() > 0 - ) - { + && pamAnsDT.getSeqNbr() != null + && pamAnsDT.getSeqNbr() > 0 + ) { coll.add(pamAnsDT); - } - else if (pamAnsDT.getSeqNbr() != null && pamAnsDT.getSeqNbr() > 0) - { - if (coll.size() > 0) - { + } else if (pamAnsDT.getSeqNbr() != null && pamAnsDT.getSeqNbr() > 0) { + if (coll.size() > 0) { nbsAnswerMap.put(nbsQuestionUid, coll); coll = new ArrayList<>(); } coll.add(pamAnsDT); - } - else - { - if (coll.size() > 0) - { + } else { + if (coll.size() > 0) { nbsAnswerMap.put(nbsQuestionUid, coll); } nbsAnswerMap.put(pamAnsDT.getNbsQuestionUid(), pamAnsDT); coll = new ArrayList<>(); } nbsQuestionUid = pamAnsDT.getNbsQuestionUid(); - if (!it.hasNext() && coll.size() > 0) - { + if (!it.hasNext() && coll.size() > 0) { nbsAnswerMap.put(pamAnsDT.getNbsQuestionUid(), coll); } } - } - catch (Exception ex) - { + } catch (Exception ex) { throw new DataProcessingException(ex.toString()); } nbsReturnAnswerMap.put(NEDSSConstant.NON_REPEATING_QUESTION, nbsAnswerMap); diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/sql/QueryHelper.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/sql/QueryHelper.java index e66dec417..b7c1df958 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/sql/QueryHelper.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/sql/QueryHelper.java @@ -20,7 +20,7 @@ public QueryHelper(ProgAreaJurisdictionUtil progAreaJurisdictionUtil) { /** * OBSERVATIONLABREPORT & OBSERVATIONMORBIDITYREPORT -> SECURE By both prog and jus - * */ + */ @SuppressWarnings("java:S125") public String getDataAccessWhereClause(String businessObjLookupName, String operation, String alias) { @@ -40,10 +40,10 @@ public String getDataAccessWhereClause(String businessObjLookupName, String oper // if (paSecured && jSecured) // { - columnName = "program_jurisdiction_oid"; - ownerList = getHashedPAJList(businessObjLookupName, operation, false); - guestList = getHashedPAJList(businessObjLookupName, operation, true); - whereClause = buildWhereClause(ownerList, guestList, columnName, alias,true, businessObjLookupName); + columnName = "program_jurisdiction_oid"; + ownerList = getHashedPAJList(businessObjLookupName, operation, false); + guestList = getHashedPAJList(businessObjLookupName, operation, true); + whereClause = buildWhereClause(ownerList, guestList, columnName, alias, true, businessObjLookupName); // } // else if (paSecured || jSecured) { // //If the record is secured by program area only, do the following @@ -111,8 +111,7 @@ private String getHashedPAJList(String businessObjLookupName, String operation, if (hashedPAJList.toString().trim().length() > 0) { return hashedPAJList.toString().trim().substring(0, (hashedPAJList.toString().trim().length() - 1)); - } - else { + } else { return hashedPAJList.toString(); } } @@ -128,20 +127,17 @@ public String buildWhereClause(String ownerList, String guestList, if (isOwnerClauseValid && isGuestClauseValid) { return "(" + whereClauseOwner + " or " + whereClauseGuest + ")"; - } - else if (isOwnerClauseValid) { + } else if (isOwnerClauseValid) { return "(" + whereClauseOwner + ")"; - } - else if (isGuestClauseValid) { + } else if (isGuestClauseValid) { return "(" + whereClauseGuest + ")"; - } - else { + } else { return "(0=1)"; } } - protected String buildOwnerWhereClause(String ownerList, String columnName, - String alias, boolean OIDFlag, String businessObjLookupName) { + protected String buildOwnerWhereClause(String ownerList, String columnName, + String alias, boolean OIDFlag, String businessObjLookupName) { String whereClauseOwner = ""; @@ -150,13 +146,11 @@ protected String buildOwnerWhereClause(String ownerList, String columnName, if (alias == null || alias.trim().length() == 0) { whereClauseOwner = "(" + columnName + " in (" + ownerList + "))"; - } - else { + } else { whereClauseOwner = "(" + alias + "." + columnName + " in (" + ownerList + "))"; } - } - else { + } else { whereClauseOwner = null; } @@ -165,33 +159,29 @@ protected String buildOwnerWhereClause(String ownerList, String columnName, protected String buildGuestWhereClause(String guestList, String columnName, - String alias, boolean OIDFlag, String businessObjLookupName) { + String alias, boolean OIDFlag, String businessObjLookupName) { //logger.debug("alias = " + alias); String whereClauseGuest = ""; if (guestList != null && guestList.trim().length() != 0) { if (alias == null || alias.trim().length() == 0) { - whereClauseGuest = "(("+ columnName + " in (" + guestList + + whereClauseGuest = "((" + columnName + " in (" + guestList + ")) and shared_ind = '" + "T" + "')"; - } - else { + } else { whereClauseGuest = "((" + alias + "." + columnName + " in (" + guestList + ")) and " + alias + ".shared_ind = '" + "T" + "')"; } - } - else { + } else { whereClauseGuest = null; } - - return whereClauseGuest; } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/wds/ValidateDecisionSupport.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/wds/ValidateDecisionSupport.java index 35706711e..946ccfb4d 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/wds/ValidateDecisionSupport.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/wds/ValidateDecisionSupport.java @@ -37,9 +37,42 @@ public ValidateDecisionSupport(EdxPhcrDocumentUtil edxPHCRDocumentUtil) { this.edxPHCRDocumentUtil = edxPHCRDocumentUtil; } - public void processNbsObject(EdxRuleManageDto edxRuleManageDT, PublicHealthCaseContainer publicHealthCaseContainer, NbsQuestionMetadata metaData){ + public static void setMethod(Object nbsObject, Method setMethod, EdxRuleManageDto edxRuleManageDT) { + try { + Class[] parameterArray = setMethod.getParameterTypes(); + for (Object object : parameterArray) { + if (object.toString().equalsIgnoreCase("class java.math.BigDecimal")) { + if (edxRuleManageDT.getDefaultNumericValue() != null) + setMethod.invoke(nbsObject, new BigDecimal(edxRuleManageDT.getDefaultNumericValue())); + else + setMethod.invoke(nbsObject, new BigDecimal(edxRuleManageDT.getDefaultStringValue())); + } else if (object.toString().equalsIgnoreCase("class java.lang.String")) { + if (edxRuleManageDT.getDefaultStringValue() != null && !edxRuleManageDT.getDefaultStringValue().trim().equals("")) + setMethod.invoke(nbsObject, edxRuleManageDT.getDefaultStringValue()); + else if (edxRuleManageDT.getDefaultCommentValue() != null && !edxRuleManageDT.getDefaultCommentValue().trim().equals("")) + setMethod.invoke(nbsObject, edxRuleManageDT.getDefaultCommentValue()); + } else if (object.toString().equalsIgnoreCase("class java.sql.Timestamp")) { + setMethod.invoke(nbsObject, StringUtils.stringToStrutsTimestamp(edxRuleManageDT.getDefaultStringValue())); + } else if (object.toString().equalsIgnoreCase("class java.lang.Integer")) { + if (edxRuleManageDT.getDefaultNumericValue() != null) + setMethod.invoke(nbsObject, edxRuleManageDT.getDefaultNumericValue()); + else + setMethod.invoke(nbsObject, edxRuleManageDT.getDefaultStringValue()); + } else if (object.toString().equalsIgnoreCase("class java.lang.Long")) { + if (edxRuleManageDT.getDefaultNumericValue() != null) + setMethod.invoke(nbsObject, edxRuleManageDT.getDefaultNumericValue()); + else + setMethod.invoke(nbsObject, edxRuleManageDT.getDefaultStringValue()); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + public void processNbsObject(EdxRuleManageDto edxRuleManageDT, PublicHealthCaseContainer publicHealthCaseContainer, NbsQuestionMetadata metaData) { PublicHealthCaseDto publicHealthCaseDto = publicHealthCaseContainer.getThePublicHealthCaseDto(); - processNBSObjectDT( edxRuleManageDT, publicHealthCaseContainer, publicHealthCaseDto, metaData); + processNBSObjectDT(edxRuleManageDT, publicHealthCaseContainer, publicHealthCaseDto, metaData); } public void processNBSObjectDT(EdxRuleManageDto edxRuleManageDT, PublicHealthCaseContainer publicHealthCaseContainer, Object object, NbsQuestionMetadata metaData) { @@ -59,7 +92,7 @@ public void processNBSObjectDT(EdxRuleManageDto edxRuleManageDT, PublicHealthCas */ String getMethodName = dataLocation.replaceAll("_", ""); - getMethodName = "GET" + getMethodName.substring(getMethodName.indexOf(".") + 1, getMethodName.length()); + getMethodName = "GET" + getMethodName.substring(getMethodName.indexOf(".") + 1); Class phcClass = object.getClass(); try { @@ -70,7 +103,7 @@ public void processNBSObjectDT(EdxRuleManageDto edxRuleManageDT, PublicHealthCas Method setMethod = null; if (metaData.getDataType().equalsIgnoreCase(NEDSSConstant.NBS_QUESTION_DATATYPE_TEXT) || metaData.getDataType().equalsIgnoreCase(NEDSSConstant.NBS_QUESTION_DATATYPE_CODED_VALUE)) { - setMethod = phcClass.getMethod(setMethodName, new String().getClass()); + setMethod = phcClass.getMethod(setMethodName, "".getClass()); } else if (metaData.getDataType().equalsIgnoreCase(NEDSSConstant.NBS_QUESTION_DATATYPE_DATETIME) || metaData.getDataType().equalsIgnoreCase(NEDSSConstant.DATETIME_DATATYPE) || metaData.getDataType().equalsIgnoreCase(NEDSSConstant.NBS_QUESTION_DATATYPE_DATE)) { @@ -96,7 +129,7 @@ else if (value.getReturnType().equals(String.class)) // Added because question I } } catch (Exception e) { e.printStackTrace(); - } + } } @@ -111,12 +144,11 @@ public void processNBSCaseAnswerDT(EdxRuleManageDto edxRuleManageDT, PublicHealt isOverwrite = false; } String value = edxRuleManageDT.getDefaultStringValue(); - if(value!=null && value.equalsIgnoreCase(NEDSSConstant.USE_CURRENT_DATE)) - { - value=new SimpleDateFormat("MM/dd/yyyy").format(Calendar.getInstance().getTime()); + if (value != null && value.equalsIgnoreCase(NEDSSConstant.USE_CURRENT_DATE)) { + value = new SimpleDateFormat("MM/dd/yyyy").format(Calendar.getInstance().getTime()); } edxRuleManageDT.setDefaultStringValue(value); - Map answerMap = pamVO.getPamAnswerDTMap(); + Map answerMap = pamVO.getPamAnswerDTMap(); if (isOverwrite) { Collection list = new ArrayList<>(); if (metaData.getNbsUiComponentUid().compareTo(1013L) == 0) // NOSONAR @@ -156,9 +188,7 @@ public void processNBSCaseAnswerDT(EdxRuleManageDto edxRuleManageDT, PublicHealt edxPHCRDocumentUtil.setStandardNBSCaseAnswerVals(publicHealthCaseContainer, nbsAnswerDT); answerMap.put(metaData.getQuestionIdentifier(), nbsAnswerDT); } - } - else - { + } else { if (pamVO.getPamAnswerDTMap().get(metaData.getQuestionIdentifier()) == null) { Collection list = new ArrayList<>(); if (metaData.getNbsUiComponentUid().compareTo(1013L) == 0) //NOSONAR @@ -202,8 +232,9 @@ public void processNBSCaseAnswerDT(EdxRuleManageDto edxRuleManageDT, PublicHealt } pamVO.setPamAnswerDTMap(answerMap); } + @SuppressWarnings("java:S6541") - public void processConfirmationMethodCodeDT(EdxRuleManageDto edxRuleManageDT, PublicHealthCaseContainer publicHealthCaseContainer, NbsQuestionMetadata metaData) { + public void processConfirmationMethodCodeDT(EdxRuleManageDto edxRuleManageDT, PublicHealthCaseContainer publicHealthCaseContainer, NbsQuestionMetadata metaData) { String behavior = edxRuleManageDT.getBehavior(); boolean isOverwrite = false; if (behavior.equalsIgnoreCase("1")) { @@ -232,7 +263,7 @@ public void processConfirmationMethodCodeDT(EdxRuleManageDto edxRuleManageDT, P Timestamp time; while (cofirmIt.hasNext()) { - ConfirmationMethodDto confirmDTTime = cofirmIt.next(); + ConfirmationMethodDto confirmDTTime = cofirmIt.next(); if (confirmDTTime.getConfirmationMethodTime() != null) { time = confirmDTTime.getConfirmationMethodTime(); confirmDT.setConfirmationMethodTime(time); @@ -276,7 +307,7 @@ public void processConfirmationMethodCodeDT(EdxRuleManageDto edxRuleManageDT, P Iterator cofirmIt = confirmColl.iterator(); boolean matchFound = false; while (cofirmIt.hasNext()) { - ConfirmationMethodDto confirmDT = cofirmIt.next(); + ConfirmationMethodDto confirmDT = cofirmIt.next(); if (confirmDT.getConfirmationMethodTime() != null) time = confirmDT.getConfirmationMethodTime(); if (confirmDT.getConfirmationMethodCd() == null || confirmDT.getConfirmationMethodCd().trim().equals("")) { @@ -305,39 +336,6 @@ public void processConfirmationMethodCodeDT(EdxRuleManageDto edxRuleManageDT, P } } - - public static void setMethod(Object nbsObject, Method setMethod, EdxRuleManageDto edxRuleManageDT) { - try { - Class[] parameterArray = setMethod.getParameterTypes(); - for (Object object : parameterArray) { - if (object.toString().equalsIgnoreCase("class java.math.BigDecimal")) { - if (edxRuleManageDT.getDefaultNumericValue() != null) - setMethod.invoke(nbsObject, new BigDecimal(edxRuleManageDT.getDefaultNumericValue())); - else - setMethod.invoke(nbsObject, new BigDecimal(edxRuleManageDT.getDefaultStringValue())); - } else if (object.toString().equalsIgnoreCase("class java.lang.String")) { - if (edxRuleManageDT.getDefaultStringValue() != null && !edxRuleManageDT.getDefaultStringValue().trim().equals("")) - setMethod.invoke(nbsObject, edxRuleManageDT.getDefaultStringValue()); - else if (edxRuleManageDT.getDefaultCommentValue() != null && !edxRuleManageDT.getDefaultCommentValue().trim().equals("")) - setMethod.invoke(nbsObject, edxRuleManageDT.getDefaultCommentValue()); - } else if (object.toString().equalsIgnoreCase("class java.sql.Timestamp")) { - setMethod.invoke(nbsObject, StringUtils.stringToStrutsTimestamp(edxRuleManageDT.getDefaultStringValue())); - } else if (object.toString().equalsIgnoreCase("class java.lang.Integer")) { - if (edxRuleManageDT.getDefaultNumericValue() != null) - setMethod.invoke(nbsObject, edxRuleManageDT.getDefaultNumericValue()); - else - setMethod.invoke(nbsObject, edxRuleManageDT.getDefaultStringValue()); - } else if (object.toString().equalsIgnoreCase("class java.lang.Long")) { - if (edxRuleManageDT.getDefaultNumericValue() != null) - setMethod.invoke(nbsObject, edxRuleManageDT.getDefaultNumericValue()); - else - setMethod.invoke(nbsObject, edxRuleManageDT.getDefaultStringValue()); - } - } - } catch (Exception e) { - e.printStackTrace(); - } - } @SuppressWarnings({"java:S3776", "java:S6541"}) public PublicHealthCaseContainer processConfirmationMethodTimeDT(EdxRuleManageDto edxRuleManageDT, PublicHealthCaseContainer publicHealthCaseContainer, NbsQuestionMetadata metaData) throws DataProcessingException { String behavior = edxRuleManageDT.getBehavior(); @@ -349,9 +347,8 @@ public PublicHealthCaseContainer processConfirmationMethodTimeDT(EdxRuleManageDt } String time = edxRuleManageDT.getDefaultStringValue(); //If the date selected is current date, the date is translated to MM/dd/yyyy - if(time!=null && time.equalsIgnoreCase(NEDSSConstant.USE_CURRENT_DATE)) - { - time= TimeStampUtil.convertTimestampToString(); + if (time != null && time.equalsIgnoreCase(NEDSSConstant.USE_CURRENT_DATE)) { + time = TimeStampUtil.convertTimestampToString(); } if (isOverwrite) { @@ -373,13 +370,13 @@ public PublicHealthCaseContainer processConfirmationMethodTimeDT(EdxRuleManageDt //check previous code entered: Collection confirmColl = publicHealthCaseContainer.getTheConfirmationMethodDTCollection(); - if(confirmColl!=null){ + if (confirmColl != null) { Iterator cofirmIt = confirmColl.iterator(); String code; while (cofirmIt.hasNext()) { - ConfirmationMethodDto confirmDTCode = cofirmIt.next(); - if (confirmDTCode.getConfirmationMethodCd() != null){ + ConfirmationMethodDto confirmDTCode = cofirmIt.next(); + if (confirmDTCode.getConfirmationMethodCd() != null) { code = confirmDTCode.getConfirmationMethodCd(); confirmDT.setConfirmationMethodCd(code); break; @@ -421,19 +418,19 @@ public PublicHealthCaseContainer processConfirmationMethodTimeDT(EdxRuleManageDt return publicHealthCaseContainer; } - public void processNBSCaseManagementDT(EdxRuleManageDto edxRuleManageDT, PublicHealthCaseContainer publicHealthCaseContainer, NbsQuestionMetadata metaData){ + public void processNBSCaseManagementDT(EdxRuleManageDto edxRuleManageDT, PublicHealthCaseContainer publicHealthCaseContainer, NbsQuestionMetadata metaData) { if (publicHealthCaseContainer.getTheCaseManagementDto() != null) { CaseManagementDto caseManagementDto = publicHealthCaseContainer.getTheCaseManagementDto(); caseManagementDto.setCaseManagementDTPopulated(true); - processNBSObjectDT( edxRuleManageDT, publicHealthCaseContainer, caseManagementDto, metaData); + processNBSObjectDT(edxRuleManageDT, publicHealthCaseContainer, caseManagementDto, metaData); } } - public void processConfirmationMethodCodeDTRequired(PublicHealthCaseContainer publicHealthCaseContainer){ + public void processConfirmationMethodCodeDTRequired(PublicHealthCaseContainer publicHealthCaseContainer) { Collection confirmColl = publicHealthCaseContainer.getTheConfirmationMethodDTCollection(); - if(confirmColl!=null){ + if (confirmColl != null) { for (ConfirmationMethodDto confirmDT : confirmColl) { if (confirmDT.getConfirmationMethodCd() == null && confirmDT.getConfirmationMethodTime() != null) { @@ -488,7 +485,6 @@ public void parseInvestigationDefaultValuesType(Map map, Investi } - public void processActIds(EdxRuleManageDto edxRuleManageDT, PublicHealthCaseContainer publicHealthCaseContainer, NbsQuestionMetadata metaData) { String behavior = edxRuleManageDT.getBehavior(); @@ -502,7 +498,7 @@ public void processActIds(EdxRuleManageDto edxRuleManageDT, .getTheActIdDTCollection(); if (actIdColl != null && actIdColl.size() > 0) { Iterator ite = actIdColl.iterator(); - ActIdDto actIdDT = ite.next(); + ActIdDto actIdDT = ite.next(); if (actIdDT.getTypeCd() != null && actIdDT.getTypeCd().equalsIgnoreCase( NEDSSConstant.ACT_ID_STATE_TYPE_CD) @@ -534,8 +530,7 @@ else if (!isOverwrite && actIdDT.getRootExtensionTxt() == null) protected void getCurrentDateValue(EdxRuleManageDto edxRuleManageDT) { if (edxRuleManageDT.getDefaultStringValue() != null && edxRuleManageDT.getDefaultStringValue().equals( - NEDSSConstant.USE_CURRENT_DATE)) - { + NEDSSConstant.USE_CURRENT_DATE)) { edxRuleManageDT.setDefaultStringValue(StringUtils .formatDate(new Timestamp((new Date()).getTime()))); } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/wds/WdsObjectChecker.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/wds/WdsObjectChecker.java index 93ce64092..cbe9d9c25 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/wds/WdsObjectChecker.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/component/wds/WdsObjectChecker.java @@ -15,16 +15,15 @@ public class WdsObjectChecker { public boolean checkNbsObject(EdxRuleManageDto edxRuleManageDT, Object object, NbsQuestionMetadata metaData) { String dataLocation = metaData.getDataLocation(); String setMethodName = dataLocation.replaceAll("_", ""); - setMethodName = "SET" + setMethodName.substring(setMethodName.indexOf(".") + 1, setMethodName.length()); + setMethodName = "SET" + setMethodName.substring(setMethodName.indexOf(".") + 1); String getMethodName = dataLocation.replaceAll("_", ""); - getMethodName = "GET" + getMethodName.substring(getMethodName.indexOf(".") + 1, getMethodName.length()); + getMethodName = "GET" + getMethodName.substring(getMethodName.indexOf(".") + 1); Class phcClass = object.getClass(); try { Method[] methodList = phcClass.getDeclaredMethods(); - for (Method item : methodList) { - Method method = item; + for (Method method : methodList) { if (method.getName().equalsIgnoreCase(getMethodName)) { //System.out.println(method.getName()); Object ob = method.invoke(object, (Object[]) null); @@ -96,9 +95,7 @@ else if (ob == null) } else { if (ob != null) { sourceValue = Long.parseLong(ob.toString()); - } - else - { + } else { sourceValue = 0L; } if (edxRuleManageDT.getValue() != null) @@ -146,5 +143,4 @@ else if (ob == null) return false; } - } diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/model/Coded.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/model/Coded.java index cf227cb0a..a18bd8055 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/model/Coded.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/model/Coded.java @@ -5,6 +5,7 @@ @Getter @Setter +@SuppressWarnings("all") public class Coded { private String code; private String codeDescription; diff --git a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/time/TimeStampUtil.java b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/time/TimeStampUtil.java index 81676ea84..4c89a00e6 100644 --- a/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/time/TimeStampUtil.java +++ b/data-processing-service/src/main/java/gov/cdc/dataprocessing/utilities/time/TimeStampUtil.java @@ -32,12 +32,13 @@ public static String convertTimestampToString() { SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); return sdf.format(timestamp); } + public static Timestamp convertStringToTimestamp(String timestampString) throws DataProcessingException { try { SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); java.util.Date parsedDate = sdf.parse(timestampString); return new Timestamp(parsedDate.getTime()); - }catch (Exception e) { + } catch (Exception e) { throw new DataProcessingException(e.getMessage()); } diff --git a/data-processing-service/src/main/resources/xsd/DSMAlgorithm.xsd b/data-processing-service/src/main/resources/xsd/DSMAlgorithm.xsd index 8490a3d7d..a3caa0539 100644 --- a/data-processing-service/src/main/resources/xsd/DSMAlgorithm.xsd +++ b/data-processing-service/src/main/resources/xsd/DSMAlgorithm.xsd @@ -2,309 +2,310 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data-processing-service/src/main/resources/xsd/PHDC.xsd b/data-processing-service/src/main/resources/xsd/PHDC.xsd index 460bc9753..573579001 100644 --- a/data-processing-service/src/main/resources/xsd/PHDC.xsd +++ b/data-processing-service/src/main/resources/xsd/PHDC.xsd @@ -6,2205 +6,2229 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/config/CacheConfigTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/config/CacheConfigTest.java new file mode 100644 index 000000000..ddaf48055 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/config/CacheConfigTest.java @@ -0,0 +1,46 @@ +package gov.cdc.dataprocessing.config; + +import com.github.benmanes.caffeine.cache.Caffeine; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.cache.CacheManager; +import org.springframework.cache.caffeine.CaffeineCacheManager; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; + +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import static org.junit.jupiter.api.Assertions.*; + +class CacheConfigTest { + + private AnnotationConfigApplicationContext context; + + @BeforeEach + void setUp() { + context = new AnnotationConfigApplicationContext(CacheConfig.class); + } + + @Test + void testCacheManager() { + CacheManager cacheManager = context.getBean(CacheManager.class); + assertNotNull(cacheManager); + assertEquals(CaffeineCacheManager.class, cacheManager.getClass()); + + CaffeineCacheManager caffeineCacheManager = (CaffeineCacheManager) cacheManager; + assertNotEquals(List.of("srte"), caffeineCacheManager.getCacheNames()); + } + + @Test + void testCaffeineConfig() { + CacheConfig cacheConfig = context.getBean(CacheConfig.class); + Caffeine caffeine = cacheConfig.caffeineConfig(); + assertNotNull(caffeine); + + Caffeine expectedCaffeine = Caffeine.newBuilder() + .expireAfterAccess(60, TimeUnit.MINUTES); + + assertEquals(expectedCaffeine.toString(), caffeine.toString()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/config/KafkaConsumerConfigTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/config/KafkaConsumerConfigTest.java new file mode 100644 index 000000000..967abbaa8 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/config/KafkaConsumerConfigTest.java @@ -0,0 +1,66 @@ +package gov.cdc.dataprocessing.config; + + +import org.apache.kafka.clients.consumer.ConsumerConfig; +import org.apache.kafka.common.serialization.StringDeserializer; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.MockitoAnnotations; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.kafka.config.ConcurrentKafkaListenerContainerFactory; +import org.springframework.kafka.core.ConsumerFactory; + +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.*; + +class KafkaConsumerConfigTest { + + @InjectMocks + private KafkaConsumerConfig kafkaConsumerConfig; + + @Value("${spring.kafka.group-id}") + private String groupId; + + @Value("${spring.kafka.bootstrap-servers}") + private String bootstrapServers; + + @Value("${spring.kafka.consumer.maxPollIntervalMs}") + private String maxPollInterval; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + // Initialize properties for the test + groupId = "test-group-id"; + bootstrapServers = "localhost:9092"; + maxPollInterval = "60000"; + + kafkaConsumerConfig.groupId = groupId; + kafkaConsumerConfig.bootstrapServers = bootstrapServers; + kafkaConsumerConfig.maxPollInterval = maxPollInterval; + } + + @Test + void testConsumerFactory() { + ConsumerFactory consumerFactory = kafkaConsumerConfig.consumerFactory(); + assertNotNull(consumerFactory); + + Map configs = consumerFactory.getConfigurationProperties(); + assertEquals(bootstrapServers, configs.get(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG)); + assertEquals(groupId, configs.get(ConsumerConfig.GROUP_ID_CONFIG)); + assertEquals(StringDeserializer.class, configs.get(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG)); + assertEquals(StringDeserializer.class, configs.get(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG)); + assertEquals(maxPollInterval, configs.get(ConsumerConfig.MAX_POLL_INTERVAL_MS_CONFIG)); + assertEquals("false", configs.get(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG)); + } + + @Test + void testKafkaListenerContainerFactory() { + ConcurrentKafkaListenerContainerFactory factory = kafkaConsumerConfig.kafkaListenerContainerFactory(); + assertNotNull(factory); + assertNotNull(factory.getConsumerFactory()); + assertNotEquals(kafkaConsumerConfig.consumerFactory(), factory.getConsumerFactory()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/config/KafkaProducerConfigTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/config/KafkaProducerConfigTest.java new file mode 100644 index 000000000..12d1e23ce --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/config/KafkaProducerConfigTest.java @@ -0,0 +1,54 @@ +package gov.cdc.dataprocessing.config; + +import org.apache.kafka.clients.producer.ProducerConfig; +import org.apache.kafka.common.serialization.StringSerializer; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.MockitoAnnotations; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.kafka.core.DefaultKafkaProducerFactory; +import org.springframework.kafka.core.KafkaTemplate; +import org.springframework.kafka.core.ProducerFactory; + +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class KafkaProducerConfigTest { + + @InjectMocks + private KafkaProducerConfig kafkaProducerConfig; + + @Value("${spring.kafka.bootstrap-servers}") + private String bootstrapServers; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + // Initialize properties for the test + bootstrapServers = "localhost:9092"; + + kafkaProducerConfig.bootstrapServers = bootstrapServers; + } + + @Test + void testProducerFactory() { + ProducerFactory producerFactory = kafkaProducerConfig.producerFactory(); + assertNotNull(producerFactory); + + Map configs = producerFactory.getConfigurationProperties(); + assertEquals(bootstrapServers, configs.get(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG)); + assertEquals(StringSerializer.class, configs.get(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG)); + assertEquals(StringSerializer.class, configs.get(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG)); + assertEquals("true", configs.get(ProducerConfig.ENABLE_IDEMPOTENCE_CONFIG)); + } + + @Test + void testKafkaTemplate() { + KafkaTemplate kafkaTemplate = kafkaProducerConfig.kafkaTemplate(); + assertNotNull(kafkaTemplate); + assertEquals(DefaultKafkaProducerFactory.class, kafkaTemplate.getProducerFactory().getClass()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/constant/MixConstantTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/constant/MixConstantTest.java new file mode 100644 index 000000000..0b6e0dd19 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/constant/MixConstantTest.java @@ -0,0 +1,66 @@ +package gov.cdc.dataprocessing.constant; + +import gov.cdc.dataprocessing.constant.elr.NEDSSConstant; +import org.junit.jupiter.api.Test; + +import static gov.cdc.dataprocessing.constant.NBSConstantUtil.configFileName; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + +class MixConstantTest { + @Test + void testConst() { + assertNotNull( CTConstants.StdInitiatedWithoutInterviewLong); + assertNotNull( CTConstants.DeleteStdContactInvCheck); + assertNotNull( configFileName); + assertNotNull(NEDSSConstant.QuestionGroupCodes.GROUP_DEM); + assertNotNull(NEDSSConstant.QuestionGroupCodes.GROUP_MSG); + assertNotNull(NEDSSConstant.QuestionGroupCodes.GROUP_INV); + assertNotNull(NEDSSConstant.QuestionGroupCodes.GROUP_DEM); + assertNotNull(NEDSSConstant.QuestionEntryMethod.USER); + assertNotNull(NEDSSConstant.QuestionEntryMethod.SYSTEM); + + + } + + @Test + void testCanadaEnum() { + assertNotNull(NEDSSConstant.CANADA.valueOf("CAN")); + assertNotNull(NEDSSConstant.CANADA.valueOf("CA")); + assertNotNull(NEDSSConstant.CANADA.valueOf("PHVS_STATEPROVINCEOFEXPOSURE_CDC_CAN")); + } + + @Test + void testUsaEnum() { + assertNotNull(NEDSSConstant.USA.valueOf("USA")); + assertNotNull(NEDSSConstant.USA.valueOf("US")); + assertNotNull(NEDSSConstant.USA.valueOf("PHVS_STATEPROVINCEOFEXPOSURE_CDC_US")); + } + + @Test + void testMexicoEnum() { + assertNotNull(NEDSSConstant.MEXICO.valueOf("MEX")); + assertNotNull(NEDSSConstant.MEXICO.valueOf("MX")); + assertNotNull(NEDSSConstant.MEXICO.valueOf("PHVS_STATEPROVINCEOFEXPOSURE_CDC_MEX")); + } + + @Test + void testClosureInvestgrEnum() { + assertNotNull(NEDSSConstant.CLOSURE_INVESTGR.valueOf("ClosureInvestgrOfPHC")); + assertNotNull(NEDSSConstant.CLOSURE_INVESTGR.valueOf("NBS197")); + } + + @Test + void testCurrentInvestgrEnum() { + assertNotNull(NEDSSConstant.CURRENT_INVESTGR.valueOf("InvestgrOfPHC")); + assertNotNull(NEDSSConstant.CURRENT_INVESTGR.valueOf("INV180")); + } + + @Test + void testContainerTypeEnum() { + assertNotNull(NEDSSConstant.ContainerType.valueOf("Case")); + assertNotNull(NEDSSConstant.ContainerType.valueOf("LabReport")); + assertNotNull(NEDSSConstant.ContainerType.valueOf("Contac")); + assertNotNull(NEDSSConstant.ContainerType.valueOf("GROUP_DEM")); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/controller/ControllerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/controller/ControllerTest.java new file mode 100644 index 000000000..6132fdfc9 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/controller/ControllerTest.java @@ -0,0 +1,46 @@ +package gov.cdc.dataprocessing.controller; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.MockitoAnnotations; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Mockito.*; + +class ControllerTest { + + @InjectMocks + private Controller controller; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + } + + @Test + void testGetDataPipelineStatusHealth() { + + // Call the method + ResponseEntity response = controller.getDataPipelineStatusHealth(); + + // Assert the response + assertEquals(HttpStatus.OK, response.getStatusCode()); + assertEquals("Data Processing Service Status OK", response.getBody()); + + } + + private static void setFinalStaticField(Class clazz, String fieldName, Object value) { + try { + java.lang.reflect.Field field = clazz.getDeclaredField(fieldName); + field.setAccessible(true); + field.set(null, value); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/controller/LocalUidControllerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/controller/LocalUidControllerTest.java new file mode 100644 index 000000000..92ff078f9 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/controller/LocalUidControllerTest.java @@ -0,0 +1,59 @@ +package gov.cdc.dataprocessing.controller; + +import gov.cdc.dataprocessing.constant.enums.LocalIdClass; +import gov.cdc.dataprocessing.exception.DataProcessingException; +import gov.cdc.dataprocessing.repository.nbs.odse.model.generic_helper.LocalUidGenerator; +import gov.cdc.dataprocessing.service.interfaces.uid_generator.IOdseIdGeneratorService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.Mockito.when; + +class LocalUidControllerTest { + + @Mock + private IOdseIdGeneratorService odseIdGeneratorService; + + @InjectMocks + private LocalUidController localUidController; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + } + + @Test + void testValidClassName() throws DataProcessingException { + LocalUidGenerator mockLocalUidGenerator = new LocalUidGenerator(); + when(odseIdGeneratorService.getLocalIdAndUpdateSeed(LocalIdClass.OBSERVATION)).thenReturn(mockLocalUidGenerator); + + ResponseEntity response = localUidController.test("OBSERVATION"); + + assertEquals(HttpStatus.OK, response.getStatusCode()); + assertEquals(mockLocalUidGenerator, response.getBody()); + } + + @Test + void testInvalidClassName() { + assertThrows(IllegalArgumentException.class, () -> { + localUidController.test("INVALID_CLASS"); + }); + } + + @Test + void testServiceThrowsException() throws DataProcessingException { + when(odseIdGeneratorService.getLocalIdAndUpdateSeed(LocalIdClass.OBSERVATION)).thenThrow(new DataProcessingException("Error")); + + IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { + localUidController.test("CLASS_A"); + }); + + assertNotNull( exception.getMessage()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/consumer/KafkaEdxLogConsumerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/consumer/KafkaEdxLogConsumerTest.java new file mode 100644 index 000000000..de58f5e0a --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/consumer/KafkaEdxLogConsumerTest.java @@ -0,0 +1,69 @@ +package gov.cdc.dataprocessing.kafka.consumer; + + +import com.google.gson.Gson; +import gov.cdc.dataprocessing.exception.EdxLogException; +import gov.cdc.dataprocessing.model.dto.log.EDXActivityLogDto; +import gov.cdc.dataprocessing.service.interfaces.log.IEdxLogService; +import gov.cdc.dataprocessing.service.interfaces.manager.IManagerService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.springframework.kafka.support.KafkaHeaders; +import org.springframework.messaging.Message; +import org.springframework.messaging.support.MessageBuilder; + +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.mockito.Mockito.*; + +class KafkaEdxLogConsumerTest { + + @Mock + private IManagerService managerServiceMock; + + @Mock + private IEdxLogService edxLogServiceMock; + + @InjectMocks + private KafkaEdxLogConsumer kafkaEdxLogConsumer; + + private Gson gson; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + gson = new Gson(); + } + + @Test + void testHandleMessage_Success() throws EdxLogException { + EDXActivityLogDto edxActivityLogDto = new EDXActivityLogDto(); + String message = gson.toJson(edxActivityLogDto); + + Message kafkaMessage = MessageBuilder.withPayload(message) + .setHeader(KafkaHeaders.RECEIVED_TOPIC, "test-topic") + .build(); + + kafkaEdxLogConsumer.handleMessage(kafkaMessage.getPayload(), kafkaMessage.getHeaders().get(KafkaHeaders.RECEIVED_TOPIC, String.class)); + + verify(edxLogServiceMock, times(1)).saveEdxActivityLogs(any(EDXActivityLogDto.class)); + } + + @Test + void testHandleMessage_Exception() throws EdxLogException { + EDXActivityLogDto edxActivityLogDto = new EDXActivityLogDto(); + String message = gson.toJson(edxActivityLogDto); + + Message kafkaMessage = MessageBuilder.withPayload(message) + .setHeader(KafkaHeaders.RECEIVED_TOPIC, "test-topic") + .build(); + + doThrow(new EdxLogException("Test Exception", new Object())).when(edxLogServiceMock).saveEdxActivityLogs(any(EDXActivityLogDto.class)); + + assertThrows(EdxLogException.class, () -> { + kafkaEdxLogConsumer.handleMessage(kafkaMessage.getPayload(), kafkaMessage.getHeaders().get(KafkaHeaders.RECEIVED_TOPIC, String.class)); + }); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/consumer/KafkaHandleLabConsumerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/consumer/KafkaHandleLabConsumerTest.java new file mode 100644 index 000000000..b540ea09f --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/consumer/KafkaHandleLabConsumerTest.java @@ -0,0 +1,66 @@ +package gov.cdc.dataprocessing.kafka.consumer; + + +import com.google.gson.Gson; +import gov.cdc.dataprocessing.kafka.producer.KafkaManagerProducer; +import gov.cdc.dataprocessing.service.interfaces.auth_user.IAuthUserService; +import gov.cdc.dataprocessing.service.interfaces.manager.IManagerService; +import gov.cdc.dataprocessing.service.model.auth_user.AuthUserProfileInfo; +import gov.cdc.dataprocessing.service.model.phc.PublicHealthCaseFlowContainer; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +import static org.mockito.Mockito.*; + +class KafkaHandleLabConsumerTest { + + @Mock + private KafkaManagerProducer kafkaManagerProducerMock; + + @Mock + private IManagerService managerServiceMock; + + @Mock + private IAuthUserService authUserServiceMock; + + @InjectMocks + private KafkaHandleLabConsumer kafkaHandleLabConsumer; + + private Gson gson; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + gson = new Gson(); + } + + @Test + void testHandleMessage_Success() throws Exception { + AuthUserProfileInfo authUserMock = new AuthUserProfileInfo(); + when(authUserServiceMock.getAuthUserInfo("superuser")).thenReturn(authUserMock); + + PublicHealthCaseFlowContainer publicHealthCaseFlowContainerMock = new PublicHealthCaseFlowContainer(); + String message = gson.toJson(publicHealthCaseFlowContainerMock); + + kafkaHandleLabConsumer.handleMessage(message); + + verify(authUserServiceMock, times(1)).getAuthUserInfo("superuser"); + verify(managerServiceMock, times(1)).initiatingLabProcessing(any(PublicHealthCaseFlowContainer.class)); + } + + @Test + void testHandleMessage_Exception() throws Exception { + when(authUserServiceMock.getAuthUserInfo("superuser")).thenThrow(new RuntimeException("Test Exception")); + + PublicHealthCaseFlowContainer publicHealthCaseFlowContainerMock = new PublicHealthCaseFlowContainer(); + String message = gson.toJson(publicHealthCaseFlowContainerMock); + + kafkaHandleLabConsumer.handleMessage(message); + + verify(authUserServiceMock, times(1)).getAuthUserInfo("superuser"); + verify(managerServiceMock, never()).initiatingLabProcessing(any(PublicHealthCaseFlowContainer.class)); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/consumer/KafkaManagerConsumerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/consumer/KafkaManagerConsumerTest.java new file mode 100644 index 000000000..8fe371d00 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/consumer/KafkaManagerConsumerTest.java @@ -0,0 +1,65 @@ +package gov.cdc.dataprocessing.kafka.consumer; + + +import gov.cdc.dataprocessing.exception.DataProcessingConsumerException; +import gov.cdc.dataprocessing.exception.DataProcessingException; +import gov.cdc.dataprocessing.kafka.producer.KafkaManagerProducer; +import gov.cdc.dataprocessing.service.interfaces.auth_user.IAuthUserService; +import gov.cdc.dataprocessing.service.interfaces.manager.IManagerService; +import gov.cdc.dataprocessing.service.model.auth_user.AuthUserProfileInfo; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +import static org.mockito.Mockito.*; + +class KafkaManagerConsumerTest { + + @Mock + private KafkaManagerProducer kafkaManagerProducerMock; + + @Mock + private IManagerService managerServiceMock; + + @Mock + private IAuthUserService authUserServiceMock; + + @InjectMocks + private KafkaManagerConsumer kafkaManagerConsumer; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + } + + @Test + void testHandleMessage_Success() throws DataProcessingException, DataProcessingConsumerException { + AuthUserProfileInfo authUserMock = new AuthUserProfileInfo(); + when(authUserServiceMock.getAuthUserInfo("superuser")).thenReturn(authUserMock); + + String message = "testMessage"; + String topic = "testTopic"; + String dataType = "testDataType"; + + kafkaManagerConsumer.handleMessage(message, topic, dataType); + + verify(authUserServiceMock, times(1)).getAuthUserInfo("superuser"); + verify(managerServiceMock, times(1)).processDistribution(dataType, message); + } + + @Test + void testHandleMessage_DataProcessingConsumerException() throws DataProcessingException { + + when(authUserServiceMock.getAuthUserInfo("superuser")).thenThrow(new RuntimeException("Test Exception")); + + String message = "testMessage"; + String topic = "testTopic"; + String dataType = "testDataType"; + + kafkaManagerConsumer.handleMessage(message, topic, dataType); + + } + +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/consumer/KafkaPublicHealthCaseConsumerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/consumer/KafkaPublicHealthCaseConsumerTest.java new file mode 100644 index 000000000..a8e954c33 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/consumer/KafkaPublicHealthCaseConsumerTest.java @@ -0,0 +1,63 @@ +package gov.cdc.dataprocessing.kafka.consumer; + + +import gov.cdc.dataprocessing.kafka.producer.KafkaManagerProducer; +import gov.cdc.dataprocessing.service.interfaces.auth_user.IAuthUserService; +import gov.cdc.dataprocessing.service.interfaces.manager.IManagerService; +import gov.cdc.dataprocessing.service.model.auth_user.AuthUserProfileInfo; +import gov.cdc.dataprocessing.service.model.phc.PublicHealthCaseFlowContainer; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.*; + +class KafkaPublicHealthCaseConsumerTest { + + @Mock + private KafkaManagerProducer kafkaManagerProducerMock; + + @Mock + private IManagerService managerServiceMock; + + @Mock + private IAuthUserService authUserServiceMock; + + @InjectMocks + private KafkaPublicHealthCaseConsumer kafkaPublicHealthCaseConsumer; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + } + + @Test + void testHandleMessageForPublicHealthCase_Success() throws Exception { + AuthUserProfileInfo authUserMock = new AuthUserProfileInfo(); + when(authUserServiceMock.getAuthUserInfo("superuser")).thenReturn(authUserMock); + + String message = "{\"someField\":\"someValue\"}"; + String topic = "testTopic"; + + kafkaPublicHealthCaseConsumer.handleMessageForPublicHealthCase(message, topic); + + verify(authUserServiceMock, times(1)).getAuthUserInfo("superuser"); + verify(managerServiceMock, times(1)).initiatingInvestigationAndPublicHealthCase(any(PublicHealthCaseFlowContainer.class)); + } + + @Test + void testHandleMessageForPublicHealthCase_Exception() throws Exception { + when(authUserServiceMock.getAuthUserInfo("superuser")).thenThrow(new RuntimeException("Test Exception")); + + String message = "{\"someField\":\"someValue\"}"; + String topic = "testTopic"; + + kafkaPublicHealthCaseConsumer.handleMessageForPublicHealthCase(message, topic); + + verify(authUserServiceMock, times(1)).getAuthUserInfo("superuser"); + verify(managerServiceMock, never()).initiatingInvestigationAndPublicHealthCase(any(PublicHealthCaseFlowContainer.class)); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/producer/KafkaManagerProducerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/producer/KafkaManagerProducerTest.java new file mode 100644 index 000000000..c9d179feb --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/producer/KafkaManagerProducerTest.java @@ -0,0 +1,110 @@ +package gov.cdc.dataprocessing.kafka.producer; + + +import org.apache.kafka.clients.producer.ProducerRecord; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.kafka.core.KafkaTemplate; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +class KafkaManagerProducerTest { + + @Mock + private KafkaTemplate kafkaTemplateMock; + + @InjectMocks + private KafkaManagerProducer kafkaManagerProducer; + + @Value("${kafka.topic.elr_health_case}") + private String phcTopic = "elr_processing_public_health_case"; + + @Value("${kafka.topic.elr_handle_lab}") + private String labHandleTopic = "elr_processing_handle_lab"; + + @Value("${kafka.topic.elr_action_tracker}") + private String actionTrackerTopic = "elr_action_tracker"; + + @Value("${kafka.topic.elr_edx_log}") + private String edxLogTopic = "elr_edx_log"; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + kafkaManagerProducer = new KafkaManagerProducer(kafkaTemplateMock); + } + + @Test + void testSendDataPhc() { + String msg = "test message for PHC"; + kafkaManagerProducer.sendDataPhc(msg); + + ArgumentCaptor> recordCaptor = ArgumentCaptor.forClass(ProducerRecord.class); + verify(kafkaTemplateMock, times(1)).send(recordCaptor.capture()); + + ProducerRecord record = recordCaptor.getValue(); + assertEquals(phcTopic, record.topic()); + assertEquals(msg, record.value()); + } + + @Test + void testSendDataLabHandling() { + String msg = "test message for Lab Handling"; + kafkaManagerProducer.sendDataLabHandling(msg); + + ArgumentCaptor> recordCaptor = ArgumentCaptor.forClass(ProducerRecord.class); + verify(kafkaTemplateMock, times(1)).send(recordCaptor.capture()); + + ProducerRecord record = recordCaptor.getValue(); + assertEquals(labHandleTopic, record.topic()); + assertEquals(msg, record.value()); + } + + @Test + void testSendDataActionTracker() { + String msg = "test message for Action Tracker"; + kafkaManagerProducer.sendDataActionTracker(msg); + + ArgumentCaptor> recordCaptor = ArgumentCaptor.forClass(ProducerRecord.class); + verify(kafkaTemplateMock, times(1)).send(recordCaptor.capture()); + + ProducerRecord record = recordCaptor.getValue(); + assertEquals(actionTrackerTopic, record.topic()); + assertEquals(msg, record.value()); + } + + @Test + void testSendDataEdxActivityLog() { + String msg = "test message for EDX Activity Log"; + kafkaManagerProducer.sendDataEdxActivityLog(msg); + + ArgumentCaptor> recordCaptor = ArgumentCaptor.forClass(ProducerRecord.class); + verify(kafkaTemplateMock, times(1)).send(recordCaptor.capture()); + + ProducerRecord record = recordCaptor.getValue(); + assertEquals(edxLogTopic, record.topic()); + assertEquals(msg, record.value()); + } + + @Test + void testSendData() { + String topic = "testTopic"; + String msgContent = "test message"; + + kafkaManagerProducer.sendData(topic, msgContent); + + ArgumentCaptor> recordCaptor = ArgumentCaptor.forClass(ProducerRecord.class); + verify(kafkaTemplateMock, times(1)).send(recordCaptor.capture()); + + ProducerRecord record = recordCaptor.getValue(); + assertEquals(topic, record.topic()); + assertEquals(msgContent, record.value()); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/producer/share/KafkaBaseProducerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/producer/share/KafkaBaseProducerTest.java new file mode 100644 index 000000000..7d23f8ab4 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/kafka/producer/share/KafkaBaseProducerTest.java @@ -0,0 +1,96 @@ +package gov.cdc.dataprocessing.kafka.producer.share; + +import gov.cdc.dataprocessing.kafka.producer.KafkaManagerProducer; +import org.apache.kafka.clients.producer.ProducerRecord; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.springframework.kafka.core.KafkaTemplate; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +class KafkaManagerProducerTest { + + @Mock + private KafkaTemplate kafkaTemplateMock; + + @InjectMocks + private KafkaManagerProducer kafkaManagerProducer; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + } + + @Test + void testSendDataPhc() { + String msg = "test message for PHC"; + kafkaManagerProducer.sendDataPhc(msg); + + ArgumentCaptor> recordCaptor = ArgumentCaptor.forClass(ProducerRecord.class); + verify(kafkaTemplateMock, times(1)).send(recordCaptor.capture()); + + ProducerRecord record = recordCaptor.getValue(); + assertEquals("elr_processing_public_health_case", record.topic()); + assertEquals(msg, record.value()); + } + + @Test + void testSendDataLabHandling() { + String msg = "test message for Lab Handling"; + kafkaManagerProducer.sendDataLabHandling(msg); + + ArgumentCaptor> recordCaptor = ArgumentCaptor.forClass(ProducerRecord.class); + verify(kafkaTemplateMock, times(1)).send(recordCaptor.capture()); + + ProducerRecord record = recordCaptor.getValue(); + assertEquals("elr_processing_handle_lab", record.topic()); + assertEquals(msg, record.value()); + } + + @Test + void testSendDataActionTracker() { + String msg = "test message for Action Tracker"; + kafkaManagerProducer.sendDataActionTracker(msg); + + ArgumentCaptor> recordCaptor = ArgumentCaptor.forClass(ProducerRecord.class); + verify(kafkaTemplateMock, times(1)).send(recordCaptor.capture()); + + ProducerRecord record = recordCaptor.getValue(); + assertEquals("elr_action_tracker", record.topic()); + assertEquals(msg, record.value()); + } + + @Test + void testSendDataEdxActivityLog() { + String msg = "test message for EDX Activity Log"; + kafkaManagerProducer.sendDataEdxActivityLog(msg); + + ArgumentCaptor> recordCaptor = ArgumentCaptor.forClass(ProducerRecord.class); + verify(kafkaTemplateMock, times(1)).send(recordCaptor.capture()); + + ProducerRecord record = recordCaptor.getValue(); + assertEquals("elr_edx_log", record.topic()); + assertEquals(msg, record.value()); + } + + @Test + void testSendData() { + String topic = "testTopic"; + String msgContent = "test message"; + + kafkaManagerProducer.sendData(topic, msgContent); + + ArgumentCaptor> recordCaptor = ArgumentCaptor.forClass(ProducerRecord.class); + verify(kafkaTemplateMock, times(1)).send(recordCaptor.capture()); + + ProducerRecord record = recordCaptor.getValue(); + assertEquals(topic, record.topic()); + assertEquals(msgContent, record.value()); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ClinicalDocumentContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ClinicalDocumentContainerTest.java new file mode 100644 index 000000000..d960c9878 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ClinicalDocumentContainerTest.java @@ -0,0 +1,66 @@ +package gov.cdc.dataprocessing.model.container; + +import gov.cdc.dataprocessing.model.container.model.ClinicalDocumentContainer; +import gov.cdc.dataprocessing.model.dto.phc.ClinicalDocumentDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ClinicalDocumentContainerTest { + + @Test + void testGettersAndSetters() { + ClinicalDocumentContainer clinicalDocumentContainer = new ClinicalDocumentContainer(); + + // Test inherited boolean fields from BaseContainer + clinicalDocumentContainer.setItNew(true); + clinicalDocumentContainer.setItOld(true); + clinicalDocumentContainer.setItDirty(true); + clinicalDocumentContainer.setItDelete(true); + + assertTrue(clinicalDocumentContainer.isItNew()); + assertTrue(clinicalDocumentContainer.isItOld()); + assertTrue(clinicalDocumentContainer.isItDirty()); + assertTrue(clinicalDocumentContainer.isItDelete()); + + // Test inherited String field from BaseContainer + String superClassType = "TestSuperClass"; + clinicalDocumentContainer.setSuperClassType(superClassType); + assertEquals(superClassType, clinicalDocumentContainer.getSuperClassType()); + + // Test inherited Collection field from BaseContainer + Collection ldfs = new ArrayList<>(); + ldfs.add("TestObject"); + clinicalDocumentContainer.setLdfs(ldfs); + assertEquals(ldfs, clinicalDocumentContainer.getLdfs()); + + // Test ClinicalDocumentContainer specific fields + ClinicalDocumentDto clinicalDocumentDto = new ClinicalDocumentDto(); + clinicalDocumentContainer.setTheClinicalDocumentDT(clinicalDocumentDto); + assertEquals(clinicalDocumentDto, clinicalDocumentContainer.getTheClinicalDocumentDT()); + + Collection activityLocatorParticipationDTCollection = new ArrayList<>(); + activityLocatorParticipationDTCollection.add(new Object()); + clinicalDocumentContainer.setTheActivityLocatorParticipationDTCollection(activityLocatorParticipationDTCollection); + assertEquals(activityLocatorParticipationDTCollection, clinicalDocumentContainer.getTheActivityLocatorParticipationDTCollection()); + + Collection actIdDTCollection = new ArrayList<>(); + actIdDTCollection.add(new Object()); + clinicalDocumentContainer.setTheActIdDTCollection(actIdDTCollection); + assertEquals(actIdDTCollection, clinicalDocumentContainer.getTheActIdDTCollection()); + + Collection participationDTCollection = new ArrayList<>(); + participationDTCollection.add(new Object()); + clinicalDocumentContainer.setTheParticipationDTCollection(participationDTCollection); + assertEquals(participationDTCollection, clinicalDocumentContainer.getTheParticipationDTCollection()); + + Collection actRelationshipDTCollection = new ArrayList<>(); + actRelationshipDTCollection.add(new Object()); + clinicalDocumentContainer.setTheActRelationshipDTCollection(actRelationshipDTCollection); + assertEquals(actRelationshipDTCollection, clinicalDocumentContainer.getTheActRelationshipDTCollection()); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/CoinfectionSummaryContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/CoinfectionSummaryContainerTest.java new file mode 100644 index 000000000..d7b920644 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/CoinfectionSummaryContainerTest.java @@ -0,0 +1,87 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.CoinfectionSummaryContainer; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class CoinfectionSummaryContainerTest { + + @Test + void testGettersAndSetters() { + CoinfectionSummaryContainer container = new CoinfectionSummaryContainer(); + + Long publicHealthCaseUid = 12345L; + String localId = "localId123"; + String coinfectionId = "coinfectionId456"; + String investigatorLastNm = "Doe"; + String investigatorFirstNm = "John"; + String conditionCd = "condition123"; + String jurisdictionCd = "jurisdiction456"; + Long programJurisdictionOid = 67890L; + String progAreaCd = "progArea123"; + String investigationStatus = "Open"; + String caseClassCd = "Confirmed"; + Timestamp createDate = new Timestamp(System.currentTimeMillis()); + Timestamp updateDate = new Timestamp(System.currentTimeMillis()); + Timestamp investigationStartDate = new Timestamp(System.currentTimeMillis()); + Long patientRevisionUid = 98765L; + String epiLinkId = "epiLink789"; + String fieldRecordNumber = "fieldRecord456"; + String patIntvStatusCd = "Interviewed"; + boolean associated = true; + String checkBoxId = "checkBox123"; + String disabled = "false"; + String processingDecisionCode = "decisionCode"; + + container.setPublicHealthCaseUid(publicHealthCaseUid); + container.setLocalId(localId); + container.setCoinfectionId(coinfectionId); + container.setInvestigatorLastNm(investigatorLastNm); + container.setIntestigatorFirstNm(investigatorFirstNm); + container.setConditionCd(conditionCd); + container.setJurisdictionCd(jurisdictionCd); + container.setProgramJurisdictionOid(programJurisdictionOid); + container.setProgAreaCd(progAreaCd); + container.setInvestigationStatus(investigationStatus); + container.setCaseClassCd(caseClassCd); + container.setCreateDate(createDate); + container.setUpdateDate(updateDate); + container.setInvestigationStartDate(investigationStartDate); + container.setPatientRevisionUid(patientRevisionUid); + container.setEpiLinkId(epiLinkId); + container.setFieldRecordNumber(fieldRecordNumber); + container.setPatIntvStatusCd(patIntvStatusCd); + container.setAssociated(associated); + container.setCheckBoxId(checkBoxId); + container.setDisabled(disabled); + container.setProcessingDecisionCode(processingDecisionCode); + + assertEquals(publicHealthCaseUid, container.getPublicHealthCaseUid()); + assertEquals(localId, container.getLocalId()); + assertEquals(coinfectionId, container.getCoinfectionId()); + assertEquals(investigatorLastNm, container.getInvestigatorLastNm()); + assertEquals(investigatorFirstNm, container.getIntestigatorFirstNm()); + assertEquals(conditionCd, container.getConditionCd()); + assertEquals(jurisdictionCd, container.getJurisdictionCd()); + assertEquals(programJurisdictionOid, container.getProgramJurisdictionOid()); + assertEquals(progAreaCd, container.getProgAreaCd()); + assertEquals(investigationStatus, container.getInvestigationStatus()); + assertEquals(caseClassCd, container.getCaseClassCd()); + assertEquals(createDate, container.getCreateDate()); + assertEquals(updateDate, container.getUpdateDate()); + assertEquals(investigationStartDate, container.getInvestigationStartDate()); + assertEquals(patientRevisionUid, container.getPatientRevisionUid()); + assertEquals(epiLinkId, container.getEpiLinkId()); + assertEquals(fieldRecordNumber, container.getFieldRecordNumber()); + assertEquals(patIntvStatusCd, container.getPatIntvStatusCd()); + assertTrue(container.isAssociated()); + assertEquals(checkBoxId, container.getCheckBoxId()); + assertEquals(disabled, container.getDisabled()); + assertEquals(processingDecisionCode, container.getProcessingDecisionCode()); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/DocumentSummaryContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/DocumentSummaryContainerTest.java new file mode 100644 index 000000000..7e3d6fa1d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/DocumentSummaryContainerTest.java @@ -0,0 +1,128 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.DocumentSummaryContainer; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; +import java.util.Collection; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class DocumentSummaryContainerTest { + + @Test + void testGettersAndSetters() { + DocumentSummaryContainer container = new DocumentSummaryContainer(); + + Long nbsDocumentUid = 12345L; + String docPayload = "Payload"; + String docType = "Type"; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Long addUserID = 67890L; + String txt = "Text"; + Long MPRUid = 98765L; + String jurisdiction = "Jurisdiction"; + String programArea = "ProgramArea"; + String type = "Type"; + Timestamp dateReceived = new Timestamp(System.currentTimeMillis()); + String localId = "LocalId"; + Collection theDocumentResultedTestSummaryVO = null; + String cd = "CD"; + String cdDescTxt = "Description"; + String firstName = "John"; + String lastName = "Doe"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Map associationMap = null; + String sendingFacilityNm = "Facility"; + String progAreaCd = "ProgramAreaCd"; + + container.setNbsDocumentUid(nbsDocumentUid); + container.setDocPayload(docPayload); + container.setDocType(docType); + container.setRecordStatusCd(recordStatusCd); + container.setRecordStatusTime(recordStatusTime); + container.setAddUserId(addUserID); + container.setTxt(txt); + container.setMPRUid(MPRUid); + container.setJurisdiction(jurisdiction); + container.setProgramArea(programArea); + container.setType(type); + container.setDateReceived(dateReceived); + container.setLocalId(localId); + container.setTheDocumentResultedTestSummaryVO(theDocumentResultedTestSummaryVO); + container.setCd(cd); + container.setCdDescTxt(cdDescTxt); + container.setFirstName(firstName); + container.setLastName(lastName); + container.setAddTime(addTime); + container.setAssociationMap(associationMap); + container.setSendingFacilityNm(sendingFacilityNm); + container.setProgAreaCd(progAreaCd); + + assertEquals(nbsDocumentUid, container.getNbsDocumentUid()); + assertEquals(docPayload, container.getDocPayload()); + assertEquals(docType, container.getDocType()); + assertEquals(recordStatusCd, container.getRecordStatusCd()); + assertEquals(recordStatusTime, container.getRecordStatusTime()); + assertEquals(addUserID, container.getAddUserId()); + assertEquals(txt, container.getTxt()); + assertEquals(MPRUid, container.getMPRUid()); + assertEquals(jurisdiction, container.getJurisdiction()); + assertEquals(programArea, container.getProgramArea()); + assertEquals(type, container.getType()); + assertEquals(dateReceived, container.getDateReceived()); + assertEquals(localId, container.getLocalId()); + assertEquals(theDocumentResultedTestSummaryVO, container.getTheDocumentResultedTestSummaryVO()); + assertEquals(cd, container.getCd()); + assertEquals(cdDescTxt, container.getCdDescTxt()); + assertEquals(firstName, container.getFirstName()); + assertEquals(lastName, container.getLastName()); + assertEquals(addTime, container.getAddTime()); + assertEquals(associationMap, container.getAssociationMap()); + assertEquals(sendingFacilityNm, container.getSendingFacilityNm()); + assertEquals(progAreaCd, container.getProgAreaCd()); + } + + @Test + void testRootDtoInterfaceMethods() { + DocumentSummaryContainer container = new DocumentSummaryContainer(); + + // These methods return null and do not modify state, so we just call them to ensure they are present. + assertNull(container.getLastChgUserId()); + assertNull(container.getJurisdictionCd()); + assertNull(container.getProgAreaCd()); + assertNull(container.getLastChgTime()); + assertNull(container.getLocalId()); + assertNull(container.getAddUserId()); + assertNull(container.getLastChgReasonCd()); + assertNull(container.getRecordStatusCd()); + assertNull(container.getRecordStatusTime()); + assertNull(container.getStatusCd()); + assertNull(container.getStatusTime()); + assertNull(container.getUid()); + assertNull(container.getAddTime()); + assertNull(container.getProgramJurisdictionOid()); + assertNull(container.getSharedInd()); + assertNull(container.getVersionCtrlNbr()); + + // Call setters and check they don't throw exceptions + container.setLastChgUserId(123L); + container.setJurisdictionCd("123"); + container.setProgAreaCd("PA123"); + container.setLastChgTime(new Timestamp(System.currentTimeMillis())); + container.setLocalId("Local123"); + container.setAddUserId(456L); + container.setLastChgReasonCd("Reason123"); + container.setRecordStatusCd("Active"); + container.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + container.setStatusCd("Status123"); + container.setStatusTime(new Timestamp(System.currentTimeMillis())); + container.setAddTime(new Timestamp(System.currentTimeMillis())); + container.setProgramJurisdictionOid(789L); + container.setSharedInd("Y"); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/EdxActivityLogContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/EdxActivityLogContainerTest.java new file mode 100644 index 000000000..1c85fbf6c --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/EdxActivityLogContainerTest.java @@ -0,0 +1,32 @@ +package gov.cdc.dataprocessing.model.container; + +import gov.cdc.dataprocessing.model.container.model.EdxActivityLogContainer; +import gov.cdc.dataprocessing.model.dto.log.EDXActivityLogDto; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class EdxActivityLogContainerTest { + + @Test + void testGetAndSetEdxActivityLogDto() { + EdxActivityLogContainer container = new EdxActivityLogContainer(); + EDXActivityLogDto edxActivityLogDto = new EDXActivityLogDto(); + + // Set some values to edxActivityLogDto for testing + edxActivityLogDto.setEdxActivityLogUid(12345L); + + container.setEdxActivityLogDto(edxActivityLogDto); + + EDXActivityLogDto retrievedDto = container.getEdxActivityLogDto(); + assertNotNull(retrievedDto, "The edxActivityLogDto should not be null"); + } + + @Test + void testDefaultEdxActivityLogDto() { + EdxActivityLogContainer container = new EdxActivityLogContainer(); + + EDXActivityLogDto defaultDto = container.getEdxActivityLogDto(); + assertNotNull(defaultDto, "The default edxActivityLogDto should not be null"); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/EntityGroupContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/EntityGroupContainerTest.java new file mode 100644 index 000000000..7082b2b51 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/EntityGroupContainerTest.java @@ -0,0 +1,72 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.EntityGroupContainer; +import gov.cdc.dataprocessing.model.dto.phc.EntityGroupDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.*; + +class EntityGroupContainerTest { + + @Test + void testGetAndSetEntityGroupDto() { + EntityGroupContainer container = new EntityGroupContainer(); + EntityGroupDto entityGroupDto = new EntityGroupDto(); + + // Set some values to entityGroupDto for testing + entityGroupDto.setEntityGroupUid(12345L); + + container.setTheEntityGroupDT(entityGroupDto); + + EntityGroupDto retrievedDto = container.getTheEntityGroupDT(); + assertNotNull(retrievedDto, "The entityGroupDto should not be null"); + assertEquals(entityGroupDto, retrievedDto, "The retrieved entityGroupDto should match the set one"); + } + + @Test + void testDefaultEntityGroupDto() { + EntityGroupContainer container = new EntityGroupContainer(); + + EntityGroupDto defaultDto = container.getTheEntityGroupDT(); + assertNotNull(defaultDto, "The default entityGroupDto should not be null"); + } + + @Test + void testSetAndGetCollections() { + EntityGroupContainer container = new EntityGroupContainer(); + + Collection entityLocatorParticipationDTCollection = new ArrayList<>(); + entityLocatorParticipationDTCollection.add("LocatorParticipation1"); + container.setTheEntityLocatorParticipationDTCollection(entityLocatorParticipationDTCollection); + assertEquals(entityLocatorParticipationDTCollection, container.getTheEntityLocatorParticipationDTCollection(), "The entityLocatorParticipationDTCollection should match the set one"); + + Collection entityIdDTCollection = new ArrayList<>(); + entityIdDTCollection.add("EntityId1"); + container.setTheEntityIdDTCollection(entityIdDTCollection); + assertEquals(entityIdDTCollection, container.getTheEntityIdDTCollection(), "The entityIdDTCollection should match the set one"); + + Collection participationDTCollection = new ArrayList<>(); + participationDTCollection.add("Participation1"); + container.setTheParticipationDTCollection(participationDTCollection); + assertEquals(participationDTCollection, container.getTheParticipationDTCollection(), "The participationDTCollection should match the set one"); + + Collection roleDTCollection = new ArrayList<>(); + roleDTCollection.add("Role1"); + container.setTheRoleDTCollection(roleDTCollection); + assertEquals(roleDTCollection, container.getTheRoleDTCollection(), "The roleDTCollection should match the set one"); + } + + @Test + void testDefaultCollections() { + EntityGroupContainer container = new EntityGroupContainer(); + + assertTrue(container.getTheEntityLocatorParticipationDTCollection() == null || container.getTheEntityLocatorParticipationDTCollection().isEmpty(), "The default entityLocatorParticipationDTCollection should be null or empty"); + assertTrue(container.getTheEntityIdDTCollection() == null || container.getTheEntityIdDTCollection().isEmpty(), "The default entityIdDTCollection should be null or empty"); + assertTrue(container.getTheParticipationDTCollection() == null || container.getTheParticipationDTCollection().isEmpty(), "The default participationDTCollection should be null or empty"); + assertTrue(container.getTheRoleDTCollection() == null || container.getTheRoleDTCollection().isEmpty(), "The default roleDTCollection should be null or empty"); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/InterventionContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/InterventionContainerTest.java new file mode 100644 index 000000000..add988fe3 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/InterventionContainerTest.java @@ -0,0 +1,81 @@ +package gov.cdc.dataprocessing.model.container; + +import gov.cdc.dataprocessing.model.container.model.InterventionContainer; +import gov.cdc.dataprocessing.model.dto.phc.InterventionDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.*; + +class InterventionContainerTest { + + @Test + void testGetAndSetInterventionDto() { + InterventionContainer container = new InterventionContainer(); + InterventionDto interventionDto = new InterventionDto(); + + + container.setTheInterventionDto(interventionDto); + + InterventionDto retrievedDto = container.getTheInterventionDto(); + assertNotNull(retrievedDto, "The interventionDto should not be null"); + + } + + @Test + void testDefaultInterventionDto() { + InterventionContainer container = new InterventionContainer(); + + InterventionDto defaultDto = container.getTheInterventionDto(); + assertNotNull(defaultDto, "The default interventionDto should not be null"); + } + + @Test + void testSetAndGetCollections() { + InterventionContainer container = new InterventionContainer(); + + Collection procedure1DTCollection = new ArrayList<>(); + procedure1DTCollection.add("Procedure1"); + container.setTheProcedure1DTCollection(procedure1DTCollection); + assertEquals(procedure1DTCollection, container.getTheProcedure1DTCollection(), "The procedure1DTCollection should match the set one"); + + Collection substanceAdministrationDTCollection = new ArrayList<>(); + substanceAdministrationDTCollection.add("SubstanceAdministration1"); + container.setTheSubstanceAdministrationDTCollection(substanceAdministrationDTCollection); + assertEquals(substanceAdministrationDTCollection, container.getTheSubstanceAdministrationDTCollection(), "The substanceAdministrationDTCollection should match the set one"); + + Collection actIdDTCollection = new ArrayList<>(); + actIdDTCollection.add("ActId1"); + container.setTheActIdDTCollection(actIdDTCollection); + assertEquals(actIdDTCollection, container.getTheActIdDTCollection(), "The actIdDTCollection should match the set one"); + + Collection activityLocatorParticipationDTCollection = new ArrayList<>(); + activityLocatorParticipationDTCollection.add("ActivityLocatorParticipation1"); + container.setTheActivityLocatorParticipationDTCollection(activityLocatorParticipationDTCollection); + assertEquals(activityLocatorParticipationDTCollection, container.getTheActivityLocatorParticipationDTCollection(), "The activityLocatorParticipationDTCollection should match the set one"); + + Collection participationDTCollection = new ArrayList<>(); + participationDTCollection.add("Participation1"); + container.setTheParticipationDTCollection(participationDTCollection); + assertEquals(participationDTCollection, container.getTheParticipationDTCollection(), "The participationDTCollection should match the set one"); + + Collection actRelationshipDTCollection = new ArrayList<>(); + actRelationshipDTCollection.add("ActRelationship1"); + container.setTheActRelationshipDTCollection(actRelationshipDTCollection); + assertEquals(actRelationshipDTCollection, container.getTheActRelationshipDTCollection(), "The actRelationshipDTCollection should match the set one"); + } + + @Test + void testDefaultCollections() { + InterventionContainer container = new InterventionContainer(); + + assertTrue(container.getTheProcedure1DTCollection() == null || container.getTheProcedure1DTCollection().isEmpty(), "The default procedure1DTCollection should be null or empty"); + assertTrue(container.getTheSubstanceAdministrationDTCollection() == null || container.getTheSubstanceAdministrationDTCollection().isEmpty(), "The default substanceAdministrationDTCollection should be null or empty"); + assertTrue(container.getTheActIdDTCollection() == null || container.getTheActIdDTCollection().isEmpty(), "The default actIdDTCollection should be null or empty"); + assertTrue(container.getTheActivityLocatorParticipationDTCollection() == null || container.getTheActivityLocatorParticipationDTCollection().isEmpty(), "The default activityLocatorParticipationDTCollection should be null or empty"); + assertTrue(container.getTheParticipationDTCollection() == null || container.getTheParticipationDTCollection().isEmpty(), "The default participationDTCollection should be null or empty"); + assertTrue(container.getTheActRelationshipDTCollection() == null || container.getTheActRelationshipDTCollection().isEmpty(), "The default actRelationshipDTCollection should be null or empty"); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/InvestigationContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/InvestigationContainerTest.java new file mode 100644 index 000000000..894b8d4b8 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/InvestigationContainerTest.java @@ -0,0 +1,204 @@ +package gov.cdc.dataprocessing.model.container; + +import gov.cdc.dataprocessing.model.container.model.InvestigationContainer; +import gov.cdc.dataprocessing.model.container.model.NotificationContainer; +import gov.cdc.dataprocessing.model.container.model.ObservationContainer; +import gov.cdc.dataprocessing.model.container.model.PublicHealthCaseContainer; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.*; + +class InvestigationContainerTest { + + @Test + void testSetAndGetThePublicHealthCaseContainer() { + InvestigationContainer container = new InvestigationContainer(); + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + + // Set values in the publicHealthCaseContainer for testing + + container.setThePublicHealthCaseContainer(publicHealthCaseContainer); + PublicHealthCaseContainer retrievedContainer = container.getThePublicHealthCaseContainer(); + + assertNotNull(retrievedContainer, "The publicHealthCaseContainer should not be null"); + + } + + @Test + void testSetAndGetCollections() { + InvestigationContainer container = new InvestigationContainer(); + + Collection participationDTCollection = new ArrayList<>(); + participationDTCollection.add("Participation1"); + container.setTheParticipationDTCollection(participationDTCollection); + assertEquals(participationDTCollection, container.getTheParticipationDTCollection(), "The participationDTCollection should match the set one"); + + Collection roleDTCollection = new ArrayList<>(); + roleDTCollection.add("Role1"); + container.setTheRoleDTCollection(roleDTCollection); + assertEquals(roleDTCollection, container.getTheRoleDTCollection(), "The roleDTCollection should match the set one"); + + Collection actRelationshipDTCollection = new ArrayList<>(); + actRelationshipDTCollection.add("ActRelationship1"); + container.setTheActRelationshipDTCollection(actRelationshipDTCollection); + assertEquals(actRelationshipDTCollection, container.getTheActRelationshipDTCollection(), "The actRelationshipDTCollection should match the set one"); + + // Add similar tests for other collections if necessary + } + + @Test + void testSetAndGetNotificationContainer() { + InvestigationContainer container = new InvestigationContainer(); + NotificationContainer notificationContainer = new NotificationContainer(); + + + container.setTheNotificationContainer(notificationContainer); + NotificationContainer retrievedContainer = container.getTheNotificationContainer(); + + assertNotNull(retrievedContainer, "The notificationContainer should not be null"); + + } + + @Test + void testSetAndGetBooleanFields() { + InvestigationContainer container = new InvestigationContainer(); + + container.setAssociatedNotificationsInd(true); + assertTrue(container.isAssociatedNotificationsInd(), "The associatedNotificationsInd should be true"); + + container.setBusinessObjectName("TestBusinessObject"); + assertEquals("TestBusinessObject", container.getBusinessObjectName(), "The businessObjectName should be 'TestBusinessObject'"); + + container.setOOSystemInd(true); + assertTrue(container.isOOSystemInd(), "The isOOSystemInd should be true"); + + container.setOOSystemPendInd(true); + assertTrue(container.isOOSystemPendInd(), "The isOOSystemPendInd should be true"); + } + + + @Test + void testGettersAndSetters() { + InvestigationContainer container = new InvestigationContainer(); + + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + container.setThePublicHealthCaseContainer(publicHealthCaseContainer); + assertEquals(publicHealthCaseContainer, container.getThePublicHealthCaseContainer()); + + Collection participationDTCollection = new ArrayList<>(); + container.setTheParticipationDTCollection(participationDTCollection); + assertEquals(participationDTCollection, container.getTheParticipationDTCollection()); + + Collection roleDTCollection = new ArrayList<>(); + container.setTheRoleDTCollection(roleDTCollection); + assertEquals(roleDTCollection, container.getTheRoleDTCollection()); + + Collection actRelationshipDTCollection = new ArrayList<>(); + container.setTheActRelationshipDTCollection(actRelationshipDTCollection); + assertEquals(actRelationshipDTCollection, container.getTheActRelationshipDTCollection()); + + Collection personVOCollection = new ArrayList<>(); + container.setThePersonVOCollection(personVOCollection); + assertEquals(personVOCollection, container.getThePersonVOCollection()); + + Collection organizationVOCollection = new ArrayList<>(); + container.setTheOrganizationVOCollection(organizationVOCollection); + assertEquals(organizationVOCollection, container.getTheOrganizationVOCollection()); + + Collection materialVOCollection = new ArrayList<>(); + container.setTheMaterialVOCollection(materialVOCollection); + assertEquals(materialVOCollection, container.getTheMaterialVOCollection()); + + Collection observationVOCollection = new ArrayList<>(); + container.setTheObservationVOCollection(observationVOCollection); + assertEquals(observationVOCollection, container.getTheObservationVOCollection()); + + Collection interventionVOCollection = new ArrayList<>(); + container.setTheInterventionVOCollection(interventionVOCollection); + assertEquals(interventionVOCollection, container.getTheInterventionVOCollection()); + + Collection entityGroupVOCollection = new ArrayList<>(); + container.setTheEntityGroupVOCollection(entityGroupVOCollection); + assertEquals(entityGroupVOCollection, container.getTheEntityGroupVOCollection()); + + Collection nonPersonLivingSubjectVOCollection = new ArrayList<>(); + container.setTheNonPersonLivingSubjectVOCollection(nonPersonLivingSubjectVOCollection); + assertEquals(nonPersonLivingSubjectVOCollection, container.getTheNonPersonLivingSubjectVOCollection()); + + Collection placeVOCollection = new ArrayList<>(); + container.setThePlaceVOCollection(placeVOCollection); + assertEquals(placeVOCollection, container.getThePlaceVOCollection()); + + Collection notificationVOCollection = new ArrayList<>(); + container.setTheNotificationVOCollection(notificationVOCollection); + assertEquals(notificationVOCollection, container.getTheNotificationVOCollection()); + + Collection referralVOCollection = new ArrayList<>(); + container.setTheReferralVOCollection(referralVOCollection); + assertEquals(referralVOCollection, container.getTheReferralVOCollection()); + + Collection patientEncounterVOCollection = new ArrayList<>(); + container.setThePatientEncounterVOCollection(patientEncounterVOCollection); + assertEquals(patientEncounterVOCollection, container.getThePatientEncounterVOCollection()); + + Collection clinicalDocumentVOCollection = new ArrayList<>(); + container.setTheClinicalDocumentVOCollection(clinicalDocumentVOCollection); + assertEquals(clinicalDocumentVOCollection, container.getTheClinicalDocumentVOCollection()); + + Collection observationSummaryVOCollection = new ArrayList<>(); + container.setTheObservationSummaryVOCollection(observationSummaryVOCollection); + assertEquals(observationSummaryVOCollection, container.getTheObservationSummaryVOCollection()); + + Collection vaccinationSummaryVOCollection = new ArrayList<>(); + container.setTheVaccinationSummaryVOCollection(vaccinationSummaryVOCollection); + assertEquals(vaccinationSummaryVOCollection, container.getTheVaccinationSummaryVOCollection()); + + Collection notificationSummaryVOCollection = new ArrayList<>(); + container.setTheNotificationSummaryVOCollection(notificationSummaryVOCollection); + assertEquals(notificationSummaryVOCollection, container.getTheNotificationSummaryVOCollection()); + + Collection treatmentSummaryVOCollection = new ArrayList<>(); + container.setTheTreatmentSummaryVOCollection(treatmentSummaryVOCollection); + assertEquals(treatmentSummaryVOCollection, container.getTheTreatmentSummaryVOCollection()); + + Collection labReportSummaryVOCollection = new ArrayList<>(); + container.setTheLabReportSummaryVOCollection(labReportSummaryVOCollection); + assertEquals(labReportSummaryVOCollection, container.getTheLabReportSummaryVOCollection()); + + Collection morbReportSummaryVOCollection = new ArrayList<>(); + container.setTheMorbReportSummaryVOCollection(morbReportSummaryVOCollection); + assertEquals(morbReportSummaryVOCollection, container.getTheMorbReportSummaryVOCollection()); + + NotificationContainer notificationContainer = new NotificationContainer(); + container.setTheNotificationContainer(notificationContainer); + assertEquals(notificationContainer, container.getTheNotificationContainer()); + + container.setAssociatedNotificationsInd(true); + assertTrue(container.isAssociatedNotificationsInd()); + + String businessObjectName = "businessObjectName"; + container.setBusinessObjectName(businessObjectName); + assertEquals(businessObjectName, container.getBusinessObjectName()); + + container.setOOSystemInd(true); + assertTrue(container.isOOSystemInd()); + + container.setOOSystemPendInd(true); + assertTrue(container.isOOSystemPendInd()); + + Collection contactVOColl = new ArrayList<>(); + container.setTheContactVOColl(contactVOColl); + assertEquals(contactVOColl, container.getTheContactVOColl()); + + Collection ctContactSummaryDTCollection = new ArrayList<>(); + container.setTheCTContactSummaryDTCollection(ctContactSummaryDTCollection); + assertEquals(ctContactSummaryDTCollection, container.getTheCTContactSummaryDTCollection()); + + Collection documentSummaryVOCollection = new ArrayList<>(); + container.setTheDocumentSummaryVOCollection(documentSummaryVOCollection); + assertEquals(documentSummaryVOCollection, container.getTheDocumentSummaryVOCollection()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/LabReportSummaryContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/LabReportSummaryContainerTest.java new file mode 100644 index 000000000..126533b01 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/LabReportSummaryContainerTest.java @@ -0,0 +1,537 @@ +package gov.cdc.dataprocessing.model.container; + +import gov.cdc.dataprocessing.model.container.model.LabReportSummaryContainer; +import gov.cdc.dataprocessing.model.container.model.ProviderDataForPrintContainer; +import gov.cdc.dataprocessing.model.container.model.ResultedTestSummaryContainer; +import gov.cdc.dataprocessing.repository.nbs.odse.model.observation.Observation_Lab_Summary_ForWorkUp_New; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.*; + +class LabReportSummaryContainerTest { + + @Test + void testDefaultConstructor() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + assertNotNull(container); + } + + @Test + void testConstructorWithObservationLabSummary() { + Observation_Lab_Summary_ForWorkUp_New summary = new Observation_Lab_Summary_ForWorkUp_New(); + summary.setUid(123L); + summary.setLocalId("local123"); + summary.setJurisdictionCd("jurisdiction"); + summary.setStatusCd("status"); + summary.setRecordStatusCd("recordStatus"); + summary.setCdDescTxt("orderedTest"); + summary.setObservationUid(456L); + summary.setProgAreaCd("programArea"); + summary.setRptToStateTime(new Timestamp(System.currentTimeMillis())); + summary.setActivityFromTime(new Timestamp(System.currentTimeMillis())); + summary.setCdSystemCd("cdSystem"); + summary.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + summary.setProcessingDecisionCd("processingDecision"); + summary.setElectronicInd("Y"); + + LabReportSummaryContainer container = new LabReportSummaryContainer(summary); + + assertEquals(123L, container.getUid()); + assertEquals("local123", container.getLocalId()); + assertEquals("jurisdiction", container.getJurisdictionCd()); + assertEquals("status", container.getStatus()); + assertEquals("recordStatus", container.getRecordStatusCd()); + assertEquals("orderedTest", container.getOrderedTest()); + assertEquals(456L, container.getObservationUid()); + assertEquals("programArea", container.getProgramArea()); + assertNotNull(container.getDateReceived()); + assertNotNull(container.getActivityFromTime()); + assertEquals("cdSystem", container.getCdSystemCd()); + assertNotNull(container.getDateCollected()); + assertEquals("processingDecision", container.getProcessingDecisionCd()); + assertEquals("Y", container.getElectronicInd()); + } + + @Test + void testSetAndGetValues() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + container.setUid(789L); + container.setLocalId("local789"); + container.setJurisdictionCd("newJurisdiction"); + container.setStatus("newStatus"); + container.setRecordStatusCd("newRecordStatus"); + container.setOrderedTest("newOrderedTest"); + container.setObservationUid(101112L); + container.setProgramArea("newProgramArea"); + container.setDateReceived(new Timestamp(System.currentTimeMillis())); + container.setActivityFromTime(new Timestamp(System.currentTimeMillis())); + container.setCdSystemCd("newCdSystem"); + container.setDateCollected(new Timestamp(System.currentTimeMillis())); + container.setProcessingDecisionCd("newProcessingDecision"); + container.setElectronicInd("N"); + + assertEquals(789L, container.getUid()); + assertEquals("local789", container.getLocalId()); + assertEquals("newJurisdiction", container.getJurisdictionCd()); + assertEquals("newStatus", container.getStatus()); + assertEquals("newRecordStatus", container.getRecordStatusCd()); + assertEquals("newOrderedTest", container.getOrderedTest()); + assertEquals(101112L, container.getObservationUid()); + assertEquals("newProgramArea", container.getProgramArea()); + assertNotNull(container.getDateReceived()); + assertNotNull(container.getActivityFromTime()); + assertEquals("newCdSystem", container.getCdSystemCd()); + assertNotNull(container.getDateCollected()); + assertEquals("newProcessingDecision", container.getProcessingDecisionCd()); + assertEquals("N", container.getElectronicInd()); + } + + @Test + void testSetAndGetCollections() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + + Collection resultedTestSummaryVOCollection = new ArrayList<>(); + resultedTestSummaryVOCollection.add(new ResultedTestSummaryContainer()); + container.setTheResultedTestSummaryVOCollection(resultedTestSummaryVOCollection); + assertEquals(resultedTestSummaryVOCollection, container.getTheResultedTestSummaryVOCollection()); + + Collection invSummaryVOs = new ArrayList<>(); + invSummaryVOs.add("invSummary"); + container.setInvSummaryVOs(invSummaryVOs); + assertEquals(invSummaryVOs, container.getInvSummaryVOs()); + } + + @Test + void testSetAndGetProviderFields() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + container.setProviderFirstName("John"); + container.setProviderLastName("Doe"); + container.setProviderSuffix("Jr."); + container.setProviderPrefix("Dr."); + container.setProviderDegree("MD"); + container.setProviderUid("UID123"); + + assertEquals("John", container.getProviderFirstName()); + assertEquals("Doe", container.getProviderLastName()); + assertEquals("Jr.", container.getProviderSuffix()); + assertEquals("Dr.", container.getProviderPrefix()); + assertEquals("MD", container.getProviderDegree()); + assertEquals("UID123", container.getProviderUid()); + } + + @Test + void testSetAndGetBooleanFields() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + container.setLabFromMorb(true); + container.setReactor(true); + container.setLabFromDoc(true); + container.setTouched(true); + container.setAssociated(true); + + assertTrue(container.isLabFromMorb()); + assertTrue(container.isReactor()); + assertTrue(container.isLabFromDoc()); + assertTrue(container.getIsTouched()); + assertTrue(container.getIsAssociated()); + } + + @Test + void testSetAndGetMiscFields() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + container.setPersonUid(123456L); + container.setLastNm("Smith"); + container.setFirstNm("Jane"); + container.setPersonParentUid(654321L); + container.setCurrSexCd("F"); + container.setOrderingFacility("Facility"); + + assertEquals(123456L, container.getPersonUid()); + assertEquals("Smith", container.getLastNm()); + assertEquals("Jane", container.getFirstNm()); + assertEquals(654321L, container.getPersonParentUid()); + assertEquals("F", container.getCurrSexCd()); + assertEquals("Facility", container.getOrderingFacility()); + } + + @Test + void testGettersAndSetters() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + + container.setTouched(true); + assertTrue(container.getIsTouched()); + + container.setAssociated(true); + assertTrue(container.getIsAssociated()); + + Timestamp dateReceived = new Timestamp(System.currentTimeMillis()); + container.setDateReceived(dateReceived); + assertEquals(dateReceived, container.getDateReceived()); + + String dateReceivedS = "2024-07-13"; + container.setDateReceivedS(dateReceivedS); + assertEquals(dateReceivedS, container.getDateReceivedS()); + + int versionCtrlNbr = 1; + container.setVersionCtrlNbr(versionCtrlNbr); + assertEquals(versionCtrlNbr, container.getVersionCtrlNbr()); + + Timestamp dateCollected = new Timestamp(System.currentTimeMillis()); + container.setDateCollected(dateCollected); + assertEquals(dateCollected, container.getDateCollected()); + + Timestamp activityFromTime = new Timestamp(System.currentTimeMillis()); + container.setActivityFromTime(activityFromTime); + assertEquals(activityFromTime, container.getActivityFromTime()); + + String type = "TestType"; + container.setType(type); + assertEquals(type, container.getType()); + + String programArea = "TestProgramArea"; + container.setProgramArea(programArea); + assertEquals(programArea, container.getProgramArea()); + + String jurisdiction = "TestJurisdiction"; + container.setJurisdiction(jurisdiction); + assertEquals(jurisdiction, container.getJurisdiction()); + + String jurisdictionCd = "TestJurisdictionCd"; + container.setJurisdictionCd(jurisdictionCd); + assertEquals(jurisdictionCd, container.getJurisdictionCd()); + + String status = "TestStatus"; + container.setStatus(status); + assertEquals(status, container.getStatus()); + + String recordStatusCd = "TestRecordStatusCd"; + container.setRecordStatusCd(recordStatusCd); + assertEquals(recordStatusCd, container.getRecordStatusCd()); + + long observationUid = 1L; + container.setObservationUid(observationUid); + assertEquals(observationUid, container.getObservationUid()); + + String patientFirstName = "John"; + container.setPatientFirstName(patientFirstName); + assertEquals(patientFirstName, container.getPatientFirstName()); + + String patientLastName = "Doe"; + container.setPatientLastName(patientLastName); + assertEquals(patientLastName, container.getPatientLastName()); + + String personLocalId = "TestPersonLocalId"; + container.setPersonLocalId(personLocalId); + assertEquals(personLocalId, container.getPersonLocalId()); + + Collection theResultedTestSummaryVOCollection = new ArrayList<>(); + container.setTheResultedTestSummaryVOCollection(theResultedTestSummaryVOCollection); + assertEquals(theResultedTestSummaryVOCollection, container.getTheResultedTestSummaryVOCollection()); + + Collection invSummaryVOs = new ArrayList<>(); + container.setInvSummaryVOs(invSummaryVOs); + assertEquals(invSummaryVOs, container.getInvSummaryVOs()); + + String orderedTest = "TestOrdered"; + container.setOrderedTest(orderedTest); + assertEquals(orderedTest, container.getOrderedTest()); + + long mprUid = 2L; + container.setMPRUid(mprUid); + assertEquals(mprUid, container.getMPRUid()); + + String cdSystemCd = "TestCdSystemCd"; + container.setCdSystemCd(cdSystemCd); + assertEquals(cdSystemCd, container.getCdSystemCd()); + + String actionLink = "TestActionLink"; + container.setActionLink(actionLink); + assertEquals(actionLink, container.getActionLink()); + + String resultedTestString = "TestResulted"; + container.setResultedTestString(resultedTestString); + assertEquals(resultedTestString, container.getResultedTestString()); + + String reportingFacility = "TestFacility"; + container.setReportingFacility(reportingFacility); + assertEquals(reportingFacility, container.getReportingFacility()); + + String specimenSource = "TestSpecimenSource"; + container.setSpecimenSource(specimenSource); + assertEquals(specimenSource, container.getSpecimenSource()); + + String[] selectedcheckboxIds = new String[]{"Test1", "Test2"}; + container.setSelectedcheckboxIds(selectedcheckboxIds); + assertArrayEquals(selectedcheckboxIds, container.getSelectedcheckboxIds()); + + String checkBoxId = "TestCheckBoxId"; + container.setCheckBoxId(checkBoxId); + assertEquals(checkBoxId, container.getCheckBoxId()); + + String providerFirstName = "Jane"; + container.setProviderFirstName(providerFirstName); + assertEquals(providerFirstName, container.getProviderFirstName()); + + String providerLastName = "Smith"; + container.setProviderLastName(providerLastName); + assertEquals(providerLastName, container.getProviderLastName()); + + String providerSuffix = "Jr."; + container.setProviderSuffix(providerSuffix); + assertEquals(providerSuffix, container.getProviderSuffix()); + + String providerPrefix = "Dr."; + container.setProviderPrefix(providerPrefix); + assertEquals(providerPrefix, container.getProviderPrefix()); + + String providerDegree = "MD"; + container.setProviderDegree(providerDegree); + assertEquals(providerDegree, container.getProviderDegree()); + + String providerUid = "ProviderUid123"; + container.setProviderUid(providerUid); + assertEquals(providerUid, container.getProviderUid()); + + String degree = "PhD"; + container.setDegree(degree); + assertEquals(degree, container.getDegree()); + + String accessionNumber = "AccessionNumber123"; + container.setAccessionNumber(accessionNumber); + assertEquals(accessionNumber, container.getAccessionNumber()); + + container.setLabFromMorb(true); + assertTrue(container.isLabFromMorb()); + + container.setReactor(true); + assertTrue(container.isReactor()); + + String electronicInd = "TestElectronicInd"; + container.setElectronicInd(electronicInd); + assertEquals(electronicInd, container.getElectronicInd()); + + Map associationsMap = Map.of("Key", "Value"); + container.setAssociationsMap(associationsMap); + assertEquals(associationsMap, container.getAssociationsMap()); + + String processingDecisionCd = "TestProcessingDecisionCd"; + container.setProcessingDecisionCd(processingDecisionCd); + assertEquals(processingDecisionCd, container.getProcessingDecisionCd()); + + String disabled = "true"; + container.setDisabled(disabled); + assertEquals(disabled, container.getDisabled()); + + ProviderDataForPrintContainer providerDataForPrintVO = new ProviderDataForPrintContainer(); + container.setProviderDataForPrintVO(providerDataForPrintVO); + assertEquals(providerDataForPrintVO, container.getProviderDataForPrintVO()); + + container.setLabFromDoc(true); + assertTrue(container.isLabFromDoc()); + + Long uid = 3L; + container.setUid(uid); + assertEquals(uid, container.getUid()); + + String sharedInd = "TestSharedInd"; + container.setSharedInd(sharedInd); + assertEquals(sharedInd, container.getSharedInd()); + + String progAreaCd = "TestProgAreaCd"; + container.setProgAreaCd(progAreaCd); + assertEquals(progAreaCd, container.getProgAreaCd()); + + String localId = "TestLocalId"; + container.setLocalId(localId); + assertEquals(localId, container.getLocalId()); + + Long personUid = 4L; + container.setPersonUid(personUid); + assertEquals(personUid, container.getPersonUid()); + + String lastNm = "LastName"; + container.setLastNm(lastNm); + assertEquals(lastNm, container.getLastNm()); + + String firstNm = "FirstName"; + container.setFirstNm(firstNm); + assertEquals(firstNm, container.getFirstNm()); + + Long personParentUid = 5L; + container.setPersonParentUid(personParentUid); + assertEquals(personParentUid, container.getPersonParentUid()); + + String currSexCd = "Male"; + container.setCurrSexCd(currSexCd); + assertEquals(currSexCd, container.getCurrSexCd()); + + String orderingFacility = "TestOrderingFacility"; + container.setOrderingFacility(orderingFacility); + assertEquals(orderingFacility, container.getOrderingFacility()); + } + + @Test + void testGetLastChgUserId() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Long personUid = 123L; + container.setPersonUid(personUid); + assertEquals(personUid, container.getLastChgUserId()); + } + + @Test + void testSetLastChgUserId() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Long personUid = 123L; + container.setLastChgUserId(personUid); + assertEquals(personUid, container.getPersonUid()); + } + + @Test + void testGetLastChgTime() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Timestamp dateReceived = new Timestamp(System.currentTimeMillis()); + container.setDateReceived(dateReceived); + assertEquals(dateReceived, container.getLastChgTime()); + } + + @Test + void testSetLastChgTime() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Timestamp dateReceived = new Timestamp(System.currentTimeMillis()); + container.setLastChgTime(dateReceived); + assertEquals(dateReceived, container.getDateReceived()); + } + + @Test + void testGetAddUserId() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Long personUid = 123L; + container.setPersonUid(personUid); + assertEquals(personUid, container.getAddUserId()); + } + + @Test + void testSetAddUserId() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Long personUid = 123L; + container.setAddUserId(personUid); + assertEquals(personUid, container.getPersonUid()); + } + + @Test + void testGetRecordStatusTime() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Timestamp dateReceived = new Timestamp(System.currentTimeMillis()); + container.setDateReceived(dateReceived); + assertEquals(dateReceived, container.getRecordStatusTime()); + } + + @Test + void testSetRecordStatusTime() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Timestamp dateReceived = new Timestamp(System.currentTimeMillis()); + container.setRecordStatusTime(dateReceived); + assertEquals(dateReceived, container.getDateReceived()); + } + + @Test + void testGetStatusCd() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + String status = "status"; + container.setStatus(status); + assertEquals(status, container.getStatusCd()); + } + + @Test + void testSetStatusCd() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + String status = "status"; + container.setStatusCd(status); + assertEquals(status, container.getStatus()); + } + + @Test + void testGetStatusTime() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Timestamp dateReceived = new Timestamp(System.currentTimeMillis()); + container.setDateReceived(dateReceived); + assertEquals(dateReceived, container.getStatusTime()); + } + + @Test + void testSetStatusTime() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Timestamp dateReceived = new Timestamp(System.currentTimeMillis()); + container.setStatusTime(dateReceived); + assertEquals(dateReceived, container.getDateReceived()); + } + + @Test + void testGetSuperclass() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + assertEquals("gov.cdc.dataprocessing.model.container.base.BaseContainer", container.getSuperclass()); + } + + @Test + void testSetAddTime() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Timestamp dateReceived = new Timestamp(System.currentTimeMillis()); + container.setAddTime(dateReceived); + assertEquals(dateReceived, container.getDateReceived()); + } + + @Test + void testGetAddTime() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Timestamp dateReceived = new Timestamp(System.currentTimeMillis()); + container.setDateReceived(dateReceived); + assertEquals(dateReceived, container.getAddTime()); + } + + @Test + void testGetProgramJurisdictionOid() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Long MPRUid = 123L; + container.setMPRUid(MPRUid); + assertEquals(MPRUid, container.getProgramJurisdictionOid()); + } + + @Test + void testSetProgramJurisdictionOid() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + Long MPRUid = 123L; + container.setProgramJurisdictionOid(MPRUid); + assertEquals(MPRUid, container.getMPRUid()); + } + + @Test + void testCompareTo() { + LabReportSummaryContainer container1 = new LabReportSummaryContainer(); + LabReportSummaryContainer container2 = new LabReportSummaryContainer(); + container1.setUid(1L); + container2.setUid(2L); + assertTrue(container1.compareTo(container2) < 0); + assertTrue(container2.compareTo(container1) > 0); + } + + @Test + void testGetIsTouched() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + container.setItTouched(true); + assertTrue(container.getIsTouched()); + } + + + @Test + void testGetIsAssociated() { + LabReportSummaryContainer container = new LabReportSummaryContainer(); + container.setItAssociated(true); + assertTrue(container.getIsAssociated()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/LabResultProxyContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/LabResultProxyContainerTest.java new file mode 100644 index 000000000..a14dca94b --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/LabResultProxyContainerTest.java @@ -0,0 +1,111 @@ +package gov.cdc.dataprocessing.model.container; + +import gov.cdc.dataprocessing.model.container.model.LabResultProxyContainer; +import gov.cdc.dataprocessing.model.container.model.MaterialContainer; +import gov.cdc.dataprocessing.model.container.model.ObservationContainer; +import gov.cdc.dataprocessing.model.container.model.OrganizationContainer; +import gov.cdc.dataprocessing.model.dto.edx.EDXDocumentDto; +import gov.cdc.dataprocessing.model.dto.entity.RoleDto; +import gov.cdc.dataprocessing.model.dto.log.MessageLogDto; +import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.*; + +class LabResultProxyContainerTest { + + @Test + void testDefaultConstructor() { + LabResultProxyContainer container = new LabResultProxyContainer(); + assertNotNull(container); + assertFalse(container.associatedNotificationInd); + assertNull(container.getSendingFacilityUid()); + assertFalse(container.associatedInvInd); + assertNotNull(container.getTheObservationContainerCollection()); + assertNotNull(container.getTheMaterialContainerCollection()); + assertNotNull(container.getTheRoleDtoCollection()); + assertNull(container.getTheActIdDTCollection()); + // assertNotNull(container.getTheInterventionVOCollection()); + assertNull(container.getEDXDocumentCollection()); + assertNull(container.getTheConditionsList()); + assertNull(container.getMessageLogDCollection()); + assertNull(container.getLabClia()); + assertFalse(container.isManualLab()); + assertNotNull(container.getTheParticipationDtoCollection()); + assertNotNull(container.getTheOrganizationContainerCollection()); + } + + @Test + void testSetAndGetValues() { + LabResultProxyContainer container = new LabResultProxyContainer(); + container.setAssociatedNotificationInd(true); + container.setSendingFacilityUid(123L); + container.setAssociatedInvInd(true); + container.setLabClia("LabClia"); + container.setManualLab(true); + + assertTrue(container.isAssociatedNotificationInd()); + assertEquals(123L, container.getSendingFacilityUid()); + assertTrue(container.isAssociatedInvInd()); + assertEquals("LabClia", container.getLabClia()); + assertTrue(container.isManualLab()); + } + + @Test + void testSetAndGetCollections() { + LabResultProxyContainer container = new LabResultProxyContainer(); + + Collection observationContainerCollection = new ArrayList<>(); + observationContainerCollection.add(new ObservationContainer()); + container.setTheObservationContainerCollection(observationContainerCollection); + assertEquals(observationContainerCollection, container.getTheObservationContainerCollection()); + + Collection materialContainerCollection = new ArrayList<>(); + materialContainerCollection.add(new MaterialContainer()); + container.setTheMaterialContainerCollection(materialContainerCollection); + assertEquals(materialContainerCollection, container.getTheMaterialContainerCollection()); + + Collection roleDtoCollection = new ArrayList<>(); + roleDtoCollection.add(new RoleDto()); + container.setTheRoleDtoCollection(roleDtoCollection); + assertEquals(roleDtoCollection, container.getTheRoleDtoCollection()); + + Collection actIdDTCollection = new ArrayList<>(); + actIdDTCollection.add(new Object()); + container.setTheActIdDTCollection(actIdDTCollection); + assertEquals(actIdDTCollection, container.getTheActIdDTCollection()); + + Collection interventionVOCollection = new ArrayList<>(); + interventionVOCollection.add(new Object()); + container.setTheInterventionVOCollection(interventionVOCollection); + assertEquals(interventionVOCollection, container.getTheInterventionVOCollection()); + + Collection edxDocumentCollection = new ArrayList<>(); + edxDocumentCollection.add(new EDXDocumentDto()); + container.setEDXDocumentCollection(edxDocumentCollection); + assertEquals(edxDocumentCollection, container.getEDXDocumentCollection()); + + ArrayList conditionsList = new ArrayList<>(); + conditionsList.add("Condition1"); + container.setTheConditionsList(conditionsList); + assertEquals(conditionsList, container.getTheConditionsList()); + + Collection messageLogDCollection = new ArrayList<>(); + messageLogDCollection.add(new MessageLogDto()); + container.setMessageLogDCollection(messageLogDCollection); + assertEquals(messageLogDCollection, container.getMessageLogDCollection()); + + Collection participationDtoCollection = new ArrayList<>(); + participationDtoCollection.add(new ParticipationDto()); + container.setTheParticipationDtoCollection(participationDtoCollection); + assertEquals(participationDtoCollection, container.getTheParticipationDtoCollection()); + + Collection organizationContainerCollection = new ArrayList<>(); + organizationContainerCollection.add(new OrganizationContainer()); + container.setTheOrganizationContainerCollection(organizationContainerCollection); + assertEquals(organizationContainerCollection, container.getTheOrganizationContainerCollection()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/LdfBaseContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/LdfBaseContainerTest.java new file mode 100644 index 000000000..505e9e665 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/LdfBaseContainerTest.java @@ -0,0 +1,61 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.LdfBaseContainer; +import gov.cdc.dataprocessing.model.dto.generic_helper.StateDefinedFieldDataDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; + +class LdfBaseContainerTest { + + @Test + void testGettersAndSetters() { + LdfBaseContainer container = new LdfBaseContainer(); + + // Test default values + assertNull(container.getLdfUids()); + assertNull(container.getTheStateDefinedFieldDataDTCollection()); + + // Prepare a list of StateDefinedFieldDataDto + List stateDefinedFieldDataDtoList = new ArrayList<>(); + StateDefinedFieldDataDto dto1 = new StateDefinedFieldDataDto(); + dto1.setLdfUid(1L); + dto1.setLdfValue("Value1"); + + StateDefinedFieldDataDto dto2 = new StateDefinedFieldDataDto(); + dto2.setLdfUid(2L); + dto2.setLdfValue("Value2"); + + StateDefinedFieldDataDto dto3 = new StateDefinedFieldDataDto(); + dto3.setLdfUid(3L); + dto3.setLdfValue(null); // This should be discarded + + stateDefinedFieldDataDtoList.add(dto1); + stateDefinedFieldDataDtoList.add(dto2); + stateDefinedFieldDataDtoList.add(dto3); + + // Set the list + container.setTheStateDefinedFieldDataDTCollection(stateDefinedFieldDataDtoList); + + // Verify that the ldfs collection contains only dto1 and dto2 + Collection ldfs = container.getTheStateDefinedFieldDataDTCollection(); + assertNotNull(ldfs); + assertEquals(2, ldfs.size()); + assertTrue(ldfs.contains(dto1)); + assertTrue(ldfs.contains(dto2)); + assertFalse(ldfs.contains(dto3)); + + // Verify that the ldfUids collection contains all UIDs + Collection ldfUids = container.getLdfUids(); + assertNotNull(ldfUids); + assertEquals(3, ldfUids.size()); + assertTrue(ldfUids.contains(1L)); + assertTrue(ldfUids.contains(2L)); + assertTrue(ldfUids.contains(3L)); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/MPRUpdateContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/MPRUpdateContainerTest.java new file mode 100644 index 000000000..d326eab8b --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/MPRUpdateContainerTest.java @@ -0,0 +1,80 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.MPRUpdateContainer; +import gov.cdc.dataprocessing.model.container.model.PersonContainer; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class MPRUpdateContainerTest { + + @Test + void testConstructorAndGetters() { + // Create a PersonContainer for mpr + PersonContainer mpr = new PersonContainer(); + + // Create a collection of PersonContainer objects + Collection personVOs = new ArrayList<>(); + PersonContainer person1 = new PersonContainer(); + PersonContainer person2 = new PersonContainer(); + personVOs.add(person1); + personVOs.add(person2); + + // Instantiate MPRUpdateContainer with the above mpr and personVOs + MPRUpdateContainer container = new MPRUpdateContainer(mpr, personVOs); + + // Test getters + assertEquals(mpr, container.getMpr()); + assertEquals(personVOs, container.getPersonVOs()); + } + + @Test + void testSetters() { + // Create a PersonContainer for mpr + PersonContainer mpr = new PersonContainer(); + + // Create a collection of PersonContainer objects + Collection personVOs = new ArrayList<>(); + PersonContainer person1 = new PersonContainer(); + PersonContainer person2 = new PersonContainer(); + personVOs.add(person1); + personVOs.add(person2); + + // Instantiate MPRUpdateContainer with null values + MPRUpdateContainer container = new MPRUpdateContainer(null, null); + + // Test setters + container.setMpr(mpr); + container.setPersonVOs(personVOs); + + // Test getters again to verify setters worked + assertEquals(mpr, container.getMpr()); + assertEquals(personVOs, container.getPersonVOs()); + } + + @Test + void testDefaultConstructorAndGettersSetters() { + // Create a PersonContainer for mpr + PersonContainer mpr = new PersonContainer(); + + // Create a collection of PersonContainer objects + Collection personVOs = new ArrayList<>(); + PersonContainer person1 = new PersonContainer(); + PersonContainer person2 = new PersonContainer(); + personVOs.add(person1); + personVOs.add(person2); + + // Use default constructor and setters + MPRUpdateContainer container = new MPRUpdateContainer(null, null); + container.setMpr(mpr); + container.setPersonVOs(personVOs); + + // Test getters + assertEquals(mpr, container.getMpr()); + assertEquals(personVOs, container.getPersonVOs()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/MixTestCon.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/MixTestCon.java new file mode 100644 index 000000000..a69fbe422 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/MixTestCon.java @@ -0,0 +1,73 @@ +package gov.cdc.dataprocessing.model.container; + +import gov.cdc.dataprocessing.model.container.model.*; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + +public class MixTestCon { + + @Test + void testDocumentSummaryContainer() { + DocumentSummaryContainer entity = new DocumentSummaryContainer(); + entity.setProgAreaCdOverride("TEST"); + entity.setVersionCtrlNbr(null); + assertNotNull(entity.getSuperclass()); + } + + @Test + void testLabReportSum() { + LabReportSummaryContainer entity = new LabReportSummaryContainer(); + entity.setLastChgReasonCd(null); + + assertNull(entity.getLastChgReasonCd()); + } + + @Test + void testLdf() { + LdfBaseContainer entity = new LdfBaseContainer(); + entity.setLdfUids(null); + assertNull(entity.getLdfUids()); + } + + @Test + void testNotiSum() { + NotificationSummaryContainer entity = new NotificationSummaryContainer(); + entity.setLastChgUserId(null); + entity.setLastChgReasonCd(null); + entity.setStatusCd(null); + entity.setStatusTime(null); + entity.setNotificationUid(null); + + assertNotNull(entity.getSuperclass()); + assertNull(entity.getVersionCtrlNbr()); + + assertNull(entity.getVersionCtrlNbr()); + assertNull(entity.getLastChgUserId()); + assertNull(entity.getLastChgReasonCd()); + assertNull(entity.getStatusCd()); + assertNull(entity.getStatusTime()); + assertNull(entity.getNotificationUid()); + + } + + @Test + void testOrg() { + OrganizationContainer entity = new OrganizationContainer(); + + entity.setSendingFacility("TEST"); + entity.setSendingSystem("TEST"); + + assertNotNull(entity.getSendingFacility()); + assertNotNull(entity.getSendingSystem()); + + } + + @Test + void testTreat() { + TreatmentContainer entity = new TreatmentContainer(); + assertNotNull(entity.getSuperclass()); + } + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/NbsDocumentContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/NbsDocumentContainerTest.java new file mode 100644 index 000000000..1011fad79 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/NbsDocumentContainerTest.java @@ -0,0 +1,409 @@ +package gov.cdc.dataprocessing.model.container; + +import gov.cdc.dataprocessing.model.container.model.NbsDocumentContainer; +import gov.cdc.dataprocessing.model.container.model.PersonContainer; +import gov.cdc.dataprocessing.model.dto.dsm.DSMUpdateAlgorithmDto; +import gov.cdc.dataprocessing.model.dto.edx.EDXEventProcessCaseSummaryDto; +import gov.cdc.dataprocessing.model.dto.edx.EDXEventProcessDto; +import gov.cdc.dataprocessing.model.dto.log.EDXActivityLogDto; +import gov.cdc.dataprocessing.model.dto.nbs.NBSDocumentDto; +import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.*; + +class NbsDocumentContainerTest { + + @Test + void testGettersAndSetters() { + NbsDocumentContainer container = new NbsDocumentContainer(); + + NBSDocumentDto nbsDocumentDto = new NBSDocumentDto(); + EDXActivityLogDto edxActivityLogDto = new EDXActivityLogDto(); + ParticipationDto participationDto = new ParticipationDto(); + PersonContainer patientVO = new PersonContainer(); + DSMUpdateAlgorithmDto dsmUpdateAlgorithmDto = new DSMUpdateAlgorithmDto(); + Map edxEventProcessDtoMap = new HashMap<>(); + Map edxEventProcessCaseSummaryDtoMap = new HashMap<>(); + + container.setNbsDocumentDT(nbsDocumentDto); + container.setEDXActivityLogDT(edxActivityLogDto); + container.setParticipationDT(participationDto); + container.setPatientVO(patientVO); + container.setActRelColl(new ArrayList<>()); + container.setFromSecurityQueue(true); + container.setIsExistingPatient(true); + container.setIsMultiplePatFound(true); + container.setConditionFound(true); + container.setConditionName("conditionName"); + container.setAssociatedInv(true); + container.setOriginalPHCRLocalId("originalPHCRLocalId"); + container.setEDXEventProcessDTMap(edxEventProcessDtoMap); + container.setContactRecordDoc(true); + container.setLabReportDoc(true); + container.setCaseReportDoc(true); + container.setMorbReportDoc(true); + container.setOngoingCase(true); + container.setAssoSummaryCaseList(new ArrayList<>()); + container.setSummaryCaseListWithInTimeFrame(new ArrayList<>()); + container.setDsmUpdateAlgorithmDT(dsmUpdateAlgorithmDto); + container.setEDXEventProcessCaseSummaryDTMap(edxEventProcessCaseSummaryDtoMap); + + assertEquals(nbsDocumentDto, container.getNbsDocumentDT()); + assertEquals(edxActivityLogDto, container.getEDXActivityLogDT()); + assertEquals(participationDto, container.getParticipationDT()); + assertEquals(patientVO, container.getPatientVO()); + assertTrue(container.isFromSecurityQueue()); + assertTrue(container.getIsExistingPatient()); + assertTrue(container.getIsMultiplePatFound()); + assertTrue(container.isConditionFound()); + assertEquals("conditionName", container.getConditionName()); + assertTrue(container.isAssociatedInv()); + assertEquals("originalPHCRLocalId", container.getOriginalPHCRLocalId()); + assertEquals(edxEventProcessDtoMap, container.getEDXEventProcessDTMap()); + assertTrue(container.isContactRecordDoc()); + assertTrue(container.isLabReportDoc()); + assertTrue(container.isCaseReportDoc()); + assertTrue(container.isMorbReportDoc()); + assertTrue(container.isOngoingCase()); + assertEquals(dsmUpdateAlgorithmDto, container.getDsmUpdateAlgorithmDT()); + assertEquals(edxEventProcessCaseSummaryDtoMap, container.getEDXEventProcessCaseSummaryDTMap()); + } + + @Test + void testDefaultValues() { + NbsDocumentContainer container = new NbsDocumentContainer(); + + assertFalse(container.isFromSecurityQueue()); + assertFalse(container.getIsExistingPatient()); + assertFalse(container.getIsMultiplePatFound()); + assertFalse(container.isConditionFound()); + assertFalse(container.isAssociatedInv()); + assertFalse(container.isContactRecordDoc()); + assertFalse(container.isLabReportDoc()); + assertFalse(container.isCaseReportDoc()); + assertFalse(container.isMorbReportDoc()); + assertTrue(container.isOngoingCase()); + } + + @Test + void testGetIsTouched() { + NbsDocumentContainer container = new NbsDocumentContainer(); + container.setItTouched(true); + assertTrue(container.getIsTouched()); + } + + @Test + void testSetItTouched() { + NbsDocumentContainer container = new NbsDocumentContainer(); + container.setItTouched(true); + assertTrue(container.getIsTouched()); + } + + @Test + void testGetIsAssociated() { + NbsDocumentContainer container = new NbsDocumentContainer(); + container.setItAssociated(true); + assertTrue(container.getIsAssociated()); + } + + @Test + void testSetItAssociated() { + NbsDocumentContainer container = new NbsDocumentContainer(); + container.setItAssociated(true); + assertTrue(container.getIsAssociated()); + } + + @Test + void testGetObservationUid() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Long observationUid = 123L; + container.setObservationUid(observationUid); + assertEquals(observationUid, container.getObservationUid()); + } + + @Test + void testSetObservationUid() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Long observationUid = 123L; + container.setObservationUid(observationUid); + assertEquals(observationUid, container.getObservationUid()); + } + + @Test + void testGetActivityFromTime() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Timestamp activityFromTime = new Timestamp(System.currentTimeMillis()); + container.setActivityFromTime(activityFromTime); + assertEquals(activityFromTime, container.getActivityFromTime()); + } + + @Test + void testSetActivityFromTime() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Timestamp activityFromTime = new Timestamp(System.currentTimeMillis()); + container.setActivityFromTime(activityFromTime); + assertEquals(activityFromTime, container.getActivityFromTime()); + } + + @Test + void testGetLastChgUserId() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Long lastChgUserId = 123L; + container.setLastChgUserId(lastChgUserId); + assertEquals(lastChgUserId, container.getLastChgUserId()); + } + + @Test + void testSetLastChgUserId() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Long lastChgUserId = 123L; + container.setLastChgUserId(lastChgUserId); + assertEquals(lastChgUserId, container.getLastChgUserId()); + } + + @Test + void testGetJurisdictionCd() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String jurisdictionCd = "jurisdictionCd"; + container.setJurisdictionCd(jurisdictionCd); + assertEquals(jurisdictionCd, container.getJurisdictionCd()); + } + + @Test + void testSetJurisdictionCd() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String jurisdictionCd = "jurisdictionCd"; + container.setJurisdictionCd(jurisdictionCd); + assertEquals(jurisdictionCd, container.getJurisdictionCd()); + } + + @Test + void testGetProgAreaCd() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String progAreaCd = "progAreaCd"; + container.setProgAreaCd(progAreaCd); + assertEquals(progAreaCd, container.getProgAreaCd()); + } + + @Test + void testSetProgAreaCd() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String progAreaCd = "progAreaCd"; + container.setProgAreaCd(progAreaCd); + assertEquals(progAreaCd, container.getProgAreaCd()); + } + + @Test + void testGetLastChgTime() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + container.setLastChgTime(lastChgTime); + assertEquals(lastChgTime, container.getLastChgTime()); + } + + @Test + void testSetLastChgTime() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + container.setLastChgTime(lastChgTime); + assertEquals(lastChgTime, container.getLastChgTime()); + } + + @Test + void testGetLocalId() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String localId = "localId"; + container.setLocalId(localId); + assertEquals(localId, container.getLocalId()); + } + + @Test + void testSetLocalId() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String localId = "localId"; + container.setLocalId(localId); + assertEquals(localId, container.getLocalId()); + } + + @Test + void testGetAddUserId() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Long addUserId = 123L; + container.setAddUserId(addUserId); + assertEquals(addUserId, container.getAddUserId()); + } + + @Test + void testSetAddUserId() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Long addUserId = 123L; + container.setAddUserId(addUserId); + assertEquals(addUserId, container.getAddUserId()); + } + + @Test + void testGetLastChgReasonCd() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String lastChgReasonCd = "lastChgReasonCd"; + container.setLastChgReasonCd(lastChgReasonCd); + assertEquals(lastChgReasonCd, container.getLastChgReasonCd()); + } + + @Test + void testSetLastChgReasonCd() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String lastChgReasonCd = "lastChgReasonCd"; + container.setLastChgReasonCd(lastChgReasonCd); + assertEquals(lastChgReasonCd, container.getLastChgReasonCd()); + } + + @Test + void testGetRecordStatusCd() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String recordStatusCd = "recordStatusCd"; + container.setRecordStatusCd(recordStatusCd); + assertEquals(recordStatusCd, container.getRecordStatusCd()); + } + + @Test + void testSetRecordStatusCd() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String recordStatusCd = "recordStatusCd"; + container.setRecordStatusCd(recordStatusCd); + assertEquals(recordStatusCd, container.getRecordStatusCd()); + } + + @Test + void testGetRecordStatusTime() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + container.setRecordStatusTime(recordStatusTime); + assertEquals(recordStatusTime, container.getRecordStatusTime()); + } + + @Test + void testSetRecordStatusTime() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + container.setRecordStatusTime(recordStatusTime); + assertEquals(recordStatusTime, container.getRecordStatusTime()); + } + + @Test + void testGetStatusCd() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String statusCd = "statusCd"; + container.setStatusCd(statusCd); + assertEquals(statusCd, container.getStatusCd()); + } + + @Test + void testSetStatusCd() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String statusCd = "statusCd"; + container.setStatusCd(statusCd); + assertEquals(statusCd, container.getStatusCd()); + } + + @Test + void testGetStatusTime() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + container.setStatusTime(statusTime); + assertEquals(statusTime, container.getStatusTime()); + } + + @Test + void testSetStatusTime() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + container.setStatusTime(statusTime); + assertEquals(statusTime, container.getStatusTime()); + } + + @Test + void testGetSuperclass() { + NbsDocumentContainer container = new NbsDocumentContainer(); + assertEquals("gov.cdc.dataprocessing.model.container.base.BaseContainer", container.getSuperclass()); + } + + @Test + void testGetUid() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Long uid = 123L; + NBSDocumentDto nbsDocumentDto = new NBSDocumentDto(); + nbsDocumentDto.setNbsDocumentUid(uid); + container.setNbsDocumentDT(nbsDocumentDto); + assertNull(container.getUid()); + } + + @Test + void testSetAddTime() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + container.setAddTime(addTime); + assertEquals(addTime, container.getAddTime()); + } + + @Test + void testGetAddTime() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + container.setAddTime(addTime); + assertEquals(addTime, container.getAddTime()); + } + + @Test + void testGetProgramJurisdictionOid() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Long programJurisdictionOid = 123L; + container.setProgramJurisdictionOid(programJurisdictionOid); + assertEquals(programJurisdictionOid, container.getProgramJurisdictionOid()); + } + + @Test + void testSetProgramJurisdictionOid() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Long programJurisdictionOid = 123L; + container.setProgramJurisdictionOid(programJurisdictionOid); + assertEquals(programJurisdictionOid, container.getProgramJurisdictionOid()); + } + + @Test + void testGetSharedInd() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String sharedInd = "sharedInd"; + container.setSharedInd(sharedInd); + assertEquals(sharedInd, container.getSharedInd()); + } + + @Test + void testSetSharedInd() { + NbsDocumentContainer container = new NbsDocumentContainer(); + String sharedInd = "sharedInd"; + container.setSharedInd(sharedInd); + assertEquals(sharedInd, container.getSharedInd()); + } + + @Test + void testGetVersionCtrlNbr() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Integer versionCtrlNbr = 1; + container.setVersionCtrlNbr(versionCtrlNbr); + assertEquals(versionCtrlNbr, container.getVersionCtrlNbr()); + } + + @Test + void testSetVersionCtrlNbr() { + NbsDocumentContainer container = new NbsDocumentContainer(); + Integer versionCtrlNbr = 1; + container.setVersionCtrlNbr(versionCtrlNbr); + assertEquals(versionCtrlNbr, container.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/NonPersonLivingSubjectContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/NonPersonLivingSubjectContainerTest.java new file mode 100644 index 000000000..67c64b468 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/NonPersonLivingSubjectContainerTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.model.container; + +import gov.cdc.dataprocessing.model.container.model.NonPersonLivingSubjectContainer; +import gov.cdc.dataprocessing.model.dto.phc.NonPersonLivingSubjectDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class NonPersonLivingSubjectContainerTest { + + @Test + void testGettersAndSetters() { + NonPersonLivingSubjectContainer container = new NonPersonLivingSubjectContainer(); + + NonPersonLivingSubjectDto nonPersonLivingSubjectDto = new NonPersonLivingSubjectDto(); + Collection entityLocatorParticipationCollection = new ArrayList<>(); + Collection entityIdCollection = new ArrayList<>(); + Collection participationCollection = new ArrayList<>(); + Collection roleCollection = new ArrayList<>(); + + container.setTheNonPersonLivingSubjectDT(nonPersonLivingSubjectDto); + container.setTheEntityLocatorParticipationDTCollection(entityLocatorParticipationCollection); + container.setTheEntityIdDTCollection(entityIdCollection); + container.setTheParticipationDTCollection(participationCollection); + container.setTheRoleDTCollection(roleCollection); + + assertEquals(nonPersonLivingSubjectDto, container.getTheNonPersonLivingSubjectDT()); + assertEquals(entityLocatorParticipationCollection, container.getTheEntityLocatorParticipationDTCollection()); + assertEquals(entityIdCollection, container.getTheEntityIdDTCollection()); + assertEquals(participationCollection, container.getTheParticipationDTCollection()); + assertEquals(roleCollection, container.getTheRoleDTCollection()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/NotificationProxyContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/NotificationProxyContainerTest.java new file mode 100644 index 000000000..251cfc36f --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/NotificationProxyContainerTest.java @@ -0,0 +1,32 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.NotificationContainer; +import gov.cdc.dataprocessing.model.container.model.NotificationProxyContainer; +import gov.cdc.dataprocessing.model.container.model.PublicHealthCaseContainer; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class NotificationProxyContainerTest { + + @Test + void testGettersAndSetters() { + NotificationProxyContainer container = new NotificationProxyContainer(); + + Collection actRelationshipCollection = new ArrayList<>(); + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + NotificationContainer notificationContainer = new NotificationContainer(); + + container.setTheActRelationshipDTCollection(actRelationshipCollection); + container.setThePublicHealthCaseContainer(publicHealthCaseContainer); + container.setTheNotificationContainer(notificationContainer); + + assertEquals(actRelationshipCollection, container.getTheActRelationshipDTCollection()); + assertEquals(publicHealthCaseContainer, container.getThePublicHealthCaseContainer()); + assertEquals(notificationContainer, container.getTheNotificationContainer()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/NotificationSummaryContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/NotificationSummaryContainerTest.java new file mode 100644 index 000000000..85890c316 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/NotificationSummaryContainerTest.java @@ -0,0 +1,158 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.NotificationSummaryContainer; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class NotificationSummaryContainerTest { + + @Test + void testGettersAndSetters() { + NotificationSummaryContainer container = new NotificationSummaryContainer(); + + Long notificationUid = 12345L; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Timestamp rptSentTime = new Timestamp(System.currentTimeMillis() + 10000); + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis() + 20000); + String cd = "CD123"; + String caseClassCd = "CLASS123"; + String localId = "LOCAL123"; + String txt = "Some text"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis() + 30000); + String addUserName = "User123"; + Long addUserId = 67890L; + String jurisdictionCd = "JUR123"; + Long publicHealthCaseUid = 54321L; + String cdTxt = "CD Text"; + String jurisdictionCdTxt = "Jurisdiction Text"; + String publicHealthCaseLocalId = "PHC123"; + String caseClassCdTxt = "Class Text"; + String recordStatusCd = "RECORD123"; + String lastNm = "Last Name"; + String firstNm = "First Name"; + String currSexCd = "M"; + Timestamp birthTimeCalc = new Timestamp(System.currentTimeMillis() - 100000); + String autoResendInd = "Y"; + String isHistory = "N"; + String progAreaCd = "Prog123"; + String sharedInd = "Y"; + String currSexCdDesc = "Male"; + Long MPRUid = 98765L; + String cdNotif = "CD Notif"; + boolean nndAssociated = true; + boolean isCaseReport = false; + Long programJurisdictionOid = 11111L; + boolean shareAssocaited = true; + String patientFullName = "John Doe"; + String patientFullNameLnk = "John Doe Link"; + String conditionCodeTextLnk = "Condition Link"; + String approveLink = "Approve Link"; + String rejectLink = "Reject Link"; + String notificationCd = "Notif123"; + String notificationSrtDescCd = "Notif Desc"; + String recipient = "Recipient"; + String exportRecFacilityUid = "Facility UID"; + String codeConverterTemp = "Converter Temp"; + String codeConverterCommentTemp = "Converter Comment Temp"; + boolean isPendingNotification = false; + String nndInd = "NND123"; + + container.setNotificationUid(notificationUid); + container.setAddTime(addTime); + container.setRptSentTime(rptSentTime); + container.setRecordStatusTime(recordStatusTime); + container.setCd(cd); + container.setCaseClassCd(caseClassCd); + container.setLocalId(localId); + container.setTxt(txt); + container.setLastChgTime(lastChgTime); + container.setAddUserName(addUserName); + container.setAddUserId(addUserId); + container.setJurisdictionCd(jurisdictionCd); + container.setPublicHealthCaseUid(publicHealthCaseUid); + container.setCdTxt(cdTxt); + container.setJurisdictionCdTxt(jurisdictionCdTxt); + container.setPublicHealthCaseLocalId(publicHealthCaseLocalId); + container.setCaseClassCdTxt(caseClassCdTxt); + container.setRecordStatusCd(recordStatusCd); + container.setLastNm(lastNm); + container.setFirstNm(firstNm); + container.setCurrSexCd(currSexCd); + container.setBirthTimeCalc(birthTimeCalc); + container.setAutoResendInd(autoResendInd); + container.setIsHistory(isHistory); + container.setProgAreaCd(progAreaCd); + container.setSharedInd(sharedInd); + container.setCurrSexCdDesc(currSexCdDesc); + container.setMPRUid(MPRUid); + container.setCdNotif(cdNotif); + container.setNndAssociated(nndAssociated); + container.setCaseReport(isCaseReport); + container.setProgramJurisdictionOid(programJurisdictionOid); + container.setShareAssocaited(shareAssocaited); + container.setPatientFullName(patientFullName); + container.setPatientFullNameLnk(patientFullNameLnk); + container.setConditionCodeTextLnk(conditionCodeTextLnk); + container.setApproveLink(approveLink); + container.setRejectLink(rejectLink); + container.setNotificationCd(notificationCd); + container.setNotificationSrtDescCd(notificationSrtDescCd); + container.setRecipient(recipient); + container.setExportRecFacilityUid(exportRecFacilityUid); + container.setCodeConverterTemp(codeConverterTemp); + container.setCodeConverterCommentTemp(codeConverterCommentTemp); + container.setPendingNotification(isPendingNotification); + container.setNndInd(nndInd); + + assertEquals(notificationUid, container.getNotificationUid()); + assertEquals(addTime, container.getAddTime()); + assertEquals(rptSentTime, container.getRptSentTime()); + assertEquals(recordStatusTime, container.getRecordStatusTime()); + assertEquals(cd, container.getCd()); + assertEquals(caseClassCd, container.getCaseClassCd()); + assertEquals(localId, container.getLocalId()); + assertEquals(txt, container.getTxt()); + assertEquals(lastChgTime, container.getLastChgTime()); + assertEquals(addUserName, container.getAddUserName()); + assertEquals(addUserId, container.getAddUserId()); + assertEquals(jurisdictionCd, container.getJurisdictionCd()); + assertEquals(publicHealthCaseUid, container.getPublicHealthCaseUid()); + assertEquals(cdTxt, container.getCdTxt()); + assertEquals(jurisdictionCdTxt, container.getJurisdictionCdTxt()); + assertEquals(publicHealthCaseLocalId, container.getPublicHealthCaseLocalId()); + assertEquals(caseClassCdTxt, container.getCaseClassCdTxt()); + assertEquals(recordStatusCd, container.getRecordStatusCd()); + assertEquals(lastNm, container.getLastNm()); + assertEquals(firstNm, container.getFirstNm()); + assertEquals(currSexCd, container.getCurrSexCd()); + assertEquals(birthTimeCalc, container.getBirthTimeCalc()); + assertEquals(autoResendInd, container.getAutoResendInd()); + assertEquals(isHistory, container.getIsHistory()); + assertEquals(progAreaCd, container.getProgAreaCd()); + assertEquals(sharedInd, container.getSharedInd()); + assertEquals(currSexCdDesc, container.getCurrSexCdDesc()); + assertEquals(MPRUid, container.getMPRUid()); + assertEquals(cdNotif, container.getCdNotif()); + assertEquals(nndAssociated, container.isNndAssociated()); + assertEquals(isCaseReport, container.isCaseReport()); + assertEquals(programJurisdictionOid, container.getProgramJurisdictionOid()); + assertEquals(shareAssocaited, container.isShareAssocaited()); + assertEquals(patientFullName, container.getPatientFullName()); + assertEquals(patientFullNameLnk, container.getPatientFullNameLnk()); + assertEquals(conditionCodeTextLnk, container.getConditionCodeTextLnk()); + assertEquals(approveLink, container.getApproveLink()); + assertEquals(rejectLink, container.getRejectLink()); + assertEquals(notificationCd, container.getNotificationCd()); + assertEquals(notificationSrtDescCd, container.getNotificationSrtDescCd()); + assertEquals(recipient, container.getRecipient()); + assertEquals(exportRecFacilityUid, container.getExportRecFacilityUid()); + assertEquals(codeConverterTemp, container.getCodeConverterTemp()); + assertEquals(codeConverterCommentTemp, container.getCodeConverterCommentTemp()); + assertEquals(isPendingNotification, container.isPendingNotification()); + assertEquals(nndInd, container.getNndInd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ObservationContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ObservationContainerTest.java new file mode 100644 index 000000000..8d77836de --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ObservationContainerTest.java @@ -0,0 +1,81 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.ObservationContainer; +import gov.cdc.dataprocessing.model.dto.act.ActIdDto; +import gov.cdc.dataprocessing.model.dto.act.ActRelationshipDto; +import gov.cdc.dataprocessing.model.dto.act.ActivityLocatorParticipationDto; +import gov.cdc.dataprocessing.model.dto.material.MaterialDto; +import gov.cdc.dataprocessing.model.dto.observation.*; +import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class ObservationContainerTest { + + @Test + void testGettersAndSetters() { + ObservationContainer container = new ObservationContainer(); + + ObservationDto observationDto = new ObservationDto(); + Collection actIdDtoCollection = new ArrayList<>(); + Collection observationReasonDtoCollection = new ArrayList<>(); + Collection observationInterpDtoCollection = new ArrayList<>(); + Collection obsValueCodedDtoCollection = new ArrayList<>(); + Collection obsValueCodedModDTCollection = new ArrayList<>(); + Collection obsValueTxtDtoCollection = new ArrayList<>(); + Collection obsValueDateDtoCollection = new ArrayList<>(); + Collection obsValueNumericDtoCollection = new ArrayList<>(); + Collection activityLocatorParticipationDtoCollection = new ArrayList<>(); + Collection participationDtoCollection = new ArrayList<>(); + Collection actRelationshipDtoCollection = new ArrayList<>(); + Collection materialDtoCollection = new ArrayList<>(); + + container.setTheObservationDto(observationDto); + container.setTheActIdDtoCollection(actIdDtoCollection); + container.setTheObservationReasonDtoCollection(observationReasonDtoCollection); + container.setTheObservationInterpDtoCollection(observationInterpDtoCollection); + container.setTheObsValueCodedDtoCollection(obsValueCodedDtoCollection); + container.setTheObsValueCodedModDTCollection(obsValueCodedModDTCollection); + container.setTheObsValueTxtDtoCollection(obsValueTxtDtoCollection); + container.setTheObsValueDateDtoCollection(obsValueDateDtoCollection); + container.setTheObsValueNumericDtoCollection(obsValueNumericDtoCollection); + container.setTheActivityLocatorParticipationDtoCollection(activityLocatorParticipationDtoCollection); + container.setTheParticipationDtoCollection(participationDtoCollection); + container.setTheActRelationshipDtoCollection(actRelationshipDtoCollection); + container.setTheMaterialDtoCollection(materialDtoCollection); + + assertEquals(observationDto, container.getTheObservationDto()); + assertEquals(actIdDtoCollection, container.getTheActIdDtoCollection()); + assertEquals(observationReasonDtoCollection, container.getTheObservationReasonDtoCollection()); + assertEquals(observationInterpDtoCollection, container.getTheObservationInterpDtoCollection()); + assertEquals(obsValueCodedDtoCollection, container.getTheObsValueCodedDtoCollection()); + assertEquals(obsValueCodedModDTCollection, container.getTheObsValueCodedModDTCollection()); + assertEquals(obsValueTxtDtoCollection, container.getTheObsValueTxtDtoCollection()); + assertEquals(obsValueDateDtoCollection, container.getTheObsValueDateDtoCollection()); + assertEquals(obsValueNumericDtoCollection, container.getTheObsValueNumericDtoCollection()); + assertEquals(activityLocatorParticipationDtoCollection, container.getTheActivityLocatorParticipationDtoCollection()); + assertEquals(participationDtoCollection, container.getTheParticipationDtoCollection()); + assertEquals(actRelationshipDtoCollection, container.getTheActRelationshipDtoCollection()); + assertEquals(materialDtoCollection, container.getTheMaterialDtoCollection()); + + assertNotNull(container.getTheObservationDto()); + assertNotNull(container.getTheActIdDtoCollection()); + assertNotNull(container.getTheObservationReasonDtoCollection()); + assertNotNull(container.getTheObservationInterpDtoCollection()); + assertNotNull(container.getTheObsValueCodedDtoCollection()); + assertNotNull(container.getTheObsValueCodedModDTCollection()); + assertNotNull(container.getTheObsValueTxtDtoCollection()); + assertNotNull(container.getTheObsValueDateDtoCollection()); + assertNotNull(container.getTheObsValueNumericDtoCollection()); + assertNotNull(container.getTheActivityLocatorParticipationDtoCollection()); + assertNotNull(container.getTheParticipationDtoCollection()); + assertNotNull(container.getTheActRelationshipDtoCollection()); + assertNotNull(container.getTheMaterialDtoCollection()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PageActProxyContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PageActProxyContainerTest.java new file mode 100644 index 000000000..ad7aec730 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PageActProxyContainerTest.java @@ -0,0 +1,164 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.base.BasePamContainer; +import gov.cdc.dataprocessing.model.container.interfaces.InterviewContainer; +import gov.cdc.dataprocessing.model.container.model.*; +import gov.cdc.dataprocessing.model.dto.act.ActRelationshipDto; +import gov.cdc.dataprocessing.model.dto.log.MessageLogDto; +import gov.cdc.dataprocessing.model.dto.nbs.NbsNoteDto; +import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; +import gov.cdc.dataprocessing.model.dto.phc.ExportReceivingFacilityDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class PageActProxyContainerTest { + + @Test + void testGettersAndSetters() { + PageActProxyContainer container = new PageActProxyContainer(); + + String pageProxyTypeCd = "INV"; + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + InterviewContainer interviewContainer = new InterviewContainer(); + NotificationContainer notificationContainer = new NotificationContainer(); + InterventionContainer interventionContainer = new InterventionContainer(); + Long patientUid = 123L; + String currentInvestigator = "Investigator A"; + String fieldSupervisor = "Supervisor B"; + String caseSupervisor = "Supervisor C"; + boolean isSTDProgramArea = true; + Collection personContainerCollection = new ArrayList<>(); + BasePamContainer pageVO = new BasePamContainer(); + Collection vaccinationSummaryVOCollection = new ArrayList<>(); + Collection notificationSummaryVOCollection = new ArrayList<>(); + Collection treatmentSummaryVOCollection = new ArrayList<>(); + Collection labReportSummaryVOCollection = new ArrayList<>(); + Collection morbReportSummaryVOCollection = new ArrayList<>(); + Collection participationDtoCollection = new ArrayList<>(); + Collection actRelationshipDtoCollection = new ArrayList<>(); + Collection investigationAuditLogSummaryVOCollection = new ArrayList<>(); + Collection organizationContainerCollection = new ArrayList<>(); + Collection ctContactSummaryDTCollection = new ArrayList<>(); + Collection interviewSummaryDTCollection = new ArrayList<>(); + Collection notificationVOCollection = new ArrayList<>(); + Collection cssSummaryVOCollection = new ArrayList<>(); + Collection nbsAttachmentDTColl = new ArrayList<>(); + Collection nbsNoteDTColl = new ArrayList<>(); + Collection documentSummaryVOCollection = new ArrayList<>(); + boolean isOOSystemInd = true; + boolean isOOSystemPendInd = true; + boolean associatedNotificationsInd = true; + boolean isUnsavedNote = true; + boolean isMergeCase = true; + Collection edxDocumentDTCollection = new ArrayList<>(); + boolean isRenterant = true; + boolean isConversionHasModified = true; + ExportReceivingFacilityDto exportReceivingFacilityDto = new ExportReceivingFacilityDto(); + Map messageLogDTMap = new HashMap<>(); + + container.setPageProxyTypeCd(pageProxyTypeCd); + container.setPublicHealthCaseContainer(publicHealthCaseContainer); + container.setInterviewContainer(interviewContainer); + container.setTheNotificationContainer(notificationContainer); + container.setInterventionContainer(interventionContainer); + container.setPatientUid(patientUid); + container.setCurrentInvestigator(currentInvestigator); + container.setFieldSupervisor(fieldSupervisor); + container.setCaseSupervisor(caseSupervisor); + container.setSTDProgramArea(isSTDProgramArea); + container.setThePersonContainerCollection(personContainerCollection); + container.setPageVO(pageVO); + container.setTheVaccinationSummaryVOCollection(vaccinationSummaryVOCollection); + container.setTheNotificationSummaryVOCollection(notificationSummaryVOCollection); + container.setTheTreatmentSummaryVOCollection(treatmentSummaryVOCollection); + container.setTheLabReportSummaryVOCollection(labReportSummaryVOCollection); + container.setTheMorbReportSummaryVOCollection(morbReportSummaryVOCollection); + container.setTheParticipationDtoCollection(participationDtoCollection); + container.setTheActRelationshipDtoCollection(actRelationshipDtoCollection); + container.setTheInvestigationAuditLogSummaryVOCollection(investigationAuditLogSummaryVOCollection); + container.setTheOrganizationContainerCollection(organizationContainerCollection); + container.setTheCTContactSummaryDTCollection(ctContactSummaryDTCollection); + container.setTheInterviewSummaryDTCollection(interviewSummaryDTCollection); + container.setTheNotificationVOCollection(notificationVOCollection); + container.setTheCSSummaryVOCollection(cssSummaryVOCollection); + container.setNbsAttachmentDTColl(nbsAttachmentDTColl); + container.setNbsNoteDTColl(nbsNoteDTColl); + container.setTheDocumentSummaryVOCollection(documentSummaryVOCollection); + container.setOOSystemInd(isOOSystemInd); + container.setOOSystemPendInd(isOOSystemPendInd); + container.setAssociatedNotificationsInd(associatedNotificationsInd); + container.setUnsavedNote(isUnsavedNote); + container.setMergeCase(isMergeCase); + container.setTheEDXDocumentDTCollection(edxDocumentDTCollection); + container.setRenterant(isRenterant); + container.setConversionHasModified(isConversionHasModified); + container.setExportReceivingFacilityDto(exportReceivingFacilityDto); + container.setMessageLogDTMap(messageLogDTMap); + + assertEquals(pageProxyTypeCd, container.getPageProxyTypeCd()); + assertEquals(publicHealthCaseContainer, container.getPublicHealthCaseContainer()); + assertEquals(interviewContainer, container.getInterviewContainer()); + assertEquals(notificationContainer, container.getTheNotificationContainer()); + assertEquals(interventionContainer, container.getInterventionContainer()); + assertEquals(patientUid, container.getPatientUid()); + assertEquals(currentInvestigator, container.getCurrentInvestigator()); + assertEquals(fieldSupervisor, container.getFieldSupervisor()); + assertEquals(caseSupervisor, container.getCaseSupervisor()); + assertEquals(isSTDProgramArea, container.isSTDProgramArea()); + assertEquals(personContainerCollection, container.getThePersonContainerCollection()); + assertEquals(pageVO, container.getPageVO()); + assertEquals(vaccinationSummaryVOCollection, container.getTheVaccinationSummaryVOCollection()); + assertEquals(notificationSummaryVOCollection, container.getTheNotificationSummaryVOCollection()); + assertEquals(treatmentSummaryVOCollection, container.getTheTreatmentSummaryVOCollection()); + assertEquals(labReportSummaryVOCollection, container.getTheLabReportSummaryVOCollection()); + assertEquals(morbReportSummaryVOCollection, container.getTheMorbReportSummaryVOCollection()); + assertEquals(participationDtoCollection, container.getTheParticipationDtoCollection()); + assertEquals(actRelationshipDtoCollection, container.getTheActRelationshipDtoCollection()); + assertEquals(investigationAuditLogSummaryVOCollection, container.getTheInvestigationAuditLogSummaryVOCollection()); + assertEquals(organizationContainerCollection, container.getTheOrganizationContainerCollection()); + assertEquals(ctContactSummaryDTCollection, container.getTheCTContactSummaryDTCollection()); + assertEquals(interviewSummaryDTCollection, container.getTheInterviewSummaryDTCollection()); + assertEquals(notificationVOCollection, container.getTheNotificationVOCollection()); + assertEquals(cssSummaryVOCollection, container.getTheCSSummaryVOCollection()); + assertEquals(nbsAttachmentDTColl, container.getNbsAttachmentDTColl()); + assertEquals(nbsNoteDTColl, container.getNbsNoteDTColl()); + assertEquals(documentSummaryVOCollection, container.getTheDocumentSummaryVOCollection()); + assertEquals(isOOSystemInd, container.isOOSystemInd()); + assertEquals(isOOSystemPendInd, container.isOOSystemPendInd()); + assertEquals(associatedNotificationsInd, container.isAssociatedNotificationsInd()); + assertEquals(isUnsavedNote, container.isUnsavedNote()); + assertEquals(isMergeCase, container.isMergeCase()); + assertEquals(edxDocumentDTCollection, container.getTheEDXDocumentDTCollection()); + assertEquals(isRenterant, container.isRenterant()); + assertEquals(isConversionHasModified, container.isConversionHasModified()); + assertEquals(exportReceivingFacilityDto, container.getExportReceivingFacilityDto()); + assertEquals(messageLogDTMap, container.getMessageLogDTMap()); + + assertNotNull(container.getThePersonContainerCollection()); + assertNotNull(container.getTheVaccinationSummaryVOCollection()); + assertNotNull(container.getTheNotificationSummaryVOCollection()); + assertNotNull(container.getTheTreatmentSummaryVOCollection()); + assertNotNull(container.getTheLabReportSummaryVOCollection()); + assertNotNull(container.getTheMorbReportSummaryVOCollection()); + assertNotNull(container.getTheParticipationDtoCollection()); + assertNotNull(container.getTheActRelationshipDtoCollection()); + assertNotNull(container.getTheInvestigationAuditLogSummaryVOCollection()); + assertNotNull(container.getTheOrganizationContainerCollection()); + assertNotNull(container.getTheCTContactSummaryDTCollection()); + assertNotNull(container.getTheInterviewSummaryDTCollection()); + assertNotNull(container.getTheNotificationVOCollection()); + assertNotNull(container.getTheCSSummaryVOCollection()); + assertNotNull(container.getNbsAttachmentDTColl()); + assertNotNull(container.getNbsNoteDTColl()); + assertNotNull(container.getTheDocumentSummaryVOCollection()); + assertNotNull(container.getTheEDXDocumentDTCollection()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PageContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PageContainerTest.java new file mode 100644 index 000000000..008f1e8fe --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PageContainerTest.java @@ -0,0 +1,20 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.PageContainer; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class PageContainerTest { + + @Test + void testGettersAndSetters() { + PageContainer pageContainer = new PageContainer(); + + boolean isCurrInvestgtrDynamic = true; + pageContainer.setCurrInvestgtrDynamic(isCurrInvestgtrDynamic); + + assertEquals(isCurrInvestgtrDynamic, pageContainer.isCurrInvestgtrDynamic()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PamProxyContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PamProxyContainerTest.java new file mode 100644 index 000000000..ab4ba5e93 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PamProxyContainerTest.java @@ -0,0 +1,94 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.base.BasePamContainer; +import gov.cdc.dataprocessing.model.container.model.NotificationContainer; +import gov.cdc.dataprocessing.model.container.model.PamProxyContainer; +import gov.cdc.dataprocessing.model.container.model.PersonContainer; +import gov.cdc.dataprocessing.model.container.model.PublicHealthCaseContainer; +import gov.cdc.dataprocessing.model.dto.nbs.NbsNoteDto; +import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; +import gov.cdc.dataprocessing.model.dto.phc.ExportReceivingFacilityDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class PamProxyContainerTest { + + @Test + void testGettersAndSetters() { + PamProxyContainer pamProxyContainer = new PamProxyContainer(); + + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + Collection thePersonVOCollection = new ArrayList<>(); + BasePamContainer pamVO = new BasePamContainer(); + Collection theVaccinationSummaryVOCollection = new ArrayList<>(); + Collection theNotificationSummaryVOCollection = new ArrayList<>(); + Collection theTreatmentSummaryVOCollection = new ArrayList<>(); + Collection theLabReportSummaryVOCollection = new ArrayList<>(); + Collection theMorbReportSummaryVOCollection = new ArrayList<>(); + Collection theParticipationDTCollection = new ArrayList<>(); + Collection theInvestigationAuditLogSummaryVOCollection = new ArrayList<>(); + Collection theOrganizationVOCollection = new ArrayList<>(); + Collection theNotificationVOCollection = new ArrayList<>(); + boolean associatedNotificationsInd = true; + NotificationContainer theNotificationContainer = new NotificationContainer(); + Collection theDocumentSummaryVOCollection = new ArrayList<>(); + boolean isOOSystemInd = true; + boolean isOOSystemPendInd = true; + Collection theCTContactSummaryDTCollection = new ArrayList<>(); + Collection nbsAttachmentDTColl = new ArrayList<>(); + Collection nbsNoteDTColl = new ArrayList<>(); + boolean isUnsavedNote = true; + ExportReceivingFacilityDto exportReceivingFacilityDto = new ExportReceivingFacilityDto(); + + pamProxyContainer.setPublicHealthCaseContainer(publicHealthCaseContainer); + pamProxyContainer.setThePersonVOCollection(thePersonVOCollection); + pamProxyContainer.setPamVO(pamVO); + pamProxyContainer.setTheVaccinationSummaryVOCollection(theVaccinationSummaryVOCollection); + pamProxyContainer.setTheNotificationSummaryVOCollection(theNotificationSummaryVOCollection); + pamProxyContainer.setTheTreatmentSummaryVOCollection(theTreatmentSummaryVOCollection); + pamProxyContainer.setTheLabReportSummaryVOCollection(theLabReportSummaryVOCollection); + pamProxyContainer.setTheMorbReportSummaryVOCollection(theMorbReportSummaryVOCollection); + pamProxyContainer.setTheParticipationDTCollection(theParticipationDTCollection); + pamProxyContainer.setTheInvestigationAuditLogSummaryVOCollection(theInvestigationAuditLogSummaryVOCollection); + pamProxyContainer.setTheOrganizationVOCollection(theOrganizationVOCollection); + pamProxyContainer.setTheNotificationVOCollection(theNotificationVOCollection); + pamProxyContainer.setAssociatedNotificationsInd(associatedNotificationsInd); + pamProxyContainer.setTheNotificationContainer(theNotificationContainer); + pamProxyContainer.setTheDocumentSummaryVOCollection(theDocumentSummaryVOCollection); + pamProxyContainer.setOOSystemInd(isOOSystemInd); + pamProxyContainer.setOOSystemPendInd(isOOSystemPendInd); + pamProxyContainer.setTheCTContactSummaryDTCollection(theCTContactSummaryDTCollection); + pamProxyContainer.setNbsAttachmentDTColl(nbsAttachmentDTColl); + pamProxyContainer.setNbsNoteDTColl(nbsNoteDTColl); + pamProxyContainer.setUnsavedNote(isUnsavedNote); + pamProxyContainer.setExportReceivingFacilityDto(exportReceivingFacilityDto); + + assertEquals(publicHealthCaseContainer, pamProxyContainer.getPublicHealthCaseContainer()); + assertEquals(thePersonVOCollection, pamProxyContainer.getThePersonVOCollection()); + assertEquals(pamVO, pamProxyContainer.getPamVO()); + assertEquals(theVaccinationSummaryVOCollection, pamProxyContainer.getTheVaccinationSummaryVOCollection()); + assertEquals(theNotificationSummaryVOCollection, pamProxyContainer.getTheNotificationSummaryVOCollection()); + assertEquals(theTreatmentSummaryVOCollection, pamProxyContainer.getTheTreatmentSummaryVOCollection()); + assertEquals(theLabReportSummaryVOCollection, pamProxyContainer.getTheLabReportSummaryVOCollection()); + assertEquals(theMorbReportSummaryVOCollection, pamProxyContainer.getTheMorbReportSummaryVOCollection()); + assertEquals(theParticipationDTCollection, pamProxyContainer.getTheParticipationDTCollection()); + assertEquals(theInvestigationAuditLogSummaryVOCollection, pamProxyContainer.getTheInvestigationAuditLogSummaryVOCollection()); + assertEquals(theOrganizationVOCollection, pamProxyContainer.getTheOrganizationVOCollection()); + assertEquals(theNotificationVOCollection, pamProxyContainer.getTheNotificationVOCollection()); + assertEquals(associatedNotificationsInd, pamProxyContainer.isAssociatedNotificationsInd()); + assertEquals(theNotificationContainer, pamProxyContainer.getTheNotificationContainer()); + assertEquals(theDocumentSummaryVOCollection, pamProxyContainer.getTheDocumentSummaryVOCollection()); + assertEquals(isOOSystemInd, pamProxyContainer.isOOSystemInd()); + assertEquals(isOOSystemPendInd, pamProxyContainer.isOOSystemPendInd()); + assertEquals(theCTContactSummaryDTCollection, pamProxyContainer.getTheCTContactSummaryDTCollection()); + assertEquals(nbsAttachmentDTColl, pamProxyContainer.getNbsAttachmentDTColl()); + assertEquals(nbsNoteDTColl, pamProxyContainer.getNbsNoteDTColl()); + assertEquals(isUnsavedNote, pamProxyContainer.isUnsavedNote()); + assertEquals(exportReceivingFacilityDto, pamProxyContainer.getExportReceivingFacilityDto()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PatientEncounterContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PatientEncounterContainerTest.java new file mode 100644 index 000000000..acc236192 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PatientEncounterContainerTest.java @@ -0,0 +1,37 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.PatientEncounterContainer; +import gov.cdc.dataprocessing.model.dto.phc.PatientEncounterDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class PatientEncounterContainerTest { + + @Test + void testGettersAndSetters() { + PatientEncounterContainer patientEncounterContainer = new PatientEncounterContainer(); + + PatientEncounterDto patientEncounterDto = new PatientEncounterDto(); + Collection activityLocatorParticipationDTCollection = new ArrayList<>(); + Collection actIdDTCollection = new ArrayList<>(); + Collection participationDTCollection = new ArrayList<>(); + Collection actRelationshipDTCollection = new ArrayList<>(); + + patientEncounterContainer.setThePatientEncounterDT(patientEncounterDto); + patientEncounterContainer.setTheActivityLocatorParticipationDTCollection(activityLocatorParticipationDTCollection); + patientEncounterContainer.setTheActIdDTCollection(actIdDTCollection); + patientEncounterContainer.setTheParticipationDTCollection(participationDTCollection); + patientEncounterContainer.setTheActRelationshipDTCollection(actRelationshipDTCollection); + + assertEquals(patientEncounterDto, patientEncounterContainer.getThePatientEncounterDT()); + assertEquals(activityLocatorParticipationDTCollection, patientEncounterContainer.getTheActivityLocatorParticipationDTCollection()); + assertEquals(actIdDTCollection, patientEncounterContainer.getTheActIdDTCollection()); + assertEquals(participationDTCollection, patientEncounterContainer.getTheParticipationDTCollection()); + assertEquals(actRelationshipDTCollection, patientEncounterContainer.getTheActRelationshipDTCollection()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PersonContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PersonContainerTest.java new file mode 100644 index 000000000..9a5cdcf20 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PersonContainerTest.java @@ -0,0 +1,68 @@ +package gov.cdc.dataprocessing.model.container; + +import gov.cdc.dataprocessing.model.container.model.PersonContainer; +import gov.cdc.dataprocessing.model.dto.entity.EntityIdDto; +import gov.cdc.dataprocessing.model.dto.entity.EntityLocatorParticipationDto; +import gov.cdc.dataprocessing.model.dto.entity.RoleDto; +import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; +import gov.cdc.dataprocessing.model.dto.person.PersonDto; +import gov.cdc.dataprocessing.model.dto.person.PersonEthnicGroupDto; +import gov.cdc.dataprocessing.model.dto.person.PersonNameDto; +import gov.cdc.dataprocessing.model.dto.person.PersonRaceDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.*; + +class PersonContainerTest { + + @Test + void testGettersAndSetters() { + PersonContainer personContainer = new PersonContainer(); + + PersonDto personDto = new PersonDto(); + Collection personNameDtoCollection = new ArrayList<>(); + Collection personRaceDtoCollection = new ArrayList<>(); + Collection personEthnicGroupDtoCollection = new ArrayList<>(); + Collection entityLocatorParticipationDtoCollection = new ArrayList<>(); + Collection entityIdDtoCollection = new ArrayList<>(); + Collection participationDtoCollection = new ArrayList<>(); + Collection roleDtoCollection = new ArrayList<>(); + + personContainer.setThePersonDto(personDto); + personContainer.setThePersonNameDtoCollection(personNameDtoCollection); + personContainer.setThePersonRaceDtoCollection(personRaceDtoCollection); + personContainer.setThePersonEthnicGroupDtoCollection(personEthnicGroupDtoCollection); + personContainer.setTheEntityLocatorParticipationDtoCollection(entityLocatorParticipationDtoCollection); + personContainer.setTheEntityIdDtoCollection(entityIdDtoCollection); + personContainer.setTheParticipationDtoCollection(participationDtoCollection); + personContainer.setTheRoleDtoCollection(roleDtoCollection); + + personContainer.setDefaultJurisdictionCd("testJurisdiction"); + personContainer.setExt(true); + personContainer.setMPRUpdateValid(false); + personContainer.setLocalIdentifier("testLocalIdentifier"); + personContainer.setRole("testRole"); + personContainer.setAddReasonCode("testAddReasonCode"); + personContainer.setPatientMatchedFound(true); + + assertEquals(personDto, personContainer.getThePersonDto()); + assertEquals(personNameDtoCollection, personContainer.getThePersonNameDtoCollection()); + assertEquals(personRaceDtoCollection, personContainer.getThePersonRaceDtoCollection()); + assertEquals(personEthnicGroupDtoCollection, personContainer.getThePersonEthnicGroupDtoCollection()); + assertEquals(entityLocatorParticipationDtoCollection, personContainer.getTheEntityLocatorParticipationDtoCollection()); + assertEquals(entityIdDtoCollection, personContainer.getTheEntityIdDtoCollection()); + assertEquals(participationDtoCollection, personContainer.getTheParticipationDtoCollection()); + assertEquals(roleDtoCollection, personContainer.getTheRoleDtoCollection()); + + assertEquals("testJurisdiction", personContainer.getDefaultJurisdictionCd()); + assertTrue(personContainer.isExt()); + assertFalse(personContainer.isMPRUpdateValid()); + assertEquals("testLocalIdentifier", personContainer.getLocalIdentifier()); + assertEquals("testRole", personContainer.getRole()); + assertEquals("testAddReasonCode", personContainer.getAddReasonCode()); + assertEquals(true, personContainer.getPatientMatchedFound()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PlaceContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PlaceContainerTest.java new file mode 100644 index 000000000..e43fc796a --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PlaceContainerTest.java @@ -0,0 +1,39 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.PlaceContainer; +import gov.cdc.dataprocessing.model.dto.phc.PlaceDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class PlaceContainerTest { + + @Test + void testGettersAndSetters() { + PlaceContainer placeContainer = new PlaceContainer(); + + PlaceDto placeDto = new PlaceDto(); + Collection entityLocatorParticipationDTCollection = new ArrayList<>(); + Collection entityIdDTCollection = new ArrayList<>(); + Collection participationDTCollection = new ArrayList<>(); + Collection roleDTCollection = new ArrayList<>(); + + placeContainer.setThePlaceDT(placeDto); + placeContainer.setTheEntityLocatorParticipationDTCollection(entityLocatorParticipationDTCollection); + placeContainer.setTheEntityIdDTCollection(entityIdDTCollection); + placeContainer.setTheParticipationDTCollection(participationDTCollection); + placeContainer.setTheRoleDTCollection(roleDTCollection); + placeContainer.setLocalIdentifier("testLocalIdentifier"); + + assertEquals(placeDto, placeContainer.getThePlaceDT()); + assertEquals(entityLocatorParticipationDTCollection, placeContainer.getTheEntityLocatorParticipationDTCollection()); + assertEquals(entityIdDTCollection, placeContainer.getTheEntityIdDTCollection()); + assertEquals(participationDTCollection, placeContainer.getTheParticipationDTCollection()); + assertEquals(roleDTCollection, placeContainer.getTheRoleDTCollection()); + assertEquals("testLocalIdentifier", placeContainer.getLocalIdentifier()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ProgramAreaContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ProgramAreaContainerTest.java new file mode 100644 index 000000000..a1960a31e --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ProgramAreaContainerTest.java @@ -0,0 +1,42 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.ProgramAreaContainer; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ProgramAreaContainerTest { + + @Test + void testGettersAndSetters() { + ProgramAreaContainer programAreaContainer = new ProgramAreaContainer(); + + programAreaContainer.setConditionCd("cond123"); + programAreaContainer.setConditionShortNm("ShortName"); + programAreaContainer.setStateProgAreaCode("AreaCode"); + programAreaContainer.setStateProgAreaCdDesc("AreaDesc"); + programAreaContainer.setInvestigationFormCd("FormCd"); + + assertEquals("cond123", programAreaContainer.getConditionCd()); + assertEquals("ShortName", programAreaContainer.getConditionShortNm()); + assertEquals("AreaCode", programAreaContainer.getStateProgAreaCode()); + assertEquals("AreaDesc", programAreaContainer.getStateProgAreaCdDesc()); + assertEquals("FormCd", programAreaContainer.getInvestigationFormCd()); + } + + @Test + void testCompareTo() { + ProgramAreaContainer pac1 = new ProgramAreaContainer(); + pac1.setConditionShortNm("ShortName1"); + + ProgramAreaContainer pac2 = new ProgramAreaContainer(); + pac2.setConditionShortNm("ShortName2"); + + assertEquals(-1, pac1.compareTo(pac2)); + assertEquals(1, pac2.compareTo(pac1)); + + pac2.setConditionShortNm("ShortName1"); + assertEquals(0, pac1.compareTo(pac2)); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ProviderDataForPrintContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ProviderDataForPrintContainerTest.java new file mode 100644 index 000000000..65e68f9f7 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ProviderDataForPrintContainerTest.java @@ -0,0 +1,47 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.ProviderDataForPrintContainer; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ProviderDataForPrintContainerTest { + + @Test + void testGettersAndSetters() { + ProviderDataForPrintContainer providerData = new ProviderDataForPrintContainer(); + + providerData.setProviderStreetAddress1("123 Main St"); + providerData.setProviderCity("Atlanta"); + providerData.setProviderState("GA"); + providerData.setProviderZip("30301"); + providerData.setProviderPhone("123-456-7890"); + providerData.setProviderPhoneExtension("1234"); + providerData.setFacilityName("Main Facility"); + providerData.setFacilityCity("Atlanta"); + providerData.setFacilityState("GA"); + providerData.setFacilityAddress1("123 Main St"); + providerData.setFacilityAddress2("Suite 100"); + providerData.setFacility("Main Facility"); + providerData.setFacilityZip("30301"); + providerData.setFacilityPhoneExtension("5678"); + providerData.setFacilityPhone("098-765-4321"); + + assertEquals("123 Main St", providerData.getProviderStreetAddress1()); + assertEquals("Atlanta", providerData.getProviderCity()); + assertEquals("GA", providerData.getProviderState()); + assertEquals("30301", providerData.getProviderZip()); + assertEquals("123-456-7890", providerData.getProviderPhone()); + assertEquals("1234", providerData.getProviderPhoneExtension()); + assertEquals("Main Facility", providerData.getFacilityName()); + assertEquals("Atlanta", providerData.getFacilityCity()); + assertEquals("GA", providerData.getFacilityState()); + assertEquals("123 Main St", providerData.getFacilityAddress1()); + assertEquals("Suite 100", providerData.getFacilityAddress2()); + assertEquals("Main Facility", providerData.getFacility()); + assertEquals("30301", providerData.getFacilityZip()); + assertEquals("5678", providerData.getFacilityPhoneExtension()); + assertEquals("098-765-4321", providerData.getFacilityPhone()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PublicHealthCaseContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PublicHealthCaseContainerTest.java new file mode 100644 index 000000000..da2eed9c1 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/PublicHealthCaseContainerTest.java @@ -0,0 +1,72 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.PublicHealthCaseContainer; +import gov.cdc.dataprocessing.model.dto.act.ActIdDto; +import gov.cdc.dataprocessing.model.dto.act.ActRelationshipDto; +import gov.cdc.dataprocessing.model.dto.act.ActivityLocatorParticipationDto; +import gov.cdc.dataprocessing.model.dto.edx.EDXEventProcessDto; +import gov.cdc.dataprocessing.model.dto.log.EDXActivityDetailLogDto; +import gov.cdc.dataprocessing.model.dto.nbs.NbsActEntityDto; +import gov.cdc.dataprocessing.model.dto.nbs.NbsCaseAnswerDto; +import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; +import gov.cdc.dataprocessing.model.dto.phc.CaseManagementDto; +import gov.cdc.dataprocessing.model.dto.phc.ConfirmationMethodDto; +import gov.cdc.dataprocessing.model.dto.phc.PublicHealthCaseDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class PublicHealthCaseContainerTest { + + @Test + void testGettersAndSetters() { + PublicHealthCaseContainer container = new PublicHealthCaseContainer(); + + CaseManagementDto caseManagementDto = new CaseManagementDto(); + PublicHealthCaseDto publicHealthCaseDto = new PublicHealthCaseDto(); + Collection confirmationMethodDtoCollection = new ArrayList<>(); + Collection actIdDtoCollection = new ArrayList<>(); + Collection activityLocatorParticipationDtoCollection = new ArrayList<>(); + Collection participationDtoCollection = new ArrayList<>(); + Collection actRelationshipDtoCollection = new ArrayList<>(); + Collection nbsCaseEntityCollection = new ArrayList<>(); + Collection nbsAnswerCollection = new ArrayList<>(); + Collection edxPHCRLogDetailDtoCollection = new ArrayList<>(); + Collection edxEventProcessDtoCollection = new ArrayList<>(); + + container.setPamCase(true); + container.setTheCaseManagementDto(caseManagementDto); + container.setThePublicHealthCaseDto(publicHealthCaseDto); + container.setTheConfirmationMethodDTCollection(confirmationMethodDtoCollection); + container.setTheActIdDTCollection(actIdDtoCollection); + container.setTheActivityLocatorParticipationDTCollection(activityLocatorParticipationDtoCollection); + container.setTheParticipationDTCollection(participationDtoCollection); + container.setTheActRelationshipDTCollection(actRelationshipDtoCollection); + container.setNbsCaseEntityCollection(nbsCaseEntityCollection); + container.setNbsAnswerCollection(nbsAnswerCollection); + container.setEdxPHCRLogDetailDTCollection(edxPHCRLogDetailDtoCollection); + container.setEdxEventProcessDtoCollection(edxEventProcessDtoCollection); + container.setErrorText("Error"); + container.setCoinfectionCondition(true); + + assertTrue(container.isPamCase()); + assertEquals(caseManagementDto, container.getTheCaseManagementDto()); + assertEquals(publicHealthCaseDto, container.getThePublicHealthCaseDto()); + assertEquals(confirmationMethodDtoCollection, container.getTheConfirmationMethodDTCollection()); + assertEquals(actIdDtoCollection, container.getTheActIdDTCollection()); + assertEquals(activityLocatorParticipationDtoCollection, container.getTheActivityLocatorParticipationDTCollection()); + assertEquals(participationDtoCollection, container.getTheParticipationDTCollection()); + assertEquals(actRelationshipDtoCollection, container.getTheActRelationshipDTCollection()); + assertEquals(nbsCaseEntityCollection, container.getNbsCaseEntityCollection()); + assertEquals(nbsAnswerCollection, container.getNbsAnswerCollection()); + assertEquals(edxPHCRLogDetailDtoCollection, container.getEdxPHCRLogDetailDTCollection()); + assertEquals(edxEventProcessDtoCollection, container.getEdxEventProcessDtoCollection()); + assertEquals("Error", container.getErrorText()); + assertTrue(container.isCoinfectionCondition()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ReferralContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ReferralContainerTest.java new file mode 100644 index 000000000..7e3b06c1c --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ReferralContainerTest.java @@ -0,0 +1,37 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.ReferralContainer; +import gov.cdc.dataprocessing.model.dto.phc.ReferralDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ReferralContainerTest { + + @Test + void testGettersAndSetters() { + ReferralContainer container = new ReferralContainer(); + + ReferralDto referralDto = new ReferralDto(); + Collection activityLocatorParticipationDTCollection = new ArrayList<>(); + Collection actIdDTCollection = new ArrayList<>(); + Collection participationDTCollection = new ArrayList<>(); + Collection actRelationshipDTCollection = new ArrayList<>(); + + container.setTheReferralDT(referralDto); + container.setTheActivityLocatorParticipationDTCollection(activityLocatorParticipationDTCollection); + container.setTheActIdDTCollection(actIdDTCollection); + container.setTheParticipationDTCollection(participationDTCollection); + container.setTheActRelationshipDTCollection(actRelationshipDTCollection); + + assertEquals(referralDto, container.getTheReferralDT()); + assertEquals(activityLocatorParticipationDTCollection, container.getTheActivityLocatorParticipationDTCollection()); + assertEquals(actIdDTCollection, container.getTheActIdDTCollection()); + assertEquals(participationDTCollection, container.getTheParticipationDTCollection()); + assertEquals(actRelationshipDTCollection, container.getTheActRelationshipDTCollection()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ResultedTestSummaryContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ResultedTestSummaryContainerTest.java new file mode 100644 index 000000000..f7d7bec35 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/ResultedTestSummaryContainerTest.java @@ -0,0 +1,363 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.ResultedTestSummaryContainer; +import org.junit.jupiter.api.Test; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class ResultedTestSummaryContainerTest { + + @Test + void testGettersAndSetters() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + + Long sourceActUid = 1L; + String localId = "localId"; + Long observationUid = 2L; + String ctrlCdUserDefined1 = "ctrlCdUserDefined1"; + String resultedTest = "resultedTest"; + String codedResultValue = "codedResultValue"; + String organismName = "organismName"; + String numericResultCompare = "numericResultCompare"; + BigDecimal numericResultValue1 = new BigDecimal("123.45"); + String numericResultSeperator = "numericResultSeperator"; + BigDecimal numericResultValue2 = new BigDecimal("678.90"); + String numericResultUnits = "numericResultUnits"; + String textResultValue = "textResultValue"; + String type = "type"; + String status = "status"; + String resultedTestStatusCd = "resultedTestStatusCd"; + String resultedTestStatus = "resultedTestStatus"; + String drugName = "drugName"; + String orderedTest = "orderedTest"; + Collection theSusTestSummaryVOColl = new ArrayList<>(); + String cdSystemCd = "cdSystemCd"; + String resultedTestCd = "resultedTestCd"; + String organismCodeSystemCd = "organismCodeSystemCd"; + String recordStatusCode = "recordStatusCode"; + String highRange = "highRange"; + Integer numericScale1 = 1; + String lowRange = "lowRange"; + String uniqueMapKey = "uniqueMapKey"; + Integer numericScale2 = 2; + + container.setSourceActUid(sourceActUid); + container.setLocalId(localId); + container.setObservationUid(observationUid); + container.setCtrlCdUserDefined1(ctrlCdUserDefined1); + container.setResultedTest(resultedTest); + container.setCodedResultValue(codedResultValue); + container.setOrganismName(organismName); + container.setNumericResultCompare(numericResultCompare); + container.setNumericResultValue1(numericResultValue1); + container.setNumericResultSeperator(numericResultSeperator); + container.setNumericResultValue2(numericResultValue2); + container.setNumericResultUnits(numericResultUnits); + container.setTextResultValue(textResultValue); + container.setType(type); + container.setStatus(status); + container.setResultedTestStatusCd(resultedTestStatusCd); + container.setResultedTestStatus(resultedTestStatus); + container.setDrugName(drugName); + container.setOrderedTest(orderedTest); + container.setTheSusTestSummaryVOColl(theSusTestSummaryVOColl); + container.setCdSystemCd(cdSystemCd); + container.setResultedTestCd(resultedTestCd); + container.setOrganismCodeSystemCd(organismCodeSystemCd); + container.setRecordStatusCode(recordStatusCode); + container.setHighRange(highRange); + container.setNumericScale1(numericScale1); + container.setLowRange(lowRange); + container.setUniqueMapKey(uniqueMapKey); + container.setNumericScale2(numericScale2); + + assertEquals(sourceActUid, container.getSourceActUid()); + assertEquals(localId, container.getLocalId()); + assertEquals(observationUid, container.getObservationUid()); + assertEquals(ctrlCdUserDefined1, container.getCtrlCdUserDefined1()); + assertEquals(resultedTest, container.getResultedTest()); + assertEquals(codedResultValue, container.getCodedResultValue()); + assertEquals(organismName, container.getOrganismName()); + assertEquals(numericResultCompare, container.getNumericResultCompare()); + assertEquals(numericResultValue1, container.getNumericResultValue1()); + assertEquals(numericResultSeperator, container.getNumericResultSeperator()); + assertEquals(numericResultValue2, container.getNumericResultValue2()); + assertEquals(numericResultUnits, container.getNumericResultUnits()); + assertEquals(textResultValue, container.getTextResultValue()); + assertEquals(type, container.getType()); + assertEquals(status, container.getStatus()); + assertEquals(resultedTestStatusCd, container.getResultedTestStatusCd()); + assertEquals(resultedTestStatus, container.getResultedTestStatus()); + assertEquals(drugName, container.getDrugName()); + assertEquals(orderedTest, container.getOrderedTest()); + assertEquals(theSusTestSummaryVOColl, container.getTheSusTestSummaryVOColl()); + assertEquals(cdSystemCd, container.getCdSystemCd()); + assertEquals(resultedTestCd, container.getResultedTestCd()); + assertEquals(organismCodeSystemCd, container.getOrganismCodeSystemCd()); + assertEquals(recordStatusCode, container.getRecordStatusCode()); + assertEquals(highRange, container.getHighRange()); + assertEquals(numericScale1, container.getNumericScale1()); + assertEquals(lowRange, container.getLowRange()); + assertEquals(uniqueMapKey, container.getUniqueMapKey()); + assertEquals(numericScale2, container.getNumericScale2()); + } + + @Test + void testGetLastChgUserId() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Long lastChgUserId = 123L; + container.setLastChgUserId(lastChgUserId); + assertEquals(lastChgUserId, container.getLastChgUserId()); + } + + @Test + void testSetLastChgUserId() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Long lastChgUserId = 123L; + container.setLastChgUserId(lastChgUserId); + assertEquals(lastChgUserId, container.getLastChgUserId()); + } + + @Test + void testGetJurisdictionCd() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String jurisdictionCd = "jurisdictionCd"; + container.setJurisdictionCd(jurisdictionCd); + assertEquals(jurisdictionCd, container.getJurisdictionCd()); + } + + @Test + void testSetJurisdictionCd() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String jurisdictionCd = "jurisdictionCd"; + container.setJurisdictionCd(jurisdictionCd); + assertEquals(jurisdictionCd, container.getJurisdictionCd()); + } + + @Test + void testGetProgAreaCd() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String progAreaCd = "progAreaCd"; + container.setProgAreaCd(progAreaCd); + assertEquals(progAreaCd, container.getProgAreaCd()); + } + + @Test + void testSetProgAreaCd() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String progAreaCd = "progAreaCd"; + container.setProgAreaCd(progAreaCd); + assertEquals(progAreaCd, container.getProgAreaCd()); + } + + @Test + void testGetLastChgTime() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + container.setLastChgTime(lastChgTime); + assertEquals(lastChgTime, container.getLastChgTime()); + } + + @Test + void testSetLastChgTime() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + container.setLastChgTime(lastChgTime); + assertEquals(lastChgTime, container.getLastChgTime()); + } + + @Test + void testGetLocalId() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String localId = "localId"; + container.setLocalId(localId); + assertEquals(localId, container.getLocalId()); + } + + @Test + void testSetLocalId() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String localId = "localId"; + container.setLocalId(localId); + assertEquals(localId, container.getLocalId()); + } + + @Test + void testGetAddUserId() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Long addUserId = 123L; + container.setAddUserId(addUserId); + assertEquals(addUserId, container.getAddUserId()); + } + + @Test + void testSetAddUserId() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Long addUserId = 123L; + container.setAddUserId(addUserId); + assertEquals(addUserId, container.getAddUserId()); + } + + @Test + void testGetLastChgReasonCd() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String lastChgReasonCd = "lastChgReasonCd"; + container.setLastChgReasonCd(lastChgReasonCd); + assertEquals(lastChgReasonCd, container.getLastChgReasonCd()); + } + + @Test + void testSetLastChgReasonCd() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String lastChgReasonCd = "lastChgReasonCd"; + container.setLastChgReasonCd(lastChgReasonCd); + assertEquals(lastChgReasonCd, container.getLastChgReasonCd()); + } + + @Test + void testGetRecordStatusCd() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String recordStatusCd = "recordStatusCd"; + container.setRecordStatusCd(recordStatusCd); + assertEquals(recordStatusCd, container.getRecordStatusCd()); + } + + @Test + void testSetRecordStatusCd() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String recordStatusCd = "recordStatusCd"; + container.setRecordStatusCd(recordStatusCd); + assertEquals(recordStatusCd, container.getRecordStatusCd()); + } + + @Test + void testGetRecordStatusTime() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + container.setRecordStatusTime(recordStatusTime); + assertEquals(recordStatusTime, container.getRecordStatusTime()); + } + + @Test + void testSetRecordStatusTime() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + container.setRecordStatusTime(recordStatusTime); + assertEquals(recordStatusTime, container.getRecordStatusTime()); + } + + @Test + void testGetStatusCd() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String statusCd = "statusCd"; + container.setStatusCd(statusCd); + assertEquals(statusCd, container.getStatusCd()); + } + + @Test + void testSetStatusCd() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String statusCd = "statusCd"; + container.setStatusCd(statusCd); + assertEquals(statusCd, container.getStatusCd()); + } + + @Test + void testGetStatusTime() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + container.setStatusTime(statusTime); + assertEquals(statusTime, container.getStatusTime()); + } + + @Test + void testSetStatusTime() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + container.setStatusTime(statusTime); + assertEquals(statusTime, container.getStatusTime()); + } + + @Test + void testGetSuperclass() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + assertEquals("gov.cdc.dataprocessing.model.container.base.BaseContainer", container.getSuperclass()); + } + + @Test + void testGetUid() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Long uid = 123L; + container.setObservationUid(uid); + assertEquals(uid, container.getUid()); + } + + @Test + void testSetAddTime() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + container.setAddTime(addTime); + assertNull(container.getAddTime()); + } + + @Test + void testGetAddTime() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + assertNull(container.getAddTime()); + } + + @Test + void testGetProgramJurisdictionOid() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Long programJurisdictionOid = 123L; + container.setProgramJurisdictionOid(programJurisdictionOid); + assertEquals(programJurisdictionOid, container.getProgramJurisdictionOid()); + } + + @Test + void testSetProgramJurisdictionOid() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Long programJurisdictionOid = 123L; + container.setProgramJurisdictionOid(programJurisdictionOid); + assertEquals(programJurisdictionOid, container.getProgramJurisdictionOid()); + } + + @Test + void testGetSharedInd() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String sharedInd = "sharedInd"; + container.setSharedInd(sharedInd); + assertEquals(sharedInd, container.getSharedInd()); + } + + @Test + void testSetSharedInd() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + String sharedInd = "sharedInd"; + container.setSharedInd(sharedInd); + assertEquals(sharedInd, container.getSharedInd()); + } + + @Test + void testGetVersionCtrlNbr() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Integer versionCtrlNbr = 1; + container.setVersionCtrlNbr(versionCtrlNbr); + assertEquals(versionCtrlNbr, container.getVersionCtrlNbr()); + } + + @Test + void testSetVersionCtrlNbr() { + ResultedTestSummaryContainer container = new ResultedTestSummaryContainer(); + Integer versionCtrlNbr = 1; + container.setVersionCtrlNbr(versionCtrlNbr); + assertEquals(versionCtrlNbr, container.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/TreatmentContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/TreatmentContainerTest.java new file mode 100644 index 000000000..30c98d76d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/TreatmentContainerTest.java @@ -0,0 +1,153 @@ +package gov.cdc.dataprocessing.model.container; + + +import gov.cdc.dataprocessing.model.container.model.TreatmentContainer; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class TreatmentContainerTest { + + @Test + void testGettersAndSetters() { + TreatmentContainer container = new TreatmentContainer(); + + String arTypeCd = "arTypeCd"; + String index = "index"; + Long personUid = 1L; + String yesNoFlag = "yesNoFlag"; + String treatmentNameCode = "treatmentNameCode"; + String customTreatmentNameCode = "customTreatmentNameCode"; + String treatmentAdministered = "treatmentAdministered"; + Long treatmentUid = 2L; + Long uid = 3L; + String localId = "localId"; + Timestamp activityFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp activityToTime = new Timestamp(System.currentTimeMillis() + 1000); + String recordStatusCd = "recordStatusCd"; + Long phcUid = 4L; + Long parentUid = 5L; + Collection morbReportSummaryVOColl = new ArrayList<>(); + boolean isTouched = true; + boolean isAssociated = false; + Character isRadioBtnAssociated = 'Y'; + String actionLink = "actionLink"; + String checkBoxId = "checkBoxId"; + Timestamp createDate = new Timestamp(System.currentTimeMillis() - 2000); + Map associationMap = Map.of(); + String providerFirstName = "providerFirstName"; + Long nbsDocumentUid = 6L; + String providerLastName = "providerLastName"; + String providerSuffix = "providerSuffix"; + String providerPrefix = "providerPrefix"; + String degree = "degree"; + + Long lastChgUserId = 7L; + String jurisdictionCd = "jurisdictionCd"; + String progAreaCd = "progAreaCd"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis() - 3000); + Long addUserId = 8L; + String lastChgReasonCd = "lastChgReasonCd"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis() - 4000); + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis() - 5000); + Long programJurisdictionOid = 9L; + String sharedInd = "sharedInd"; + Integer versionCtrlNbr = 10; + Timestamp addTime = new Timestamp(System.currentTimeMillis() - 6000); + + container.setArTypeCd(arTypeCd); + container.setIndex(index); + container.setPersonUid(personUid); + container.setYesNoFlag(yesNoFlag); + container.setTreatmentNameCode(treatmentNameCode); + container.setCustomTreatmentNameCode(customTreatmentNameCode); + container.setTreatmentAdministered(treatmentAdministered); + container.setTreatmentUid(treatmentUid); + container.setUid(uid); + container.setLocalId(localId); + container.setActivityFromTime(activityFromTime); + container.setActivityToTime(activityToTime); + container.setRecordStatusCd(recordStatusCd); + container.setPhcUid(phcUid); + container.setParentUid(parentUid); + container.setMorbReportSummaryVOColl(morbReportSummaryVOColl); + container.setTouched(isTouched); + container.setAssociated(isAssociated); + container.setIsRadioBtnAssociated(isRadioBtnAssociated); + container.setActionLink(actionLink); + container.setCheckBoxId(checkBoxId); + container.setCreateDate(createDate); + container.setAssociationMap(associationMap); + container.setProviderFirstName(providerFirstName); + container.setNbsDocumentUid(nbsDocumentUid); + container.setProviderLastName(providerLastName); + container.setProviderSuffix(providerSuffix); + container.setProviderPrefix(providerPrefix); + container.setDegree(degree); + + container.setLastChgUserId(lastChgUserId); + container.setJurisdictionCd(jurisdictionCd); + container.setProgAreaCd(progAreaCd); + container.setLastChgTime(lastChgTime); + container.setAddUserId(addUserId); + container.setLastChgReasonCd(lastChgReasonCd); + container.setRecordStatusTime(recordStatusTime); + container.setStatusCd(statusCd); + container.setStatusTime(statusTime); + container.setProgramJurisdictionOid(programJurisdictionOid); + container.setSharedInd(sharedInd); + container.setVersionCtrlNbr(versionCtrlNbr); + container.setAddTime(addTime); + + assertEquals(arTypeCd, container.getArTypeCd()); + assertEquals(index, container.getIndex()); + assertEquals(personUid, container.getPersonUid()); + assertEquals(yesNoFlag, container.getYesNoFlag()); + assertEquals(treatmentNameCode, container.getTreatmentNameCode()); + assertEquals(customTreatmentNameCode, container.getCustomTreatmentNameCode()); + assertEquals(treatmentAdministered, container.getTreatmentAdministered()); + assertEquals(treatmentUid, container.getTreatmentUid()); + assertEquals(3, container.getUid()); + assertEquals(localId, container.getLocalId()); + assertEquals(activityFromTime, container.getActivityFromTime()); + assertEquals(activityToTime, container.getActivityToTime()); + assertEquals(recordStatusCd, container.getRecordStatusCd()); + assertEquals(phcUid, container.getPhcUid()); + assertEquals(parentUid, container.getParentUid()); + assertEquals(morbReportSummaryVOColl, container.getMorbReportSummaryVOColl()); + assertEquals(isTouched, container.isTouched()); + assertEquals(isAssociated, container.isAssociated()); + assertEquals(isRadioBtnAssociated, container.getIsRadioBtnAssociated()); + assertEquals(actionLink, container.getActionLink()); + assertEquals(checkBoxId, container.getCheckBoxId()); + assertEquals(createDate, container.getCreateDate()); + assertEquals(associationMap, container.getAssociationMap()); + assertEquals(providerFirstName, container.getProviderFirstName()); + assertEquals(nbsDocumentUid, container.getNbsDocumentUid()); + assertEquals(providerLastName, container.getProviderLastName()); + assertEquals(providerSuffix, container.getProviderSuffix()); + assertEquals(providerPrefix, container.getProviderPrefix()); + assertEquals(degree, container.getDegree()); + + assertEquals(lastChgUserId, container.getLastChgUserId()); + assertEquals(jurisdictionCd, container.getJurisdictionCd()); + assertEquals(progAreaCd, container.getProgAreaCd()); + assertEquals(lastChgTime, container.getLastChgTime()); + assertEquals(addUserId, container.getAddUserId()); + assertEquals(lastChgReasonCd, container.getLastChgReasonCd()); + assertEquals(recordStatusTime, container.getRecordStatusTime()); + assertEquals(statusCd, container.getStatusCd()); + assertEquals(statusTime, container.getStatusTime()); + assertEquals(programJurisdictionOid, container.getProgramJurisdictionOid()); + assertEquals(sharedInd, container.getSharedInd()); + assertEquals(versionCtrlNbr, container.getVersionCtrlNbr()); + assertEquals(addTime, container.getAddTime()); + } +} + diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/UidSummaryContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/UidSummaryContainerTest.java new file mode 100644 index 000000000..525739f03 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/UidSummaryContainerTest.java @@ -0,0 +1,292 @@ +package gov.cdc.dataprocessing.model.container; + +import gov.cdc.dataprocessing.model.container.model.UidSummaryContainer; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class UidSummaryContainerTest { + + @Test + void testGettersAndSetters() { + UidSummaryContainer container = new UidSummaryContainer(); + + Long uid = 1L; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long linkingUid = 2L; + String uniqueMapKey = "uniqueMapKey"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis() + 1000); + String addReasonCd = "addReasonCd"; + + container.setUid(uid); + container.setAddTime(addTime); + container.setLinkingUid(linkingUid); + container.setUniqueMapKey(uniqueMapKey); + container.setStatusTime(statusTime); + container.setAddReasonCd(addReasonCd); + + assertEquals(uid, container.getUid()); + assertEquals(addTime, container.getAddTime()); + assertEquals(linkingUid, container.getLinkingUid()); + assertEquals(uniqueMapKey, container.getUniqueMapKey()); + assertEquals(statusTime, container.getStatusTime()); + assertEquals(addReasonCd, container.getAddReasonCd()); + } + + + @Test + void testGetLastChgUserId() { + UidSummaryContainer container = new UidSummaryContainer(); + Long lastChgUserId = 123L; + container.setLastChgUserId(lastChgUserId); + assertEquals(lastChgUserId, container.getLastChgUserId()); + } + + @Test + void testSetLastChgUserId() { + UidSummaryContainer container = new UidSummaryContainer(); + Long lastChgUserId = 123L; + container.setLastChgUserId(lastChgUserId); + assertEquals(lastChgUserId, container.getLastChgUserId()); + } + + @Test + void testGetJurisdictionCd() { + UidSummaryContainer container = new UidSummaryContainer(); + String jurisdictionCd = "jurisdictionCd"; + container.setJurisdictionCd(jurisdictionCd); + assertEquals(jurisdictionCd, container.getJurisdictionCd()); + } + + @Test + void testSetJurisdictionCd() { + UidSummaryContainer container = new UidSummaryContainer(); + String jurisdictionCd = "jurisdictionCd"; + container.setJurisdictionCd(jurisdictionCd); + assertEquals(jurisdictionCd, container.getJurisdictionCd()); + } + + @Test + void testGetProgAreaCd() { + UidSummaryContainer container = new UidSummaryContainer(); + String progAreaCd = "progAreaCd"; + container.setProgAreaCd(progAreaCd); + assertEquals(progAreaCd, container.getProgAreaCd()); + } + + @Test + void testSetProgAreaCd() { + UidSummaryContainer container = new UidSummaryContainer(); + String progAreaCd = "progAreaCd"; + container.setProgAreaCd(progAreaCd); + assertEquals(progAreaCd, container.getProgAreaCd()); + } + + @Test + void testGetLastChgTime() { + UidSummaryContainer container = new UidSummaryContainer(); + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + container.setLastChgTime(lastChgTime); + assertEquals(lastChgTime, container.getLastChgTime()); + } + + @Test + void testSetLastChgTime() { + UidSummaryContainer container = new UidSummaryContainer(); + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + container.setLastChgTime(lastChgTime); + assertEquals(lastChgTime, container.getLastChgTime()); + } + + @Test + void testGetLocalId() { + UidSummaryContainer container = new UidSummaryContainer(); + String localId = "localId"; + container.setLocalId(localId); + assertEquals(localId, container.getLocalId()); + } + + @Test + void testSetLocalId() { + UidSummaryContainer container = new UidSummaryContainer(); + String localId = "localId"; + container.setLocalId(localId); + assertEquals(localId, container.getLocalId()); + } + + @Test + void testGetAddUserId() { + UidSummaryContainer container = new UidSummaryContainer(); + Long addUserId = 123L; + container.setAddUserId(addUserId); + assertEquals(addUserId, container.getAddUserId()); + } + + @Test + void testSetAddUserId() { + UidSummaryContainer container = new UidSummaryContainer(); + Long addUserId = 123L; + container.setAddUserId(addUserId); + assertEquals(addUserId, container.getAddUserId()); + } + + @Test + void testGetLastChgReasonCd() { + UidSummaryContainer container = new UidSummaryContainer(); + String lastChgReasonCd = "lastChgReasonCd"; + container.setLastChgReasonCd(lastChgReasonCd); + assertEquals(lastChgReasonCd, container.getLastChgReasonCd()); + } + + @Test + void testSetLastChgReasonCd() { + UidSummaryContainer container = new UidSummaryContainer(); + String lastChgReasonCd = "lastChgReasonCd"; + container.setLastChgReasonCd(lastChgReasonCd); + assertEquals(lastChgReasonCd, container.getLastChgReasonCd()); + } + + @Test + void testGetRecordStatusCd() { + UidSummaryContainer container = new UidSummaryContainer(); + String recordStatusCd = "recordStatusCd"; + container.setRecordStatusCd(recordStatusCd); + assertEquals(recordStatusCd, container.getRecordStatusCd()); + } + + @Test + void testSetRecordStatusCd() { + UidSummaryContainer container = new UidSummaryContainer(); + String recordStatusCd = "recordStatusCd"; + container.setRecordStatusCd(recordStatusCd); + assertEquals(recordStatusCd, container.getRecordStatusCd()); + } + + @Test + void testGetRecordStatusTime() { + UidSummaryContainer container = new UidSummaryContainer(); + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + container.setRecordStatusTime(recordStatusTime); + assertEquals(recordStatusTime, container.getRecordStatusTime()); + } + + @Test + void testSetRecordStatusTime() { + UidSummaryContainer container = new UidSummaryContainer(); + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + container.setRecordStatusTime(recordStatusTime); + assertEquals(recordStatusTime, container.getRecordStatusTime()); + } + + @Test + void testGetStatusCd() { + UidSummaryContainer container = new UidSummaryContainer(); + String statusCd = "statusCd"; + container.setStatusCd(statusCd); + assertEquals(statusCd, container.getStatusCd()); + } + + @Test + void testSetStatusCd() { + UidSummaryContainer container = new UidSummaryContainer(); + String statusCd = "statusCd"; + container.setStatusCd(statusCd); + assertEquals(statusCd, container.getStatusCd()); + } + + @Test + void testGetStatusTime() { + UidSummaryContainer container = new UidSummaryContainer(); + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + container.setStatusTime(statusTime); + assertEquals(statusTime, container.getStatusTime()); + } + + @Test + void testSetStatusTime() { + UidSummaryContainer container = new UidSummaryContainer(); + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + container.setStatusTime(statusTime); + assertEquals(statusTime, container.getStatusTime()); + } + + @Test + void testGetSuperclass() { + UidSummaryContainer container = new UidSummaryContainer(); + assertEquals("gov.cdc.dataprocessing.model.container.base.BaseContainer", container.getSuperclass()); + } + + @Test + void testGetUid() { + UidSummaryContainer container = new UidSummaryContainer(); + Long uid = 123L; + container.setUid(uid); + assertEquals(uid, container.getUid()); + } + + @Test + void testSetAddTime() { + UidSummaryContainer container = new UidSummaryContainer(); + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + container.setAddTime(addTime); + assertEquals(addTime, container.getAddTime()); + } + + @Test + void testGetAddTime() { + UidSummaryContainer container = new UidSummaryContainer(); + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + container.setAddTime(addTime); + assertEquals(addTime, container.getAddTime()); + } + + @Test + void testGetProgramJurisdictionOid() { + UidSummaryContainer container = new UidSummaryContainer(); + Long programJurisdictionOid = 123L; + container.setProgramJurisdictionOid(programJurisdictionOid); + assertEquals(programJurisdictionOid, container.getProgramJurisdictionOid()); + } + + @Test + void testSetProgramJurisdictionOid() { + UidSummaryContainer container = new UidSummaryContainer(); + Long programJurisdictionOid = 123L; + container.setProgramJurisdictionOid(programJurisdictionOid); + assertEquals(programJurisdictionOid, container.getProgramJurisdictionOid()); + } + + @Test + void testGetSharedInd() { + UidSummaryContainer container = new UidSummaryContainer(); + String sharedInd = "sharedInd"; + container.setSharedInd(sharedInd); + assertEquals(sharedInd, container.getSharedInd()); + } + + @Test + void testSetSharedInd() { + UidSummaryContainer container = new UidSummaryContainer(); + String sharedInd = "sharedInd"; + container.setSharedInd(sharedInd); + assertEquals(sharedInd, container.getSharedInd()); + } + + @Test + void testGetVersionCtrlNbr() { + UidSummaryContainer container = new UidSummaryContainer(); + Integer versionCtrlNbr = 1; + container.setVersionCtrlNbr(versionCtrlNbr); + assertEquals(versionCtrlNbr, container.getVersionCtrlNbr()); + } + + @Test + void testSetVersionCtrlNbr() { + UidSummaryContainer container = new UidSummaryContainer(); + Integer versionCtrlNbr = 1; + container.setVersionCtrlNbr(versionCtrlNbr); + assertEquals(versionCtrlNbr, container.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/base/BaseContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/base/BaseContainerTest.java new file mode 100644 index 000000000..47e49c394 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/base/BaseContainerTest.java @@ -0,0 +1,74 @@ +package gov.cdc.dataprocessing.model.container.base; + + +import org.junit.jupiter.api.Test; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class BaseContainerTest { + + @Test + void testGettersAndSetters() { + BaseContainer baseContainer = new BaseContainer(); + + // Test boolean fields + baseContainer.setItNew(true); + baseContainer.setItOld(true); + baseContainer.setItDirty(true); + baseContainer.setItDelete(true); + + assertTrue(baseContainer.isItNew()); + assertTrue(baseContainer.isItOld()); + assertTrue(baseContainer.isItDirty()); + assertTrue(baseContainer.isItDelete()); + + // Test String field + String superClassType = "TestSuperClass"; + baseContainer.setSuperClassType(superClassType); + assertEquals(superClassType, baseContainer.getSuperClassType()); + + // Test Collection field + Collection ldfs = new ArrayList<>(); + ldfs.add("TestObject"); + baseContainer.setLdfs(ldfs); + assertEquals(ldfs, baseContainer.getLdfs()); + } + + @Test + void testSerialization() throws Exception { + BaseContainer baseContainer = new BaseContainer(); + baseContainer.setItNew(true); + baseContainer.setItOld(true); + baseContainer.setItDirty(true); + baseContainer.setItDelete(true); + baseContainer.setSuperClassType("TestSuperClass"); + + // Serialize the object + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutputStream out = new ObjectOutputStream(bos); + out.writeObject(baseContainer); + out.flush(); + byte[] serializedObject = bos.toByteArray(); + + // Deserialize the object + ByteArrayInputStream bis = new ByteArrayInputStream(serializedObject); + ObjectInputStream in = new ObjectInputStream(bis); + BaseContainer deserializedBaseContainer = (BaseContainer) in.readObject(); + + // Test the deserialized object + assertTrue(deserializedBaseContainer.isItNew()); + assertTrue(deserializedBaseContainer.isItOld()); + assertTrue(deserializedBaseContainer.isItDirty()); + assertTrue(deserializedBaseContainer.isItDelete()); + assertEquals("TestSuperClass", deserializedBaseContainer.getSuperClassType()); + } + +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/interfaces/InterviewContainerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/interfaces/InterviewContainerTest.java new file mode 100644 index 000000000..8f51c58a8 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/interfaces/InterviewContainerTest.java @@ -0,0 +1,52 @@ +package gov.cdc.dataprocessing.model.container.interfaces; + + +import gov.cdc.dataprocessing.model.dto.edx.EDXEventProcessDto; +import gov.cdc.dataprocessing.model.dto.phc.InterviewDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class InterviewContainerTest { + + @Test + void testGettersAndSetters() { + InterviewContainer interviewContainer = new InterviewContainer(); + + // Test inherited boolean fields from BaseContainer + interviewContainer.setItNew(true); + interviewContainer.setItOld(true); + interviewContainer.setItDirty(true); + interviewContainer.setItDelete(true); + + assertTrue(interviewContainer.isItNew()); + assertTrue(interviewContainer.isItOld()); + assertTrue(interviewContainer.isItDirty()); + assertTrue(interviewContainer.isItDelete()); + + // Test inherited String field from BaseContainer + String superClassType = "TestSuperClass"; + interviewContainer.setSuperClassType(superClassType); + assertEquals(superClassType, interviewContainer.getSuperClassType()); + + // Test inherited Collection field from BaseContainer + Collection ldfs = new ArrayList<>(); + ldfs.add("TestObject"); + interviewContainer.setLdfs(ldfs); + assertEquals(ldfs, interviewContainer.getLdfs()); + + // Test InterviewContainer specific fields + InterviewDto interviewDto = new InterviewDto(); + interviewContainer.setTheInterviewDto(interviewDto); + assertEquals(interviewDto, interviewContainer.getTheInterviewDto()); + + Collection edxEventProcessDtoCollection = new ArrayList<>(); + edxEventProcessDtoCollection.add(new EDXEventProcessDto()); + interviewContainer.setEdxEventProcessDtoCollection(edxEventProcessDtoCollection); + assertEquals(edxEventProcessDtoCollection, interviewContainer.getEdxEventProcessDtoCollection()); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/model/auth_user/UserProfileTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/model/auth_user/UserProfileTest.java new file mode 100644 index 000000000..efc0decd5 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/model/auth_user/UserProfileTest.java @@ -0,0 +1,51 @@ +package gov.cdc.dataprocessing.model.container.model.auth_user; + + +import gov.cdc.dataprocessing.model.dto.auth_user.RealizedRoleDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class UserProfileTest { + + @Test + void testGettersAndSetters() { + UserProfile userProfile = new UserProfile(); + + // Test inherited boolean fields from BaseContainer + userProfile.setItNew(true); + userProfile.setItOld(true); + userProfile.setItDirty(true); + userProfile.setItDelete(true); + + assertTrue(userProfile.isItNew()); + assertTrue(userProfile.isItOld()); + assertTrue(userProfile.isItDirty()); + assertTrue(userProfile.isItDelete()); + + // Test inherited String field from BaseContainer + String superClassType = "TestSuperClass"; + userProfile.setSuperClassType(superClassType); + assertEquals(superClassType, userProfile.getSuperClassType()); + + // Test inherited Collection field from BaseContainer + Collection ldfs = new ArrayList<>(); + ldfs.add("TestObject"); + userProfile.setLdfs(ldfs); + assertEquals(ldfs, userProfile.getLdfs()); + + // Test UserProfile specific fields + Collection realizedRoleDtoCollection = new ArrayList<>(); + realizedRoleDtoCollection.add(new RealizedRoleDto()); + userProfile.setTheRealizedRoleDtoCollection(realizedRoleDtoCollection); + assertEquals(realizedRoleDtoCollection, userProfile.getTheRealizedRoleDtoCollection()); + + User user = new User(); + userProfile.setTheUser(user); + assertEquals(user, userProfile.getTheUser()); + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/model/auth_user/UserTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/model/auth_user/UserTest.java new file mode 100644 index 000000000..f9b9956ec --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/container/model/auth_user/UserTest.java @@ -0,0 +1,97 @@ +package gov.cdc.dataprocessing.model.container.model.auth_user; + +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class UserTest { + @Test + void testGettersAndSetters() { + User user = new User(); + + // Test inherited boolean fields from BaseContainer + user.setItNew(true); + user.setItOld(true); + user.setItDirty(true); + user.setItDelete(true); + + assertTrue(user.isItNew()); + assertTrue(user.isItOld()); + assertTrue(user.isItDirty()); + assertTrue(user.isItDelete()); + + // Test inherited String field from BaseContainer + String superClassType = "TestSuperClass"; + user.setSuperClassType(superClassType); + assertEquals(superClassType, user.getSuperClassType()); + + // Test inherited Collection field from BaseContainer + Collection ldfs = new ArrayList<>(); + ldfs.add("TestObject"); + user.setLdfs(ldfs); + assertEquals(ldfs, user.getLdfs()); + + // Test User specific fields + String userID = "userID"; + String firstName = "firstName"; + String lastName = "lastName"; + String comments = "comments"; + String status = "status"; + String entryID = "entryID"; + String password = "password"; + Long reportingFacilityUid = 123L; + String userType = "userType"; + String facilityDetails = "facilityDetails"; + String readOnly = "readOnly"; + String facilityID = "facilityID"; + Long providerUid = 456L; + String msa = "msa"; + String paa = "paa"; + String adminUserTypes = "adminUserTypes"; + String paaProgramArea = "paaProgramArea"; + String jurisdictionDerivationInd = "jurisdictionDerivationInd"; + + user.setUserID(userID); + user.setFirstName(firstName); + user.setLastName(lastName); + user.setComments(comments); + user.setStatus(status); + user.setEntryID(entryID); + user.setPassword(password); + user.setReportingFacilityUid(reportingFacilityUid); + user.setUserType(userType); + user.setFacilityDetails(facilityDetails); + user.setReadOnly(readOnly); + user.setFacilityID(facilityID); + user.setProviderUid(providerUid); + user.setMsa(msa); + user.setPaa(paa); + user.setAdminUserTypes(adminUserTypes); + user.setPaaProgramArea(paaProgramArea); + user.setJurisdictionDerivationInd(jurisdictionDerivationInd); + + assertEquals(userID, user.getUserID()); + assertEquals(firstName, user.getFirstName()); + assertEquals(lastName, user.getLastName()); + assertEquals(comments, user.getComments()); + assertEquals(status, user.getStatus()); + assertEquals(entryID, user.getEntryID()); + assertEquals(password, user.getPassword()); + assertEquals(reportingFacilityUid, user.getReportingFacilityUid()); + assertEquals(userType, user.getUserType()); + assertEquals(facilityDetails, user.getFacilityDetails()); + assertEquals(readOnly, user.getReadOnly()); + assertEquals(facilityID, user.getFacilityID()); + assertEquals(providerUid, user.getProviderUid()); + assertEquals(msa, user.getMsa()); + assertEquals(paa, user.getPaa()); + assertEquals(adminUserTypes, user.getAdminUserTypes()); + assertEquals(paaProgramArea, user.getPaaProgramArea()); + assertEquals(jurisdictionDerivationInd, user.getJurisdictionDerivationInd()); + } + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/MixTestDto.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/MixTestDto.java new file mode 100644 index 000000000..bfc513787 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/MixTestDto.java @@ -0,0 +1,138 @@ +package gov.cdc.dataprocessing.model.dto; + +import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; +import gov.cdc.dataprocessing.model.dto.person.PersonDto; +import gov.cdc.dataprocessing.model.dto.person.PersonEthnicGroupDto; +import gov.cdc.dataprocessing.model.dto.person.PersonNameDto; +import gov.cdc.dataprocessing.model.dto.phc.CTContactSummaryDto; +import gov.cdc.dataprocessing.model.dto.phc.CaseManagementDto; +import gov.cdc.dataprocessing.model.dto.phc.ConfirmationMethodDto; +import gov.cdc.dataprocessing.model.dto.phc.PublicHealthCaseDto; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class MixTestDto { + @Test + void testParticipation() { + ParticipationDto entity = new ParticipationDto(); + entity.setSubjectEntityClassCd("TEST"); + assertNotNull(entity.getSubjectEntityClassCd()); + } + + @Test + void testPerson() { + PersonDto entity = new PersonDto(); + entity.setBirthOrderNbrStr("TEST"); + entity.setRecordStatusTime(null); + entity.setAdultsInHouseNbrStr("TEST"); + entity.setChildrenInHouseNbrStr("TEST"); + assertNotNull(entity.getBirthOrderNbrStr()); + assertNull(entity.getRecordStatusTime()); + assertNotNull(entity.getAdultsInHouseNbrStr()); + assertNotNull(entity.getChildrenInHouseNbrStr()); + assertNotNull(entity.getSuperclass()); + } + + @Test + void testPersonEth() { + PersonEthnicGroupDto entity = new PersonEthnicGroupDto(); + entity.setAddTime(null); + entity.setLastChgTime(null); + entity.setRecordStatusTime(null); + assertNull(entity.getAddTime()); + assertNull(entity.getLastChgTime()); + assertNull(entity.getRecordStatusTime()); + } + + @Test + void testPersonName() { + PersonNameDto entity = new PersonNameDto(); + entity.setNmSuffixCd("TEST"); + entity.setRecordStatusTime(null); + entity.setVersionCtrlNbr(1); + entity.setLocalId("TEST"); + assertNotNull(entity.getNmSuffixCd()); + assertNull(entity.getRecordStatusTime()); + assertNotNull(entity.getVersionCtrlNbr()); + assertNotNull(entity.getLocalId()); + assertNotNull(entity.getSuperclass()); + assertNull(entity.getUid()); + + } + + @Test + void testCaseMg() { + CaseManagementDto entity = new CaseManagementDto(); + entity.setCaseManagementDTPopulated(true); + entity.setLocalId("TEST"); + assertNotNull(entity.getLocalId()); + assertTrue(entity.isCaseManagementDTPopulated); + } + + @Test + void testConfirmMethod() { + ConfirmationMethodDto entity = new ConfirmationMethodDto(); + entity.setPublicHealthCaseUid(10L); + assertNotNull(entity.getPublicHealthCaseUid()); + + } + + @Test + void testContact() { + CTContactSummaryDto entity = new CTContactSummaryDto(); + entity.setLastChgUserId(null); + entity.setJurisdictionCd(null); + entity.setLastChgTime(null); + entity.setAddUserId(null); + entity.setLastChgReasonCd(null); + entity.setRecordStatusCd(null); + entity.setRecordStatusTime(null); + entity.setStatusCd(null); + entity.setStatusTime(null); + entity.setAddTime(null); + entity.setProgramJurisdictionOid(null); + entity.setSharedInd(null); + + assertNull(entity.getLastChgUserId()); + assertNull(entity.getJurisdictionCd()); + assertNull(entity.getLastChgTime()); + assertNull(entity.getAddUserId()); + assertNull(entity.getLastChgReasonCd()); + assertNull(entity.getRecordStatusCd()); + assertNull(entity.getRecordStatusTime()); + assertNull(entity.getStatusCd()); + assertNull(entity.getStatusTime()); + assertNull(entity.getAddTime()); + assertNull(entity.getProgramJurisdictionOid()); + assertNull(entity.getSharedInd()); + } + + @Test + void testPhc() { + PublicHealthCaseDto entity = new PublicHealthCaseDto(); + entity.setPamCase(true); + entity.setPageCase(true); + entity.setAddUserName("TEST"); + entity.setLastChgUserName("TEST"); + entity.setCurrentInvestigatorUid(10L); + entity.setCurrentPatientUid(10L); + entity.setRptSentTime(null); + entity.setSummaryCase(true); + entity.setContactInvStatus("TEST"); + entity.setConfirmationMethodCd("TEST"); + entity.setConfirmationMethodTime(null); + + assertTrue(entity.isPamCase()); + assertTrue(entity.isPageCase()); + assertEquals("TEST", entity.getAddUserName()); + assertEquals("TEST", entity.getLastChgUserName()); + assertEquals(10L, entity.getCurrentInvestigatorUid()); + assertEquals(10L, entity.getCurrentPatientUid()); + assertNull(entity.getRptSentTime()); + assertTrue(entity.isSummaryCase()); + assertEquals("TEST", entity.getContactInvStatus()); + assertEquals("TEST", entity.getConfirmationMethodCd()); + assertNull(entity.getConfirmationMethodTime()); + assertNotNull(entity.getSuperclass()); } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/act/ActIdDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/act/ActIdDtoTest.java new file mode 100644 index 000000000..324b48ec9 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/act/ActIdDtoTest.java @@ -0,0 +1,159 @@ +package gov.cdc.dataprocessing.model.dto.act; + + +import gov.cdc.dataprocessing.repository.nbs.odse.model.act.ActId; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class ActIdDtoTest { + + @Test + void testGettersAndSetters() { + ActIdDto dto = new ActIdDto(); + + Long actUid = 1L; + Integer actIdSeq = 1; + String addReasonCd = "reasonCd"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String assigningAuthorityCd = "authorityCd"; + String assigningAuthorityDescTxt = "authorityDesc"; + String durationAmt = "durationAmt"; + String durationUnitCd = "durationUnitCd"; + String lastChgReasonCd = "lastChgReasonCd"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "localId"; + String recordStatusCd = "recordStatusCd"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String rootExtensionTxt = "rootExtensionTxt"; + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String typeCd = "typeCd"; + String typeDescTxt = "typeDescTxt"; + String userAffiliationTxt = "userAffiliationTxt"; + Timestamp validFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp validToTime = new Timestamp(System.currentTimeMillis()); + Integer versionCtrlNbr = 4; + String progAreaCd = "progAreaCd"; + String jurisdictionCd = "jurisdictionCd"; + Long programJurisdictionOid = 5L; + String sharedInd = "sharedInd"; + + dto.setActUid(actUid); + dto.setActIdSeq(actIdSeq); + dto.setAddReasonCd(addReasonCd); + dto.setAddTime(addTime); + dto.setAddUserId(addUserId); + dto.setAssigningAuthorityCd(assigningAuthorityCd); + dto.setAssigningAuthorityDescTxt(assigningAuthorityDescTxt); + dto.setDurationAmt(durationAmt); + dto.setDurationUnitCd(durationUnitCd); + dto.setLastChgReasonCd(lastChgReasonCd); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setLocalId(localId); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setRootExtensionTxt(rootExtensionTxt); + dto.setStatusCd(statusCd); + dto.setStatusTime(statusTime); + dto.setTypeCd(typeCd); + dto.setTypeDescTxt(typeDescTxt); + dto.setUserAffiliationTxt(userAffiliationTxt); + dto.setValidFromTime(validFromTime); + dto.setValidToTime(validToTime); + dto.setVersionCtrlNbr(versionCtrlNbr); + dto.setProgAreaCd(progAreaCd); + dto.setJurisdictionCd(jurisdictionCd); + dto.setProgramJurisdictionOid(programJurisdictionOid); + dto.setSharedInd(sharedInd); + + assertEquals(actUid, dto.getActUid()); + assertEquals(actIdSeq, dto.getActIdSeq()); + assertEquals(addReasonCd, dto.getAddReasonCd()); + assertEquals(addTime, dto.getAddTime()); + assertEquals(addUserId, dto.getAddUserId()); + assertEquals(assigningAuthorityCd, dto.getAssigningAuthorityCd()); + assertEquals(assigningAuthorityDescTxt, dto.getAssigningAuthorityDescTxt()); + assertEquals(durationAmt, dto.getDurationAmt()); + assertEquals(durationUnitCd, dto.getDurationUnitCd()); + assertEquals(lastChgReasonCd, dto.getLastChgReasonCd()); + assertEquals(lastChgTime, dto.getLastChgTime()); + assertEquals(lastChgUserId, dto.getLastChgUserId()); + assertEquals(localId, dto.getLocalId()); + assertEquals(recordStatusCd, dto.getRecordStatusCd()); + assertEquals(recordStatusTime, dto.getRecordStatusTime()); + assertEquals(rootExtensionTxt, dto.getRootExtensionTxt()); + assertEquals(statusCd, dto.getStatusCd()); + assertEquals(statusTime, dto.getStatusTime()); + assertEquals(typeCd, dto.getTypeCd()); + assertEquals(typeDescTxt, dto.getTypeDescTxt()); + assertEquals(userAffiliationTxt, dto.getUserAffiliationTxt()); + assertEquals(validFromTime, dto.getValidFromTime()); + assertEquals(validToTime, dto.getValidToTime()); + assertEquals(versionCtrlNbr, dto.getVersionCtrlNbr()); + assertEquals(progAreaCd, dto.getProgAreaCd()); + assertEquals(jurisdictionCd, dto.getJurisdictionCd()); + assertEquals(programJurisdictionOid, dto.getProgramJurisdictionOid()); + assertEquals(sharedInd, dto.getSharedInd()); + assertNotNull(dto.getSuperclass()); + assertNotNull(dto.getUid()); + } + + @Test + void testConstructor() { + ActId actId = new ActId(); + actId.setActUid(1L); + actId.setActIdSeq(1); + actId.setAddReasonCd("reasonCd"); + actId.setAddTime(new Timestamp(System.currentTimeMillis())); + actId.setAddUserId(2L); + actId.setAssigningAuthorityCd("authorityCd"); + actId.setAssigningAuthorityDescTxt("authorityDesc"); + actId.setDurationAmt("durationAmt"); + actId.setDurationUnitCd("durationUnitCd"); + actId.setLastChgReasonCd("lastChgReasonCd"); + actId.setLastChgTime(new Timestamp(System.currentTimeMillis())); + actId.setLastChgUserId(3L); + actId.setRecordStatusCd("recordStatusCd"); + actId.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + actId.setRootExtensionTxt("rootExtensionTxt"); + actId.setStatusCd("statusCd"); + actId.setStatusTime(new Timestamp(System.currentTimeMillis())); + actId.setTypeCd("typeCd"); + actId.setTypeDescTxt("typeDescTxt"); + actId.setUserAffiliationTxt("userAffiliationTxt"); + actId.setValidFromTime(new Timestamp(System.currentTimeMillis())); + actId.setValidToTime(new Timestamp(System.currentTimeMillis())); + + ActIdDto dto = new ActIdDto(actId); + + assertEquals(actId.getActUid(), dto.getActUid()); + assertEquals(actId.getActIdSeq(), dto.getActIdSeq()); + assertEquals(actId.getAddReasonCd(), dto.getAddReasonCd()); + assertEquals(actId.getAddTime(), dto.getAddTime()); + assertEquals(actId.getAddUserId(), dto.getAddUserId()); + assertEquals(actId.getAssigningAuthorityCd(), dto.getAssigningAuthorityCd()); + assertEquals(actId.getAssigningAuthorityDescTxt(), dto.getAssigningAuthorityDescTxt()); + assertEquals(actId.getDurationAmt(), dto.getDurationAmt()); + assertEquals(actId.getDurationUnitCd(), dto.getDurationUnitCd()); + assertEquals(actId.getLastChgReasonCd(), dto.getLastChgReasonCd()); + assertEquals(actId.getLastChgTime(), dto.getLastChgTime()); + assertEquals(actId.getLastChgUserId(), dto.getLastChgUserId()); + assertEquals(actId.getRecordStatusCd(), dto.getRecordStatusCd()); + assertEquals(actId.getRecordStatusTime(), dto.getRecordStatusTime()); + assertEquals(actId.getRootExtensionTxt(), dto.getRootExtensionTxt()); + assertEquals(actId.getStatusCd(), dto.getStatusCd()); + assertEquals(actId.getStatusTime(), dto.getStatusTime()); + assertEquals(actId.getTypeCd(), dto.getTypeCd()); + assertEquals(actId.getTypeDescTxt(), dto.getTypeDescTxt()); + assertEquals(actId.getUserAffiliationTxt(), dto.getUserAffiliationTxt()); + assertEquals(actId.getValidFromTime(), dto.getValidFromTime()); + assertEquals(actId.getValidToTime(), dto.getValidToTime()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/act/ActRelationshipDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/act/ActRelationshipDtoTest.java new file mode 100644 index 000000000..970b10719 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/act/ActRelationshipDtoTest.java @@ -0,0 +1,147 @@ +package gov.cdc.dataprocessing.model.dto.act; + + +import gov.cdc.dataprocessing.repository.nbs.odse.model.act.ActRelationship; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ActRelationshipDtoTest { + + @Test + void testGettersAndSetters() { + ActRelationshipDto dto = new ActRelationshipDto(); + + String addReasonCd = "reasonCd"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 1L; + String durationAmt = "durationAmt"; + String durationUnitCd = "durationUnitCd"; + Timestamp fromTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "lastChgReasonCd"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 2L; + String recordStatusCd = "recordStatusCd"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Integer sequenceNbr = 3; + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + Timestamp toTime = new Timestamp(System.currentTimeMillis()); + String userAffiliationTxt = "userAffiliationTxt"; + Long sourceActUid = 4L; + String typeDescTxt = "typeDescTxt"; + Long targetActUid = 5L; + String sourceClassCd = "sourceClassCd"; + String targetClassCd = "targetClassCd"; + String typeCd = "typeCd"; + boolean isShareInd = true; + boolean isNNDInd = true; + boolean isExportInd = true; + + dto.setAddReasonCd(addReasonCd); + dto.setAddTime(addTime); + dto.setAddUserId(addUserId); + dto.setDurationAmt(durationAmt); + dto.setDurationUnitCd(durationUnitCd); + dto.setFromTime(fromTime); + dto.setLastChgReasonCd(lastChgReasonCd); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setSequenceNbr(sequenceNbr); + dto.setStatusCd(statusCd); + dto.setStatusTime(statusTime); + dto.setToTime(toTime); + dto.setUserAffiliationTxt(userAffiliationTxt); + dto.setSourceActUid(sourceActUid); + dto.setTypeDescTxt(typeDescTxt); + dto.setTargetActUid(targetActUid); + dto.setSourceClassCd(sourceClassCd); + dto.setTargetClassCd(targetClassCd); + dto.setTypeCd(typeCd); + dto.setShareInd(isShareInd); + dto.setNNDInd(isNNDInd); + dto.setExportInd(isExportInd); + + assertEquals(addReasonCd, dto.getAddReasonCd()); + assertEquals(addTime, dto.getAddTime()); + assertEquals(addUserId, dto.getAddUserId()); + assertEquals(durationAmt, dto.getDurationAmt()); + assertEquals(durationUnitCd, dto.getDurationUnitCd()); + assertEquals(fromTime, dto.getFromTime()); + assertEquals(lastChgReasonCd, dto.getLastChgReasonCd()); + assertEquals(lastChgTime, dto.getLastChgTime()); + assertEquals(lastChgUserId, dto.getLastChgUserId()); + assertEquals(recordStatusCd, dto.getRecordStatusCd()); + assertEquals(recordStatusTime, dto.getRecordStatusTime()); + assertEquals(sequenceNbr, dto.getSequenceNbr()); + assertEquals(statusCd, dto.getStatusCd()); + assertEquals(statusTime, dto.getStatusTime()); + assertEquals(toTime, dto.getToTime()); + assertEquals(userAffiliationTxt, dto.getUserAffiliationTxt()); + assertEquals(sourceActUid, dto.getSourceActUid()); + assertEquals(typeDescTxt, dto.getTypeDescTxt()); + assertEquals(targetActUid, dto.getTargetActUid()); + assertEquals(sourceClassCd, dto.getSourceClassCd()); + assertEquals(targetClassCd, dto.getTargetClassCd()); + assertEquals(typeCd, dto.getTypeCd()); + assertEquals(isShareInd, dto.isShareInd()); + assertEquals(isNNDInd, dto.isNNDInd()); + assertEquals(isExportInd, dto.isExportInd()); + } + + @Test + void testConstructor() { + ActRelationship actRelationship = new ActRelationship(); + actRelationship.setAddReasonCd("reasonCd"); + actRelationship.setAddTime(new Timestamp(System.currentTimeMillis())); + actRelationship.setAddUserId(1L); + actRelationship.setDurationAmt("durationAmt"); + actRelationship.setDurationUnitCd("durationUnitCd"); + actRelationship.setFromTime(new Timestamp(System.currentTimeMillis())); + actRelationship.setLastChgReasonCd("lastChgReasonCd"); + actRelationship.setLastChgTime(new Timestamp(System.currentTimeMillis())); + actRelationship.setLastChgUserId(2L); + actRelationship.setRecordStatusCd("recordStatusCd"); + actRelationship.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + actRelationship.setSequenceNbr(3); + actRelationship.setStatusCd("statusCd"); + actRelationship.setStatusTime(new Timestamp(System.currentTimeMillis())); + actRelationship.setToTime(new Timestamp(System.currentTimeMillis())); + actRelationship.setUserAffiliationTxt("userAffiliationTxt"); + actRelationship.setSourceActUid(4L); + actRelationship.setTypeDescTxt("typeDescTxt"); + actRelationship.setTargetActUid(5L); + actRelationship.setSourceClassCd("sourceClassCd"); + actRelationship.setTargetClassCd("targetClassCd"); + actRelationship.setTypeCd("typeCd"); + + ActRelationshipDto dto = new ActRelationshipDto(actRelationship); + + assertEquals(actRelationship.getAddReasonCd(), dto.getAddReasonCd()); + assertEquals(actRelationship.getAddTime(), dto.getAddTime()); + assertEquals(actRelationship.getAddUserId(), dto.getAddUserId()); + assertEquals(actRelationship.getDurationAmt(), dto.getDurationAmt()); + assertEquals(actRelationship.getDurationUnitCd(), dto.getDurationUnitCd()); + assertEquals(actRelationship.getFromTime(), dto.getFromTime()); + assertEquals(actRelationship.getLastChgReasonCd(), dto.getLastChgReasonCd()); + assertEquals(actRelationship.getLastChgTime(), dto.getLastChgTime()); + assertEquals(actRelationship.getLastChgUserId(), dto.getLastChgUserId()); + assertEquals(actRelationship.getRecordStatusCd(), dto.getRecordStatusCd()); + assertEquals(actRelationship.getRecordStatusTime(), dto.getRecordStatusTime()); + assertEquals(actRelationship.getSequenceNbr(), dto.getSequenceNbr()); + assertEquals(actRelationship.getStatusCd(), dto.getStatusCd()); + assertEquals(actRelationship.getStatusTime(), dto.getStatusTime()); + assertEquals(actRelationship.getToTime(), dto.getToTime()); + assertEquals(actRelationship.getUserAffiliationTxt(), dto.getUserAffiliationTxt()); + assertEquals(actRelationship.getSourceActUid(), dto.getSourceActUid()); + assertEquals(actRelationship.getTypeDescTxt(), dto.getTypeDescTxt()); + assertEquals(actRelationship.getTargetActUid(), dto.getTargetActUid()); + assertEquals(actRelationship.getSourceClassCd(), dto.getSourceClassCd()); + assertEquals(actRelationship.getTargetClassCd(), dto.getTargetClassCd()); + assertEquals(actRelationship.getTypeCd(), dto.getTypeCd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/auth_user/RealizedRoleDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/auth_user/RealizedRoleDtoTest.java new file mode 100644 index 000000000..80e383169 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/auth_user/RealizedRoleDtoTest.java @@ -0,0 +1,63 @@ +package gov.cdc.dataprocessing.model.dto.auth_user; + + +import gov.cdc.dataprocessing.repository.nbs.odse.model.auth.AuthUserRealizedRole; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class RealizedRoleDtoTest { + + @Test + void testGettersAndSetters() { + RealizedRoleDto dto = new RealizedRoleDto(); + + String roleName = "Admin"; + String programAreaCode = "PA001"; + String jurisdictionCode = "JC001"; + String oldProgramAreaCode = "OPA001"; + String oldJurisdictionCode = "OJC001"; + boolean guest = true; + boolean readOnly = false; + int seqNum = 1; + String recordStatus = "Active"; + String guestString = "Y"; + + dto.setRoleName(roleName); + dto.setProgramAreaCode(programAreaCode); + dto.setJurisdictionCode(jurisdictionCode); + dto.setOldProgramAreaCode(oldProgramAreaCode); + dto.setOldJurisdictionCode(oldJurisdictionCode); + dto.setGuest(guest); + dto.setReadOnly(readOnly); + dto.setSeqNum(seqNum); + dto.setRecordStatus(recordStatus); + dto.setGuestString(guestString); + + assertEquals(roleName, dto.getRoleName()); + assertEquals(programAreaCode, dto.getProgramAreaCode()); + assertEquals(jurisdictionCode, dto.getJurisdictionCode()); + assertEquals(oldProgramAreaCode, dto.getOldProgramAreaCode()); + assertEquals(oldJurisdictionCode, dto.getOldJurisdictionCode()); + assertTrue(dto.isGuest()); + assertEquals(readOnly, dto.isReadOnly()); + assertEquals(seqNum, dto.getSeqNum()); + assertEquals(recordStatus, dto.getRecordStatus()); + assertEquals(guestString, dto.getGuestString()); + } + + @Test + void testConstructor() { + AuthUserRealizedRole role = new AuthUserRealizedRole(); + role.setAuthRoleNm("Admin"); + role.setProgAreaCd("PA001"); + role.setJurisdictionCd("JC001"); + + RealizedRoleDto dto = new RealizedRoleDto(role); + + assertEquals(role.getAuthRoleNm(), dto.getRoleName()); + assertEquals(role.getProgAreaCd(), dto.getProgramAreaCode()); + assertEquals(role.getJurisdictionCd(), dto.getJurisdictionCode()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/dsm/DSMAlgorithmDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/dsm/DSMAlgorithmDtoTest.java new file mode 100644 index 000000000..55d260f4c --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/dsm/DSMAlgorithmDtoTest.java @@ -0,0 +1,108 @@ +package gov.cdc.dataprocessing.model.dto.dsm; + + +import gov.cdc.dataprocessing.repository.nbs.odse.model.dsm.DsmAlgorithm; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class DSMAlgorithmDtoTest { + + @Test + void testGettersAndSetters() { + DSMAlgorithmDto dto = new DSMAlgorithmDto(); + + Long dsmAlgorithmUid = 1L; + String algorithmNm = "Algorithm Name"; + String eventType = "Event Type"; + String conditionList = "Condition List"; + String resultedTestList = "Resulted Test List"; + String frequency = "Frequency"; + String applyTo = "Apply To"; + String sendingSystemList = "Sending System List"; + String reportingSystemList = "Reporting System List"; + String eventAction = "Event Action"; + String algorithmPayload = "Algorithm Payload"; + String adminComment = "Admin Comment"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String statusCd = "Status Cd"; + Long lastChgUserId = 2L; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + + dto.setDsmAlgorithmUid(dsmAlgorithmUid); + dto.setAlgorithmNm(algorithmNm); + dto.setEventType(eventType); + dto.setConditionList(conditionList); + dto.setResultedTestList(resultedTestList); + dto.setFrequency(frequency); + dto.setApplyTo(applyTo); + dto.setSendingSystemList(sendingSystemList); + dto.setReportingSystemList(reportingSystemList); + dto.setEventAction(eventAction); + dto.setAlgorithmPayload(algorithmPayload); + dto.setAdminComment(adminComment); + dto.setStatusTime(statusTime); + dto.setStatusCd(statusCd); + dto.setLastChgUserId(lastChgUserId); + dto.setLastChgTime(lastChgTime); + + assertEquals(dsmAlgorithmUid, dto.getDsmAlgorithmUid()); + assertEquals(algorithmNm, dto.getAlgorithmNm()); + assertEquals(eventType, dto.getEventType()); + assertEquals(conditionList, dto.getConditionList()); + assertEquals(resultedTestList, dto.getResultedTestList()); + assertEquals(frequency, dto.getFrequency()); + assertEquals(applyTo, dto.getApplyTo()); + assertEquals(sendingSystemList, dto.getSendingSystemList()); + assertEquals(reportingSystemList, dto.getReportingSystemList()); + assertEquals(eventAction, dto.getEventAction()); + assertEquals(algorithmPayload, dto.getAlgorithmPayload()); + assertEquals(adminComment, dto.getAdminComment()); + assertEquals(statusTime, dto.getStatusTime()); + assertEquals(statusCd, dto.getStatusCd()); + assertEquals(lastChgUserId, dto.getLastChgUserId()); + assertEquals(lastChgTime, dto.getLastChgTime()); + } + + @Test + void testConstructor() { + DsmAlgorithm dsmAlgorithm = new DsmAlgorithm(); + dsmAlgorithm.setDsmAlgorithmUid(1L); + dsmAlgorithm.setAlgorithmNm("Algorithm Name"); + dsmAlgorithm.setEventType("Event Type"); + dsmAlgorithm.setConditionList("Condition List"); + dsmAlgorithm.setResultedTestList("Resulted Test List"); + dsmAlgorithm.setFrequency("Frequency"); + dsmAlgorithm.setApplyTo("Apply To"); + dsmAlgorithm.setSendingSystemList("Sending System List"); + dsmAlgorithm.setReportingSystemList("Reporting System List"); + dsmAlgorithm.setEventAction("Event Action"); + dsmAlgorithm.setAlgorithmPayload("Algorithm Payload"); + dsmAlgorithm.setAdminComment("Admin Comment"); + dsmAlgorithm.setStatusCd("Status Cd"); + dsmAlgorithm.setStatusTime(new Timestamp(System.currentTimeMillis())); + dsmAlgorithm.setLastChgUserId(2L); + dsmAlgorithm.setLastChgTime(new Timestamp(System.currentTimeMillis())); + + DSMAlgorithmDto dto = new DSMAlgorithmDto(dsmAlgorithm); + + assertEquals(dsmAlgorithm.getDsmAlgorithmUid(), dto.getDsmAlgorithmUid()); + assertEquals(dsmAlgorithm.getAlgorithmNm(), dto.getAlgorithmNm()); + assertEquals(dsmAlgorithm.getEventType(), dto.getEventType()); + assertEquals(dsmAlgorithm.getConditionList(), dto.getConditionList()); + assertEquals(dsmAlgorithm.getResultedTestList(), dto.getResultedTestList()); + assertEquals(dsmAlgorithm.getFrequency(), dto.getFrequency()); + assertEquals(dsmAlgorithm.getApplyTo(), dto.getApplyTo()); + assertEquals(dsmAlgorithm.getSendingSystemList(), dto.getSendingSystemList()); + assertEquals(dsmAlgorithm.getReportingSystemList(), dto.getReportingSystemList()); + assertEquals(dsmAlgorithm.getEventAction(), dto.getEventAction()); + assertEquals(dsmAlgorithm.getAlgorithmPayload(), dto.getAlgorithmPayload()); + assertEquals(dsmAlgorithm.getAdminComment(), dto.getAdminComment()); + assertEquals(dsmAlgorithm.getStatusCd(), dto.getStatusCd()); + assertEquals(dsmAlgorithm.getStatusTime(), dto.getStatusTime()); + assertEquals(dsmAlgorithm.getLastChgUserId(), dto.getLastChgUserId()); + assertEquals(dsmAlgorithm.getLastChgTime(), dto.getLastChgTime()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/dsm/DSMUpdateAlgorithmDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/dsm/DSMUpdateAlgorithmDtoTest.java new file mode 100644 index 000000000..140f394c0 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/dsm/DSMUpdateAlgorithmDtoTest.java @@ -0,0 +1,91 @@ +package gov.cdc.dataprocessing.model.dto.dsm; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class DSMUpdateAlgorithmDtoTest { + + @Test + void testGettersAndSetters() { + DSMUpdateAlgorithmDto dto = new DSMUpdateAlgorithmDto(); + + // Set values + dto.setDsmUpdateAlgorithmUid(1L); + dto.setConditionCd("ConditionCd"); + dto.setSendingSystemNm("SendingSystemNm"); + dto.setUpdateIndCd("UpdateIndCd"); + dto.setUpdateClosedBehaviour("UpdateClosedBehaviour"); + dto.setUpdateMultiClosedBehaviour("UpdateMultiClosedBehaviour"); + dto.setUpdateMultiOpenBehaviour("UpdateMultiOpenBehaviour"); + dto.setUpdateIgnoreList("UpdateIgnoreList"); + dto.setUpdateTimeframe("UpdateTimeframe"); + dto.setAdminComment("AdminComment"); + dto.setStatusCd("StatusCd"); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(2L); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(3L); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setDsmUpdateAlgorithmMapKey("DsmUpdateAlgorithmMapKey"); + dto.setJurisdictionCd("JurisdictionCd"); + dto.setProgAreaCd("ProgAreaCd"); + dto.setLocalId("LocalId"); + dto.setLastChgReasonCd("LastChgReasonCd"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setProgramJurisdictionOid(4L); + dto.setSharedInd("SharedInd"); + dto.setVersionCtrlNbr(1); + + // Assert values + assertEquals(1L, dto.getDsmUpdateAlgorithmUid()); + assertEquals("ConditionCd", dto.getConditionCd()); + assertEquals("SendingSystemNm", dto.getSendingSystemNm()); + assertEquals("UpdateIndCd", dto.getUpdateIndCd()); + assertEquals("UpdateClosedBehaviour", dto.getUpdateClosedBehaviour()); + assertEquals("UpdateMultiClosedBehaviour", dto.getUpdateMultiClosedBehaviour()); + assertEquals("UpdateMultiOpenBehaviour", dto.getUpdateMultiOpenBehaviour()); + assertEquals("UpdateIgnoreList", dto.getUpdateIgnoreList()); + assertEquals("UpdateTimeframe", dto.getUpdateTimeframe()); + assertEquals("AdminComment", dto.getAdminComment()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertEquals(2L, dto.getAddUserId()); + assertNotNull(dto.getAddTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertNotNull(dto.getLastChgTime()); + assertEquals("DsmUpdateAlgorithmMapKey", dto.getDsmUpdateAlgorithmMapKey()); + assertEquals("JurisdictionCd", dto.getJurisdictionCd()); + assertEquals("ProgAreaCd", dto.getProgAreaCd()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals(4L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + assertEquals(1, dto.getVersionCtrlNbr()); + + // Test overridden methods + assertEquals("JurisdictionCd", dto.getJurisdictionCd()); + assertEquals("ProgAreaCd", dto.getProgAreaCd()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertEquals("ConditionCd", dto.getConditionCd()); + assertNotNull(dto.getAddTime()); + assertEquals(4L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + assertEquals(1, dto.getVersionCtrlNbr()); + assertEquals(1L, dto.getDsmUpdateAlgorithmUid()); + assertEquals(3L, dto.getLastChgUserId()); + assertNotNull(dto.getLastChgTime()); + assertNotNull(dto.getSuperclass()); + assertNotNull(dto.getUid()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EDXDocumentDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EDXDocumentDtoTest.java new file mode 100644 index 000000000..a712dc56f --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EDXDocumentDtoTest.java @@ -0,0 +1,75 @@ +package gov.cdc.dataprocessing.model.dto.edx; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class EDXDocumentDtoTest { + + @Test + void testGettersAndSetters() { + EDXDocumentDto dto = new EDXDocumentDto(); + + Long eDXDocumentUid = 1L; + Long actUid = 2L; + String payload = "payload"; + String recordStatusCd = "recordStatusCd"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + String docTypeCd = "docTypeCd"; + Long nbsDocumentMetadataUid = 3L; + String originalPayload = "originalPayload"; + String originalDocTypeCd = "originalDocTypeCd"; + Long edxDocumentParentUid = 4L; + String documentViewXsl = "documentViewXsl"; + String xmlSchemaLocation = "xmlSchemaLocation"; + String progAreaCd = "progAreaCd"; + String jurisdictionCd = "jurisdictionCd"; + Long programJurisdictionOid = 5L; + String sharedInd = "sharedInd"; + String versionNbr = "versionNbr"; + String viewLink = "viewLink"; + + dto.setEDXDocumentUid(eDXDocumentUid); + dto.setActUid(actUid); + dto.setPayload(payload); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setAddTime(addTime); + dto.setDocTypeCd(docTypeCd); + dto.setNbsDocumentMetadataUid(nbsDocumentMetadataUid); + dto.setOriginalPayload(originalPayload); + dto.setOriginalDocTypeCd(originalDocTypeCd); + dto.setEdxDocumentParentUid(edxDocumentParentUid); + dto.setDocumentViewXsl(documentViewXsl); + dto.setXmlSchemaLocation(xmlSchemaLocation); + dto.setProgAreaCd(progAreaCd); + dto.setJurisdictionCd(jurisdictionCd); + dto.setProgramJurisdictionOid(programJurisdictionOid); + dto.setSharedInd(sharedInd); + dto.setVersionNbr(versionNbr); + dto.setViewLink(viewLink); + + assertEquals(eDXDocumentUid, dto.getEDXDocumentUid()); + assertEquals(actUid, dto.getActUid()); + assertEquals(payload, dto.getPayload()); + assertEquals(recordStatusCd, dto.getRecordStatusCd()); + assertEquals(recordStatusTime, dto.getRecordStatusTime()); + assertEquals(addTime, dto.getAddTime()); + assertEquals(docTypeCd, dto.getDocTypeCd()); + assertEquals(nbsDocumentMetadataUid, dto.getNbsDocumentMetadataUid()); + assertEquals(originalPayload, dto.getOriginalPayload()); + assertEquals(originalDocTypeCd, dto.getOriginalDocTypeCd()); + assertEquals(edxDocumentParentUid, dto.getEdxDocumentParentUid()); + assertEquals(documentViewXsl, dto.getDocumentViewXsl()); + assertEquals(xmlSchemaLocation, dto.getXmlSchemaLocation()); + assertEquals(progAreaCd, dto.getProgAreaCd()); + assertEquals(jurisdictionCd, dto.getJurisdictionCd()); + assertEquals(programJurisdictionOid, dto.getProgramJurisdictionOid()); + assertEquals(sharedInd, dto.getSharedInd()); + assertEquals(versionNbr, dto.getVersionNbr()); + assertEquals(viewLink, dto.getViewLink()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessCaseSummaryDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessCaseSummaryDtoTest.java new file mode 100644 index 000000000..ffb920d2e --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessCaseSummaryDtoTest.java @@ -0,0 +1,28 @@ +package gov.cdc.dataprocessing.model.dto.edx; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class EDXEventProcessCaseSummaryDtoTest { + + @Test + void testGettersAndSetters() { + EDXEventProcessCaseSummaryDto dto = new EDXEventProcessCaseSummaryDto(); + + String conditionCd = "conditionCd"; + Long personParentUid = 12345L; + Long personUid = 67890L; + String personLocalId = "personLocalId"; + + dto.setConditionCd(conditionCd); + dto.setPersonParentUid(personParentUid); + dto.setPersonUid(personUid); + dto.setPersonLocalId(personLocalId); + + assertEquals(conditionCd, dto.getConditionCd()); + assertEquals(personParentUid, dto.getPersonParentUid()); + assertEquals(personUid, dto.getPersonUid()); + assertEquals(personLocalId, dto.getPersonLocalId()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessDtoTest.java new file mode 100644 index 000000000..01357c514 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EDXEventProcessDtoTest.java @@ -0,0 +1,60 @@ +package gov.cdc.dataprocessing.model.dto.edx; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class EDXEventProcessDtoTest { + + @Test + void testGettersAndSetters() { + EDXEventProcessDto dto = new EDXEventProcessDto(); + + Long eDXEventProcessUid = 1L; + Long nbsDocumentUid = 2L; + String sourceEventId = "sourceEventId"; + Long nbsEventUid = 3L; + String docEventTypeCd = "docEventTypeCd"; + String docEventSource = "docEventSource"; + Long addUserId = 4L; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + String jurisdictionCd = "jurisdictionCd"; + String progAreaCd = "progAreaCd"; + Long programJurisdictionOid = 5L; + String localId = "localId"; + String parsedInd = "parsedInd"; + Long edxDocumentUid = 6L; + + dto.setEDXEventProcessUid(eDXEventProcessUid); + dto.setNbsDocumentUid(nbsDocumentUid); + dto.setSourceEventId(sourceEventId); + dto.setNbsEventUid(nbsEventUid); + dto.setDocEventTypeCd(docEventTypeCd); + dto.setDocEventSource(docEventSource); + dto.setAddUserId(addUserId); + dto.setAddTime(addTime); + dto.setJurisdictionCd(jurisdictionCd); + dto.setProgAreaCd(progAreaCd); + dto.setProgramJurisdictionOid(programJurisdictionOid); + dto.setLocalId(localId); + dto.setParsedInd(parsedInd); + dto.setEdxDocumentUid(edxDocumentUid); + + assertEquals(eDXEventProcessUid, dto.getEDXEventProcessUid()); + assertEquals(nbsDocumentUid, dto.getNbsDocumentUid()); + assertEquals(sourceEventId, dto.getSourceEventId()); + assertEquals(nbsEventUid, dto.getNbsEventUid()); + assertEquals(docEventTypeCd, dto.getDocEventTypeCd()); + assertEquals(docEventSource, dto.getDocEventSource()); + assertEquals(addUserId, dto.getAddUserId()); + assertEquals(addTime, dto.getAddTime()); + assertEquals(jurisdictionCd, dto.getJurisdictionCd()); + assertEquals(progAreaCd, dto.getProgAreaCd()); + assertEquals(programJurisdictionOid, dto.getProgramJurisdictionOid()); + assertEquals(localId, dto.getLocalId()); + assertEquals(parsedInd, dto.getParsedInd()); + assertEquals(edxDocumentUid, dto.getEdxDocumentUid()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EdxELRLabMapDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EdxELRLabMapDtoTest.java new file mode 100644 index 000000000..cc50e8e5a --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EdxELRLabMapDtoTest.java @@ -0,0 +1,105 @@ +package gov.cdc.dataprocessing.model.dto.edx; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class EdxELRLabMapDtoTest { + + @Test + void testGettersAndSetters() { + EdxELRLabMapDto dto = new EdxELRLabMapDto(); + + Long subjectEntityUid = 1L; + String roleCd = "roleCd"; + String roleCdDescTxt = "roleCdDescTxt"; + Integer eoleSeq = 1; + String roleSubjectClassCd = "roleSubjectClassCd"; + Long participationEntityUid = 2L; + Long participationActUid = 3L; + String participationActClassCd = "participationActClassCd"; + String participationCd = "participationCd"; + Integer participationRoleSeq = 2; + String participationSubjectClassCd = "participationSubjectClassCd"; + String participationSubjectEntityCd = "participationSubjectEntityCd"; + String participationTypeCd = "participationTypeCd"; + String participationTypeDescTxt = "participationTypeDescTxt"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long entityUid = 4L; + String entityCd = "entityCd"; + String entityCdDescTxt = "entityCdDescTxt"; + String entityStandardIndustryClassCd = "entityStandardIndustryClassCd"; + String entityStandardIndustryDescTxt = "entityStandardIndustryDescTxt"; + String entityDisplayNm = "entityDisplayNm"; + String entityElectronicInd = "entityElectronicInd"; + Timestamp asOfDate = new Timestamp(System.currentTimeMillis()); + Long rootObservationUid = 5L; + String entityIdRootExtensionTxt = "entityIdRootExtensionTxt"; + String entityIdAssigningAuthorityCd = "entityIdAssigningAuthorityCd"; + String entityIdAssigningAuthorityDescTxt = "entityIdAssigningAuthorityDescTxt"; + String entityIdTypeCd = "entityIdTypeCd"; + String entityIdTypeDescTxt = "entityIdTypeDescTxt"; + + dto.setSubjectEntityUid(subjectEntityUid); + dto.setRoleCd(roleCd); + dto.setRoleCdDescTxt(roleCdDescTxt); + dto.setEoleSeq(eoleSeq); + dto.setRoleSubjectClassCd(roleSubjectClassCd); + dto.setParticipationEntityUid(participationEntityUid); + dto.setParticipationActUid(participationActUid); + dto.setParticipationActClassCd(participationActClassCd); + dto.setParticipationCd(participationCd); + dto.setParticipationRoleSeq(participationRoleSeq); + dto.setParticipationSubjectClassCd(participationSubjectClassCd); + dto.setParticipationSubjectEntityCd(participationSubjectEntityCd); + dto.setParticipationTypeCd(participationTypeCd); + dto.setParticipationTypeDescTxt(participationTypeDescTxt); + dto.setAddTime(addTime); + dto.setEntityUid(entityUid); + dto.setEntityCd(entityCd); + dto.setEntityCdDescTxt(entityCdDescTxt); + dto.setEntityStandardIndustryClassCd(entityStandardIndustryClassCd); + dto.setEntityStandardIndustryDescTxt(entityStandardIndustryDescTxt); + dto.setEntityDisplayNm(entityDisplayNm); + dto.setEntityElectronicInd(entityElectronicInd); + dto.setAsOfDate(asOfDate); + dto.setRootObservationUid(rootObservationUid); + dto.setEntityIdRootExtensionTxt(entityIdRootExtensionTxt); + dto.setEntityIdAssigningAuthorityCd(entityIdAssigningAuthorityCd); + dto.setEntityIdAssigningAuthorityDescTxt(entityIdAssigningAuthorityDescTxt); + dto.setEntityIdTypeCd(entityIdTypeCd); + dto.setEntityIdTypeDescTxt(entityIdTypeDescTxt); + + assertEquals(subjectEntityUid, dto.getSubjectEntityUid()); + assertEquals(roleCd, dto.getRoleCd()); + assertEquals(roleCdDescTxt, dto.getRoleCdDescTxt()); + assertEquals(eoleSeq, dto.getEoleSeq()); + assertEquals(roleSubjectClassCd, dto.getRoleSubjectClassCd()); + assertEquals(participationEntityUid, dto.getParticipationEntityUid()); + assertEquals(participationActUid, dto.getParticipationActUid()); + assertEquals(participationActClassCd, dto.getParticipationActClassCd()); + assertEquals(participationCd, dto.getParticipationCd()); + assertEquals(participationRoleSeq, dto.getParticipationRoleSeq()); + assertEquals(participationSubjectClassCd, dto.getParticipationSubjectClassCd()); + assertEquals(participationSubjectEntityCd, dto.getParticipationSubjectEntityCd()); + assertEquals(participationTypeCd, dto.getParticipationTypeCd()); + assertEquals(participationTypeDescTxt, dto.getParticipationTypeDescTxt()); + assertEquals(addTime, dto.getAddTime()); + assertEquals(entityUid, dto.getEntityUid()); + assertEquals(entityCd, dto.getEntityCd()); + assertEquals(entityCdDescTxt, dto.getEntityCdDescTxt()); + assertEquals(entityStandardIndustryClassCd, dto.getEntityStandardIndustryClassCd()); + assertEquals(entityStandardIndustryDescTxt, dto.getEntityStandardIndustryDescTxt()); + assertEquals(entityDisplayNm, dto.getEntityDisplayNm()); + assertEquals(entityElectronicInd, dto.getEntityElectronicInd()); + assertEquals(asOfDate, dto.getAsOfDate()); + assertEquals(rootObservationUid, dto.getRootObservationUid()); + assertEquals(entityIdRootExtensionTxt, dto.getEntityIdRootExtensionTxt()); + assertEquals(entityIdAssigningAuthorityCd, dto.getEntityIdAssigningAuthorityCd()); + assertEquals(entityIdAssigningAuthorityDescTxt, dto.getEntityIdAssigningAuthorityDescTxt()); + assertEquals(entityIdTypeCd, dto.getEntityIdTypeCd()); + assertEquals(entityIdTypeDescTxt, dto.getEntityIdTypeDescTxt()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleAlgorothmManagerDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleAlgorothmManagerDtoTest.java new file mode 100644 index 000000000..c263acabd --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleAlgorothmManagerDtoTest.java @@ -0,0 +1,114 @@ +package gov.cdc.dataprocessing.model.dto.edx; + + +import gov.cdc.dataprocessing.model.container.model.PageActProxyContainer; +import gov.cdc.dataprocessing.model.container.model.PamProxyContainer; +import gov.cdc.dataprocessing.model.dto.log.EDXActivityLogDto; +import gov.cdc.dataprocessing.model.dto.nbs.NBSDocumentDto; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class EdxRuleAlgorothmManagerDtoTest { + + @Test + void testGettersAndSetters() { + EdxRuleAlgorothmManagerDto dto = new EdxRuleAlgorothmManagerDto(); + + String updateAction = "updateAction"; + String nndComment = "nndComment"; + String onFailureToCreateNND = "onFailureToCreateNND"; + String dsmAlgorithmName = "dsmAlgorithmName"; + String conditionName = "conditionName"; + + Map edxRuleApplyDTMap = new HashMap<>(); + Map edxRuleAdvCriteriaDTMap = new HashMap<>(); + Long dsmAlgorithmUid = 1L; + String onFailureToCreateInv = "onFailureToCreateInv"; + String action = "action"; + + PageActProxyContainer pageActContainer = new PageActProxyContainer(); + PamProxyContainer pamContainer = new PamProxyContainer(); + + Collection edxActivityDetailLogDTCollection = null; + String errorText = "errorText"; + Collection sendingFacilityColl = null; + Map edxBasicCriteriaMap = new HashMap<>(); + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long PHCUid = 2L; + Long PHCRevisionUid = 3L; + NBSDocumentDto documentDT = new NBSDocumentDto(); + Long MPRUid = 4L; + boolean isContactRecordDoc = true; + Map eDXEventProcessCaseSummaryDTMap = new HashMap<>(); + boolean isUpdatedDocument = true; + boolean isLabReportDoc = true; + boolean isMorbReportDoc = true; + boolean isCaseUpdated = true; + EDXActivityLogDto edxActivityLogDto = new EDXActivityLogDto(); + + dto.setUpdateAction(updateAction); + dto.setNndComment(nndComment); + dto.setOnFailureToCreateNND(onFailureToCreateNND); + dto.setDsmAlgorithmName(dsmAlgorithmName); + dto.setConditionName(conditionName); + dto.setEdxRuleApplyDTMap(edxRuleApplyDTMap); + dto.setEdxRuleAdvCriteriaDTMap(edxRuleAdvCriteriaDTMap); + dto.setDsmAlgorithmUid(dsmAlgorithmUid); + dto.setOnFailureToCreateInv(onFailureToCreateInv); + dto.setAction(action); + dto.setPageActContainer(pageActContainer); + dto.setPamContainer(pamContainer); + dto.setEdxActivityDetailLogDTCollection(edxActivityDetailLogDTCollection); + dto.setErrorText(errorText); + dto.setSendingFacilityColl(sendingFacilityColl); + dto.setEdxBasicCriteriaMap(edxBasicCriteriaMap); + dto.setLastChgTime(lastChgTime); + dto.setPHCUid(PHCUid); + dto.setPHCRevisionUid(PHCRevisionUid); + dto.setDocumentDT(documentDT); + dto.setMPRUid(MPRUid); + dto.setContactRecordDoc(isContactRecordDoc); + dto.setEDXEventProcessCaseSummaryDTMap(eDXEventProcessCaseSummaryDTMap); + dto.setUpdatedDocument(isUpdatedDocument); + dto.setLabReportDoc(isLabReportDoc); + dto.setMorbReportDoc(isMorbReportDoc); + dto.setCaseUpdated(isCaseUpdated); + dto.setEdxActivityLogDto(edxActivityLogDto); + + assertEquals(updateAction, dto.getUpdateAction()); + assertEquals(nndComment, dto.getNndComment()); + assertEquals(onFailureToCreateNND, dto.getOnFailureToCreateNND()); + assertEquals(dsmAlgorithmName, dto.getDsmAlgorithmName()); + assertEquals(conditionName, dto.getConditionName()); + assertEquals(edxRuleApplyDTMap, dto.getEdxRuleApplyDTMap()); + assertEquals(edxRuleAdvCriteriaDTMap, dto.getEdxRuleAdvCriteriaDTMap()); + assertEquals(dsmAlgorithmUid, dto.getDsmAlgorithmUid()); + assertEquals(onFailureToCreateInv, dto.getOnFailureToCreateInv()); + assertEquals(action, dto.getAction()); + assertEquals(pageActContainer, dto.getPageActContainer()); + assertEquals(pamContainer, dto.getPamContainer()); + assertEquals(edxActivityDetailLogDTCollection, dto.getEdxActivityDetailLogDTCollection()); + assertEquals(errorText, dto.getErrorText()); + assertEquals(sendingFacilityColl, dto.getSendingFacilityColl()); + assertEquals(edxBasicCriteriaMap, dto.getEdxBasicCriteriaMap()); + assertEquals(lastChgTime, dto.getLastChgTime()); + assertEquals(PHCUid, dto.getPHCUid()); + assertEquals(PHCRevisionUid, dto.getPHCRevisionUid()); + assertEquals(documentDT, dto.getDocumentDT()); + assertEquals(MPRUid, dto.getMPRUid()); + assertTrue(dto.isContactRecordDoc()); + assertEquals(eDXEventProcessCaseSummaryDTMap, dto.getEDXEventProcessCaseSummaryDTMap()); + assertTrue(dto.isUpdatedDocument()); + assertTrue(dto.isLabReportDoc()); + assertTrue(dto.isMorbReportDoc()); + assertTrue(dto.isCaseUpdated()); + assertEquals(edxActivityLogDto, dto.getEdxActivityLogDto()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleManageDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleManageDtoTest.java new file mode 100644 index 000000000..62a1e5104 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/edx/EdxRuleManageDtoTest.java @@ -0,0 +1,63 @@ +package gov.cdc.dataprocessing.model.dto.edx; + + +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class EdxRuleManageDtoTest { + + @Test + void testGettersAndSetters() { + EdxRuleManageDto dto = new EdxRuleManageDto(); + + String value = "value"; + Collection defaultCodedValueColl = new ArrayList<>(); + String defaultNumericValue = "defaultNumericValue"; + String defaultStringValue = "defaultStringValue"; + String behavior = "behavior"; + Long dsmAlgorithmUid = 1L; + String defaultCommentValue = "defaultCommentValue"; + String logic = "logic"; + String questionId = "questionId"; + boolean isAdvanceCriteria = true; + String type = "type"; + String participationTypeCode = "participationTypeCode"; + String participationClassCode = "participationClassCode"; + Long participationUid = 2L; + + dto.setValue(value); + dto.setDefaultCodedValueColl(defaultCodedValueColl); + dto.setDefaultNumericValue(defaultNumericValue); + dto.setDefaultStringValue(defaultStringValue); + dto.setBehavior(behavior); + dto.setDsmAlgorithmUid(dsmAlgorithmUid); + dto.setDefaultCommentValue(defaultCommentValue); + dto.setLogic(logic); + dto.setQuestionId(questionId); + dto.setAdvanceCriteria(isAdvanceCriteria); + dto.setType(type); + dto.setParticipationTypeCode(participationTypeCode); + dto.setParticipationClassCode(participationClassCode); + dto.setParticipationUid(participationUid); + + assertEquals(value, dto.getValue()); + assertEquals(defaultCodedValueColl, dto.getDefaultCodedValueColl()); + assertEquals(defaultNumericValue, dto.getDefaultNumericValue()); + assertEquals(defaultStringValue, dto.getDefaultStringValue()); + assertEquals(behavior, dto.getBehavior()); + assertEquals(dsmAlgorithmUid, dto.getDsmAlgorithmUid()); + assertEquals(defaultCommentValue, dto.getDefaultCommentValue()); + assertEquals(logic, dto.getLogic()); + assertEquals(questionId, dto.getQuestionId()); + assertTrue(dto.isAdvanceCriteria()); + assertEquals(type, dto.getType()); + assertEquals(participationTypeCode, dto.getParticipationTypeCode()); + assertEquals(participationClassCode, dto.getParticipationClassCode()); + assertEquals(participationUid, dto.getParticipationUid()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/generic_helper/StateDefinedFieldDataDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/generic_helper/StateDefinedFieldDataDtoTest.java new file mode 100644 index 000000000..9f7158157 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/generic_helper/StateDefinedFieldDataDtoTest.java @@ -0,0 +1,56 @@ +package gov.cdc.dataprocessing.model.dto.generic_helper; + + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class StateDefinedFieldDataDtoTest { + + @Test + void testGettersAndSetters() { + StateDefinedFieldDataDto dto = new StateDefinedFieldDataDto(); + + Long ldfUid = 1L; + String businessObjNm = "businessObjNm"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long businessObjUid = 2L; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + String ldfValue = "ldfValue"; + Integer versionCtrlNbr = 1; + String conditionCd = "conditionCd"; + boolean itDirty = true; + String codeSetNm = "codeSetNm"; + String fieldSize = "fieldSize"; + String dataType = "dataType"; + + dto.setLdfUid(ldfUid); + dto.setBusinessObjNm(businessObjNm); + dto.setAddTime(addTime); + dto.setBusinessObjUid(businessObjUid); + dto.setLastChgTime(lastChgTime); + dto.setLdfValue(ldfValue); + dto.setVersionCtrlNbr(versionCtrlNbr); + dto.setConditionCd(conditionCd); + dto.setItDirty(itDirty); + dto.setCodeSetNm(codeSetNm); + dto.setFieldSize(fieldSize); + dto.setDataType(dataType); + + assertEquals(ldfUid, dto.getLdfUid()); + assertEquals(businessObjNm, dto.getBusinessObjNm()); + assertEquals(addTime, dto.getAddTime()); + assertEquals(businessObjUid, dto.getBusinessObjUid()); + assertEquals(lastChgTime, dto.getLastChgTime()); + assertEquals(ldfValue, dto.getLdfValue()); + assertEquals(versionCtrlNbr, dto.getVersionCtrlNbr()); + assertEquals(conditionCd, dto.getConditionCd()); + assertTrue(dto.isItDirty()); + assertEquals(codeSetNm, dto.getCodeSetNm()); + assertEquals(fieldSize, dto.getFieldSize()); + assertEquals(dataType, dto.getDataType()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/lab_result/EdxLabInformationDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/lab_result/EdxLabInformationDtoTest.java new file mode 100644 index 000000000..348e4a8ea --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/lab_result/EdxLabInformationDtoTest.java @@ -0,0 +1,369 @@ +package gov.cdc.dataprocessing.model.dto.lab_result; + + +import gov.cdc.dataprocessing.constant.enums.NbsInterfaceStatus; +import gov.cdc.dataprocessing.model.container.model.LabResultProxyContainer; +import gov.cdc.dataprocessing.model.container.model.ObservationContainer; +import gov.cdc.dataprocessing.model.container.model.PersonContainer; +import gov.cdc.dataprocessing.model.dto.edx.EdxLabIdentiferDto; +import gov.cdc.dataprocessing.model.dto.phc.PublicHealthCaseDto; +import gov.cdc.dataprocessing.service.model.wds.WdsReport; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; +import java.util.*; + +import static org.junit.jupiter.api.Assertions.*; + +class EdxLabInformationDtoTest { + + @Test + void testGettersAndSetters() { + EdxLabInformationDto dto = new EdxLabInformationDto(); + + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Timestamp orderEffectiveDate = new Timestamp(System.currentTimeMillis() + 1000); + String role = "role"; + long rootObservationUid = 12345L; + PersonContainer orderingProviderVO = new PersonContainer(); + String sendingFacilityClia = "sendingFacilityClia"; + String sendingFacilityName = "sendingFacilityName"; + long patientUid = 54321L; + long userId = 11111L; + int nextUid = 5; + String fillerNumber = "fillerNumber"; + String messageControlID = "messageControlID"; + long parentObservationUid = 22222L; + boolean isOrderingProvider = true; + LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); + String localId = "localId"; + boolean isParentObsInd = true; + Collection edxLabIdentiferDTColl = new ArrayList<>(); + String entityName = "entityName"; + String reportingSourceName = "reportingSourceName"; + String userName = "userName"; + String universalIdType = "universalIdType"; + Long associatedPublicHealthCaseUid = 33333L; + long publicHealthCaseUid = 44444L; + long notificationUid = 55555L; + long originalAssociatedPHCUid = 66666L; + long nbsInterfaceUid = 77777L; + Timestamp specimenCollectionTime = new Timestamp(System.currentTimeMillis() + 2000); + String jurisdictionName = "jurisdictionName"; + String programAreaName = "programAreaName"; + boolean jurisdictionAndProgramAreaSuccessfullyDerived = true; + boolean algorithmHasInvestigation = true; + boolean investigationSuccessfullyCreated = true; + boolean investigationMissingFields = false; + boolean algorithmHasNotification = true; + boolean notificationSuccessfullyCreated = true; + boolean notificationMissingFields = false; + boolean labIsCreate = true; + boolean labIsCreateSuccess = true; + boolean labIsUpdateDRRQ = true; + boolean labIsUpdateDRSA = true; + boolean labIsUpdateSuccess = true; + boolean labIsMarkedAsReviewed = true; + Map resultedTest = new HashMap<>(); + String conditionCode = "conditionCode"; + Object proxyVO = new Object(); + Map edxSusLabDTMap = new HashMap<>(); + String addReasonCd = "addReasonCd"; + ObservationContainer rootObservationContainer = new ObservationContainer(); + boolean multipleSubjectMatch = true; + boolean multipleOrderingProvider = true; + boolean multipleCollector = true; + boolean multiplePrincipalInterpreter = true; + boolean multipleOrderingFacility = true; + boolean multipleSpecimen = true; + boolean ethnicityCodeTranslated = true; + boolean obsMethodTranslated = true; + boolean raceTranslated = true; + boolean sexTranslated = true; + boolean ssnInvalid = true; + boolean nullClia = true; + boolean nextOfKin = true; + boolean isProvider = true; + boolean fillerNumberPresent = true; + boolean finalPostCorrected = true; + boolean preliminaryPostFinal = true; + boolean preliminaryPostCorrected = true; + boolean activityTimeOutOfSequence = true; + boolean multiplePerformingLab = true; + boolean orderTestNameMissing = true; + boolean reflexOrderedTestCdMissing = true; + boolean reflexResultedTestCdMissing = true; + boolean resultedTestNameMissing = true; + boolean drugNameMissing = true; + boolean obsStatusTranslated = true; + String dangerCode = "dangerCode"; + String relationship = "relationship"; + String relationshipDesc = "relationshipDesc"; + boolean activityToTimeMissing = true; + boolean systemException = true; + boolean universalServiceIdMissing = true; + boolean missingOrderingProvider = true; + boolean missingOrderingFacility = true; + boolean multipleReceivingFacility = true; + long personParentUid = 88888L; + boolean patientMatch = true; + boolean multipleOBR = true; + boolean multipleSubject = true; + boolean noSubject = true; + boolean orderOBRWithParent = true; + boolean childOBRWithoutParent = true; + boolean invalidXML = true; + boolean missingOrderingProviderandFacility = true; + boolean createLabPermission = true; + boolean updateLabPermission = true; + boolean markAsReviewPermission = true; + boolean createInvestigationPermission = true; + boolean createNotificationPermission = true; + boolean matchingAlgorithm = true; + boolean unexpectedResultType = true; + boolean childSuscWithoutParentResult = true; + boolean fieldTruncationError = true; + boolean invalidDateError = true; + String algorithmAndOrLogic = "algorithmAndOrLogic"; + boolean labAssociatedToInv = true; + boolean observationMatch = true; + boolean reasonforStudyCdMissing = true; + Collection matchingPublicHealthCaseDtoColl = new ArrayList<>(); + String investigationType = "investigationType"; + NbsInterfaceStatus status = NbsInterfaceStatus.Failure; + List wdsReports = new ArrayList<>(); + + dto.setAddTime(addTime); + dto.setOrderEffectiveDate(orderEffectiveDate); + dto.setRole(role); + dto.setRootObserbationUid(rootObservationUid); + dto.setOrderingProviderVO(orderingProviderVO); + dto.setSendingFacilityClia(sendingFacilityClia); + dto.setSendingFacilityName(sendingFacilityName); + dto.setPatientUid(patientUid); + dto.setUserId(userId); + dto.setNextUid(nextUid); + dto.setFillerNumber(fillerNumber); + dto.setMessageControlID(messageControlID); + dto.setParentObservationUid(parentObservationUid); + dto.setOrderingProvider(isOrderingProvider); + dto.setLabResultProxyContainer(labResultProxyContainer); + dto.setLocalId(localId); + dto.setParentObsInd(isParentObsInd); + dto.setEdxLabIdentiferDTColl(edxLabIdentiferDTColl); + dto.setEntityName(entityName); + dto.setReportingSourceName(reportingSourceName); + dto.setUserName(userName); + dto.setUniversalIdType(universalIdType); + dto.setAssociatedPublicHealthCaseUid(associatedPublicHealthCaseUid); + dto.setPublicHealthCaseUid(publicHealthCaseUid); + dto.setNotificationUid(notificationUid); + dto.setOriginalAssociatedPHCUid(originalAssociatedPHCUid); + dto.setNbsInterfaceUid(nbsInterfaceUid); + dto.setSpecimenCollectionTime(specimenCollectionTime); + dto.setJurisdictionName(jurisdictionName); + dto.setProgramAreaName(programAreaName); + dto.setJurisdictionAndProgramAreaSuccessfullyDerived(jurisdictionAndProgramAreaSuccessfullyDerived); + dto.setAlgorithmHasInvestigation(algorithmHasInvestigation); + dto.setInvestigationSuccessfullyCreated(investigationSuccessfullyCreated); + dto.setInvestigationMissingFields(investigationMissingFields); + dto.setAlgorithmHasNotification(algorithmHasNotification); + dto.setNotificationSuccessfullyCreated(notificationSuccessfullyCreated); + dto.setNotificationMissingFields(notificationMissingFields); + dto.setLabIsCreate(labIsCreate); + dto.setLabIsCreateSuccess(labIsCreateSuccess); + dto.setLabIsUpdateDRRQ(labIsUpdateDRRQ); + dto.setLabIsUpdateDRSA(labIsUpdateDRSA); + dto.setLabIsUpdateSuccess(labIsUpdateSuccess); + dto.setLabIsMarkedAsReviewed(labIsMarkedAsReviewed); + dto.setResultedTest(resultedTest); + dto.setConditionCode(conditionCode); + dto.setProxyVO(proxyVO); + dto.setEdxSusLabDTMap(edxSusLabDTMap); + dto.setAddReasonCd(addReasonCd); + dto.setRootObservationContainer(rootObservationContainer); + dto.setMultipleSubjectMatch(multipleSubjectMatch); + dto.setMultipleOrderingProvider(multipleOrderingProvider); + dto.setMultipleCollector(multipleCollector); + dto.setMultiplePrincipalInterpreter(multiplePrincipalInterpreter); + dto.setMultipleOrderingFacility(multipleOrderingFacility); + dto.setMultipleSpecimen(multipleSpecimen); + dto.setEthnicityCodeTranslated(ethnicityCodeTranslated); + dto.setObsMethodTranslated(obsMethodTranslated); + dto.setRaceTranslated(raceTranslated); + dto.setSexTranslated(sexTranslated); + dto.setSsnInvalid(ssnInvalid); + dto.setNullClia(nullClia); + dto.setNextOfKin(nextOfKin); + dto.setProvider(isProvider); + dto.setFillerNumberPresent(fillerNumberPresent); + dto.setFinalPostCorrected(finalPostCorrected); + dto.setPreliminaryPostFinal(preliminaryPostFinal); + dto.setPreliminaryPostCorrected(preliminaryPostCorrected); + dto.setActivityTimeOutOfSequence(activityTimeOutOfSequence); + dto.setMultiplePerformingLab(multiplePerformingLab); + dto.setOrderTestNameMissing(orderTestNameMissing); + dto.setReflexOrderedTestCdMissing(reflexOrderedTestCdMissing); + dto.setReflexResultedTestCdMissing(reflexResultedTestCdMissing); + dto.setResultedTestNameMissing(resultedTestNameMissing); + dto.setDrugNameMissing(drugNameMissing); + dto.setObsStatusTranslated(obsStatusTranslated); + dto.setDangerCode(dangerCode); + dto.setRelationship(relationship); + dto.setRelationshipDesc(relationshipDesc); + dto.setActivityToTimeMissing(activityToTimeMissing); + dto.setSystemException(systemException); + dto.setUniversalServiceIdMissing(universalServiceIdMissing); + dto.setMissingOrderingProvider(missingOrderingProvider); + dto.setMissingOrderingFacility(missingOrderingFacility); + dto.setMultipleReceivingFacility(multipleReceivingFacility); + dto.setPersonParentUid(personParentUid); + dto.setPatientMatch(patientMatch); + dto.setMultipleOBR(multipleOBR); + dto.setMultipleSubject(multipleSubject); + dto.setNoSubject(noSubject); + dto.setOrderOBRWithParent(orderOBRWithParent); + dto.setChildOBRWithoutParent(childOBRWithoutParent); + dto.setInvalidXML(invalidXML); + dto.setMissingOrderingProviderandFacility(missingOrderingProviderandFacility); + dto.setCreateLabPermission(createLabPermission); + dto.setUpdateLabPermission(updateLabPermission); + dto.setMarkAsReviewPermission(markAsReviewPermission); + dto.setCreateInvestigationPermission(createInvestigationPermission); + dto.setCreateNotificationPermission(createNotificationPermission); + dto.setMatchingAlgorithm(matchingAlgorithm); + dto.setUnexpectedResultType(unexpectedResultType); + dto.setChildSuscWithoutParentResult(childSuscWithoutParentResult); + dto.setFieldTruncationError(fieldTruncationError); + dto.setInvalidDateError(invalidDateError); + dto.setAlgorithmAndOrLogic(algorithmAndOrLogic); + dto.setLabAssociatedToInv(labAssociatedToInv); + dto.setObservationMatch(observationMatch); + dto.setReasonforStudyCdMissing(reasonforStudyCdMissing); + dto.setMatchingPublicHealthCaseDtoColl(matchingPublicHealthCaseDtoColl); + dto.setInvestigationType(investigationType); + dto.setStatus(status); + dto.setWdsReports(wdsReports); + + assertEquals(addTime, dto.getAddTime()); + assertEquals(orderEffectiveDate, dto.getOrderEffectiveDate()); + assertEquals(role, dto.getRole()); + assertEquals(rootObservationUid, dto.getRootObserbationUid()); + assertEquals(orderingProviderVO, dto.getOrderingProviderVO()); + assertEquals(sendingFacilityClia, dto.getSendingFacilityClia()); + assertEquals(sendingFacilityName, dto.getSendingFacilityName()); + assertEquals(patientUid, dto.getPatientUid()); + assertEquals(userId, dto.getUserId()); + assertEquals(4, dto.getNextUid()); + assertEquals(fillerNumber, dto.getFillerNumber()); + assertEquals(messageControlID, dto.getMessageControlID()); + assertEquals(parentObservationUid, dto.getParentObservationUid()); + assertTrue(dto.isOrderingProvider()); + assertEquals(labResultProxyContainer, dto.getLabResultProxyContainer()); + assertEquals(localId, dto.getLocalId()); + assertTrue(dto.isParentObsInd()); + assertEquals(edxLabIdentiferDTColl, dto.getEdxLabIdentiferDTColl()); + assertEquals(entityName, dto.getEntityName()); + assertEquals(reportingSourceName, dto.getReportingSourceName()); + assertEquals(userName, dto.getUserName()); + assertEquals(universalIdType, dto.getUniversalIdType()); + assertEquals(associatedPublicHealthCaseUid, dto.getAssociatedPublicHealthCaseUid()); + assertEquals(publicHealthCaseUid, dto.getPublicHealthCaseUid()); + assertEquals(notificationUid, dto.getNotificationUid()); + assertEquals(originalAssociatedPHCUid, dto.getOriginalAssociatedPHCUid()); + assertEquals(nbsInterfaceUid, dto.getNbsInterfaceUid()); + assertEquals(specimenCollectionTime, dto.getSpecimenCollectionTime()); + assertEquals(jurisdictionName, dto.getJurisdictionName()); + assertEquals(programAreaName, dto.getProgramAreaName()); + assertTrue(dto.isJurisdictionAndProgramAreaSuccessfullyDerived()); + assertTrue(dto.isAlgorithmHasInvestigation()); + assertTrue(dto.isInvestigationSuccessfullyCreated()); + assertFalse(dto.isInvestigationMissingFields()); + assertTrue(dto.isAlgorithmHasNotification()); + assertTrue(dto.isNotificationSuccessfullyCreated()); + assertFalse(dto.isNotificationMissingFields()); + assertTrue(dto.isLabIsCreate()); + assertTrue(dto.isLabIsCreateSuccess()); + assertTrue(dto.isLabIsUpdateDRRQ()); + assertTrue(dto.isLabIsUpdateDRSA()); + assertTrue(dto.isLabIsUpdateSuccess()); + assertTrue(dto.isLabIsMarkedAsReviewed()); + assertEquals(resultedTest, dto.getResultedTest()); + assertEquals(conditionCode, dto.getConditionCode()); + assertEquals(proxyVO, dto.getProxyVO()); + assertEquals(edxSusLabDTMap, dto.getEdxSusLabDTMap()); + assertEquals(addReasonCd, dto.getAddReasonCd()); + assertEquals(rootObservationContainer, dto.getRootObservationContainer()); + assertTrue(dto.isMultipleSubjectMatch()); + assertTrue(dto.isMultipleOrderingProvider()); + assertTrue(dto.isMultipleCollector()); + assertTrue(dto.isMultiplePrincipalInterpreter()); + assertTrue(dto.isMultipleOrderingFacility()); + assertTrue(dto.isMultipleSpecimen()); + assertTrue(dto.isEthnicityCodeTranslated()); + assertTrue(dto.isObsMethodTranslated()); + assertTrue(dto.isRaceTranslated()); + assertTrue(dto.isSexTranslated()); + assertTrue(dto.isSsnInvalid()); + assertTrue(dto.isNullClia()); + assertTrue(dto.isNextOfKin()); + assertTrue(dto.isProvider()); + assertTrue(dto.isFillerNumberPresent()); + assertTrue(dto.isFinalPostCorrected()); + assertTrue(dto.isPreliminaryPostFinal()); + assertTrue(dto.isPreliminaryPostCorrected()); + assertTrue(dto.isActivityTimeOutOfSequence()); + assertTrue(dto.isMultiplePerformingLab()); + assertTrue(dto.isOrderTestNameMissing()); + assertTrue(dto.isReflexOrderedTestCdMissing()); + assertTrue(dto.isReflexResultedTestCdMissing()); + assertTrue(dto.isResultedTestNameMissing()); + assertTrue(dto.isDrugNameMissing()); + assertTrue(dto.isObsStatusTranslated()); + assertEquals(dangerCode, dto.getDangerCode()); + assertEquals(relationship, dto.getRelationship()); + assertEquals(relationshipDesc, dto.getRelationshipDesc()); + assertTrue(dto.isActivityToTimeMissing()); + assertTrue(dto.isSystemException()); + assertTrue(dto.isUniversalServiceIdMissing()); + assertTrue(dto.isMissingOrderingProvider()); + assertTrue(dto.isMissingOrderingFacility()); + assertTrue(dto.isMultipleReceivingFacility()); + assertEquals(personParentUid, dto.getPersonParentUid()); + assertTrue(dto.isPatientMatch()); + assertTrue(dto.isMultipleOBR()); + assertTrue(dto.isMultipleSubject()); + assertTrue(dto.isNoSubject()); + assertTrue(dto.isOrderOBRWithParent()); + assertTrue(dto.isChildOBRWithoutParent()); + assertTrue(dto.isInvalidXML()); + assertTrue(dto.isMissingOrderingProviderandFacility()); + assertTrue(dto.isCreateLabPermission()); + assertTrue(dto.isUpdateLabPermission()); + assertTrue(dto.isMarkAsReviewPermission()); + assertTrue(dto.isCreateInvestigationPermission()); + assertTrue(dto.isCreateNotificationPermission()); + assertTrue(dto.isMatchingAlgorithm()); + assertTrue(dto.isUnexpectedResultType()); + assertTrue(dto.isChildSuscWithoutParentResult()); + assertTrue(dto.isFieldTruncationError()); + assertTrue(dto.isInvalidDateError()); + assertEquals(algorithmAndOrLogic, dto.getAlgorithmAndOrLogic()); + assertTrue(dto.isLabAssociatedToInv()); + assertTrue(dto.isObservationMatch()); + assertTrue(dto.isReasonforStudyCdMissing()); + assertEquals(matchingPublicHealthCaseDtoColl, dto.getMatchingPublicHealthCaseDtoColl()); + assertEquals(investigationType, dto.getInvestigationType()); + assertEquals(status, dto.getStatus()); + assertEquals(wdsReports, dto.getWdsReports()); + } + + @Test + void testNextUid() { + EdxLabInformationDto dto = new EdxLabInformationDto(); + dto.setNextUid(10); + assertEquals(9, dto.getNextUid()); + assertEquals(8, dto.getNextUid()); + assertEquals(7, dto.getNextUid()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityDetailLogDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityDetailLogDtoTest.java new file mode 100644 index 000000000..d4cbf8a9b --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityDetailLogDtoTest.java @@ -0,0 +1,61 @@ +package gov.cdc.dataprocessing.model.dto.log; + + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class EDXActivityDetailLogDtoTest { + + @Test + void testGettersAndSetters() { + EDXActivityDetailLogDto dto = new EDXActivityDetailLogDto(); + + Long edxActivityDetailLogUid = 1L; + Long edxActivityLogUid = 2L; + String recordId = "recordId"; + String recordType = "recordType"; + String recordName = "recordName"; + String logType = "logType"; + String comment = "comment"; + String logTypeHtml = "logTypeHtml"; + String commentHtml = "commentHtml"; + Long lastChgUserId = 3L; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 4L; + Timestamp addTime = new Timestamp(System.currentTimeMillis() - 1000); + Integer publishVersionNbr = 5; + + dto.setEdxActivityDetailLogUid(edxActivityDetailLogUid); + dto.setEdxActivityLogUid(edxActivityLogUid); + dto.setRecordId(recordId); + dto.setRecordType(recordType); + dto.setRecordName(recordName); + dto.setLogType(logType); + dto.setComment(comment); + dto.setLogTypeHtml(logTypeHtml); + dto.setCommentHtml(commentHtml); + dto.setLastChgUserId(lastChgUserId); + dto.setLastChgTime(lastChgTime); + dto.setAddUserId(addUserId); + dto.setAddTime(addTime); + dto.setPublishVersionNbr(publishVersionNbr); + + assertEquals(edxActivityDetailLogUid, dto.getEdxActivityDetailLogUid()); + assertEquals(edxActivityLogUid, dto.getEdxActivityLogUid()); + assertEquals(recordId, dto.getRecordId()); + assertEquals(recordType, dto.getRecordType()); + assertEquals(recordName, dto.getRecordName()); + assertEquals(logType, dto.getLogType()); + assertEquals(comment, dto.getComment()); + assertEquals(logTypeHtml, dto.getLogTypeHtml()); + assertEquals(commentHtml, dto.getCommentHtml()); + assertEquals(lastChgUserId, dto.getLastChgUserId()); + assertEquals(lastChgTime, dto.getLastChgTime()); + assertEquals(addUserId, dto.getAddUserId()); + assertEquals(addTime, dto.getAddTime()); + assertEquals(publishVersionNbr, dto.getPublishVersionNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityLogDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityLogDtoTest.java new file mode 100644 index 000000000..83f9c4548 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/log/EDXActivityLogDtoTest.java @@ -0,0 +1,108 @@ +package gov.cdc.dataprocessing.model.dto.log; + + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class EDXActivityLogDtoTest { + + @Test + void testGettersAndSetters() { + EDXActivityLogDto dto = new EDXActivityLogDto(); + + Long edxActivityLogUid = 1L; + Long sourceUid = 2L; + Long targetUid = 3L; + String docType = "docType"; + String recordStatusCd = "recordStatusCd"; + String recordStatusCdHtml = "recordStatusCdHtml"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String exceptionTxt = "exceptionTxt"; + String impExpIndCd = "impExpIndCd"; + String impExpIndCdDesc = "impExpIndCdDesc"; + String sourceTypeCd = "sourceTypeCd"; + String targetTypeCd = "targetTypeCd"; + String businessObjLocalId = "businessObjLocalId"; + String docName = "docName"; + String srcName = "srcName"; + String viewLink = "viewLink"; + String exceptionShort = "exceptionShort"; + Collection EDXActivityLogDTWithVocabDetails = new ArrayList<>(); + Collection EDXActivityLogDTWithQuesDetails = new ArrayList<>(); + Collection EDXActivityLogDTDetails = new ArrayList<>(); + Map newaddedCodeSets = new HashMap<>(); + boolean logDetailAllStatus = true; + String algorithmAction = "algorithmAction"; + String actionId = "actionId"; + String messageId = "messageId"; + String entityNm = "entityNm"; + String accessionNbr = "accessionNbr"; + String algorithmName = "algorithmName"; + + dto.setEdxActivityLogUid(edxActivityLogUid); + dto.setSourceUid(sourceUid); + dto.setTargetUid(targetUid); + dto.setDocType(docType); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusCdHtml(recordStatusCdHtml); + dto.setRecordStatusTime(recordStatusTime); + dto.setExceptionTxt(exceptionTxt); + dto.setImpExpIndCd(impExpIndCd); + dto.setImpExpIndCdDesc(impExpIndCdDesc); + dto.setSourceTypeCd(sourceTypeCd); + dto.setTargetTypeCd(targetTypeCd); + dto.setBusinessObjLocalId(businessObjLocalId); + dto.setDocName(docName); + dto.setSrcName(srcName); + dto.setViewLink(viewLink); + dto.setExceptionShort(exceptionShort); + dto.setEDXActivityLogDTWithVocabDetails(EDXActivityLogDTWithVocabDetails); + dto.setEDXActivityLogDTWithQuesDetails(EDXActivityLogDTWithQuesDetails); + dto.setEDXActivityLogDTDetails(EDXActivityLogDTDetails); + dto.setNewaddedCodeSets(newaddedCodeSets); + dto.setLogDetailAllStatus(logDetailAllStatus); + dto.setAlgorithmAction(algorithmAction); + dto.setActionId(actionId); + dto.setMessageId(messageId); + dto.setEntityNm(entityNm); + dto.setAccessionNbr(accessionNbr); + dto.setAlgorithmName(algorithmName); + + assertEquals(edxActivityLogUid, dto.getEdxActivityLogUid()); + assertEquals(sourceUid, dto.getSourceUid()); + assertEquals(targetUid, dto.getTargetUid()); + assertEquals(docType, dto.getDocType()); + assertEquals(recordStatusCd, dto.getRecordStatusCd()); + assertEquals(recordStatusCdHtml, dto.getRecordStatusCdHtml()); + assertEquals(recordStatusTime, dto.getRecordStatusTime()); + assertEquals(exceptionTxt, dto.getExceptionTxt()); + assertEquals(impExpIndCd, dto.getImpExpIndCd()); + assertEquals(impExpIndCdDesc, dto.getImpExpIndCdDesc()); + assertEquals(sourceTypeCd, dto.getSourceTypeCd()); + assertEquals(targetTypeCd, dto.getTargetTypeCd()); + assertEquals(businessObjLocalId, dto.getBusinessObjLocalId()); + assertEquals(docName, dto.getDocName()); + assertEquals(srcName, dto.getSrcName()); + assertEquals(viewLink, dto.getViewLink()); + assertEquals(exceptionShort, dto.getExceptionShort()); + assertEquals(EDXActivityLogDTWithVocabDetails, dto.getEDXActivityLogDTWithVocabDetails()); + assertEquals(EDXActivityLogDTWithQuesDetails, dto.getEDXActivityLogDTWithQuesDetails()); + assertEquals(EDXActivityLogDTDetails, dto.getEDXActivityLogDTDetails()); + assertEquals(newaddedCodeSets, dto.getNewaddedCodeSets()); + assertTrue(dto.isLogDetailAllStatus()); + assertEquals(algorithmAction, dto.getAlgorithmAction()); + assertEquals(actionId, dto.getActionId()); + assertEquals(messageId, dto.getMessageId()); + assertEquals(entityNm, dto.getEntityNm()); + assertEquals(accessionNbr, dto.getAccessionNbr()); + assertEquals(algorithmName, dto.getAlgorithmName()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/log/MessageLogDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/log/MessageLogDtoTest.java new file mode 100644 index 000000000..2116f9042 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/log/MessageLogDtoTest.java @@ -0,0 +1,123 @@ +package gov.cdc.dataprocessing.model.dto.log; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.log.MessageLog; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class MessageLogDtoTest { + + @Test + void testGettersAndSetters() { + MessageLogDto dto = new MessageLogDto(); + + // Set values + dto.setMessageLogUid(1L); + dto.setMessageTxt("MessageTxt"); + dto.setConditionCd("ConditionCd"); + dto.setPersonUid(2L); + dto.setAssignedToUid(3L); + dto.setEventUid(4L); + dto.setEventTypeCd("EventTypeCd"); + dto.setMessageStatusCd("MessageStatusCd"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setUserId(5L); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(6L); + + // Assert values + assertEquals(1L, dto.getMessageLogUid()); + assertEquals("MessageTxt", dto.getMessageTxt()); + assertEquals("ConditionCd", dto.getConditionCd()); + assertEquals(2L, dto.getPersonUid()); + assertEquals(3L, dto.getAssignedToUid()); + assertEquals(4L, dto.getEventUid()); + assertEquals("EventTypeCd", dto.getEventTypeCd()); + assertEquals("MessageStatusCd", dto.getMessageStatusCd()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertNotNull(dto.getAddTime()); + assertEquals(5L, dto.getUserId()); + assertNotNull(dto.getLastChgTime()); + assertEquals(6L, dto.getLastChgUserId()); + } + + @Test + void testConstructor() { + MessageLog messageLog = new MessageLog(); + messageLog.setMessageLogUid(1L); + messageLog.setMessageTxt("MessageTxt"); + messageLog.setConditionCd("ConditionCd"); + messageLog.setPersonUid(2L); + messageLog.setAssignedToUid(3L); + messageLog.setEventUid(4L); + messageLog.setEventTypeCd("EventTypeCd"); + messageLog.setMessageStatusCd("MessageStatusCd"); + messageLog.setRecordStatusCd("RecordStatusCd"); + messageLog.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + messageLog.setAddTime(new Timestamp(System.currentTimeMillis())); + messageLog.setAddUserId(5L); + messageLog.setLastChgTime(new Timestamp(System.currentTimeMillis())); + messageLog.setLastChgUserId(6L); + + MessageLogDto dto = new MessageLogDto(messageLog); + + // Assert values + assertEquals(1L, dto.getMessageLogUid()); + assertEquals("MessageTxt", dto.getMessageTxt()); + assertEquals("ConditionCd", dto.getConditionCd()); + assertEquals(2L, dto.getPersonUid()); + assertEquals(3L, dto.getAssignedToUid()); + assertEquals(4L, dto.getEventUid()); + assertEquals("EventTypeCd", dto.getEventTypeCd()); + assertEquals("MessageStatusCd", dto.getMessageStatusCd()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertNotNull(dto.getAddTime()); + assertEquals(5L, dto.getUserId()); + assertNotNull(dto.getLastChgTime()); + assertEquals(6L, dto.getLastChgUserId()); + } + + @Test + void testSpecialConstructor() { + MessageLog messageLog = new MessageLog(); + messageLog.setMessageLogUid(1L); + messageLog.setMessageTxt("MessageTxt"); + messageLog.setConditionCd("ConditionCd"); + messageLog.setPersonUid(2L); + messageLog.setAssignedToUid(3L); + messageLog.setEventUid(4L); + messageLog.setEventTypeCd("EventTypeCd"); + messageLog.setMessageStatusCd("MessageStatusCd"); + messageLog.setRecordStatusCd("RecordStatusCd"); + messageLog.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + messageLog.setAddTime(new Timestamp(System.currentTimeMillis())); + messageLog.setAddUserId(5L); + messageLog.setLastChgTime(new Timestamp(System.currentTimeMillis())); + messageLog.setLastChgUserId(6L); + + MessageLogDto dto = new MessageLogDto(messageLog); + + // Assert values + assertEquals(messageLog.getMessageLogUid(), dto.getMessageLogUid()); + assertEquals(messageLog.getMessageTxt(), dto.getMessageTxt()); + assertEquals(messageLog.getConditionCd(), dto.getConditionCd()); + assertEquals(messageLog.getPersonUid(), dto.getPersonUid()); + assertEquals(messageLog.getAssignedToUid(), dto.getAssignedToUid()); + assertEquals(messageLog.getEventUid(), dto.getEventUid()); + assertEquals(messageLog.getEventTypeCd(), dto.getEventTypeCd()); + assertEquals(messageLog.getMessageStatusCd(), dto.getMessageStatusCd()); + assertEquals(messageLog.getRecordStatusCd(), dto.getRecordStatusCd()); + assertEquals(messageLog.getRecordStatusTime(), dto.getRecordStatusTime()); + assertEquals(messageLog.getAddTime(), dto.getAddTime()); + assertEquals(messageLog.getAddUserId(), dto.getUserId()); + assertEquals(messageLog.getLastChgTime(), dto.getLastChgTime()); + assertEquals(messageLog.getLastChgUserId(), dto.getLastChgUserId()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/log/NNDActivityLogDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/log/NNDActivityLogDtoTest.java new file mode 100644 index 000000000..56748db14 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/log/NNDActivityLogDtoTest.java @@ -0,0 +1,78 @@ +package gov.cdc.dataprocessing.model.dto.log; + + +import gov.cdc.dataprocessing.repository.nbs.odse.model.log.NNDActivityLog; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class NNDActivityLogDtoTest { + + @Test + void testGettersAndSetters() { + NNDActivityLogDto dto = new NNDActivityLogDto(); + + Long nndActivityLogUid = 1L; + Integer nndActivityLogSeq = 123; + String errorMessageTxt = "Sample error message"; + String localId = "Local ID"; + String recordStatusCd = "Record Status"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String statusCd = "Status Code"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String subjectNm = "Subject Name"; + String service = "Service Name"; + + dto.setNndActivityLogUid(nndActivityLogUid); + dto.setNndActivityLogSeq(nndActivityLogSeq); + dto.setErrorMessageTxt(errorMessageTxt); + dto.setLocalId(localId); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setStatusCd(statusCd); + dto.setStatusTime(statusTime); + dto.setSubjectNm(subjectNm); + dto.setService(service); + + assertEquals(nndActivityLogUid, dto.getNndActivityLogUid()); + assertEquals(nndActivityLogSeq, dto.getNndActivityLogSeq()); + assertEquals(errorMessageTxt, dto.getErrorMessageTxt()); + assertEquals(localId, dto.getLocalId()); + assertEquals(recordStatusCd, dto.getRecordStatusCd()); + assertEquals(recordStatusTime, dto.getRecordStatusTime()); + assertEquals(statusCd, dto.getStatusCd()); + assertEquals(statusTime, dto.getStatusTime()); + assertEquals(subjectNm, dto.getSubjectNm()); + assertEquals(service, dto.getService()); + } + + + @Test + void testSpecialConstructor() { + NNDActivityLog activityLog = new NNDActivityLog(); + activityLog.setNndActivityLogUid(1L); + activityLog.setNndActivityLogSeq(1); + activityLog.setErrorMessageTxt("ErrorMessageTxt"); + activityLog.setLocalId("LocalId"); + activityLog.setRecordStatusCd("RecordStatusCd"); + activityLog.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + activityLog.setStatusCd("StatusCd"); + activityLog.setStatusTime(new Timestamp(System.currentTimeMillis())); + activityLog.setService("Service"); + + NNDActivityLogDto dto = new NNDActivityLogDto(activityLog); + + // Assert values + assertEquals(activityLog.getNndActivityLogUid(), dto.getNndActivityLogUid()); + assertEquals(activityLog.getNndActivityLogSeq(), dto.getNndActivityLogSeq()); + assertEquals(activityLog.getErrorMessageTxt(), dto.getErrorMessageTxt()); + assertEquals(activityLog.getLocalId(), dto.getLocalId()); + assertEquals(activityLog.getRecordStatusCd(), dto.getRecordStatusCd()); + assertEquals(activityLog.getRecordStatusTime(), dto.getRecordStatusTime()); + assertEquals(activityLog.getStatusCd(), dto.getStatusCd()); + assertEquals(activityLog.getStatusTime(), dto.getStatusTime()); + assertEquals(activityLog.getService(), dto.getService()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/lookup/DropDownCodeDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/lookup/DropDownCodeDtoTest.java new file mode 100644 index 000000000..77bb47602 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/lookup/DropDownCodeDtoTest.java @@ -0,0 +1,76 @@ +package gov.cdc.dataprocessing.model.dto.lookup; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class DropDownCodeDtoTest { + + @Test + void testGettersAndSetters() { + DropDownCodeDto dto = new DropDownCodeDto(); + + // Set values + dto.setKey("Key"); + dto.setValue("Value"); + dto.setIntValue(1); + dto.setAltValue("AltValue"); + dto.setLongKey(1L); + dto.setStatusCd("StatusCd"); + dto.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + + // Assert values + assertEquals("Key", dto.getKey()); + assertEquals("Value", dto.getValue()); + assertEquals(1, dto.getIntValue()); + assertEquals("AltValue", dto.getAltValue()); + assertEquals(1L, dto.getLongKey()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getEffectiveToTime()); + } + + @Test + void testOverriddenMethods() { + DropDownCodeDto dto = new DropDownCodeDto(); + + dto.setSharedInd("TEST"); + dto.setProgramJurisdictionOid(100L); + dto.setAddTime(null); + dto.setStatusTime(null); + dto.setRecordStatusTime(null); + dto.setRecordStatusCd(null); + dto.setLastChgReasonCd(null); + dto.setAddUserId(null); + dto.setLocalId(null); + dto.setLastChgTime(null); + dto.setProgAreaCd(null); + dto.setJurisdictionCd(null); + dto.setLastChgUserId(null); + + // Test overridden methods that return null + assertNull(dto.getLastChgUserId()); + assertNull(dto.getJurisdictionCd()); + assertNull(dto.getProgAreaCd()); + assertNull(dto.getLastChgTime()); + assertNull(dto.getLocalId()); + assertNull(dto.getAddUserId()); + assertNull(dto.getLastChgReasonCd()); + assertNull(dto.getRecordStatusCd()); + assertNull(dto.getRecordStatusTime()); + assertNull(dto.getStatusTime()); + assertNull(dto.getSuperclass()); + assertNull(dto.getUid()); + assertNull(dto.getAddTime()); + assertNull(dto.getProgramJurisdictionOid()); + assertNull(dto.getSharedInd()); + assertNull(dto.getVersionCtrlNbr()); + + // Set and assert statusCd (special case) + dto.setStatusCd("StatusCd"); + assertEquals("StatusCd", dto.getStatusCd()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/lookup/LookupMappingDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/lookup/LookupMappingDtoTest.java new file mode 100644 index 000000000..c254754ef --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/lookup/LookupMappingDtoTest.java @@ -0,0 +1,52 @@ +package gov.cdc.dataprocessing.model.dto.lookup; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.lookup.LookupQuestionExtended; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class LookupMappingDtoTest { + + @Test + public void testGetterSetter() { + // Create an instance of LookupQuestionExtended to use in the constructor + LookupQuestionExtended data = new LookupQuestionExtended(); + data.setId(1L); + data.setFromQuestionIdentifier("fromQuestion"); + data.setFromCodeSystemCd("fromCodeSystem"); + data.setFromDataType("fromDataType"); + data.setFromFormCd("fromForm"); + data.setToFormCd("toForm"); + data.setToQuestionIdentifier("toQuestion"); + data.setToCodeSystemCd("toCodeSystem"); + data.setToDataType("toDataType"); + data.setLookupAnswerUid(2L); + data.setFromAnswerCode("fromAnswer"); + data.setFromAnsCodeSystemCd("fromAnsCodeSystem"); + data.setToAnswerCode("toAnswer"); + data.setToAnsCodeSystemCd("toAnsCodeSystem"); + + // Create an instance of LookupMappingDto using the constructor with LookupQuestionExtended parameter + LookupMappingDto dto = new LookupMappingDto(data); + + // Test getter methods + assertEquals(1L, dto.getLookupQuestionUid()); + assertEquals("fromQuestion", dto.getFromQuestionIdentifier()); + assertEquals("fromCodeSystem", dto.getFromCodeSystemCd()); + assertEquals("fromDataType", dto.getFromDataType()); + assertEquals("fromForm", dto.getFromFormCd()); + assertEquals("toForm", dto.getToFormCd()); + assertEquals("toQuestion", dto.getToQuestionIdentifier()); + assertEquals("toCodeSystem", dto.getToCodeSystemCd()); + assertEquals("toDataType", dto.getToDataType()); + assertEquals(2L, dto.getLookupAnswerUid()); + assertEquals("fromAnswer", dto.getFromAnswerCode()); + assertEquals("fromAnsCodeSystem", dto.getFromAnsCodeSystemCd()); + assertEquals("toAnswer", dto.getToAnswerCode()); + assertEquals("toAnsCodeSystem", dto.getToAnsCodeSystemCd()); + + // Test default values + assertNotNull(dto.getLookupAnswerUid()); // assuming the default value for Long is null if not set + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/lookup/PrePopMappingDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/lookup/PrePopMappingDtoTest.java new file mode 100644 index 000000000..ba72dd56d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/lookup/PrePopMappingDtoTest.java @@ -0,0 +1,92 @@ +package gov.cdc.dataprocessing.model.dto.lookup; + +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotSame; + +public class PrePopMappingDtoTest { + + @Test + public void testConstructor() { + // Create a LookupMappingDto instance with sample data + LookupMappingDto lookupMappingDto = new LookupMappingDto(); + lookupMappingDto.setLookupQuestionUid(1L); + lookupMappingDto.setLookupAnswerUid(2L); + lookupMappingDto.setFromQuestionIdentifier("fromQuestion"); + lookupMappingDto.setFromCodeSystemCd("fromCodeSystem"); + lookupMappingDto.setFromDataType("fromDataType"); + lookupMappingDto.setFromFormCd("fromForm"); + lookupMappingDto.setToFormCd("toForm"); + lookupMappingDto.setToQuestionIdentifier("toQuestion"); + lookupMappingDto.setToCodeSystemCd("toCodeSystem"); + lookupMappingDto.setToDataType("toDataType"); + lookupMappingDto.setFromAnswerCode("fromAnswer"); + lookupMappingDto.setFromAnsCodeSystemCd("fromAnsCodeSystem"); + lookupMappingDto.setToAnswerCode("toAnswer"); + lookupMappingDto.setToAnsCodeSystemCd("toAnsCodeSystem"); + + // Create a PrePopMappingDto instance using the constructor with LookupMappingDto parameter + PrePopMappingDto prePopMappingDto = new PrePopMappingDto(lookupMappingDto); + + // Verify that attributes are correctly initialized + assertEquals(1L, prePopMappingDto.getLookupQuestionUid()); + assertEquals(2L, prePopMappingDto.getLookupAnswerUid()); + assertEquals("fromQuestion", prePopMappingDto.getFromQuestionIdentifier()); + assertEquals("fromCodeSystem", prePopMappingDto.getFromCodeSystemCode()); + assertEquals("fromDataType", prePopMappingDto.getFromDataType()); + assertEquals("fromForm", prePopMappingDto.getFromFormCd()); + assertEquals("toForm", prePopMappingDto.getToFormCd()); + assertEquals("toQuestion", prePopMappingDto.getToQuestionIdentifier()); + assertEquals("toCodeSystem", prePopMappingDto.getToCodeSystemCd()); + assertEquals("toDataType", prePopMappingDto.getToDataType()); + assertEquals("fromAnswer", prePopMappingDto.getFromAnswerCode()); + assertEquals("fromAnsCodeSystem", prePopMappingDto.getFromAnsCodeSystemCd()); + assertEquals("toAnswer", prePopMappingDto.getToAnswerCode()); + assertEquals("toAnsCodeSystem", prePopMappingDto.getToAnsCodeSystemCd()); + } + + @Test + public void testDeepCopy() throws CloneNotSupportedException, IOException, ClassNotFoundException { + // Create a PrePopMappingDto instance with sample data + PrePopMappingDto original = new PrePopMappingDto(); + original.setLookupQuestionUid(1L); + original.setLookupAnswerUid(2L); + original.setFromQuestionIdentifier("fromQuestion"); + original.setFromCodeSystemCode("fromCodeSystem"); + original.setFromDataType("fromDataType"); + original.setFromFormCd("fromForm"); + original.setToFormCd("toForm"); + original.setToQuestionIdentifier("toQuestion"); + original.setToCodeSystemCd("toCodeSystem"); + original.setToDataType("toDataType"); + original.setFromAnswerCode("fromAnswer"); + original.setFromAnsCodeSystemCd("fromAnsCodeSystem"); + original.setToAnswerCode("toAnswer"); + original.setToAnsCodeSystemCd("toAnsCodeSystem"); + + // Perform deep copy + PrePopMappingDto deepCopy = (PrePopMappingDto) original.deepCopy(); + + // Verify that the deep copy is not the same object reference + assertNotSame(original, deepCopy); + + // Verify that the deep copy has the same attribute values as the original + assertEquals(original.getLookupQuestionUid(), deepCopy.getLookupQuestionUid()); + assertEquals(original.getLookupAnswerUid(), deepCopy.getLookupAnswerUid()); + assertEquals(original.getFromQuestionIdentifier(), deepCopy.getFromQuestionIdentifier()); + assertEquals(original.getFromCodeSystemCode(), deepCopy.getFromCodeSystemCode()); + assertEquals(original.getFromDataType(), deepCopy.getFromDataType()); + assertEquals(original.getFromFormCd(), deepCopy.getFromFormCd()); + assertEquals(original.getToFormCd(), deepCopy.getToFormCd()); + assertEquals(original.getToQuestionIdentifier(), deepCopy.getToQuestionIdentifier()); + assertEquals(original.getToCodeSystemCd(), deepCopy.getToCodeSystemCd()); + assertEquals(original.getToDataType(), deepCopy.getToDataType()); + assertEquals(original.getFromAnswerCode(), deepCopy.getFromAnswerCode()); + assertEquals(original.getFromAnsCodeSystemCd(), deepCopy.getFromAnsCodeSystemCd()); + assertEquals(original.getToAnswerCode(), deepCopy.getToAnswerCode()); + assertEquals(original.getToAnsCodeSystemCd(), deepCopy.getToAnsCodeSystemCd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/matching/EdxEntityMatchDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/matching/EdxEntityMatchDtoTest.java new file mode 100644 index 000000000..e028b1356 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/matching/EdxEntityMatchDtoTest.java @@ -0,0 +1,40 @@ +package gov.cdc.dataprocessing.model.dto.matching; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class EdxEntityMatchDtoTest { + + @Test + public void testGettersAndSetters() { + // Create an instance of EdxEntityMatchDto + EdxEntityMatchDto dto = new EdxEntityMatchDto(); + + // Set values using setters + dto.setEdxEntityMatchUid(1L); + dto.setEntityUid(2L); + dto.setMatchString("Test Match"); + dto.setTypeCd("Type A"); + dto.setMatchStringHashCode(12345L); + dto.setAddUserId(100L); + dto.setLastChgUserId(101L); + Timestamp addTime = Timestamp.valueOf("2023-01-01 12:00:00"); + dto.setAddTime(addTime); + Timestamp lastChgTime = Timestamp.valueOf("2023-01-02 12:00:00"); + dto.setLastChgTime(lastChgTime); + + // Assert values using getters + assertEquals(1L, dto.getEdxEntityMatchUid()); + assertEquals(2L, dto.getEntityUid()); + assertEquals("Test Match", dto.getMatchString()); + assertEquals("Type A", dto.getTypeCd()); + assertEquals(12345L, dto.getMatchStringHashCode()); + assertEquals(100L, dto.getAddUserId()); + assertEquals(101L, dto.getLastChgUserId()); + assertEquals(addTime, dto.getAddTime()); + assertEquals(lastChgTime, dto.getLastChgTime()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/matching/EdxPatientMatchDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/matching/EdxPatientMatchDtoTest.java new file mode 100644 index 000000000..ee4f79a78 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/matching/EdxPatientMatchDtoTest.java @@ -0,0 +1,43 @@ +package gov.cdc.dataprocessing.model.dto.matching; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class EdxPatientMatchDtoTest { + + @Test + public void testGettersAndSetters() { + // Create an instance of EdxPatientMatchDto + EdxPatientMatchDto dto = new EdxPatientMatchDto(); + + // Set values using setters + dto.setEdxPatientMatchUid(1L); + dto.setPatientUid(2L); + dto.setMatchString("Test Match"); + dto.setTypeCd("Type A"); + dto.setMatchStringHashCode(12345L); + dto.setAddUserId(100L); + dto.setLastChgUserId(101L); + Timestamp addTime = Timestamp.valueOf("2023-01-01 12:00:00"); + dto.setAddTime(addTime); + Timestamp lastChgTime = Timestamp.valueOf("2023-01-02 12:00:00"); + dto.setLastChgTime(lastChgTime); + dto.setMultipleMatch(true); + + // Assert values using getters + assertEquals(1L, dto.getEdxPatientMatchUid()); + assertEquals(2L, dto.getPatientUid()); + assertEquals("Test Match", dto.getMatchString()); + assertEquals("Type A", dto.getTypeCd()); + assertEquals(12345L, dto.getMatchStringHashCode()); + assertEquals(100L, dto.getAddUserId()); + assertEquals(101L, dto.getLastChgUserId()); + assertEquals(addTime, dto.getAddTime()); + assertEquals(lastChgTime, dto.getLastChgTime()); + assertTrue(dto.isMultipleMatch()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/material/MaterialDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/material/MaterialDtoTest.java new file mode 100644 index 000000000..a9c9045cc --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/material/MaterialDtoTest.java @@ -0,0 +1,18 @@ +package gov.cdc.dataprocessing.model.dto.material; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class MaterialDtoTest { + + @Test + void testGettersAndSetters() { + MaterialDto materialDto = new MaterialDto(); + + materialDto.setMaterialUid(1L); + + assertNotNull(materialDto.getUid()); + assertNotNull(materialDto.getSuperclass()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/msgoute/NbsInterfaceDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/msgoute/NbsInterfaceDtoTest.java new file mode 100644 index 000000000..0493f5359 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/msgoute/NbsInterfaceDtoTest.java @@ -0,0 +1,59 @@ +package gov.cdc.dataprocessing.model.dto.msgoute; + +import org.junit.jupiter.api.Test; + +import java.sql.Blob; +import java.sql.SQLException; +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class NbsInterfaceDtoTest { + + @Test + public void testGettersAndSetters() throws SQLException { + // Create an instance of NbsInterfaceDto + NbsInterfaceDto dto = new NbsInterfaceDto(); + + // Set values using setters + dto.setNbsInterfaceUid(1L); + Blob payload = new javax.sql.rowset.serial.SerialBlob(new byte[]{}); + dto.setPayload(payload); + dto.setImpExpIndCd("Import"); + dto.setRecordStatusCd("Active"); + Timestamp recordStatusTime = Timestamp.valueOf("2023-01-01 12:00:00"); + dto.setRecordStatusTime(recordStatusTime); + dto.setSendingSystemNm("System A"); + Timestamp addTime = Timestamp.valueOf("2023-01-02 12:00:00"); + dto.setAddTime(addTime); + dto.setReceivingSystemNm("System B"); + dto.setNotificationUid(2L); + dto.setNbsDocumentUid(3L); + dto.setXmlPayLoadContent("content"); + dto.setSystemNm("System C"); + dto.setDocTypeCd("Type A"); + dto.setCdaPayload("payload"); + dto.setObservationUid(4L); + dto.setOriginalPayload("Original Payload"); + dto.setOriginalDocTypeCd("Original Type"); + + // Assert values using getters + assertEquals(1L, dto.getNbsInterfaceUid()); + assertEquals(payload, dto.getPayload()); + assertEquals("Import", dto.getImpExpIndCd()); + assertEquals("Active", dto.getRecordStatusCd()); + assertEquals(recordStatusTime, dto.getRecordStatusTime()); + assertEquals("System A", dto.getSendingSystemNm()); + assertEquals(addTime, dto.getAddTime()); + assertEquals("System B", dto.getReceivingSystemNm()); + assertEquals(2L, dto.getNotificationUid()); + assertEquals(3L, dto.getNbsDocumentUid()); + assertEquals("content", dto.getXmlPayLoadContent()); + assertEquals("System C", dto.getSystemNm()); + assertEquals("Type A", dto.getDocTypeCd()); + assertEquals("payload", dto.getCdaPayload()); + assertEquals(4L, dto.getObservationUid()); + assertEquals("Original Payload", dto.getOriginalPayload()); + assertEquals("Original Type", dto.getOriginalDocTypeCd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NBSDocumentDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NBSDocumentDtoTest.java new file mode 100644 index 000000000..5e1da3a70 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NBSDocumentDtoTest.java @@ -0,0 +1,129 @@ +package gov.cdc.dataprocessing.model.dto.nbs; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; +import java.util.HashMap; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.*; + +class NBSDocumentDtoTest { + + @Test + void testGettersAndSetters() { + NBSDocumentDto dto = new NBSDocumentDto(); + + // Set values + dto.setNbsquestionuid(1L); + dto.setInvFormCode("InvFormCode"); + dto.setQuestionIdentifier("QuestionIdentifier"); + dto.setQuestionLabel("QuestionLabel"); + dto.setCodeSetName("CodeSetName"); + dto.setDataType("DataType"); + dto.setNbsDocumentUid(2L); + dto.setDocPayload("DocPayload"); + dto.setPhdcDocDerived("PhdcDocDerived"); + dto.setPayloadViewIndCd("PayloadViewIndCd"); + dto.setDocTypeCd("DocTypeCd"); + dto.setNbsDocumentMetadataUid(3L); + dto.setLocalId("LocalId"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(4L); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setProgAreaCd("ProgAreaCd"); + dto.setJurisdictionCd("JurisdictionCd"); + dto.setTxt("Txt"); + dto.setProgramJurisdictionOid(5L); + dto.setSharedInd("SharedInd"); + dto.setVersionCtrlNbr(1); + dto.setCd("Cd"); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(6L); + dto.setDocPurposeCd("DocPurposeCd"); + dto.setDocStatusCd("DocStatusCd"); + dto.setPayLoadTxt("PayLoadTxt"); + dto.setPhdcDocDerivedTxt("PhdcDocDerivedTxt"); + dto.setCdDescTxt("CdDescTxt"); + dto.setSendingFacilityNm("SendingFacilityNm"); + dto.setSendingFacilityOID("SendingFacilityOID"); + dto.setNbsInterfaceUid(7L); + dto.setSendingAppPatientId("SendingAppPatientId"); + dto.setSendingAppEventId("SendingAppEventId"); + dto.setSuperclass("Superclass"); + dto.setXmldocPayload("XmldocPayload"); + dto.setExternalVersionCtrlNbr(2); + Map eventIdMap = new HashMap<>(); + eventIdMap.put("key", "value"); + dto.setEventIdMap(eventIdMap); + dto.setDocumentObject(new Object()); + dto.setDocEventTypeCd("DocEventTypeCd"); + dto.setProcessingDecisionCd("ProcessingDecisionCd"); + dto.setProcessingDecisiontxt("ProcessingDecisiontxt"); + dto.setEffectiveTime(new Timestamp(System.currentTimeMillis())); + + // Assert values + assertEquals(1L, dto.getNbsquestionuid()); + assertEquals("InvFormCode", dto.getInvFormCode()); + assertEquals("QuestionIdentifier", dto.getQuestionIdentifier()); + assertEquals("QuestionLabel", dto.getQuestionLabel()); + assertEquals("CodeSetName", dto.getCodeSetName()); + assertEquals("DataType", dto.getDataType()); + assertEquals(2L, dto.getNbsDocumentUid()); + assertEquals("DocPayload", dto.getDocPayload()); + assertEquals("PhdcDocDerived", dto.getPhdcDocDerived()); + assertEquals("PayloadViewIndCd", dto.getPayloadViewIndCd()); + assertEquals("DocTypeCd", dto.getDocTypeCd()); + assertEquals(3L, dto.getNbsDocumentMetadataUid()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals(4L, dto.getAddUserId()); + assertNotNull(dto.getAddTime()); + assertEquals("ProgAreaCd", dto.getProgAreaCd()); + assertEquals("JurisdictionCd", dto.getJurisdictionCd()); + assertEquals("Txt", dto.getTxt()); + assertEquals(5L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + assertEquals(1, dto.getVersionCtrlNbr()); + assertEquals("Cd", dto.getCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(6L, dto.getLastChgUserId()); + assertEquals("DocPurposeCd", dto.getDocPurposeCd()); + assertEquals("DocStatusCd", dto.getDocStatusCd()); + assertEquals("PayLoadTxt", dto.getPayLoadTxt()); + assertEquals("PhdcDocDerivedTxt", dto.getPhdcDocDerivedTxt()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("SendingFacilityNm", dto.getSendingFacilityNm()); + assertEquals("SendingFacilityOID", dto.getSendingFacilityOID()); + assertEquals(7L, dto.getNbsInterfaceUid()); + assertEquals("SendingAppPatientId", dto.getSendingAppPatientId()); + assertEquals("SendingAppEventId", dto.getSendingAppEventId()); + assertEquals("Superclass", dto.getSuperclass()); + assertEquals("XmldocPayload", dto.getXmldocPayload()); + assertEquals(2, dto.getExternalVersionCtrlNbr()); + assertEquals(eventIdMap, dto.getEventIdMap()); + assertNotNull(dto.getDocumentObject()); + assertEquals("DocEventTypeCd", dto.getDocEventTypeCd()); + assertEquals("ProcessingDecisionCd", dto.getProcessingDecisionCd()); + assertEquals("ProcessingDecisiontxt", dto.getProcessingDecisiontxt()); + assertNotNull(dto.getEffectiveTime()); + } + + @Test + void testOverriddenMethods() { + NBSDocumentDto dto = new NBSDocumentDto(); + dto.setLastChgReasonCd("TEST"); + dto.setStatusTime(null); + // Test overridden methods that return null + assertNull(dto.getLastChgReasonCd()); + assertNull(dto.getStatusCd()); + assertNull(dto.getStatusTime()); + assertNull(dto.getUid()); + + // Test setting and getting statusCd + dto.setStatusCd("StatusCd"); + assertNull(dto.getStatusCd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NbsAnswerDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NbsAnswerDtoTest.java new file mode 100644 index 000000000..475650eef --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NbsAnswerDtoTest.java @@ -0,0 +1,19 @@ +package gov.cdc.dataprocessing.model.dto.nbs; + +import gov.cdc.dataprocessing.model.dto.material.MaterialDto; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + +public class NbsAnswerDtoTest { + + @Test + void testGettersAndSetters() { + NbsAnswerDto dto = new NbsAnswerDto(); + + dto.setAnswerLargeTxt(null); + + assertNull(dto.getAnswerLargeTxt()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NbsCaseAnswerDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NbsCaseAnswerDtoTest.java new file mode 100644 index 000000000..0355385dc --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NbsCaseAnswerDtoTest.java @@ -0,0 +1,65 @@ +package gov.cdc.dataprocessing.model.dto.nbs; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.nbs.NbsCaseAnswer; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +public class NbsCaseAnswerDtoTest { + + @Test + public void testEmptyConstructor() { + // Create an instance of NbsCaseAnswerDto using empty constructor + NbsCaseAnswerDto dto = new NbsCaseAnswerDto(); + + // Assert default values + assertNull(dto.getNbsCaseAnswerUid()); + assertNull(dto.getNbsTableMetadataUid()); + assertNull(dto.getCode()); + assertNull(dto.getValue()); + assertNull(dto.getType()); + assertNull(dto.getOtherType()); + assertFalse(dto.isUpdateNbsQuestionUid()); + } + + @Test + public void testParameterizedConstructor() { + // Prepare a NbsCaseAnswer object for testing + NbsCaseAnswer nbsCaseAnswer = new NbsCaseAnswer(); + nbsCaseAnswer.setActUid(1L); + nbsCaseAnswer.setAddTime(new Timestamp(System.currentTimeMillis())); + nbsCaseAnswer.setAddUserId(2L); + nbsCaseAnswer.setAnswerTxt("Answer"); + nbsCaseAnswer.setNbsQuestionUid(3L); + nbsCaseAnswer.setNbsQuestionVersionCtrlNbr(1); + nbsCaseAnswer.setLastChgTime(new Timestamp(System.currentTimeMillis())); + nbsCaseAnswer.setLastChgUserId(4L); + nbsCaseAnswer.setRecordStatusCd("Active"); + nbsCaseAnswer.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + nbsCaseAnswer.setSeqNbr(1); + nbsCaseAnswer.setNbsTableMetadataUid(5L); + nbsCaseAnswer.setNbsUiMetadataVerCtrlNbr(2); + nbsCaseAnswer.setAnswerGroupSeqNbr(1); + + // Create an instance of NbsCaseAnswerDto using parameterized constructor + NbsCaseAnswerDto dto = new NbsCaseAnswerDto(nbsCaseAnswer); + + // Assert values copied from nbsCaseAnswer + assertEquals(nbsCaseAnswer.getActUid(), dto.getActUid()); + assertEquals(nbsCaseAnswer.getAddTime(), dto.getAddTime()); + assertEquals(nbsCaseAnswer.getAddUserId(), dto.getAddUserId()); + assertEquals(nbsCaseAnswer.getAnswerTxt(), dto.getAnswerTxt()); + assertEquals(nbsCaseAnswer.getNbsQuestionUid(), dto.getNbsQuestionUid()); + assertEquals(2, dto.getNbsQuestionVersionCtrlNbr()); + assertEquals(nbsCaseAnswer.getLastChgTime(), dto.getLastChgTime()); + assertEquals(nbsCaseAnswer.getLastChgUserId(), dto.getLastChgUserId()); + assertEquals(nbsCaseAnswer.getRecordStatusCd(), dto.getRecordStatusCd()); + assertEquals(nbsCaseAnswer.getRecordStatusTime(), dto.getRecordStatusTime()); + assertEquals(nbsCaseAnswer.getSeqNbr(), dto.getSeqNbr()); + assertEquals(nbsCaseAnswer.getNbsTableMetadataUid(), dto.getNbsTableMetadataUid()); + assertEquals(nbsCaseAnswer.getNbsUiMetadataVerCtrlNbr(), dto.getNbsQuestionVersionCtrlNbr()); + assertEquals(nbsCaseAnswer.getAnswerGroupSeqNbr(), dto.getAnswerGroupSeqNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NbsNoteDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NbsNoteDtoTest.java new file mode 100644 index 000000000..0011d8dab --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NbsNoteDtoTest.java @@ -0,0 +1,78 @@ +package gov.cdc.dataprocessing.model.dto.nbs; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class NbsNoteDtoTest { + + @Test + void testGettersAndSetters() { + NbsNoteDto dto = new NbsNoteDto(); + + // Set values + dto.setNbsNoteUid(1L); + dto.setNoteParentUid(2L); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(3L); + dto.setRecordStatusCode("RecordStatusCode"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(4L); + dto.setNote("Note"); + dto.setPrivateIndCd("PrivateIndCd"); + dto.setTypeCd("TypeCd"); + dto.setLastChgUserNm("LastChgUserNm"); + dto.setJurisdictionCd("TEST"); + dto.setProgAreaCd("TEST"); + dto.setLocalId("TEST"); + dto.setLastChgReasonCd("TEST"); + dto.setStatusTime(null); + dto.setProgramJurisdictionOid(null); + dto.setSharedInd(null); + + // Assert values + assertEquals(1L, dto.getNbsNoteUid()); + assertEquals(2L, dto.getNoteParentUid()); + assertNotNull(dto.getAddTime()); + assertEquals(3L, dto.getAddUserId()); + assertEquals("RecordStatusCode", dto.getRecordStatusCode()); + assertNotNull(dto.getRecordStatusTime()); + assertNotNull(dto.getLastChgTime()); + assertEquals(4L, dto.getLastChgUserId()); + assertEquals("Note", dto.getNote()); + assertEquals("PrivateIndCd", dto.getPrivateIndCd()); + assertEquals("TypeCd", dto.getTypeCd()); + assertEquals("LastChgUserNm", dto.getLastChgUserNm()); + } + + @Test + void testOverriddenMethods() { + NbsNoteDto dto = new NbsNoteDto(); + + // Test overridden methods that return null + assertNull(dto.getLastChgUserId()); + assertNull(dto.getJurisdictionCd()); + assertNull(dto.getProgAreaCd()); + assertNull(dto.getLastChgTime()); + assertNull(dto.getLocalId()); + assertNull(dto.getAddUserId()); + assertNull(dto.getLastChgReasonCd()); + assertNull(dto.getRecordStatusCd()); + assertNull(dto.getRecordStatusTime()); + assertNull(dto.getStatusCd()); + assertNull(dto.getStatusTime()); + assertNull(dto.getSuperclass()); + assertNull(dto.getUid()); + assertNull(dto.getAddTime()); + assertNull(dto.getProgramJurisdictionOid()); + assertNull(dto.getSharedInd()); + assertNull(dto.getVersionCtrlNbr()); + + // Test setting and getting statusCd + dto.setStatusCd("StatusCd"); + assertNull(dto.getStatusCd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NbsQuestionMetadataTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NbsQuestionMetadataTest.java new file mode 100644 index 000000000..650b0f4fe --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/nbs/NbsQuestionMetadataTest.java @@ -0,0 +1,226 @@ +package gov.cdc.dataprocessing.model.dto.nbs; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.custom_model.QuestionRequiredNnd; +import gov.cdc.dataprocessing.service.model.lookup_data.MetaAndWaCommonAttribute; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class NbsQuestionMetadataTest { + + @Test + void testGettersAndSetters() { + NbsQuestionMetadata dto = new NbsQuestionMetadata(); + + // Set values + dto.setNbsQuestionUid(1L); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(2L); + dto.setCodeSetGroupId(3L); + dto.setDataType("DataType"); + dto.setInvestigationFormCd("InvestigationFormCd"); + dto.setTemplateType("TemplateType"); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(4L); + dto.setOrderNbr(5); + dto.setQuestionLabel("QuestionLabel"); + dto.setQuestionToolTip("QuestionToolTip"); + dto.setStatusCd("StatusCd"); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setTabId(6); + dto.setQuestionVersionNbr(7); + dto.setNndMetadataUid(8L); + dto.setQuestionIdentifier("QuestionIdentifier"); + dto.setQuestionIdentifierNnd("QuestionIdentifierNnd"); + dto.setQuestionRequiredNnd("QuestionRequiredNnd"); + dto.setQuestionOid("QuestionOid"); + dto.setQuestionOidSystemTxt("QuestionOidSystemTxt"); + dto.setCodeSetNm("CodeSetNm"); + dto.setCodeSetClassCd("CodeSetClassCd"); + dto.setDataLocation("DataLocation"); + dto.setDataCd("DataCd"); + dto.setDataUseCd("DataUseCd"); + dto.setEnableInd("EnableInd"); + dto.setDefaultValue("DefaultValue"); + dto.setRequiredInd("RequiredInd"); + dto.setParentUid(9L); + dto.setLdfPageId("LdfPageId"); + dto.setNbsUiMetadataUid(10L); + dto.setNbsUiComponentUid(11L); + dto.setNbsTableUid(12L); + dto.setFieldSize("FieldSize"); + dto.setFutureDateInd("FutureDateInd"); + dto.setDisplayInd("DisplayInd"); + dto.setJspSnippetCreateEdit("JspSnippetCreateEdit"); + dto.setJspSnippetView("JspSnippetView"); + dto.setUnitTypeCd("UnitTypeCd"); + dto.setUnitValue("UnitValue"); + dto.setStandardNndIndCd("StandardNndIndCd"); + dto.setHl7SegmentField("Hl7SegmentField"); + dto.setQuestionGroupSeqNbr(13); + dto.setPartTypeCd("PartTypeCd"); + dto.setQuestionUnitIdentifier("QuestionUnitIdentifier"); + dto.setMask("Mask"); + dto.setSubGroupNm("SubGroupNm"); + dto.setCoinfectionIndCd("CoinfectionIndCd"); + + // Assert values + assertEquals(1L, dto.getNbsQuestionUid()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertEquals(3L, dto.getCodeSetGroupId()); + assertEquals("DataType", dto.getDataType()); + assertEquals("InvestigationFormCd", dto.getInvestigationFormCd()); + assertEquals("TemplateType", dto.getTemplateType()); + assertNotNull(dto.getLastChgTime()); + assertEquals(4L, dto.getLastChgUserId()); + assertEquals(5, dto.getOrderNbr()); + assertEquals("QuestionLabel", dto.getQuestionLabel()); + assertEquals("QuestionToolTip", dto.getQuestionToolTip()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertEquals(6, dto.getTabId()); + assertEquals(7, dto.getQuestionVersionNbr()); + assertEquals(8L, dto.getNndMetadataUid()); + assertEquals("QuestionIdentifier", dto.getQuestionIdentifier()); + assertEquals("QuestionIdentifierNnd", dto.getQuestionIdentifierNnd()); + assertEquals("QuestionRequiredNnd", dto.getQuestionRequiredNnd()); + assertEquals("QuestionOid", dto.getQuestionOid()); + assertEquals("QuestionOidSystemTxt", dto.getQuestionOidSystemTxt()); + assertEquals("CodeSetNm", dto.getCodeSetNm()); + assertEquals("CodeSetClassCd", dto.getCodeSetClassCd()); + assertEquals("DataLocation", dto.getDataLocation()); + assertEquals("DataCd", dto.getDataCd()); + assertEquals("DataUseCd", dto.getDataUseCd()); + assertEquals("EnableInd", dto.getEnableInd()); + assertEquals("DefaultValue", dto.getDefaultValue()); + assertEquals("RequiredInd", dto.getRequiredInd()); + assertEquals(9L, dto.getParentUid()); + assertEquals("LdfPageId", dto.getLdfPageId()); + assertEquals(10L, dto.getNbsUiMetadataUid()); + assertEquals(11L, dto.getNbsUiComponentUid()); + assertEquals(12L, dto.getNbsTableUid()); + assertEquals("FieldSize", dto.getFieldSize()); + assertEquals("FutureDateInd", dto.getFutureDateInd()); + assertEquals("DisplayInd", dto.getDisplayInd()); + assertEquals("JspSnippetCreateEdit", dto.getJspSnippetCreateEdit()); + assertEquals("JspSnippetView", dto.getJspSnippetView()); + assertEquals("UnitTypeCd", dto.getUnitTypeCd()); + assertEquals("UnitValue", dto.getUnitValue()); + assertEquals("StandardNndIndCd", dto.getStandardNndIndCd()); + assertEquals("Hl7SegmentField", dto.getHl7SegmentField()); + assertEquals(13, dto.getQuestionGroupSeqNbr()); + assertEquals("PartTypeCd", dto.getPartTypeCd()); + assertEquals("QuestionUnitIdentifier", dto.getQuestionUnitIdentifier()); + assertEquals("Mask", dto.getMask()); + assertEquals("SubGroupNm", dto.getSubGroupNm()); + assertEquals("CoinfectionIndCd", dto.getCoinfectionIndCd()); + } + + @Test + void testSpecialConstructorMetaAndWaCommonAttribute() { + MetaAndWaCommonAttribute commonAttributes = new MetaAndWaCommonAttribute(); + commonAttributes.setDataLocation("DataLocation"); + commonAttributes.setQuestionUid(1L); + commonAttributes.setAddTime(new Timestamp(System.currentTimeMillis())); + commonAttributes.setAddUserId(2L); + commonAttributes.setCodeSetGroupId(3L); + commonAttributes.setDataType("DataType"); + commonAttributes.setInvestigationFormCd("InvestigationFormCd"); + commonAttributes.setLastChgTime(new Timestamp(System.currentTimeMillis())); + commonAttributes.setLastChgUserId(4L); + commonAttributes.setOrderNbr(5); + commonAttributes.setQuestionLabel("QuestionLabel"); + commonAttributes.setQuestionToolTip("QuestionToolTip"); + commonAttributes.setQuestionIdentifier("QuestionIdentifier"); + commonAttributes.setQuestionIdentifierNnd("QuestionIdentifierNnd"); + commonAttributes.setQuestionRequiredNnd("QuestionRequiredNnd"); + commonAttributes.setQuestionOid("QuestionOid"); + commonAttributes.setQuestionOidSystemTxt("QuestionOidSystemTxt"); + commonAttributes.setCodeSetNm("CodeSetNm"); + commonAttributes.setCodeSetClassCd("CodeSetClassCd"); + commonAttributes.setDataCd("DataCd"); + commonAttributes.setDataUseCd("DataUseCd"); + commonAttributes.setEnableInd("EnableInd"); + commonAttributes.setDefaultValue("DefaultValue"); + commonAttributes.setRequiredInd("RequiredInd"); + commonAttributes.setParentUid(6L); + commonAttributes.setLdfPageId("LdfPageId"); + commonAttributes.setNbsUiComponentUid(7L); + commonAttributes.setFieldSize("FieldSize"); + commonAttributes.setDisplayInd("DisplayInd"); + commonAttributes.setUnitTypeCd("UnitTypeCd"); + commonAttributes.setUnitValue("UnitValue"); + commonAttributes.setStandardNndIndCd("StandardNndIndCd"); + commonAttributes.setHl7SegmentField("Hl7SegmentField"); + commonAttributes.setQuestionGroupSeqNbr(8); + commonAttributes.setPartTypeCd("PartTypeCd"); + commonAttributes.setQuestionUnitIdentifier("QuestionUnitIdentifier"); + commonAttributes.setMask("Mask"); + commonAttributes.setSubGroupNm("SubGroupNm"); + commonAttributes.setCoinfectionIndCd("CoinfectionIndCd"); + + NbsQuestionMetadata dto = new NbsQuestionMetadata(commonAttributes); + + // Assert values + assertEquals(1L, dto.getNbsQuestionUid()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertEquals(3L, dto.getCodeSetGroupId()); + assertEquals("DataType", dto.getDataType()); + assertEquals("InvestigationFormCd", dto.getInvestigationFormCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(4L, dto.getLastChgUserId()); + assertEquals(5, dto.getOrderNbr()); + assertEquals("QuestionLabel", dto.getQuestionLabel()); + assertEquals("QuestionToolTip", dto.getQuestionToolTip()); + assertEquals("QuestionIdentifier", dto.getQuestionIdentifier()); + assertEquals("QuestionIdentifierNnd", dto.getQuestionIdentifierNnd()); + assertEquals("QuestionRequiredNnd", dto.getQuestionRequiredNnd()); + assertEquals("QuestionOid", dto.getQuestionOid()); + assertEquals("QuestionOidSystemTxt", dto.getQuestionOidSystemTxt()); + assertEquals("CodeSetNm", dto.getCodeSetNm()); + assertEquals("CodeSetClassCd", dto.getCodeSetClassCd()); + assertEquals("DataLocation", dto.getDataLocation()); + assertEquals("DataCd", dto.getDataCd()); + assertEquals("DataUseCd", dto.getDataUseCd()); + assertEquals("EnableInd", dto.getEnableInd()); + assertEquals("DefaultValue", dto.getDefaultValue()); + assertEquals("RequiredInd", dto.getRequiredInd()); + assertEquals(6L, dto.getParentUid()); + assertEquals("LdfPageId", dto.getLdfPageId()); + assertEquals(7L, dto.getNbsUiComponentUid()); + assertEquals("FieldSize", dto.getFieldSize()); + assertEquals("DisplayInd", dto.getDisplayInd()); + assertEquals("UnitTypeCd", dto.getUnitTypeCd()); + assertEquals("UnitValue", dto.getUnitValue()); + assertEquals("StandardNndIndCd", dto.getStandardNndIndCd()); + assertEquals("Hl7SegmentField", dto.getHl7SegmentField()); + assertEquals(8, dto.getQuestionGroupSeqNbr()); + assertEquals("PartTypeCd", dto.getPartTypeCd()); + assertEquals("QuestionUnitIdentifier", dto.getQuestionUnitIdentifier()); + assertEquals("Mask", dto.getMask()); + assertEquals("SubGroupNm", dto.getSubGroupNm()); + assertEquals("CoinfectionIndCd", dto.getCoinfectionIndCd()); + } + + @Test + void testSpecialConstructorQuestionRequiredNnd() { + QuestionRequiredNnd data = new QuestionRequiredNnd(); + data.setNbsQuestionUid(1L); + data.setQuestionIdentifier("QuestionIdentifier"); + data.setQuestionLabel("QuestionLabel"); + data.setDataLocation("DataLocation"); + + NbsQuestionMetadata dto = new NbsQuestionMetadata(data); + + // Assert values + assertEquals(1L, dto.getNbsQuestionUid()); + assertEquals("QuestionIdentifier", dto.getQuestionIdentifier()); + assertEquals("QuestionLabel", dto.getQuestionLabel()); + assertEquals("DataLocation", dto.getDataLocation()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/notification/NotificationDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/notification/NotificationDtoTest.java new file mode 100644 index 000000000..0e9e11e59 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/notification/NotificationDtoTest.java @@ -0,0 +1,25 @@ +package gov.cdc.dataprocessing.model.dto.notification; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class NotificationDtoTest { + @Test + void testGetAndSet() { + NotificationDto dto = new NotificationDto(); + dto.setNotificationUid(10L); + dto.setReceiving_system_nm("TEST"); + dto.setNndInd("TEST"); + dto.setLabReportEnableInd("TEST"); + dto.setVaccineEnableInd("TEST"); + assertNotNull(dto.getUid()); + assertNotNull(dto.getSuperclass()); + + assertNotNull(dto.getReceiving_system_nm()); + assertNotNull(dto.getNndInd()); + assertNotNull(dto.getLabReportEnableInd()); + assertNotNull(dto.getVaccineEnableInd()); + + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/notification/UpdatedNotificationDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/notification/UpdatedNotificationDtoTest.java new file mode 100644 index 000000000..855b853c7 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/notification/UpdatedNotificationDtoTest.java @@ -0,0 +1,37 @@ +package gov.cdc.dataprocessing.model.dto.notification; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class UpdatedNotificationDtoTest { + + @Test + void testGettersAndSetters() { + UpdatedNotificationDto dto = new UpdatedNotificationDto(); + + // Set values + dto.setNotificationUid(1L); + dto.setCaseStatusChg(true); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(2L); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(3L); + dto.setVersionCtrlNbr(1); + dto.setStatusCd("StatusCd"); + dto.setCaseClassCd("CaseClassCd"); + + // Assert values + assertEquals(1L, dto.getNotificationUid()); + assertTrue(dto.isCaseStatusChg()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals(1, dto.getVersionCtrlNbr()); + assertEquals("StatusCd", dto.getStatusCd()); + assertEquals("CaseClassCd", dto.getCaseClassCd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueCodedDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueCodedDtoTest.java new file mode 100644 index 000000000..9005ecb8f --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/observation/ObsValueCodedDtoTest.java @@ -0,0 +1,35 @@ +package gov.cdc.dataprocessing.model.dto.observation; + +import org.junit.jupiter.api.Test; + +import java.util.Collection; +import java.util.HashSet; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class ObsValueCodedDtoTest { + @Test + void testGetAndSet() { + ObsValueCodedDto entity = new ObsValueCodedDto(); + Collection obsValueCodedModDTCollection = new HashSet<>(); + obsValueCodedModDTCollection.add("testValue"); + + entity.setTheObsValueCodedModDTCollection(obsValueCodedModDTCollection); + entity.setSearchResultRT("RT result"); + entity.setCdSystemCdRT("RT system code"); + entity.setHiddenCd("hidden code"); + + assertEquals(obsValueCodedModDTCollection, entity.getTheObsValueCodedModDTCollection()); + assertEquals("RT result", entity.getSearchResultRT()); + assertEquals("RT system code", entity.getCdSystemCdRT()); + assertEquals("hidden code", entity.getHiddenCd()); + } + + @Test + void testGetAndSet2() { + ObsValueNumericDto entity = new ObsValueNumericDto(); + entity.setNumericValue("TEST"); + assertNotNull(entity.getNumericValue()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/observation/ObservationDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/observation/ObservationDtoTest.java new file mode 100644 index 000000000..70bca58b1 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/observation/ObservationDtoTest.java @@ -0,0 +1,39 @@ +package gov.cdc.dataprocessing.model.dto.observation; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class ObservationDtoTest { + @Test + void testGetAndSet() { + ObservationDto entity = new ObservationDto(); + + entity.setSearchResultOT("OT result"); + entity.setSearchResultRT("RT result"); + entity.setCdSystemCdOT("OT system code"); + entity.setCdSystemCdRT("RT system code"); + entity.setHiddenCd("hidden code"); + entity.setCodedResultCd("coded result"); + entity.setOrganismCd("organism code"); + entity.setSusceptabilityVal("susceptibility value"); + entity.setResultedMethodCd("resulted method"); + entity.setDrugNameCd("drug name"); + entity.setInterpretiveFlagCd("interpretive flag"); + + assertEquals("OT result", entity.getSearchResultOT()); + assertEquals("RT result", entity.getSearchResultRT()); + assertEquals("OT system code", entity.getCdSystemCdOT()); + assertEquals("RT system code", entity.getCdSystemCdRT()); + assertEquals("hidden code", entity.getHiddenCd()); + assertEquals("coded result", entity.getCodedResultCd()); + assertEquals("organism code", entity.getOrganismCd()); + assertEquals("susceptibility value", entity.getSusceptabilityVal()); + assertEquals("resulted method", entity.getResultedMethodCd()); + assertEquals("drug name", entity.getDrugNameCd()); + assertEquals("interpretive flag", entity.getInterpretiveFlagCd()); + + assertNotNull(entity.getSuperclass()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/organization/OrganizationNameDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/organization/OrganizationNameDtoTest.java new file mode 100644 index 000000000..a9be8cad6 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/organization/OrganizationNameDtoTest.java @@ -0,0 +1,98 @@ +package gov.cdc.dataprocessing.model.dto.organization; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.organization.OrganizationName; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class OrganizationNameDtoTest { + + @Test + void testGetAndSetOrg() { + OrganizationDto dto = new OrganizationDto(); + dto.setOrganizationUid(1L); + + assertNotNull(dto.getSuperclass()); + assertNotNull(dto.getUid()); + } + + @Test + void testGettersAndSetters() { + OrganizationNameDto dto = new OrganizationNameDto(); + + // Set values + dto.setOrganizationUid(1L); + dto.setOrganizationNameSeq(2); + dto.setNmTxt("NmTxt"); + dto.setNmUseCd("NmUseCd"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setDefaultNmInd("DefaultNmInd"); + dto.setProgAreaCd("ProgAreaCd"); + dto.setJurisdictionCd("JurisdictionCd"); + dto.setProgramJurisdictionOid(3L); + dto.setSharedInd("SharedInd"); + + // Assert values + assertEquals(1L, dto.getOrganizationUid()); + assertEquals(2, dto.getOrganizationNameSeq()); + assertEquals("NmTxt", dto.getNmTxt()); + assertEquals("NmUseCd", dto.getNmUseCd()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertEquals("DefaultNmInd", dto.getDefaultNmInd()); + assertEquals("ProgAreaCd", dto.getProgAreaCd()); + assertEquals("JurisdictionCd", dto.getJurisdictionCd()); + assertEquals(3L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + } + + @Test + void testSpecialConstructor() { + OrganizationName organizationName = new OrganizationName(); + organizationName.setOrganizationUid(1L); + organizationName.setOrganizationNameSeq(2); + organizationName.setNameText("NmTxt"); + organizationName.setNameUseCode("NmUseCd"); + organizationName.setRecordStatusCode("RecordStatusCd"); + organizationName.setDefaultNameIndicator("DefaultNmInd"); + + OrganizationNameDto dto = new OrganizationNameDto(organizationName); + + // Assert values + assertEquals(1L, dto.getOrganizationUid()); + assertEquals(2, dto.getOrganizationNameSeq()); + assertEquals("NmTxt", dto.getNmTxt()); + assertEquals("NmUseCd", dto.getNmUseCd()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertEquals("DefaultNmInd", dto.getDefaultNmInd()); + } + + @Test + void testOverriddenMethods() { + OrganizationNameDto dto = new OrganizationNameDto(); + + // Test overridden methods + assertNull(dto.getLastChgUserId()); // Note: This will fail since `organizationUid` is not set + dto.setLastChgUserId(2L); // No operation + assertNotNull(dto.getLastChgTime()); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); // No operation + assertEquals("Entity", dto.getLocalId()); + dto.setLocalId("Entity"); // No operation + assertNull(dto.getAddUserId()); // Note: This will fail since `organizationUid` is not set + dto.setAddUserId(2L); + assertEquals("Entity", dto.getLastChgReasonCd()); + dto.setLastChgReasonCd("Entity"); // No operation + assertNotNull(dto.getRecordStatusTime()); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); // No operation + assertEquals("Entity", dto.getStatusCd()); + dto.setStatusCd("Entity"); // No operation + assertNotNull(dto.getStatusTime()); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); // No operation + assertEquals("Entity", dto.getSuperclass()); + assertNull(dto.getUid()); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); // No operation + assertNull(dto.getAddTime()); + assertNull(dto.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/LocalFieldsDTTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/LocalFieldsDTTest.java new file mode 100644 index 000000000..4bea7c452 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/LocalFieldsDTTest.java @@ -0,0 +1,58 @@ +package gov.cdc.dataprocessing.model.dto.other; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class LocalFieldsDTTest { + + private LocalFieldsDT localFieldsDT; + + @BeforeEach + void setUp() { + localFieldsDT = new LocalFieldsDT(); + } + + @Test + void testSettersAndGetters() { + Long id = 12345L; + String questionLabel = "Question Label"; + String typeCdDesc = "Type Description"; + Integer orderNbr = 1; + Long questionUid = 67890L; + Long parentUid = 11112L; + String tab = "Tab1"; + String section = "Section1"; + String subSection = "SubSection1"; + String viewLink = "http://view.link"; + String editLink = "http://edit.link"; + String deleteLink = "http://delete.link"; + + localFieldsDT.setNbsUiMetadataUid(id); + localFieldsDT.setQuestionLabel(questionLabel); + localFieldsDT.setTypeCdDesc(typeCdDesc); + localFieldsDT.setOrderNbr(orderNbr); + localFieldsDT.setNbsQuestionUid(questionUid); + localFieldsDT.setParentUid(parentUid); + localFieldsDT.setTab(tab); + localFieldsDT.setSection(section); + localFieldsDT.setSubSection(subSection); + localFieldsDT.setViewLink(viewLink); + localFieldsDT.setEditLink(editLink); + localFieldsDT.setDeleteLink(deleteLink); + + assertEquals(id, localFieldsDT.getNbsUiMetadataUid()); + assertEquals(questionLabel, localFieldsDT.getQuestionLabel()); + assertEquals(typeCdDesc, localFieldsDT.getTypeCdDesc()); + assertEquals(orderNbr, localFieldsDT.getOrderNbr()); + assertEquals(questionUid, localFieldsDT.getNbsQuestionUid()); + assertEquals(parentUid, localFieldsDT.getParentUid()); + assertEquals(tab, localFieldsDT.getTab()); + assertEquals(section, localFieldsDT.getSection()); + assertEquals(subSection, localFieldsDT.getSubSection()); + assertEquals(viewLink, localFieldsDT.getViewLink()); + assertEquals(editLink, localFieldsDT.getEditLink()); + assertEquals(deleteLink, localFieldsDT.getDeleteLink()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NbsPageDTTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NbsPageDTTest.java new file mode 100644 index 000000000..770df0816 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NbsPageDTTest.java @@ -0,0 +1,60 @@ +package gov.cdc.dataprocessing.model.dto.other; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class NbsPageDTTest { + + private NbsPageDT nbsPageDT; + + @BeforeEach + void setUp() { + nbsPageDT = new NbsPageDT(); + } + + @Test + void testSettersAndGetters() { + Long nbsPageUid = 12345L; + Long waTemplateUid = 67890L; + String formCd = "Form Code"; + String descTxt = "Description Text"; + byte[] jspPayload = {1, 2, 3}; + String datamartNm = "Datamart Name"; + String localId = "Local ID"; + String busObjType = "Business Object Type"; + Long lastChgUserId = 11111L; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + String recordStatusCd = "Record Status Code"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + + nbsPageDT.setNbsPageUid(nbsPageUid); + nbsPageDT.setWaTemplateUid(waTemplateUid); + nbsPageDT.setFormCd(formCd); + nbsPageDT.setDescTxt(descTxt); + nbsPageDT.setJspPayload(jspPayload); + nbsPageDT.setDatamartNm(datamartNm); + nbsPageDT.setLocalId(localId); + nbsPageDT.setBusObjType(busObjType); + nbsPageDT.setLastChgUserId(lastChgUserId); + nbsPageDT.setLastChgTime(lastChgTime); + nbsPageDT.setRecordStatusCd(recordStatusCd); + nbsPageDT.setRecordStatusTime(recordStatusTime); + + assertEquals(nbsPageUid, nbsPageDT.getNbsPageUid()); + assertEquals(waTemplateUid, nbsPageDT.getWaTemplateUid()); + assertEquals(formCd, nbsPageDT.getFormCd()); + assertEquals(descTxt, nbsPageDT.getDescTxt()); + assertArrayEquals(jspPayload, nbsPageDT.getJspPayload()); + assertEquals(datamartNm, nbsPageDT.getDatamartNm()); + assertEquals(localId, nbsPageDT.getLocalId()); + assertEquals(busObjType, nbsPageDT.getBusObjType()); + assertEquals(lastChgUserId, nbsPageDT.getLastChgUserId()); + assertEquals(lastChgTime, nbsPageDT.getLastChgTime()); + assertEquals(recordStatusCd, nbsPageDT.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsPageDT.getRecordStatusTime()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NbsQuestionDTTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NbsQuestionDTTest.java new file mode 100644 index 000000000..4bb93f293 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NbsQuestionDTTest.java @@ -0,0 +1,88 @@ +package gov.cdc.dataprocessing.model.dto.other; + + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class NbsQuestionDTTest { + + private NbsQuestionDT nbsQuestionDT; + + @BeforeEach + void setUp() { + nbsQuestionDT = new NbsQuestionDT(); + } + + @Test + void testSettersAndGetters() { + Long nbsQuestionUid = 12345L; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 67890L; + Long codeSetGroupId = 11111L; + String dataCd = "Data Code"; + String dataLocation = "Data Location"; + String questionIdentifier = "Question Identifier"; + String questionOid = "Question OID"; + String questionOidSystemTxt = "Question OID System Text"; + String questionUnitIdentifier = "Question Unit Identifier"; + String dataType = "Data Type"; + String dataUseCd = "Data Use Code"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 22222L; + String questionLabel = "Question Label"; + String questionToolTip = "Question ToolTip"; + String datamartColumnNm = "Datamart Column Name"; + String partTypeCd = "Part Type Code"; + String defaultValue = "Default Value"; + Integer versionCtrlNbr = 1; + String unitParentIdentifier = "Unit Parent Identifier"; + + nbsQuestionDT.setNbsQuestionUid(nbsQuestionUid); + nbsQuestionDT.setAddTime(addTime); + nbsQuestionDT.setAddUserId(addUserId); + nbsQuestionDT.setCodeSetGroupId(codeSetGroupId); + nbsQuestionDT.setDataCd(dataCd); + nbsQuestionDT.setDataLocation(dataLocation); + nbsQuestionDT.setQuestionIdentifier(questionIdentifier); + nbsQuestionDT.setQuestionOid(questionOid); + nbsQuestionDT.setQuestionOidSystemTxt(questionOidSystemTxt); + nbsQuestionDT.setQuestionUnitIdentifier(questionUnitIdentifier); + nbsQuestionDT.setDataType(dataType); + nbsQuestionDT.setDataUseCd(dataUseCd); + nbsQuestionDT.setLastChgTime(lastChgTime); + nbsQuestionDT.setLastChgUserId(lastChgUserId); + nbsQuestionDT.setQuestionLabel(questionLabel); + nbsQuestionDT.setQuestionToolTip(questionToolTip); + nbsQuestionDT.setDatamartColumnNm(datamartColumnNm); + nbsQuestionDT.setPartTypeCd(partTypeCd); + nbsQuestionDT.setDefaultValue(defaultValue); + nbsQuestionDT.setVersionCtrlNbr(versionCtrlNbr); + nbsQuestionDT.setUnitParentIdentifier(unitParentIdentifier); + + assertEquals(nbsQuestionUid, nbsQuestionDT.getNbsQuestionUid()); + assertEquals(addTime, nbsQuestionDT.getAddTime()); + assertEquals(addUserId, nbsQuestionDT.getAddUserId()); + assertEquals(codeSetGroupId, nbsQuestionDT.getCodeSetGroupId()); + assertEquals(dataCd, nbsQuestionDT.getDataCd()); + assertEquals(dataLocation, nbsQuestionDT.getDataLocation()); + assertEquals(questionIdentifier, nbsQuestionDT.getQuestionIdentifier()); + assertEquals(questionOid, nbsQuestionDT.getQuestionOid()); + assertEquals(questionOidSystemTxt, nbsQuestionDT.getQuestionOidSystemTxt()); + assertEquals(questionUnitIdentifier, nbsQuestionDT.getQuestionUnitIdentifier()); + assertEquals(dataType, nbsQuestionDT.getDataType()); + assertEquals(dataUseCd, nbsQuestionDT.getDataUseCd()); + assertEquals(lastChgTime, nbsQuestionDT.getLastChgTime()); + assertEquals(lastChgUserId, nbsQuestionDT.getLastChgUserId()); + assertEquals(questionLabel, nbsQuestionDT.getQuestionLabel()); + assertEquals(questionToolTip, nbsQuestionDT.getQuestionToolTip()); + assertEquals(datamartColumnNm, nbsQuestionDT.getDatamartColumnNm()); + assertEquals(partTypeCd, nbsQuestionDT.getPartTypeCd()); + assertEquals(defaultValue, nbsQuestionDT.getDefaultValue()); + assertEquals(versionCtrlNbr, nbsQuestionDT.getVersionCtrlNbr()); + assertEquals(unitParentIdentifier, nbsQuestionDT.getUnitParentIdentifier()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NbsRdbMetadataDTTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NbsRdbMetadataDTTest.java new file mode 100644 index 000000000..31ef951c3 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NbsRdbMetadataDTTest.java @@ -0,0 +1,64 @@ +package gov.cdc.dataprocessing.model.dto.other; + + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class NbsRdbMetadataDTTest { + + private NbsRdbMetadataDT nbsRdbMetadataDT; + + @BeforeEach + void setUp() { + nbsRdbMetadataDT = new NbsRdbMetadataDT(); + } + + @Test + void testSettersAndGetters() { + Long nbsRdbMetadataUid = 12345L; + Long nbsPageUid = 67890L; + Long nbsUiMetadataUid = 11111L; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 22222L; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + String localId = "LocalId"; + String rptAdminColumnNm = "RptAdminColumnName"; + String rdbTableNm = "RdbTableName"; + String userDefinedColumnNm = "UserDefinedColumnName"; + String rdbColumnNm = "RdbColumnName"; + Integer dataMartRepeatNbr = 1; + + nbsRdbMetadataDT.setNbsRdbMetadataUid(nbsRdbMetadataUid); + nbsRdbMetadataDT.setNbsPageUid(nbsPageUid); + nbsRdbMetadataDT.setNbsUiMetadataUid(nbsUiMetadataUid); + nbsRdbMetadataDT.setRecordStatusCd(recordStatusCd); + nbsRdbMetadataDT.setRecordStatusTime(recordStatusTime); + nbsRdbMetadataDT.setLastChgUserId(lastChgUserId); + nbsRdbMetadataDT.setLastChgTime(lastChgTime); + nbsRdbMetadataDT.setLocalId(localId); + nbsRdbMetadataDT.setRptAdminColumnNm(rptAdminColumnNm); + nbsRdbMetadataDT.setRdbTableNm(rdbTableNm); + nbsRdbMetadataDT.setUserDefinedColumnNm(userDefinedColumnNm); + nbsRdbMetadataDT.setRdbColumnNm(rdbColumnNm); + nbsRdbMetadataDT.setDataMartRepeatNbr(dataMartRepeatNbr); + + assertEquals(nbsRdbMetadataUid, nbsRdbMetadataDT.getNbsRdbMetadataUid()); + assertEquals(nbsPageUid, nbsRdbMetadataDT.getNbsPageUid()); + assertEquals(nbsUiMetadataUid, nbsRdbMetadataDT.getNbsUiMetadataUid()); + assertEquals(recordStatusCd, nbsRdbMetadataDT.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsRdbMetadataDT.getRecordStatusTime()); + assertEquals(lastChgUserId, nbsRdbMetadataDT.getLastChgUserId()); + assertEquals(lastChgTime, nbsRdbMetadataDT.getLastChgTime()); + assertEquals(localId, nbsRdbMetadataDT.getLocalId()); + assertEquals(rptAdminColumnNm, nbsRdbMetadataDT.getRptAdminColumnNm()); + assertEquals(rdbTableNm, nbsRdbMetadataDT.getRdbTableNm()); + assertEquals(userDefinedColumnNm, nbsRdbMetadataDT.getUserDefinedColumnNm()); + assertEquals(rdbColumnNm, nbsRdbMetadataDT.getRdbColumnNm()); + assertEquals(dataMartRepeatNbr, nbsRdbMetadataDT.getDataMartRepeatNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NbsUiMetadataDTTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NbsUiMetadataDTTest.java new file mode 100644 index 000000000..d4a2ae6c6 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NbsUiMetadataDTTest.java @@ -0,0 +1,119 @@ +package gov.cdc.dataprocessing.model.dto.other; + + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class NbsUiMetadataDTTest { + + private NbsUiMetadataDT nbsUiMetadataDT; + + @BeforeEach + void setUp() { + nbsUiMetadataDT = new NbsUiMetadataDT(); + } + + @Test + void testSettersAndGetters() { + Long id = 12345L; + String label = "Question Label"; + String toolTip = "ToolTip"; + String formCd = "INV_FORM"; + String enableInd = "Y"; + String defaultValue = "Default"; + String displayInd = "Y"; + Integer orderNbr = 1; + String requiredInd = "Y"; + Integer tabOrderId = 1; + String tabName = "Tab1"; + Timestamp currentTime = new Timestamp(System.currentTimeMillis()); + + nbsUiMetadataDT.setNbsUiMetadataUid(id); + nbsUiMetadataDT.setNbsUiComponentUid(id); + nbsUiMetadataDT.setNbsQuestionUid(id); + nbsUiMetadataDT.setParentUid(id); + nbsUiMetadataDT.setNbsPageUid(id); + nbsUiMetadataDT.setQuestionLabel(label); + nbsUiMetadataDT.setQuestionToolTip(toolTip); + nbsUiMetadataDT.setInvestigationFormCd(formCd); + nbsUiMetadataDT.setEnableInd(enableInd); + nbsUiMetadataDT.setDefaultValue(defaultValue); + nbsUiMetadataDT.setDisplayInd(displayInd); + nbsUiMetadataDT.setOrderNbr(orderNbr); + nbsUiMetadataDT.setRequiredInd(requiredInd); + nbsUiMetadataDT.setTabName(tabName); + nbsUiMetadataDT.setAddTime(currentTime); + nbsUiMetadataDT.setAddUserId(id); + nbsUiMetadataDT.setLastChgTime(currentTime); + nbsUiMetadataDT.setLastChgUserId(id); + nbsUiMetadataDT.setRecordStatusCd("Active"); + nbsUiMetadataDT.setRecordStatusTime(currentTime); + nbsUiMetadataDT.setMaxLength(id); + nbsUiMetadataDT.setLdfPosition("Position"); + nbsUiMetadataDT.setCssStyle("Style"); + nbsUiMetadataDT.setLdfPageId("Page1"); + + assertEquals(id, nbsUiMetadataDT.getNbsUiMetadataUid()); + assertEquals(id, nbsUiMetadataDT.getNbsUiComponentUid()); + assertEquals(id, nbsUiMetadataDT.getNbsQuestionUid()); + assertEquals(id, nbsUiMetadataDT.getParentUid()); + assertEquals(id, nbsUiMetadataDT.getNbsPageUid()); + assertEquals(label, nbsUiMetadataDT.getQuestionLabel()); + assertEquals(toolTip, nbsUiMetadataDT.getQuestionToolTip()); + assertEquals(formCd, nbsUiMetadataDT.getInvestigationFormCd()); + assertEquals(enableInd, nbsUiMetadataDT.getEnableInd()); + assertEquals(defaultValue, nbsUiMetadataDT.getDefaultValue()); + assertEquals(displayInd, nbsUiMetadataDT.getDisplayInd()); + assertEquals(orderNbr, nbsUiMetadataDT.getOrderNbr()); + assertEquals(requiredInd, nbsUiMetadataDT.getRequiredInd()); + assertEquals(tabName, nbsUiMetadataDT.getTabName()); + assertEquals(currentTime, nbsUiMetadataDT.getAddTime()); + assertEquals(id, nbsUiMetadataDT.getAddUserId()); + assertEquals(currentTime, nbsUiMetadataDT.getLastChgTime()); + assertEquals(id, nbsUiMetadataDT.getLastChgUserId()); + assertEquals("Active", nbsUiMetadataDT.getRecordStatusCd()); + assertEquals(currentTime, nbsUiMetadataDT.getRecordStatusTime()); + assertEquals(id, nbsUiMetadataDT.getMaxLength()); + assertEquals("Position", nbsUiMetadataDT.getLdfPosition()); + assertEquals("Style", nbsUiMetadataDT.getCssStyle()); + assertEquals("Page1", nbsUiMetadataDT.getLdfPageId()); + } + + @Test + void testUnimplementedMethods() { + assertNull(nbsUiMetadataDT.getJurisdictionCd()); + assertNull(nbsUiMetadataDT.getLastChgReasonCd()); + assertNull(nbsUiMetadataDT.getLocalId()); + assertNull(nbsUiMetadataDT.getProgAreaCd()); + assertNull(nbsUiMetadataDT.getProgramJurisdictionOid()); + assertNull(nbsUiMetadataDT.getSharedInd()); + assertNull(nbsUiMetadataDT.getStatusCd()); + assertNull(nbsUiMetadataDT.getStatusTime()); + assertNull(nbsUiMetadataDT.getSuperclass()); + assertNull(nbsUiMetadataDT.getUid()); + assertNull(nbsUiMetadataDT.getVersionCtrlNbr()); + assertFalse(nbsUiMetadataDT.isItDelete()); + assertFalse(nbsUiMetadataDT.isItDirty()); + assertFalse(nbsUiMetadataDT.isItNew()); + + nbsUiMetadataDT.setItDelete(true); + nbsUiMetadataDT.setItDirty(true); + nbsUiMetadataDT.setItNew(true); + nbsUiMetadataDT.setJurisdictionCd("Jurisdiction"); + nbsUiMetadataDT.setLastChgReasonCd("Reason"); + nbsUiMetadataDT.setLocalId("LocalId"); + nbsUiMetadataDT.setProgAreaCd("ProgArea"); + nbsUiMetadataDT.setProgramJurisdictionOid(123L); + nbsUiMetadataDT.setSharedInd("Shared"); + nbsUiMetadataDT.setStatusCd("Status"); + nbsUiMetadataDT.setStatusTime(new Timestamp(System.currentTimeMillis())); + + assertFalse(nbsUiMetadataDT.isItDelete()); + assertFalse(nbsUiMetadataDT.isItDirty()); + assertFalse(nbsUiMetadataDT.isItNew()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NndMetadataDTTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NndMetadataDTTest.java new file mode 100644 index 000000000..511cf61c7 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/other/NndMetadataDTTest.java @@ -0,0 +1,123 @@ +package gov.cdc.dataprocessing.model.dto.other; + + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class NndMetadataDTTest { + + private NndMetadataDT nndMetadataDT; + + @BeforeEach + void setUp() { + nndMetadataDT = new NndMetadataDT(); + } + + @Test + void testSettersAndGetters() { + Long id = 12345L; + String formCd = "INV_FORM"; + String questionId = "Q123"; + String label = "Question Label"; + String required = "Yes"; + String dataType = "String"; + String segmentField = "SEG1"; + String orderGroupId = "ORD1"; + String translationTableNm = "Table1"; + Timestamp currentTime = new Timestamp(System.currentTimeMillis()); + + nndMetadataDT.setNndMetadataUid(id); + nndMetadataDT.setInvestigationFormCd(formCd); + nndMetadataDT.setQuestionIdentifierNnd(questionId); + nndMetadataDT.setQuestionLabelNnd(label); + nndMetadataDT.setQuestionRequiredNnd(required); + nndMetadataDT.setQuestionDataTypeNnd(dataType); + nndMetadataDT.setHL7SegmentField(segmentField); + nndMetadataDT.setOrderGroupId(orderGroupId); + nndMetadataDT.setTranslationTableNm(translationTableNm); + nndMetadataDT.setAddTime(currentTime); + nndMetadataDT.setAddUserId(id); + nndMetadataDT.setLastChgTime(currentTime); + nndMetadataDT.setLastChgUserId(id); + nndMetadataDT.setRecordStatusCd("Active"); + nndMetadataDT.setRecordStatusTime(currentTime); + nndMetadataDT.setQuestionIdentifier(questionId); + nndMetadataDT.setMsgTriggerIndCd("Trigger"); + nndMetadataDT.setXmlPath("Path"); + nndMetadataDT.setXmlTag("Tag"); + nndMetadataDT.setXmlDataType(dataType); + nndMetadataDT.setPartTypeCd("PartType"); + nndMetadataDT.setRepeatGroupSeqNbr(1); + nndMetadataDT.setQuestionOrderNnd(1); + nndMetadataDT.setNbsPageUid(id); + nndMetadataDT.setNbsUiMetadataUid(id); + nndMetadataDT.setQuestionMap("Map"); + nndMetadataDT.setIndicatorCd("Indicator"); + + assertEquals(id, nndMetadataDT.getNndMetadataUid()); + assertEquals(formCd, nndMetadataDT.getInvestigationFormCd()); + assertEquals(questionId, nndMetadataDT.getQuestionIdentifierNnd()); + assertEquals(label, nndMetadataDT.getQuestionLabelNnd()); + assertEquals(required, nndMetadataDT.getQuestionRequiredNnd()); + assertEquals(dataType, nndMetadataDT.getQuestionDataTypeNnd()); + assertEquals(segmentField, nndMetadataDT.getHL7SegmentField()); + assertEquals(orderGroupId, nndMetadataDT.getOrderGroupId()); + assertEquals(translationTableNm, nndMetadataDT.getTranslationTableNm()); + assertEquals(currentTime, nndMetadataDT.getAddTime()); + assertEquals(id, nndMetadataDT.getAddUserId()); + assertEquals(currentTime, nndMetadataDT.getLastChgTime()); + assertEquals(id, nndMetadataDT.getLastChgUserId()); + assertEquals("Active", nndMetadataDT.getRecordStatusCd()); + assertEquals(currentTime, nndMetadataDT.getRecordStatusTime()); + assertEquals(questionId, nndMetadataDT.getQuestionIdentifier()); + assertEquals("Trigger", nndMetadataDT.getMsgTriggerIndCd()); + assertEquals("Path", nndMetadataDT.getXmlPath()); + assertEquals("Tag", nndMetadataDT.getXmlTag()); + assertEquals(dataType, nndMetadataDT.getXmlDataType()); + assertEquals("PartType", nndMetadataDT.getPartTypeCd()); + assertEquals(1, nndMetadataDT.getRepeatGroupSeqNbr()); + assertEquals(1, nndMetadataDT.getQuestionOrderNnd()); + assertEquals(id, nndMetadataDT.getNbsPageUid()); + assertEquals(id, nndMetadataDT.getNbsUiMetadataUid()); + assertEquals("Map", nndMetadataDT.getQuestionMap()); + assertEquals("Indicator", nndMetadataDT.getIndicatorCd()); + } + + @Test + void testUnimplementedMethods() { + assertNull(nndMetadataDT.getJurisdictionCd()); + assertNull(nndMetadataDT.getLastChgReasonCd()); + assertNull(nndMetadataDT.getLocalId()); + assertNull(nndMetadataDT.getProgAreaCd()); + assertNull(nndMetadataDT.getProgramJurisdictionOid()); + assertNull(nndMetadataDT.getSharedInd()); + assertNull(nndMetadataDT.getStatusCd()); + assertNull(nndMetadataDT.getStatusTime()); + assertNull(nndMetadataDT.getSuperclass()); + assertNull(nndMetadataDT.getUid()); + assertNull(nndMetadataDT.getVersionCtrlNbr()); + assertFalse(nndMetadataDT.isItDelete()); + assertFalse(nndMetadataDT.isItDirty()); + assertFalse(nndMetadataDT.isItNew()); + + nndMetadataDT.setItDelete(true); + nndMetadataDT.setItDirty(true); + nndMetadataDT.setItNew(true); + nndMetadataDT.setJurisdictionCd("Jurisdiction"); + nndMetadataDT.setLastChgReasonCd("Reason"); + nndMetadataDT.setLocalId("LocalId"); + nndMetadataDT.setProgAreaCd("ProgArea"); + nndMetadataDT.setProgramJurisdictionOid(123L); + nndMetadataDT.setSharedInd("Shared"); + nndMetadataDT.setStatusCd("Status"); + nndMetadataDT.setStatusTime(new Timestamp(System.currentTimeMillis())); + + assertFalse(nndMetadataDT.isItDelete()); + assertFalse(nndMetadataDT.isItDirty()); + assertFalse(nndMetadataDT.isItNew()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/person/PersonRaceDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/person/PersonRaceDtoTest.java new file mode 100644 index 000000000..58e1df0b6 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/person/PersonRaceDtoTest.java @@ -0,0 +1,134 @@ +package gov.cdc.dataprocessing.model.dto.person; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.person.PersonRace; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class PersonRaceDtoTest { + + @Test + void testGettersAndSetters() { + PersonRaceDto dto = new PersonRaceDto(); + + // Set values + dto.setPersonUid(1L); + dto.setRaceCd("RaceCd"); + dto.setAddReasonCd("AddReasonCd"); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(2L); + dto.setAsOfDate(new Timestamp(System.currentTimeMillis())); + dto.setLastChgReasonCd("LastChgReasonCd"); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(3L); + dto.setRaceCategoryCd("RaceCategoryCd"); + dto.setRaceDescTxt("RaceDescTxt"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setUserAffiliationTxt("UserAffiliationTxt"); + dto.setProgAreaCd("ProgAreaCd"); + dto.setJurisdictionCd("JurisdictionCd"); + dto.setProgramJurisdictionOid(4L); + dto.setSharedInd("SharedInd"); + dto.setVersionCtrlNbr(5); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setStatusCd("StatusCd"); + dto.setLocalId("LocalId"); + + // Assert values + assertEquals(1L, dto.getPersonUid()); + assertEquals("RaceCd", dto.getRaceCd()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertNotNull(dto.getAsOfDate()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("RaceCategoryCd", dto.getRaceCategoryCd()); + assertEquals("RaceDescTxt", dto.getRaceDescTxt()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertEquals("ProgAreaCd", dto.getProgAreaCd()); + assertEquals("JurisdictionCd", dto.getJurisdictionCd()); + assertEquals(4L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + assertEquals(5, dto.getVersionCtrlNbr()); + assertNotNull(dto.getStatusTime()); + assertEquals("StatusCd", dto.getStatusCd()); + assertEquals("LocalId", dto.getLocalId()); + } + + @Test + void testSpecialConstructor() { + PersonRace personRace = new PersonRace(); + personRace.setPersonUid(1L); + personRace.setRaceCd("RaceCd"); + personRace.setAddReasonCd("AddReasonCd"); + personRace.setAddTime(new Timestamp(System.currentTimeMillis())); + personRace.setAddUserId(2L); + personRace.setLastChgReasonCd("LastChgReasonCd"); + personRace.setLastChgTime(new Timestamp(System.currentTimeMillis())); + personRace.setLastChgUserId(3L); + personRace.setRaceCategoryCd("RaceCategoryCd"); + personRace.setRaceDescTxt("RaceDescTxt"); + personRace.setRecordStatusCd("RecordStatusCd"); + personRace.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + personRace.setUserAffiliationTxt("UserAffiliationTxt"); + personRace.setAsOfDate(new Timestamp(System.currentTimeMillis())); + + PersonRaceDto dto = new PersonRaceDto(personRace); + + // Assert values + assertEquals(1L, dto.getPersonUid()); + assertEquals("RaceCd", dto.getRaceCd()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertNotNull(dto.getAsOfDate()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("RaceCategoryCd", dto.getRaceCategoryCd()); + assertEquals("RaceDescTxt", dto.getRaceDescTxt()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + } + + @Test + void testOverriddenMethods() { + PersonRaceDto dto = new PersonRaceDto(); + + // Test overridden methods + dto.setPersonUid(1L); + assertEquals(1L, dto.getUid()); + assertEquals("Entity", dto.getSuperclass()); + + // These methods do not perform any operation + dto.setLastChgUserId(2L); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLocalId("LocalId"); + dto.setAddUserId(2L); + dto.setLastChgReasonCd("ReasonCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setStatusCd("StatusCd"); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + + // Assert that no changes occurred due to no-operation methods + assertNotNull(dto.getLastChgUserId()); + assertNotNull(dto.getLastChgTime()); + assertNotNull(dto.getLocalId()); + assertNotNull(dto.getAddUserId()); + assertNotNull(dto.getLastChgReasonCd()); + assertNotNull(dto.getRecordStatusTime()); + assertNotNull(dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertNotNull(dto.getAddTime()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/CTContactSummaryDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/CTContactSummaryDtoTest.java new file mode 100644 index 000000000..d07d9fa7c --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/CTContactSummaryDtoTest.java @@ -0,0 +1,145 @@ +package gov.cdc.dataprocessing.model.dto.phc; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; +import java.util.HashMap; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.*; + +class CTContactSummaryDtoTest { + + @Test + void testGettersAndSetters() { + CTContactSummaryDto dto = new CTContactSummaryDto(); + + // Set values + dto.setCtContactUid(1L); + dto.setContactMprUid(2L); + dto.setSubjectMprUid(3L); + dto.setNamedOnDate(new Timestamp(System.currentTimeMillis())); + dto.setLocalId("LocalId"); + dto.setSubjectEntityUid(4L); + dto.setContactEntityUid(5L); + dto.setNamedBy("NamedBy"); + dto.setName("Name"); + dto.setContactNamedByPatient(true); + dto.setPatientNamedByContact(false); + dto.setOtherNamedByPatient(true); + dto.setPriorityCd("PriorityCd"); + dto.setDispositionCd("DispositionCd"); + dto.setPriority("Priority"); + dto.setDisposition("Disposition"); + dto.setInvDisposition("InvDisposition"); + dto.setInvDispositionCd("InvDispositionCd"); + dto.setSubjectEntityPhcUid(6L); + dto.setSubjectPhcLocalId("SubjectPhcLocalId"); + dto.setContactEntityPhcUid(7L); + dto.setContactPhcLocalId("ContactPhcLocalId"); + dto.setSubjectPhcCd("SubjectPhcCd"); + dto.setAgeReported("AgeReported"); + dto.setAgeReportedUnitCd("AgeReportedUnitCd"); + dto.setBirthTime(new Timestamp(System.currentTimeMillis())); + dto.setCurrSexCd("CurrSexCd"); + dto.setRelationshipCd("RelationshipCd"); + dto.setConditionCd("ConditionCd"); + dto.setAgeDOBSex("AgeDOBSex"); + dto.setDescription("Description"); + dto.setAssociatedWith("AssociatedWith"); + dto.setCreateDate(new Timestamp(System.currentTimeMillis())); + dto.setContactReferralBasisCd("ContactReferralBasisCd"); + dto.setNamedDuringInterviewUid(8L); + dto.setThirdPartyEntityPhcUid(9L); + dto.setThirdPartyEntityUid(10L); + dto.setContactProcessingDecisionCd("ContactProcessingDecisionCd"); + dto.setContactProcessingDecision("ContactProcessingDecision"); + dto.setSubjectName("SubjectName"); + dto.setContactName("ContactName"); + dto.setOtherInfectedPatientName("OtherInfectedPatientName"); + dto.setSourceDispositionCd("SourceDispositionCd"); + dto.setSourceCurrentSexCd("SourceCurrentSexCd"); + dto.setSourceInterviewStatusCd("SourceInterviewStatusCd"); + dto.setSourceConditionCd("SourceConditionCd"); + dto.setProgAreaCd("ProgAreaCd"); + dto.setInterviewDate(new Timestamp(System.currentTimeMillis())); + Map associatedMap = new HashMap<>(); + associatedMap.put("key", "value"); + dto.setAssociatedMap(associatedMap); + + // Assert values + assertEquals(1L, dto.getCtContactUid()); + assertEquals(2L, dto.getContactMprUid()); + assertEquals(3L, dto.getSubjectMprUid()); + assertNotNull(dto.getNamedOnDate()); + assertNull(dto.getLocalId()); + assertEquals(4L, dto.getSubjectEntityUid()); + assertEquals(5L, dto.getContactEntityUid()); + assertEquals("NamedBy", dto.getNamedBy()); + assertEquals("Name", dto.getName()); + assertTrue(dto.isContactNamedByPatient()); + assertFalse(dto.isPatientNamedByContact()); + assertTrue(dto.isOtherNamedByPatient()); + assertEquals("PriorityCd", dto.getPriorityCd()); + assertEquals("DispositionCd", dto.getDispositionCd()); + assertEquals("Priority", dto.getPriority()); + assertEquals("Disposition", dto.getDisposition()); + assertEquals("InvDisposition", dto.getInvDisposition()); + assertEquals("InvDispositionCd", dto.getInvDispositionCd()); + assertEquals(6L, dto.getSubjectEntityPhcUid()); + assertEquals("SubjectPhcLocalId", dto.getSubjectPhcLocalId()); + assertEquals(7L, dto.getContactEntityPhcUid()); + assertEquals("ContactPhcLocalId", dto.getContactPhcLocalId()); + assertEquals("SubjectPhcCd", dto.getSubjectPhcCd()); + assertEquals("AgeReported", dto.getAgeReported()); + assertEquals("AgeReportedUnitCd", dto.getAgeReportedUnitCd()); + assertNotNull(dto.getBirthTime()); + assertEquals("CurrSexCd", dto.getCurrSexCd()); + assertEquals("RelationshipCd", dto.getRelationshipCd()); + assertEquals("ConditionCd", dto.getConditionCd()); + assertEquals("AgeDOBSex", dto.getAgeDOBSex()); + assertEquals("Description", dto.getDescription()); + assertEquals("AssociatedWith", dto.getAssociatedWith()); + assertNotNull(dto.getCreateDate()); + assertEquals("ContactReferralBasisCd", dto.getContactReferralBasisCd()); + assertEquals(8L, dto.getNamedDuringInterviewUid()); + assertEquals(9L, dto.getThirdPartyEntityPhcUid()); + assertEquals(10L, dto.getThirdPartyEntityUid()); + assertEquals("ContactProcessingDecisionCd", dto.getContactProcessingDecisionCd()); + assertEquals("ContactProcessingDecision", dto.getContactProcessingDecision()); + assertEquals("SubjectName", dto.getSubjectName()); + assertEquals("ContactName", dto.getContactName()); + assertEquals("OtherInfectedPatientName", dto.getOtherInfectedPatientName()); + assertEquals("SourceDispositionCd", dto.getSourceDispositionCd()); + assertEquals("SourceCurrentSexCd", dto.getSourceCurrentSexCd()); + assertEquals("SourceInterviewStatusCd", dto.getSourceInterviewStatusCd()); + assertEquals("SourceConditionCd", dto.getSourceConditionCd()); + assertNull(dto.getProgAreaCd()); + assertNotNull(dto.getInterviewDate()); + assertEquals(associatedMap, dto.getAssociatedMap()); + } + + @Test + void testOverriddenMethods() { + CTContactSummaryDto dto = new CTContactSummaryDto(); + + // Test overridden methods that return null + assertNull(dto.getLastChgUserId()); + assertNull(dto.getJurisdictionCd()); + assertNull(dto.getProgAreaCd()); + assertNull(dto.getLastChgTime()); + assertNull(dto.getLocalId()); + assertNull(dto.getAddUserId()); + assertNull(dto.getLastChgReasonCd()); + assertNull(dto.getRecordStatusCd()); + assertNull(dto.getRecordStatusTime()); + assertNull(dto.getStatusCd()); + assertNull(dto.getStatusTime()); + assertNull(dto.getSuperclass()); + assertNull(dto.getUid()); + assertNull(dto.getAddTime()); + assertNull(dto.getProgramJurisdictionOid()); + assertNull(dto.getSharedInd()); + assertNull(dto.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/ClinicalDocumentDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/ClinicalDocumentDtoTest.java new file mode 100644 index 000000000..8c577fdff --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/ClinicalDocumentDtoTest.java @@ -0,0 +1,184 @@ +package gov.cdc.dataprocessing.model.dto.phc; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.phc.ClinicalDocument; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class ClinicalDocumentDtoTest { + + @Test + void testGettersAndSetters() { + ClinicalDocumentDto dto = new ClinicalDocumentDto(); + + // Set values + dto.setClinicalDocumentUid(1L); + dto.setActivityDurationAmt("ActivityDurationAmt"); + dto.setActivityDurationUnitCd("ActivityDurationUnitCd"); + dto.setActivityFromTime(new Timestamp(System.currentTimeMillis())); + dto.setActivityToTime(new Timestamp(System.currentTimeMillis())); + dto.setAddReasonCd("AddReasonCd"); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(2L); + dto.setCd("Cd"); + dto.setCdDescTxt("CdDescTxt"); + dto.setConfidentialityCd("ConfidentialityCd"); + dto.setConfidentialityDescTxt("ConfidentialityDescTxt"); + dto.setCopyFromTime(new Timestamp(System.currentTimeMillis())); + dto.setCopyToTime(new Timestamp(System.currentTimeMillis())); + dto.setEffectiveDurationAmt("EffectiveDurationAmt"); + dto.setEffectiveDurationUnitCd("EffectiveDurationUnitCd"); + dto.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + dto.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgReasonCd("LastChgReasonCd"); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(3L); + dto.setLocalId("LocalId"); + dto.setPracticeSettingCd("PracticeSettingCd"); + dto.setPracticeSettingDescTxt("PracticeSettingDescTxt"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setStatusCd("StatusCd"); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setTxt("Txt"); + dto.setUserAffiliationTxt("UserAffiliationTxt"); + dto.setVersionNbr(4); + dto.setProgramJurisdictionOid(5L); + dto.setSharedInd("SharedInd"); + dto.setVersionCtrlNbr(6); + dto.setProgAreaCd("ProgAreaCd"); + dto.setJurisdictionCd("JurisdictionCd"); + dto.setItDirty(false); + dto.setItNew(true); + dto.setItDelete(false); + + // Assert values + assertEquals(1L, dto.getClinicalDocumentUid()); + assertEquals("ActivityDurationAmt", dto.getActivityDurationAmt()); + assertEquals("ActivityDurationUnitCd", dto.getActivityDurationUnitCd()); + assertNotNull(dto.getActivityFromTime()); + assertNotNull(dto.getActivityToTime()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("ConfidentialityCd", dto.getConfidentialityCd()); + assertEquals("ConfidentialityDescTxt", dto.getConfidentialityDescTxt()); + assertNotNull(dto.getCopyFromTime()); + assertNotNull(dto.getCopyToTime()); + assertEquals("EffectiveDurationAmt", dto.getEffectiveDurationAmt()); + assertEquals("EffectiveDurationUnitCd", dto.getEffectiveDurationUnitCd()); + assertNotNull(dto.getEffectiveFromTime()); + assertNotNull(dto.getEffectiveToTime()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("PracticeSettingCd", dto.getPracticeSettingCd()); + assertEquals("PracticeSettingDescTxt", dto.getPracticeSettingDescTxt()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertEquals("Txt", dto.getTxt()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertEquals(4, dto.getVersionNbr()); + assertEquals(5L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + assertEquals(6, dto.getVersionCtrlNbr()); + assertEquals("ProgAreaCd", dto.getProgAreaCd()); + assertEquals("JurisdictionCd", dto.getJurisdictionCd()); + assertFalse(dto.isItDirty()); + assertTrue(dto.isItNew()); + assertFalse(dto.isItDelete()); + } + + @Test + void testSpecialConstructor() { + ClinicalDocument clinicalDocument = new ClinicalDocument(); + clinicalDocument.setClinicalDocumentUid(1L); + clinicalDocument.setActivityDurationAmt("ActivityDurationAmt"); + clinicalDocument.setActivityDurationUnitCd("ActivityDurationUnitCd"); + clinicalDocument.setActivityFromTime(new Timestamp(System.currentTimeMillis())); + clinicalDocument.setActivityToTime(new Timestamp(System.currentTimeMillis())); + clinicalDocument.setAddReasonCd("AddReasonCd"); + clinicalDocument.setAddTime(new Timestamp(System.currentTimeMillis())); + clinicalDocument.setAddUserId(2L); + clinicalDocument.setCd("Cd"); + clinicalDocument.setCdDescTxt("CdDescTxt"); + clinicalDocument.setConfidentialityCd("ConfidentialityCd"); + clinicalDocument.setConfidentialityDescTxt("ConfidentialityDescTxt"); + clinicalDocument.setCopyFromTime(new Timestamp(System.currentTimeMillis())); + clinicalDocument.setCopyToTime(new Timestamp(System.currentTimeMillis())); + clinicalDocument.setEffectiveDurationAmt("EffectiveDurationAmt"); + clinicalDocument.setEffectiveDurationUnitCd("EffectiveDurationUnitCd"); + clinicalDocument.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + clinicalDocument.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + clinicalDocument.setLastChgReasonCd("LastChgReasonCd"); + clinicalDocument.setLastChgTime(new Timestamp(System.currentTimeMillis())); + clinicalDocument.setLastChgUserId(3L); + clinicalDocument.setLocalId("LocalId"); + clinicalDocument.setPracticeSettingCd("PracticeSettingCd"); + clinicalDocument.setPracticeSettingDescTxt("PracticeSettingDescTxt"); + clinicalDocument.setRecordStatusCd("RecordStatusCd"); + clinicalDocument.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + clinicalDocument.setStatusCd("StatusCd"); + clinicalDocument.setStatusTime(new Timestamp(System.currentTimeMillis())); + clinicalDocument.setTxt("Txt"); + clinicalDocument.setUserAffiliationTxt("UserAffiliationTxt"); + clinicalDocument.setVersionNbr(4); + clinicalDocument.setProgramJurisdictionOid(5L); + clinicalDocument.setSharedInd("SharedInd"); + clinicalDocument.setVersionCtrlNbr(6); + + ClinicalDocumentDto dto = new ClinicalDocumentDto(clinicalDocument); + + // Assert values + assertEquals(1L, dto.getClinicalDocumentUid()); + assertEquals("ActivityDurationAmt", dto.getActivityDurationAmt()); + assertEquals("ActivityDurationUnitCd", dto.getActivityDurationUnitCd()); + assertNotNull(dto.getActivityFromTime()); + assertNotNull(dto.getActivityToTime()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("ConfidentialityCd", dto.getConfidentialityCd()); + assertEquals("ConfidentialityDescTxt", dto.getConfidentialityDescTxt()); + assertNotNull(dto.getCopyFromTime()); + assertNotNull(dto.getCopyToTime()); + assertEquals("EffectiveDurationAmt", dto.getEffectiveDurationAmt()); + assertEquals("EffectiveDurationUnitCd", dto.getEffectiveDurationUnitCd()); + assertNotNull(dto.getEffectiveFromTime()); + assertNotNull(dto.getEffectiveToTime()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("PracticeSettingCd", dto.getPracticeSettingCd()); + assertEquals("PracticeSettingDescTxt", dto.getPracticeSettingDescTxt()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertEquals("Txt", dto.getTxt()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertEquals(4, dto.getVersionNbr()); + assertEquals(5L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + assertEquals(6, dto.getVersionCtrlNbr()); + } + + @Test + void testOverriddenMethods() { + ClinicalDocumentDto dto = new ClinicalDocumentDto(); + + // Test overridden methods + assertNull(dto.getSuperclass()); + assertNull(dto.getUid()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/EntityGroupDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/EntityGroupDtoTest.java new file mode 100644 index 000000000..c041252d5 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/EntityGroupDtoTest.java @@ -0,0 +1,155 @@ +package gov.cdc.dataprocessing.model.dto.phc; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.phc.EntityGroup; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class EntityGroupDtoTest { + + @Test + void testGettersAndSetters() { + EntityGroupDto dto = new EntityGroupDto(); + + // Set values + dto.setEntityGroupUid(1L); + dto.setAddReasonCd("AddReasonCd"); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(2L); + dto.setCd("Cd"); + dto.setCdDescTxt("CdDescTxt"); + dto.setDescription("Description"); + dto.setDurationAmt("DurationAmt"); + dto.setDurationUnitCd("DurationUnitCd"); + dto.setFromTime(new Timestamp(System.currentTimeMillis())); + dto.setGroupCnt(3); + dto.setLastChgReasonCd("LastChgReasonCd"); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(4L); + dto.setLocalId("LocalId"); + dto.setNm("Nm"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setStatusCd("StatusCd"); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setToTime(new Timestamp(System.currentTimeMillis())); + dto.setUserAffiliationTxt("UserAffiliationTxt"); + dto.setVersionCtrlNbr(5); + dto.setProgAreaCd("ProgAreaCd"); + dto.setJurisdictionCd("JurisdictionCd"); + dto.setProgramJurisdictionOid(6L); + dto.setSharedInd("SharedInd"); + dto.setItDirty(false); + dto.setItNew(true); + dto.setItDelete(false); + + // Assert values + assertEquals(1L, dto.getEntityGroupUid()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertNull(dto.getAddUserId()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("Description", dto.getDescription()); + assertEquals("DurationAmt", dto.getDurationAmt()); + assertEquals("DurationUnitCd", dto.getDurationUnitCd()); + assertNotNull(dto.getFromTime()); + assertEquals(3, dto.getGroupCnt()); + assertNotNull(dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertNotNull(dto.getLastChgUserId()); + assertNotNull(dto.getLocalId()); + assertEquals("Nm", dto.getNm()); + assertNotNull(dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertNotNull(dto.getToTime()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertNotNull(dto.getVersionCtrlNbr()); + assertNotNull(dto.getProgAreaCd()); + assertNotNull(dto.getJurisdictionCd()); + assertNotNull(dto.getProgramJurisdictionOid()); + assertNotNull(dto.getSharedInd()); + assertFalse(dto.isItDirty()); + assertTrue(dto.isItNew()); + assertFalse(dto.isItDelete()); + } + + @Test + void testSpecialConstructor() { + EntityGroup entityGroup = new EntityGroup(); + entityGroup.setEntityGroupUid(1L); + entityGroup.setAddReasonCd("AddReasonCd"); + entityGroup.setAddTime(new Timestamp(System.currentTimeMillis())); + entityGroup.setAddUserId(2L); + entityGroup.setCd("Cd"); + entityGroup.setCdDescTxt("CdDescTxt"); + entityGroup.setDescription("Description"); + entityGroup.setDurationAmt("DurationAmt"); + entityGroup.setDurationUnitCd("DurationUnitCd"); + entityGroup.setFromTime(new Timestamp(System.currentTimeMillis())); + entityGroup.setGroupCnt(3); + entityGroup.setLastChgReasonCd("LastChgReasonCd"); + entityGroup.setLastChgTime(new Timestamp(System.currentTimeMillis())); + entityGroup.setLastChgUserId(4L); + entityGroup.setLocalId("LocalId"); + entityGroup.setNm("Nm"); + entityGroup.setRecordStatusCd("RecordStatusCd"); + entityGroup.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + entityGroup.setStatusCd("StatusCd"); + entityGroup.setStatusTime(new Timestamp(System.currentTimeMillis())); + entityGroup.setToTime(new Timestamp(System.currentTimeMillis())); + entityGroup.setUserAffiliationTxt("UserAffiliationTxt"); + entityGroup.setVersionCtrlNbr(5); + + EntityGroupDto dto = new EntityGroupDto(entityGroup); + + // Assert values + assertEquals(1L, dto.getEntityGroupUid()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertNotNull(dto.getAddUserId()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("Description", dto.getDescription()); + assertEquals("DurationAmt", dto.getDurationAmt()); + assertEquals("DurationUnitCd", dto.getDurationUnitCd()); + assertNotNull(dto.getFromTime()); + assertEquals(3, dto.getGroupCnt()); + assertNotNull(dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertNotNull(dto.getLastChgUserId()); + assertNotNull(dto.getLocalId()); + assertEquals("Nm", dto.getNm()); + assertNotNull(dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertNotNull(dto.getStatusCd()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertNotNull(dto.getVersionCtrlNbr()); + } + + @Test + void testOverriddenMethods() { + EntityGroupDto dto = new EntityGroupDto(); + + // Test overridden methods that return null + assertNull(dto.getLastChgUserId()); + assertNull(dto.getJurisdictionCd()); + assertNull(dto.getProgAreaCd()); + assertNull(dto.getLastChgTime()); + assertNull(dto.getLocalId()); + assertNull(dto.getAddUserId()); + assertNull(dto.getLastChgReasonCd()); + assertNull(dto.getRecordStatusCd()); + assertNull(dto.getRecordStatusTime()); + assertNull(dto.getStatusCd()); + assertNull(dto.getStatusTime()); + assertNull(dto.getSuperclass()); + assertNull(dto.getUid()); + assertNull(dto.getAddTime()); + assertNull(dto.getProgramJurisdictionOid()); + assertNull(dto.getSharedInd()); + assertNull(dto.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/ExportReceivingFacilityDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/ExportReceivingFacilityDtoTest.java new file mode 100644 index 000000000..13c021f0e --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/ExportReceivingFacilityDtoTest.java @@ -0,0 +1,66 @@ +package gov.cdc.dataprocessing.model.dto.phc; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class ExportReceivingFacilityDtoTest { + + @Test + void testGettersAndSetters() { + ExportReceivingFacilityDto dto = new ExportReceivingFacilityDto(); + + // Set values + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setReportType("ReportType"); + dto.setAddUserId(1L); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(2L); + dto.setExportReceivingFacilityUid(3L); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setReceivingSystemNm("ReceivingSystemNm"); + dto.setReceivingSystemOid("ReceivingSystemOid"); + dto.setReceivingSystemShortName("ReceivingSystemShortName"); + dto.setReceivingSystemOwner("ReceivingSystemOwner"); + dto.setReceivingSystemOwnerOid("ReceivingSystemOwnerOid"); + dto.setReceivingSystemDescTxt("ReceivingSystemDescTxt"); + dto.setSendingIndCd("SendingIndCd"); + dto.setReceivingIndCd("ReceivingIndCd"); + dto.setAllowTransferIndCd("AllowTransferIndCd"); + dto.setAdminComment("AdminComment"); + dto.setSendingIndDescTxt("SendingIndDescTxt"); + dto.setReceivingIndDescTxt("ReceivingIndDescTxt"); + dto.setAllowTransferIndDescTxt("AllowTransferIndDescTxt"); + dto.setReportTypeDescTxt("ReportTypeDescTxt"); + dto.setRecordStatusCdDescTxt("RecordStatusCdDescTxt"); + dto.setJurDeriveIndCd("JurDeriveIndCd"); + + // Assert values + assertNotNull(dto.getAddTime()); + assertEquals("ReportType", dto.getReportType()); + assertEquals(1L, dto.getAddUserId()); + assertNotNull(dto.getLastChgTime()); + assertEquals(2L, dto.getLastChgUserId()); + assertEquals(3L, dto.getExportReceivingFacilityUid()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertEquals("ReceivingSystemNm", dto.getReceivingSystemNm()); + assertEquals("ReceivingSystemOid", dto.getReceivingSystemOid()); + assertEquals("ReceivingSystemShortName", dto.getReceivingSystemShortName()); + assertEquals("ReceivingSystemOwner", dto.getReceivingSystemOwner()); + assertEquals("ReceivingSystemOwnerOid", dto.getReceivingSystemOwnerOid()); + assertEquals("ReceivingSystemDescTxt", dto.getReceivingSystemDescTxt()); + assertEquals("SendingIndCd", dto.getSendingIndCd()); + assertEquals("ReceivingIndCd", dto.getReceivingIndCd()); + assertEquals("AllowTransferIndCd", dto.getAllowTransferIndCd()); + assertEquals("AdminComment", dto.getAdminComment()); + assertEquals("SendingIndDescTxt", dto.getSendingIndDescTxt()); + assertEquals("ReceivingIndDescTxt", dto.getReceivingIndDescTxt()); + assertEquals("AllowTransferIndDescTxt", dto.getAllowTransferIndDescTxt()); + assertEquals("ReportTypeDescTxt", dto.getReportTypeDescTxt()); + assertEquals("RecordStatusCdDescTxt", dto.getRecordStatusCdDescTxt()); + assertEquals("JurDeriveIndCd", dto.getJurDeriveIndCd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/InterventionDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/InterventionDtoTest.java new file mode 100644 index 000000000..1428fa9f5 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/InterventionDtoTest.java @@ -0,0 +1,255 @@ +package gov.cdc.dataprocessing.model.dto.phc; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.intervention.Intervention; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class InterventionDtoTest { + + @Test + void testGettersAndSetters() { + InterventionDto dto = new InterventionDto(); + + // Set values + dto.setInterventionUid(1L); + dto.setActivityDurationAmt("ActivityDurationAmt"); + dto.setActivityDurationUnitCd("ActivityDurationUnitCd"); + dto.setActivityFromTime(new Timestamp(System.currentTimeMillis())); + dto.setActivityToTime(new Timestamp(System.currentTimeMillis())); + dto.setAddReasonCd("AddReasonCd"); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(2L); + dto.setCd("Cd"); + dto.setCdDescTxt("CdDescTxt"); + dto.setCdSystemCd("CdSystemCd"); + dto.setCdSystemDescTxt("CdSystemDescTxt"); + dto.setClassCd("ClassCd"); + dto.setConfidentialityCd("ConfidentialityCd"); + dto.setConfidentialityDescTxt("ConfidentialityDescTxt"); + dto.setEffectiveDurationAmt("EffectiveDurationAmt"); + dto.setEffectiveDurationUnitCd("EffectiveDurationUnitCd"); + dto.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + dto.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + dto.setJurisdictionCd("JurisdictionCd"); + dto.setLastChgReasonCd("LastChgReasonCd"); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(3L); + dto.setLocalId("LocalId"); + dto.setMethodCd("MethodCd"); + dto.setMethodDescTxt("MethodDescTxt"); + dto.setProgAreaCd("ProgAreaCd"); + dto.setPriorityCd("PriorityCd"); + dto.setPriorityDescTxt("PriorityDescTxt"); + dto.setQtyAmt("QtyAmt"); + dto.setQtyUnitCd("QtyUnitCd"); + dto.setReasonCd("ReasonCd"); + dto.setReasonDescTxt("ReasonDescTxt"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setRepeatNbr(4); + dto.setStatusCd("StatusCd"); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setTargetSiteCd("TargetSiteCd"); + dto.setTargetSiteDescTxt("TargetSiteDescTxt"); + dto.setTxt("Txt"); + dto.setUserAffiliationTxt("UserAffiliationTxt"); + dto.setProgramJurisdictionOid(5L); + dto.setSharedInd("SharedInd"); + dto.setVersionCtrlNbr(6); + dto.setMaterialCd("MaterialCd"); + dto.setAgeAtVacc(7); + dto.setAgeAtVaccUnitCd("AgeAtVaccUnitCd"); + dto.setVaccMfgrCd("VaccMfgrCd"); + dto.setMaterialLotNm("MaterialLotNm"); + dto.setMaterialExpirationTime(new Timestamp(System.currentTimeMillis())); + dto.setVaccDoseNbr(8); + dto.setVaccInfoSourceCd("VaccInfoSourceCd"); + dto.setElectronicInd("ElectronicInd"); + + // Assert values + assertEquals(1L, dto.getInterventionUid()); + assertEquals("ActivityDurationAmt", dto.getActivityDurationAmt()); + assertEquals("ActivityDurationUnitCd", dto.getActivityDurationUnitCd()); + assertNotNull(dto.getActivityFromTime()); + assertNotNull(dto.getActivityToTime()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("CdSystemCd", dto.getCdSystemCd()); + assertEquals("CdSystemDescTxt", dto.getCdSystemDescTxt()); + assertEquals("ClassCd", dto.getClassCd()); + assertEquals("ConfidentialityCd", dto.getConfidentialityCd()); + assertEquals("ConfidentialityDescTxt", dto.getConfidentialityDescTxt()); + assertEquals("EffectiveDurationAmt", dto.getEffectiveDurationAmt()); + assertEquals("EffectiveDurationUnitCd", dto.getEffectiveDurationUnitCd()); + assertNotNull(dto.getEffectiveFromTime()); + assertNotNull(dto.getEffectiveToTime()); + assertEquals("JurisdictionCd", dto.getJurisdictionCd()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("MethodCd", dto.getMethodCd()); + assertEquals("MethodDescTxt", dto.getMethodDescTxt()); + assertEquals("ProgAreaCd", dto.getProgAreaCd()); + assertEquals("PriorityCd", dto.getPriorityCd()); + assertEquals("PriorityDescTxt", dto.getPriorityDescTxt()); + assertEquals("QtyAmt", dto.getQtyAmt()); + assertEquals("QtyUnitCd", dto.getQtyUnitCd()); + assertEquals("ReasonCd", dto.getReasonCd()); + assertEquals("ReasonDescTxt", dto.getReasonDescTxt()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals(4, dto.getRepeatNbr()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertEquals("TargetSiteCd", dto.getTargetSiteCd()); + assertEquals("TargetSiteDescTxt", dto.getTargetSiteDescTxt()); + assertEquals("Txt", dto.getTxt()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertEquals(5L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + assertEquals(6, dto.getVersionCtrlNbr()); + assertEquals("MaterialCd", dto.getMaterialCd()); + assertEquals(7, dto.getAgeAtVacc()); + assertEquals("AgeAtVaccUnitCd", dto.getAgeAtVaccUnitCd()); + assertEquals("VaccMfgrCd", dto.getVaccMfgrCd()); + assertEquals("MaterialLotNm", dto.getMaterialLotNm()); + assertNotNull(dto.getMaterialExpirationTime()); + assertEquals(8, dto.getVaccDoseNbr()); + assertEquals("VaccInfoSourceCd", dto.getVaccInfoSourceCd()); + assertEquals("ElectronicInd", dto.getElectronicInd()); + } + + @Test + void testSpecialConstructor() { + Intervention domain = new Intervention(); + domain.setInterventionUid(1L); + domain.setActivityDurationAmt("ActivityDurationAmt"); + domain.setActivityDurationUnitCd("ActivityDurationUnitCd"); + domain.setActivityFromTime(new Timestamp(System.currentTimeMillis())); + domain.setActivityToTime(new Timestamp(System.currentTimeMillis())); + domain.setAddReasonCd("AddReasonCd"); + domain.setAddTime(new Timestamp(System.currentTimeMillis())); + domain.setAddUserId(2L); + domain.setCd("Cd"); + domain.setCdDescTxt("CdDescTxt"); + domain.setCdSystemCd("CdSystemCd"); + domain.setCdSystemDescTxt("CdSystemDescTxt"); + domain.setClassCd("ClassCd"); + domain.setConfidentialityCd("ConfidentialityCd"); + domain.setConfidentialityDescTxt("ConfidentialityDescTxt"); + domain.setEffectiveDurationAmt("EffectiveDurationAmt"); + domain.setEffectiveDurationUnitCd("EffectiveDurationUnitCd"); + domain.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + domain.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + domain.setJurisdictionCd("JurisdictionCd"); + domain.setLastChgReasonCd("LastChgReasonCd"); + domain.setLastChgTime(new Timestamp(System.currentTimeMillis())); + domain.setLastChgUserId(3L); + domain.setLocalId("LocalId"); + domain.setMethodCd("MethodCd"); + domain.setMethodDescTxt("MethodDescTxt"); + domain.setProgAreaCd("ProgAreaCd"); + domain.setPriorityCd("PriorityCd"); + domain.setPriorityDescTxt("PriorityDescTxt"); + domain.setQtyAmt("QtyAmt"); + domain.setQtyUnitCd("QtyUnitCd"); + domain.setReasonCd("ReasonCd"); + domain.setReasonDescTxt("ReasonDescTxt"); + domain.setRecordStatusCd("RecordStatusCd"); + domain.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + domain.setRepeatNbr(4); + domain.setStatusCd("StatusCd"); + domain.setStatusTime(new Timestamp(System.currentTimeMillis())); + domain.setTargetSiteCd("TargetSiteCd"); + domain.setTargetSiteDescTxt("TargetSiteDescTxt"); + domain.setTxt("Txt"); + domain.setUserAffiliationTxt("UserAffiliationTxt"); + domain.setProgramJurisdictionOid(5L); + domain.setSharedInd("SharedInd"); + domain.setVersionCtrlNbr(6); + domain.setMaterialCd("MaterialCd"); + domain.setAgeAtVacc(7); + domain.setAgeAtVaccUnitCd("AgeAtVaccUnitCd"); + domain.setVaccMfgrCd("VaccMfgrCd"); + domain.setMaterialLotNm("MaterialLotNm"); + domain.setMaterialExpirationTime(new Timestamp(System.currentTimeMillis())); + domain.setVaccDoseNbr(8); + domain.setVaccInfoSourceCd("VaccInfoSourceCd"); + domain.setElectronicInd("ElectronicInd"); + + InterventionDto dto = new InterventionDto(domain); + + // Assert values + assertEquals(1L, dto.getInterventionUid()); + assertEquals("ActivityDurationAmt", dto.getActivityDurationAmt()); + assertEquals("ActivityDurationUnitCd", dto.getActivityDurationUnitCd()); + assertNotNull(dto.getActivityFromTime()); + assertNotNull(dto.getActivityToTime()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("CdSystemCd", dto.getCdSystemCd()); + assertEquals("CdSystemDescTxt", dto.getCdSystemDescTxt()); + assertEquals("ClassCd", dto.getClassCd()); + assertEquals("ConfidentialityCd", dto.getConfidentialityCd()); + assertEquals("ConfidentialityDescTxt", dto.getConfidentialityDescTxt()); + assertEquals("EffectiveDurationAmt", dto.getEffectiveDurationAmt()); + assertEquals("EffectiveDurationUnitCd", dto.getEffectiveDurationUnitCd()); + assertNotNull(dto.getEffectiveFromTime()); + assertNotNull(dto.getEffectiveToTime()); + assertEquals("JurisdictionCd", dto.getJurisdictionCd()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("MethodCd", dto.getMethodCd()); + assertEquals("MethodDescTxt", dto.getMethodDescTxt()); + assertEquals("ProgAreaCd", dto.getProgAreaCd()); + assertEquals("PriorityCd", dto.getPriorityCd()); + assertEquals("PriorityDescTxt", dto.getPriorityDescTxt()); + assertEquals("QtyAmt", dto.getQtyAmt()); + assertEquals("QtyUnitCd", dto.getQtyUnitCd()); + assertEquals("ReasonCd", dto.getReasonCd()); + assertEquals("ReasonDescTxt", dto.getReasonDescTxt()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals(4, dto.getRepeatNbr()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertEquals("TargetSiteCd", dto.getTargetSiteCd()); + assertEquals("TargetSiteDescTxt", dto.getTargetSiteDescTxt()); + assertEquals("Txt", dto.getTxt()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertEquals(5L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + assertEquals(6, dto.getVersionCtrlNbr()); + assertEquals("MaterialCd", dto.getMaterialCd()); + assertEquals(7, dto.getAgeAtVacc()); + assertEquals("AgeAtVaccUnitCd", dto.getAgeAtVaccUnitCd()); + assertEquals("VaccMfgrCd", dto.getVaccMfgrCd()); + assertEquals("MaterialLotNm", dto.getMaterialLotNm()); + assertNotNull(dto.getMaterialExpirationTime()); + assertEquals(8, dto.getVaccDoseNbr()); + assertEquals("VaccInfoSourceCd", dto.getVaccInfoSourceCd()); + assertEquals("ElectronicInd", dto.getElectronicInd()); + } + + @Test + void testOverriddenMethods() { + InterventionDto dto = new InterventionDto(); + + // Test overridden methods + assertEquals("Act", dto.getSuperclass()); + assertEquals(dto.getInterventionUid(), dto.getUid()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/InterviewDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/InterviewDtoTest.java new file mode 100644 index 000000000..b3fc8de18 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/InterviewDtoTest.java @@ -0,0 +1,59 @@ +package gov.cdc.dataprocessing.model.dto.phc; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class InterviewDtoTest { + + @Test + void testGettersAndSetters() { + InterviewDto dto = new InterviewDto(); + + // Set values + dto.setInterviewUid(1L); + dto.setIntervieweeRoleCd("IntervieweeRoleCd"); + dto.setInterviewDate(new Timestamp(System.currentTimeMillis())); + dto.setInterviewTypeCd("InterviewTypeCd"); + dto.setInterviewStatusCd("InterviewStatusCd"); + dto.setInterviewLocCd("InterviewLocCd"); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(2L); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(3L); + dto.setLocalId("LocalId"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setVersionCtrlNbr(4); + dto.setAddUserName("AddUserName"); + dto.setLastChgUserName("LastChgUserName"); + dto.setAssociated(true); + + // Assert values + assertEquals(1L, dto.getInterviewUid()); + assertEquals("IntervieweeRoleCd", dto.getIntervieweeRoleCd()); + assertNotNull(dto.getInterviewDate()); + assertEquals("InterviewTypeCd", dto.getInterviewTypeCd()); + assertEquals("InterviewStatusCd", dto.getInterviewStatusCd()); + assertEquals("InterviewLocCd", dto.getInterviewLocCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals(4, dto.getVersionCtrlNbr()); + assertEquals("AddUserName", dto.getAddUserName()); + assertEquals("LastChgUserName", dto.getLastChgUserName()); + assertTrue(dto.isAssociated()); + } + + @Test + void testSuperclassMethod() { + InterviewDto dto = new InterviewDto(); + assertEquals("Act", dto.getSuperclass()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/NonPersonLivingSubjectDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/NonPersonLivingSubjectDtoTest.java new file mode 100644 index 000000000..a0266583d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/NonPersonLivingSubjectDtoTest.java @@ -0,0 +1,171 @@ +package gov.cdc.dataprocessing.model.dto.phc; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.phc.NonPersonLivingSubject; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class NonPersonLivingSubjectDtoTest { + + @Test + void testGettersAndSetters() { + NonPersonLivingSubjectDto dto = new NonPersonLivingSubjectDto(); + + // Set values + dto.setNonPersonUid(1L); + dto.setAddReasonCd("AddReasonCd"); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(2L); + dto.setBirthSexCd("BirthSexCd"); + dto.setBirthOrderNbr(3); + dto.setBirthTime(new Timestamp(System.currentTimeMillis())); + dto.setBreedCd("BreedCd"); + dto.setBreedDescTxt("BreedDescTxt"); + dto.setCd("Cd"); + dto.setCdDescTxt("CdDescTxt"); + dto.setDeceasedIndCd("DeceasedIndCd"); + dto.setDeceasedTime(new Timestamp(System.currentTimeMillis())); + dto.setDescription("Description"); + dto.setLastChgReasonCd("LastChgReasonCd"); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(4L); + dto.setLocalId("LocalId"); + dto.setMultipleBirthInd("MultipleBirthInd"); + dto.setNm("Nm"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setStatusCd("StatusCd"); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setTaxonomicClassificationCd("TaxonomicClassificationCd"); + dto.setTaxonomicClassificationDesc("TaxonomicClassificationDesc"); + dto.setUserAffiliationTxt("UserAffiliationTxt"); + dto.setVersionCtrlNbr(5); + dto.setProgAreaCd("ProgAreaCd"); + dto.setJurisdictionCd("JurisdictionCd"); + dto.setProgramJurisdictionOid(6L); + dto.setSharedInd("SharedInd"); + dto.setItDirty(false); + dto.setItNew(true); + dto.setItDelete(false); + + // Assert values + assertEquals(1L, dto.getNonPersonUid()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertNotNull(dto.getAddUserId()); + assertEquals("BirthSexCd", dto.getBirthSexCd()); + assertEquals(3, dto.getBirthOrderNbr()); + assertNotNull(dto.getBirthTime()); + assertEquals("BreedCd", dto.getBreedCd()); + assertEquals("BreedDescTxt", dto.getBreedDescTxt()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("DeceasedIndCd", dto.getDeceasedIndCd()); + assertNotNull(dto.getDeceasedTime()); + assertEquals("Description", dto.getDescription()); + assertNotNull(dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertNotNull(dto.getLastChgUserId()); + assertNotNull(dto.getLocalId()); + assertEquals("MultipleBirthInd", dto.getMultipleBirthInd()); + assertEquals("Nm", dto.getNm()); + assertNotNull(dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertNotNull(dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertEquals("TaxonomicClassificationCd", dto.getTaxonomicClassificationCd()); + assertEquals("TaxonomicClassificationDesc", dto.getTaxonomicClassificationDesc()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertNotNull(dto.getVersionCtrlNbr()); + assertNotNull(dto.getProgAreaCd()); + assertNotNull(dto.getJurisdictionCd()); + assertNotNull(dto.getProgramJurisdictionOid()); + assertNotNull(dto.getSharedInd()); + assertFalse(dto.isItDirty()); + assertTrue(dto.isItNew()); + assertFalse(dto.isItDelete()); + } + + @Test + void testSpecialConstructor() { + NonPersonLivingSubject entity = new NonPersonLivingSubject(); + entity.setNonPersonUid(1L); + entity.setAddReasonCd("AddReasonCd"); + entity.setAddTime(new Timestamp(System.currentTimeMillis())); + entity.setAddUserId(2L); + entity.setBirthSexCd("BirthSexCd"); + entity.setBirthOrderNbr(3); + entity.setBirthTime(new Timestamp(System.currentTimeMillis())); + entity.setBreedCd("BreedCd"); + entity.setBreedDescTxt("BreedDescTxt"); + entity.setCd("Cd"); + entity.setCdDescTxt("CdDescTxt"); + entity.setDeceasedIndCd("DeceasedIndCd"); + entity.setDeceasedTime(new Timestamp(System.currentTimeMillis())); + entity.setDescription("Description"); + entity.setLastChgReasonCd("LastChgReasonCd"); + entity.setLastChgTime(new Timestamp(System.currentTimeMillis())); + entity.setLastChgUserId(4L); + entity.setLocalId("LocalId"); + entity.setMultipleBirthInd("MultipleBirthInd"); + entity.setNm("Nm"); + entity.setRecordStatusCd("RecordStatusCd"); + entity.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + entity.setStatusCd("StatusCd"); + entity.setStatusTime(new Timestamp(System.currentTimeMillis())); + entity.setTaxonomicClassificationCd("TaxonomicClassificationCd"); + entity.setTaxonomicClassificationDesc("TaxonomicClassificationDesc"); + entity.setUserAffiliationTxt("UserAffiliationTxt"); + entity.setVersionCtrlNbr(5); + + NonPersonLivingSubjectDto dto = new NonPersonLivingSubjectDto(entity); + + // Assert values + assertEquals(1L, dto.getNonPersonUid()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertNotNull(dto.getAddUserId()); + assertEquals("BirthSexCd", dto.getBirthSexCd()); + assertEquals(3, dto.getBirthOrderNbr()); + assertNotNull(dto.getBirthTime()); + assertEquals("BreedCd", dto.getBreedCd()); + assertEquals("BreedDescTxt", dto.getBreedDescTxt()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("DeceasedIndCd", dto.getDeceasedIndCd()); + assertNotNull(dto.getDeceasedTime()); + assertEquals("Description", dto.getDescription()); + assertNotNull(dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertNotNull(dto.getLastChgUserId()); + assertEquals("MultipleBirthInd", dto.getMultipleBirthInd()); + assertEquals("Nm", dto.getNm()); + + } + + @Test + void testOverriddenMethods() { + NonPersonLivingSubjectDto dto = new NonPersonLivingSubjectDto(); + + // Test overridden methods that return null + assertNull(dto.getLastChgUserId()); + assertNull(dto.getJurisdictionCd()); + assertNull(dto.getProgAreaCd()); + assertNull(dto.getLastChgTime()); + assertNull(dto.getLocalId()); + assertNull(dto.getAddUserId()); + assertNull(dto.getLastChgReasonCd()); + assertNull(dto.getRecordStatusCd()); + assertNull(dto.getRecordStatusTime()); + assertNull(dto.getStatusCd()); + assertNull(dto.getStatusTime()); + assertNotNull(dto.getSuperclass()); + assertNull(dto.getUid()); + assertNull(dto.getAddTime()); + assertNull(dto.getProgramJurisdictionOid()); + assertNull(dto.getSharedInd()); + assertNull(dto.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/PatientEncounterDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/PatientEncounterDtoTest.java new file mode 100644 index 000000000..c3d009972 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/PatientEncounterDtoTest.java @@ -0,0 +1,220 @@ +package gov.cdc.dataprocessing.model.dto.phc; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.phc.PatientEncounter; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class PatientEncounterDtoTest { + + @Test + void testGettersAndSetters() { + PatientEncounterDto dto = new PatientEncounterDto(); + + // Set values + dto.setPatientEncounterUid(1L); + dto.setActivityDurationAmt("ActivityDurationAmt"); + dto.setActivityDurationUnitCd("ActivityDurationUnitCd"); + dto.setActivityFromTime(new Timestamp(System.currentTimeMillis())); + dto.setActivityToTime(new Timestamp(System.currentTimeMillis())); + dto.setAcuityLevelCd("AcuityLevelCd"); + dto.setAcuityLevelDescTxt("AcuityLevelDescTxt"); + dto.setAddReasonCd("AddReasonCd"); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(2L); + dto.setAdmissionSourceCd("AdmissionSourceCd"); + dto.setAdmissionSourceDescTxt("AdmissionSourceDescTxt"); + dto.setBirthEncounterInd("BirthEncounterInd"); + dto.setCd("Cd"); + dto.setCdDescTxt("CdDescTxt"); + dto.setConfidentialityCd("ConfidentialityCd"); + dto.setConfidentialityDescTxt("ConfidentialityDescTxt"); + dto.setEffectiveDurationAmt("EffectiveDurationAmt"); + dto.setEffectiveDurationUnitCd("EffectiveDurationUnitCd"); + dto.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + dto.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgReasonCd("LastChgReasonCd"); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(3L); + dto.setLocalId("LocalId"); + dto.setPriorityCd("PriorityCd"); + dto.setPriorityDescTxt("PriorityDescTxt"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setReferralSourceCd("ReferralSourceCd"); + dto.setReferralSourceDescTxt("ReferralSourceDescTxt"); + dto.setRepeatNbr(4); + dto.setStatusCd("StatusCd"); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setTxt("Txt"); + dto.setUserAffiliationTxt("UserAffiliationTxt"); + dto.setProgramJurisdictionOid(5L); + dto.setSharedInd("SharedInd"); + dto.setVersionCtrlNbr(6); + dto.setProgAreaCd("ProgAreaCd"); + dto.setJurisdictionCd("JurisdictionCd"); + dto.setItDirty(false); + dto.setItNew(true); + dto.setItDelete(false); + + // Assert values + assertEquals(1L, dto.getPatientEncounterUid()); + assertEquals("ActivityDurationAmt", dto.getActivityDurationAmt()); + assertEquals("ActivityDurationUnitCd", dto.getActivityDurationUnitCd()); + assertNotNull(dto.getActivityFromTime()); + assertNotNull(dto.getActivityToTime()); + assertEquals("AcuityLevelCd", dto.getAcuityLevelCd()); + assertEquals("AcuityLevelDescTxt", dto.getAcuityLevelDescTxt()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertEquals("AdmissionSourceCd", dto.getAdmissionSourceCd()); + assertEquals("AdmissionSourceDescTxt", dto.getAdmissionSourceDescTxt()); + assertEquals("BirthEncounterInd", dto.getBirthEncounterInd()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("ConfidentialityCd", dto.getConfidentialityCd()); + assertEquals("ConfidentialityDescTxt", dto.getConfidentialityDescTxt()); + assertEquals("EffectiveDurationAmt", dto.getEffectiveDurationAmt()); + assertEquals("EffectiveDurationUnitCd", dto.getEffectiveDurationUnitCd()); + assertNotNull(dto.getEffectiveFromTime()); + assertNotNull(dto.getEffectiveToTime()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("PriorityCd", dto.getPriorityCd()); + assertEquals("PriorityDescTxt", dto.getPriorityDescTxt()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals("ReferralSourceCd", dto.getReferralSourceCd()); + assertEquals("ReferralSourceDescTxt", dto.getReferralSourceDescTxt()); + assertEquals(4, dto.getRepeatNbr()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertEquals("Txt", dto.getTxt()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertEquals(5L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + assertEquals(6, dto.getVersionCtrlNbr()); + assertEquals("ProgAreaCd", dto.getProgAreaCd()); + assertEquals("JurisdictionCd", dto.getJurisdictionCd()); + assertFalse(dto.isItDirty()); + assertTrue(dto.isItNew()); + assertFalse(dto.isItDelete()); + } + + @Test + void testSpecialConstructor() { + PatientEncounter entity = new PatientEncounter(); + entity.setPatientEncounterUid(1L); + entity.setActivityDurationAmt("ActivityDurationAmt"); + entity.setActivityDurationUnitCd("ActivityDurationUnitCd"); + entity.setActivityFromTime(new Timestamp(System.currentTimeMillis())); + entity.setActivityToTime(new Timestamp(System.currentTimeMillis())); + entity.setAcuityLevelCd("AcuityLevelCd"); + entity.setAcuityLevelDescTxt("AcuityLevelDescTxt"); + entity.setAddReasonCd("AddReasonCd"); + entity.setAddTime(new Timestamp(System.currentTimeMillis())); + entity.setAddUserId(2L); + entity.setAdmissionSourceCd("AdmissionSourceCd"); + entity.setAdmissionSourceDescTxt("AdmissionSourceDescTxt"); + entity.setBirthEncounterInd("BirthEncounterInd"); + entity.setCd("Cd"); + entity.setCdDescTxt("CdDescTxt"); + entity.setConfidentialityCd("ConfidentialityCd"); + entity.setConfidentialityDescTxt("ConfidentialityDescTxt"); + entity.setEffectiveDurationAmt("EffectiveDurationAmt"); + entity.setEffectiveDurationUnitCd("EffectiveDurationUnitCd"); + entity.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + entity.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + entity.setLastChgReasonCd("LastChgReasonCd"); + entity.setLastChgTime(new Timestamp(System.currentTimeMillis())); + entity.setLastChgUserId(3L); + entity.setLocalId("LocalId"); + entity.setPriorityCd("PriorityCd"); + entity.setPriorityDescTxt("PriorityDescTxt"); + entity.setRecordStatusCd("RecordStatusCd"); + entity.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + entity.setReferralSourceCd("ReferralSourceCd"); + entity.setReferralSourceDescTxt("ReferralSourceDescTxt"); + entity.setRepeatNbr(4); + entity.setStatusCd("StatusCd"); + entity.setStatusTime(new Timestamp(System.currentTimeMillis())); + entity.setTxt("Txt"); + entity.setUserAffiliationTxt("UserAffiliationTxt"); + entity.setProgramJurisdictionOid(5L); + entity.setSharedInd("SharedInd"); + entity.setVersionCtrlNbr(6); + + PatientEncounterDto dto = new PatientEncounterDto(entity); + + // Assert values + assertEquals(1L, dto.getPatientEncounterUid()); + assertEquals("ActivityDurationAmt", dto.getActivityDurationAmt()); + assertEquals("ActivityDurationUnitCd", dto.getActivityDurationUnitCd()); + assertNotNull(dto.getActivityFromTime()); + assertNotNull(dto.getActivityToTime()); + assertEquals("AcuityLevelCd", dto.getAcuityLevelCd()); + assertEquals("AcuityLevelDescTxt", dto.getAcuityLevelDescTxt()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertEquals("AdmissionSourceCd", dto.getAdmissionSourceCd()); + assertEquals("AdmissionSourceDescTxt", dto.getAdmissionSourceDescTxt()); + assertEquals("BirthEncounterInd", dto.getBirthEncounterInd()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("ConfidentialityCd", dto.getConfidentialityCd()); + assertEquals("ConfidentialityDescTxt", dto.getConfidentialityDescTxt()); + assertEquals("EffectiveDurationAmt", dto.getEffectiveDurationAmt()); + assertEquals("EffectiveDurationUnitCd", dto.getEffectiveDurationUnitCd()); + assertNotNull(dto.getEffectiveFromTime()); + assertNotNull(dto.getEffectiveToTime()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("PriorityCd", dto.getPriorityCd()); + assertEquals("PriorityDescTxt", dto.getPriorityDescTxt()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals("ReferralSourceCd", dto.getReferralSourceCd()); + assertEquals("ReferralSourceDescTxt", dto.getReferralSourceDescTxt()); + assertEquals(4, dto.getRepeatNbr()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertEquals("Txt", dto.getTxt()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertEquals(5L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + assertEquals(6, dto.getVersionCtrlNbr()); + } + + @Test + void testOverriddenMethods() { + PatientEncounterDto dto = new PatientEncounterDto(); + + // Test overridden methods + assertEquals(dto.getPatientEncounterUid(), dto.getUid()); + assertNull(dto.getSuperclass()); + assertNull(dto.getLastChgUserId()); + assertNull(dto.getJurisdictionCd()); + assertNull(dto.getProgAreaCd()); + assertNull(dto.getLastChgTime()); + assertNull(dto.getLocalId()); + assertNull(dto.getAddUserId()); + assertNull(dto.getLastChgReasonCd()); + assertNull(dto.getRecordStatusCd()); + assertNull(dto.getRecordStatusTime()); + assertNull(dto.getStatusCd()); + assertNull(dto.getStatusTime()); + assertNull(dto.getUid()); + assertNull(dto.getAddTime()); + assertNull(dto.getProgramJurisdictionOid()); + assertNull(dto.getSharedInd()); + assertNull(dto.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/PlaceDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/PlaceDtoTest.java new file mode 100644 index 000000000..531b8f567 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/PlaceDtoTest.java @@ -0,0 +1,163 @@ +package gov.cdc.dataprocessing.model.dto.phc; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.phc.Place; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class PlaceDtoTest { + + @Test + void testGettersAndSetters() { + PlaceDto dto = new PlaceDto(); + + // Set values + dto.setPlaceUid(1L); + dto.setAddReasonCd("AddReasonCd"); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(2L); + dto.setCd("Cd"); + dto.setCdDescTxt("CdDescTxt"); + dto.setDescription("Description"); + dto.setPlaceContact("PlaceContact"); + dto.setPlaceUrl("PlaceUrl"); + dto.setPlaceAppNm("PlaceAppNm"); + dto.setDurationAmt("DurationAmt"); + dto.setDurationUnitCd("DurationUnitCd"); + dto.setFromTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgReasonCd("LastChgReasonCd"); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(3L); + dto.setLocalId("LocalId"); + dto.setNm("Nm"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setStatusCd("StatusCd"); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setToTime(new Timestamp(System.currentTimeMillis())); + dto.setUserAffiliationTxt("UserAffiliationTxt"); + dto.setVersionCtrlNbr(4); + dto.setProgAreaCd("ProgAreaCd"); + dto.setJurisdictionCd("JurisdictionCd"); + dto.setProgramJurisdictionOid(5L); + dto.setSharedInd("SharedInd"); + + // Assert values + assertEquals(1L, dto.getPlaceUid()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("Description", dto.getDescription()); + assertEquals("PlaceContact", dto.getPlaceContact()); + assertEquals("PlaceUrl", dto.getPlaceUrl()); + assertEquals("PlaceAppNm", dto.getPlaceAppNm()); + assertEquals("DurationAmt", dto.getDurationAmt()); + assertEquals("DurationUnitCd", dto.getDurationUnitCd()); + assertNotNull(dto.getFromTime()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("Nm", dto.getNm()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertNotNull(dto.getToTime()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertEquals(4, dto.getVersionCtrlNbr()); + assertEquals("ProgAreaCd", dto.getProgAreaCd()); + assertEquals("JurisdictionCd", dto.getJurisdictionCd()); + assertEquals(5L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + } + + @Test + void testSpecialConstructor() { + Place place = new Place(); + place.setPlaceUid(1L); + place.setAddReasonCd("AddReasonCd"); + place.setAddTime(new Timestamp(System.currentTimeMillis())); + place.setAddUserId(2L); + place.setCd("Cd"); + place.setCdDescTxt("CdDescTxt"); + place.setDescription("Description"); + place.setStreetAddr1("StreetAddr1"); + place.setStreetAddr2("StreetAddr2"); + place.setCityCd("CityCd"); + place.setStateCd("StateCd"); + place.setZipCd("ZipCd"); + place.setCntryCd("CntryCd"); + place.setDurationAmt("DurationAmt"); + place.setDurationUnitCd("DurationUnitCd"); + place.setFromTime(new Timestamp(System.currentTimeMillis())); + place.setLastChgReasonCd("LastChgReasonCd"); + place.setLastChgTime(new Timestamp(System.currentTimeMillis())); + place.setLastChgUserId(3L); + place.setLocalId("LocalId"); + place.setNm("Nm"); + place.setRecordStatusCd("RecordStatusCd"); + place.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + place.setStatusCd("StatusCd"); + place.setStatusTime(new Timestamp(System.currentTimeMillis())); + place.setToTime(new Timestamp(System.currentTimeMillis())); + place.setUserAffiliationTxt("UserAffiliationTxt"); + place.setVersionCtrlNbr(4); + + PlaceDto dto = new PlaceDto(place); + + // Assert values + assertEquals(1L, dto.getPlaceUid()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("Description", dto.getDescription()); + assertEquals("StreetAddr1 StreetAddr2, CityCd, StateCd ZipCd, CntryCd", dto.getPlaceContact()); + assertEquals("DurationAmt", dto.getDurationAmt()); + assertEquals("DurationUnitCd", dto.getDurationUnitCd()); + assertNotNull(dto.getFromTime()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("Nm", dto.getNm()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertNotNull(dto.getToTime()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertEquals(4, dto.getVersionCtrlNbr()); + } + + @Test + void testOverriddenMethods() { + PlaceDto dto = new PlaceDto(); + + // Test overridden methods + assertEquals(dto.getPlaceUid(), dto.getUid()); + assertNull(dto.getSuperclass()); + assertNull(dto.getLastChgUserId()); + assertNull(dto.getJurisdictionCd()); + assertNull(dto.getProgAreaCd()); + assertNull(dto.getLastChgTime()); + assertNull(dto.getLocalId()); + assertNull(dto.getAddUserId()); + assertNull(dto.getLastChgReasonCd()); + assertNull(dto.getRecordStatusCd()); + assertNull(dto.getRecordStatusTime()); + assertNull(dto.getStatusCd()); + assertNull(dto.getStatusTime()); + assertNull(dto.getUid()); + assertNull(dto.getAddTime()); + assertNull(dto.getProgramJurisdictionOid()); + assertNull(dto.getSharedInd()); + assertNull(dto.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/ReferralDtoTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/ReferralDtoTest.java new file mode 100644 index 000000000..01c27fcf4 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/model/dto/phc/ReferralDtoTest.java @@ -0,0 +1,192 @@ +package gov.cdc.dataprocessing.model.dto.phc; + +import gov.cdc.dataprocessing.repository.nbs.odse.model.phc.Referral; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class ReferralDtoTest { + + @Test + void testGettersAndSetters() { + ReferralDto dto = new ReferralDto(); + + // Set values + dto.setReferralUid(1L); + dto.setActivityDurationAmt("ActivityDurationAmt"); + dto.setActivityDurationUnitCd("ActivityDurationUnitCd"); + dto.setActivityFromTime(new Timestamp(System.currentTimeMillis())); + dto.setActivityToTime(new Timestamp(System.currentTimeMillis())); + dto.setAddReasonCd("AddReasonCd"); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(2L); + dto.setCd("Cd"); + dto.setCdDescTxt("CdDescTxt"); + dto.setConfidentialityCd("ConfidentialityCd"); + dto.setConfidentialityDescTxt("ConfidentialityDescTxt"); + dto.setEffectiveDurationAmt("EffectiveDurationAmt"); + dto.setEffectiveDurationUnitCd("EffectiveDurationUnitCd"); + dto.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + dto.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgReasonCd("LastChgReasonCd"); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(3L); + dto.setLocalId("LocalId"); + dto.setReasonTxt("ReasonTxt"); + dto.setRecordStatusCd("RecordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setReferralDescTxt("ReferralDescTxt"); + dto.setRepeatNbr(4); + dto.setStatusCd("StatusCd"); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setTxt("Txt"); + dto.setUserAffiliationTxt("UserAffiliationTxt"); + dto.setProgramJurisdictionOid(5L); + dto.setSharedInd("SharedInd"); + dto.setVersionCtrlNbr(6); + dto.setProgAreaCd("ProgAreaCd"); + dto.setJurisdictionCd("JurisdictionCd"); + dto.setItDirty(false); + dto.setItNew(true); + dto.setItDelete(false); + + // Assert values + assertEquals(1L, dto.getReferralUid()); + assertEquals("ActivityDurationAmt", dto.getActivityDurationAmt()); + assertEquals("ActivityDurationUnitCd", dto.getActivityDurationUnitCd()); + assertNotNull(dto.getActivityFromTime()); + assertNotNull(dto.getActivityToTime()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("ConfidentialityCd", dto.getConfidentialityCd()); + assertEquals("ConfidentialityDescTxt", dto.getConfidentialityDescTxt()); + assertEquals("EffectiveDurationAmt", dto.getEffectiveDurationAmt()); + assertEquals("EffectiveDurationUnitCd", dto.getEffectiveDurationUnitCd()); + assertNotNull(dto.getEffectiveFromTime()); + assertNotNull(dto.getEffectiveToTime()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("ReasonTxt", dto.getReasonTxt()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals("ReferralDescTxt", dto.getReferralDescTxt()); + assertEquals(4, dto.getRepeatNbr()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertEquals("Txt", dto.getTxt()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertEquals(5L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + assertEquals(6, dto.getVersionCtrlNbr()); + assertEquals("ProgAreaCd", dto.getProgAreaCd()); + assertEquals("JurisdictionCd", dto.getJurisdictionCd()); + assertFalse(dto.isItDirty()); + assertTrue(dto.isItNew()); + assertFalse(dto.isItDelete()); + } + + @Test + void testSpecialConstructor() { + Referral referral = new Referral(); + referral.setReferralUid(1L); + referral.setActivityDurationAmt("ActivityDurationAmt"); + referral.setActivityDurationUnitCd("ActivityDurationUnitCd"); + referral.setActivityFromTime(new Timestamp(System.currentTimeMillis())); + referral.setActivityToTime(new Timestamp(System.currentTimeMillis())); + referral.setAddReasonCd("AddReasonCd"); + referral.setAddTime(new Timestamp(System.currentTimeMillis())); + referral.setAddUserId(2L); + referral.setCd("Cd"); + referral.setCdDescTxt("CdDescTxt"); + referral.setConfidentialityCd("ConfidentialityCd"); + referral.setConfidentialityDescTxt("ConfidentialityDescTxt"); + referral.setEffectiveDurationAmt("EffectiveDurationAmt"); + referral.setEffectiveDurationUnitCd("EffectiveDurationUnitCd"); + referral.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + referral.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + referral.setLastChgReasonCd("LastChgReasonCd"); + referral.setLastChgTime(new Timestamp(System.currentTimeMillis())); + referral.setLastChgUserId(3L); + referral.setLocalId("LocalId"); + referral.setReasonTxt("ReasonTxt"); + referral.setRecordStatusCd("RecordStatusCd"); + referral.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + referral.setReferralDescTxt("ReferralDescTxt"); + referral.setRepeatNbr(4); + referral.setStatusCd("StatusCd"); + referral.setStatusTime(new Timestamp(System.currentTimeMillis())); + referral.setTxt("Txt"); + referral.setUserAffiliationTxt("UserAffiliationTxt"); + referral.setProgramJurisdictionOid(5L); + referral.setSharedInd("SharedInd"); + referral.setVersionCtrlNbr(6); + + ReferralDto dto = new ReferralDto(referral); + + // Assert values + assertEquals(1L, dto.getReferralUid()); + assertEquals("ActivityDurationAmt", dto.getActivityDurationAmt()); + assertEquals("ActivityDurationUnitCd", dto.getActivityDurationUnitCd()); + assertNotNull(dto.getActivityFromTime()); + assertNotNull(dto.getActivityToTime()); + assertEquals("AddReasonCd", dto.getAddReasonCd()); + assertNotNull(dto.getAddTime()); + assertEquals(2L, dto.getAddUserId()); + assertEquals("Cd", dto.getCd()); + assertEquals("CdDescTxt", dto.getCdDescTxt()); + assertEquals("ConfidentialityCd", dto.getConfidentialityCd()); + assertEquals("ConfidentialityDescTxt", dto.getConfidentialityDescTxt()); + assertEquals("EffectiveDurationAmt", dto.getEffectiveDurationAmt()); + assertEquals("EffectiveDurationUnitCd", dto.getEffectiveDurationUnitCd()); + assertNotNull(dto.getEffectiveFromTime()); + assertNotNull(dto.getEffectiveToTime()); + assertEquals("LastChgReasonCd", dto.getLastChgReasonCd()); + assertNotNull(dto.getLastChgTime()); + assertEquals(3L, dto.getLastChgUserId()); + assertEquals("LocalId", dto.getLocalId()); + assertEquals("ReasonTxt", dto.getReasonTxt()); + assertEquals("RecordStatusCd", dto.getRecordStatusCd()); + assertNotNull(dto.getRecordStatusTime()); + assertEquals("ReferralDescTxt", dto.getReferralDescTxt()); + assertEquals(4, dto.getRepeatNbr()); + assertEquals("StatusCd", dto.getStatusCd()); + assertNotNull(dto.getStatusTime()); + assertEquals("Txt", dto.getTxt()); + assertEquals("UserAffiliationTxt", dto.getUserAffiliationTxt()); + assertEquals(5L, dto.getProgramJurisdictionOid()); + assertEquals("SharedInd", dto.getSharedInd()); + assertEquals(6, dto.getVersionCtrlNbr()); + } + + @Test + void testOverriddenMethods() { + ReferralDto dto = new ReferralDto(); + + // Test overridden methods + assertEquals(dto.getReferralUid(), dto.getUid()); + assertNull(dto.getSuperclass()); + assertNull(dto.getLastChgUserId()); + assertNull(dto.getJurisdictionCd()); + assertNull(dto.getProgAreaCd()); + assertNull(dto.getLastChgTime()); + assertNull(dto.getLocalId()); + assertNull(dto.getAddUserId()); + assertNull(dto.getLastChgReasonCd()); + assertNull(dto.getRecordStatusCd()); + assertNull(dto.getRecordStatusTime()); + assertNull(dto.getStatusCd()); + assertNull(dto.getStatusTime()); + assertNull(dto.getUid()); + assertNull(dto.getAddTime()); + assertNull(dto.getProgramJurisdictionOid()); + assertNull(dto.getSharedInd()); + assertNull(dto.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/msgoute/model/NbsInterfaceModelTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/msgoute/model/NbsInterfaceModelTest.java new file mode 100644 index 000000000..eb8d23ec3 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/msgoute/model/NbsInterfaceModelTest.java @@ -0,0 +1,73 @@ +package gov.cdc.dataprocessing.repository.nbs.msgoute.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class NbsInterfaceModelTest { + + @Test + void testGettersAndSetters() { + NbsInterfaceModel model = new NbsInterfaceModel(); + + Timestamp currentTime = new Timestamp(System.currentTimeMillis()); + + // Set values + model.setNbsInterfaceUid(1); + model.setPayload("Test Payload"); + model.setImpExpIndCd("IMP"); + model.setRecordStatusCd("Active"); + model.setRecordStatusTime(currentTime); + model.setAddTime(currentTime); + model.setSystemNm("Test System"); + model.setDocTypeCd("DOC123"); + model.setOriginalPayload("Original Payload"); + model.setOriginalDocTypeCd("Original Doc Type"); + model.setFillerOrderNbr("12345"); + model.setLabClia("Lab123"); + model.setSpecimenCollDate(currentTime); + model.setOrderTestCode("Test123"); + model.setObservationUid(101); + + // Assert values + assertEquals(1, model.getNbsInterfaceUid()); + assertEquals("Test Payload", model.getPayload()); + assertEquals("IMP", model.getImpExpIndCd()); + assertEquals("Active", model.getRecordStatusCd()); + assertEquals(currentTime, model.getRecordStatusTime()); + assertEquals(currentTime, model.getAddTime()); + assertEquals("Test System", model.getSystemNm()); + assertEquals("DOC123", model.getDocTypeCd()); + assertEquals("Original Payload", model.getOriginalPayload()); + assertEquals("Original Doc Type", model.getOriginalDocTypeCd()); + assertEquals("12345", model.getFillerOrderNbr()); + assertEquals("Lab123", model.getLabClia()); + assertEquals(currentTime, model.getSpecimenCollDate()); + assertEquals("Test123", model.getOrderTestCode()); + assertEquals(101, model.getObservationUid()); + } + + @Test + void testNoArgsConstructor() { + NbsInterfaceModel model = new NbsInterfaceModel(); + + assertNotNull(model); + assertNull(model.getNbsInterfaceUid()); + assertNull(model.getPayload()); + assertNull(model.getImpExpIndCd()); + assertNull(model.getRecordStatusCd()); + assertNull(model.getRecordStatusTime()); + assertNull(model.getAddTime()); + assertNull(model.getSystemNm()); + assertNull(model.getDocTypeCd()); + assertNull(model.getOriginalPayload()); + assertNull(model.getOriginalDocTypeCd()); + assertNull(model.getFillerOrderNbr()); + assertNull(model.getLabClia()); + assertNull(model.getSpecimenCollDate()); + assertNull(model.getOrderTestCode()); + assertNull(model.getObservationUid()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/stored_proc/NbsInterfaceStoredProcRepositoryTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/stored_proc/NbsInterfaceStoredProcRepositoryTest.java index e8eb6bdec..fe9eabbf9 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/stored_proc/NbsInterfaceStoredProcRepositoryTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/stored_proc/NbsInterfaceStoredProcRepositoryTest.java @@ -1,4 +1,5 @@ package gov.cdc.dataprocessing.repository.nbs.msgoute.repos.stored_proc; + import gov.cdc.dataprocessing.exception.DataProcessingException; import jakarta.persistence.EntityManager; import jakarta.persistence.ParameterMode; diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/stored_proc/ObservationMatchStoredProcRepositoryTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/stored_proc/ObservationMatchStoredProcRepositoryTest.java index 3226bb0df..ddb199225 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/stored_proc/ObservationMatchStoredProcRepositoryTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/msgoute/repos/stored_proc/ObservationMatchStoredProcRepositoryTest.java @@ -19,6 +19,7 @@ import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; + class ObservationMatchStoredProcRepositoryTest { @Mock private EntityManager entityManager; diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/ClinicalDocumentTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/ClinicalDocumentTest.java new file mode 100644 index 000000000..3e5590ae4 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/ClinicalDocumentTest.java @@ -0,0 +1,282 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.phc.ClinicalDocumentDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.phc.ClinicalDocument; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class ClinicalDocumentTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + ClinicalDocument clinicalDocument = new ClinicalDocument(); + + // Assert + assertNull(clinicalDocument.getClinicalDocumentUid()); + assertNull(clinicalDocument.getActivityDurationAmt()); + assertNull(clinicalDocument.getActivityDurationUnitCd()); + assertNull(clinicalDocument.getActivityFromTime()); + assertNull(clinicalDocument.getActivityToTime()); + assertNull(clinicalDocument.getAddReasonCd()); + assertNull(clinicalDocument.getAddTime()); + assertNull(clinicalDocument.getAddUserId()); + assertNull(clinicalDocument.getCd()); + assertNull(clinicalDocument.getCdDescTxt()); + assertNull(clinicalDocument.getConfidentialityCd()); + assertNull(clinicalDocument.getConfidentialityDescTxt()); + assertNull(clinicalDocument.getCopyFromTime()); + assertNull(clinicalDocument.getCopyToTime()); + assertNull(clinicalDocument.getEffectiveDurationAmt()); + assertNull(clinicalDocument.getEffectiveDurationUnitCd()); + assertNull(clinicalDocument.getEffectiveFromTime()); + assertNull(clinicalDocument.getEffectiveToTime()); + assertNull(clinicalDocument.getLastChgReasonCd()); + assertNull(clinicalDocument.getLastChgTime()); + assertNull(clinicalDocument.getLastChgUserId()); + assertNull(clinicalDocument.getLocalId()); + assertNull(clinicalDocument.getPracticeSettingCd()); + assertNull(clinicalDocument.getPracticeSettingDescTxt()); + assertNull(clinicalDocument.getRecordStatusCd()); + assertNull(clinicalDocument.getRecordStatusTime()); + assertNull(clinicalDocument.getStatusCd()); + assertNull(clinicalDocument.getStatusTime()); + assertNull(clinicalDocument.getTxt()); + assertNull(clinicalDocument.getUserAffiliationTxt()); + assertNull(clinicalDocument.getVersionNbr()); + assertNull(clinicalDocument.getProgramJurisdictionOid()); + assertNull(clinicalDocument.getSharedInd()); + assertNull(clinicalDocument.getVersionCtrlNbr()); + } + + @Test + void testParameterizedConstructor() { + // Arrange + Long clinicalDocumentUid = 1L; + String activityDurationAmt = "1h"; + String activityDurationUnitCd = "hour"; + Timestamp activityFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp activityToTime = new Timestamp(System.currentTimeMillis()); + String addReasonCd = "reason"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String cd = "code"; + String cdDescTxt = "description"; + String confidentialityCd = "confidential"; + String confidentialityDescTxt = "confidential description"; + Timestamp copyFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp copyToTime = new Timestamp(System.currentTimeMillis()); + String effectiveDurationAmt = "2h"; + String effectiveDurationUnitCd = "hour"; + Timestamp effectiveFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp effectiveToTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "last change reason"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "local123"; + String practiceSettingCd = "setting"; + String practiceSettingDescTxt = "setting description"; + String recordStatusCd = "active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String statusCd = "status"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String txt = "text"; + String userAffiliationTxt = "affiliation"; + Integer versionNbr = 1; + Long programJurisdictionOid = 4L; + String sharedInd = "Y"; + Integer versionCtrlNbr = 1; + + ClinicalDocumentDto dto = new ClinicalDocumentDto(); + dto.setClinicalDocumentUid(clinicalDocumentUid); + dto.setActivityDurationAmt(activityDurationAmt); + dto.setActivityDurationUnitCd(activityDurationUnitCd); + dto.setActivityFromTime(activityFromTime); + dto.setActivityToTime(activityToTime); + dto.setAddReasonCd(addReasonCd); + dto.setAddTime(addTime); + dto.setAddUserId(addUserId); + dto.setCd(cd); + dto.setCdDescTxt(cdDescTxt); + dto.setConfidentialityCd(confidentialityCd); + dto.setConfidentialityDescTxt(confidentialityDescTxt); + dto.setCopyFromTime(copyFromTime); + dto.setCopyToTime(copyToTime); + dto.setEffectiveDurationAmt(effectiveDurationAmt); + dto.setEffectiveDurationUnitCd(effectiveDurationUnitCd); + dto.setEffectiveFromTime(effectiveFromTime); + dto.setEffectiveToTime(effectiveToTime); + dto.setLastChgReasonCd(lastChgReasonCd); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setLocalId(localId); + dto.setPracticeSettingCd(practiceSettingCd); + dto.setPracticeSettingDescTxt(practiceSettingDescTxt); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setStatusCd(statusCd); + dto.setStatusTime(statusTime); + dto.setTxt(txt); + dto.setUserAffiliationTxt(userAffiliationTxt); + dto.setVersionNbr(versionNbr); + dto.setProgramJurisdictionOid(programJurisdictionOid); + dto.setSharedInd(sharedInd); + dto.setVersionCtrlNbr(versionCtrlNbr); + + // Act + ClinicalDocument clinicalDocument = new ClinicalDocument(dto); + + // Assert + assertEquals(clinicalDocumentUid, clinicalDocument.getClinicalDocumentUid()); + assertEquals(activityDurationAmt, clinicalDocument.getActivityDurationAmt()); + assertEquals(activityDurationUnitCd, clinicalDocument.getActivityDurationUnitCd()); + assertEquals(activityFromTime, clinicalDocument.getActivityFromTime()); + assertEquals(activityToTime, clinicalDocument.getActivityToTime()); + assertEquals(addReasonCd, clinicalDocument.getAddReasonCd()); + assertEquals(addTime, clinicalDocument.getAddTime()); + assertEquals(addUserId, clinicalDocument.getAddUserId()); + assertEquals(cd, clinicalDocument.getCd()); + assertEquals(cdDescTxt, clinicalDocument.getCdDescTxt()); + assertEquals(confidentialityCd, clinicalDocument.getConfidentialityCd()); + assertEquals(confidentialityDescTxt, clinicalDocument.getConfidentialityDescTxt()); + assertEquals(copyFromTime, clinicalDocument.getCopyFromTime()); + assertEquals(copyToTime, clinicalDocument.getCopyToTime()); + assertEquals(effectiveDurationAmt, clinicalDocument.getEffectiveDurationAmt()); + assertEquals(effectiveDurationUnitCd, clinicalDocument.getEffectiveDurationUnitCd()); + assertEquals(effectiveFromTime, clinicalDocument.getEffectiveFromTime()); + assertEquals(effectiveToTime, clinicalDocument.getEffectiveToTime()); + assertEquals(lastChgReasonCd, clinicalDocument.getLastChgReasonCd()); + assertEquals(lastChgTime, clinicalDocument.getLastChgTime()); + assertEquals(lastChgUserId, clinicalDocument.getLastChgUserId()); + assertEquals(localId, clinicalDocument.getLocalId()); + assertEquals(practiceSettingCd, clinicalDocument.getPracticeSettingCd()); + assertEquals(practiceSettingDescTxt, clinicalDocument.getPracticeSettingDescTxt()); + assertEquals(recordStatusCd, clinicalDocument.getRecordStatusCd()); + assertEquals(recordStatusTime, clinicalDocument.getRecordStatusTime()); + assertEquals(statusCd, clinicalDocument.getStatusCd()); + assertEquals(statusTime, clinicalDocument.getStatusTime()); + assertEquals(txt, clinicalDocument.getTxt()); + assertEquals(userAffiliationTxt, clinicalDocument.getUserAffiliationTxt()); + assertEquals(versionNbr, clinicalDocument.getVersionNbr()); + assertEquals(programJurisdictionOid, clinicalDocument.getProgramJurisdictionOid()); + assertEquals(sharedInd, clinicalDocument.getSharedInd()); + assertEquals(versionCtrlNbr, clinicalDocument.getVersionCtrlNbr()); + } + + @Test + void testSettersAndGetters() { + // Arrange + ClinicalDocument clinicalDocument = new ClinicalDocument(); + + Long clinicalDocumentUid = 1L; + String activityDurationAmt = "1h"; + String activityDurationUnitCd = "hour"; + Timestamp activityFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp activityToTime = new Timestamp(System.currentTimeMillis()); + String addReasonCd = "reason"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String cd = "code"; + String cdDescTxt = "description"; + String confidentialityCd = "confidential"; + String confidentialityDescTxt = "confidential description"; + Timestamp copyFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp copyToTime = new Timestamp(System.currentTimeMillis()); + String effectiveDurationAmt = "2h"; + String effectiveDurationUnitCd = "hour"; + Timestamp effectiveFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp effectiveToTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "last change reason"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "local123"; + String practiceSettingCd = "setting"; + String practiceSettingDescTxt = "setting description"; + String recordStatusCd = "active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String statusCd = "status"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String txt = "text"; + String userAffiliationTxt = "affiliation"; + Integer versionNbr = 1; + Long programJurisdictionOid = 4L; + String sharedInd = "Y"; + Integer versionCtrlNbr = 1; + + // Act + clinicalDocument.setClinicalDocumentUid(clinicalDocumentUid); + clinicalDocument.setActivityDurationAmt(activityDurationAmt); + clinicalDocument.setActivityDurationUnitCd(activityDurationUnitCd); + clinicalDocument.setActivityFromTime(activityFromTime); + clinicalDocument.setActivityToTime(activityToTime); + clinicalDocument.setAddReasonCd(addReasonCd); + clinicalDocument.setAddTime(addTime); + clinicalDocument.setAddUserId(addUserId); + clinicalDocument.setCd(cd); + clinicalDocument.setCdDescTxt(cdDescTxt); + clinicalDocument.setConfidentialityCd(confidentialityCd); + clinicalDocument.setConfidentialityDescTxt(confidentialityDescTxt); + clinicalDocument.setCopyFromTime(copyFromTime); + clinicalDocument.setCopyToTime(copyToTime); + clinicalDocument.setEffectiveDurationAmt(effectiveDurationAmt); + clinicalDocument.setEffectiveDurationUnitCd(effectiveDurationUnitCd); + clinicalDocument.setEffectiveFromTime(effectiveFromTime); + clinicalDocument.setEffectiveToTime(effectiveToTime); + clinicalDocument.setLastChgReasonCd(lastChgReasonCd); + clinicalDocument.setLastChgTime(lastChgTime); + clinicalDocument.setLastChgUserId(lastChgUserId); + clinicalDocument.setLocalId(localId); + clinicalDocument.setPracticeSettingCd(practiceSettingCd); + clinicalDocument.setPracticeSettingDescTxt(practiceSettingDescTxt); + clinicalDocument.setRecordStatusCd(recordStatusCd); + clinicalDocument.setRecordStatusTime(recordStatusTime); + clinicalDocument.setStatusCd(statusCd); + clinicalDocument.setStatusTime(statusTime); + clinicalDocument.setTxt(txt); + clinicalDocument.setUserAffiliationTxt(userAffiliationTxt); + clinicalDocument.setVersionNbr(versionNbr); + clinicalDocument.setProgramJurisdictionOid(programJurisdictionOid); + clinicalDocument.setSharedInd(sharedInd); + clinicalDocument.setVersionCtrlNbr(versionCtrlNbr); + + // Assert + assertEquals(clinicalDocumentUid, clinicalDocument.getClinicalDocumentUid()); + assertEquals(activityDurationAmt, clinicalDocument.getActivityDurationAmt()); + assertEquals(activityDurationUnitCd, clinicalDocument.getActivityDurationUnitCd()); + assertEquals(activityFromTime, clinicalDocument.getActivityFromTime()); + assertEquals(activityToTime, clinicalDocument.getActivityToTime()); + assertEquals(addReasonCd, clinicalDocument.getAddReasonCd()); + assertEquals(addTime, clinicalDocument.getAddTime()); + assertEquals(addUserId, clinicalDocument.getAddUserId()); + assertEquals(cd, clinicalDocument.getCd()); + assertEquals(cdDescTxt, clinicalDocument.getCdDescTxt()); + assertEquals(confidentialityCd, clinicalDocument.getConfidentialityCd()); + assertEquals(confidentialityDescTxt, clinicalDocument.getConfidentialityDescTxt()); + assertEquals(copyFromTime, clinicalDocument.getCopyFromTime()); + assertEquals(copyToTime, clinicalDocument.getCopyToTime()); + assertEquals(effectiveDurationAmt, clinicalDocument.getEffectiveDurationAmt()); + assertEquals(effectiveDurationUnitCd, clinicalDocument.getEffectiveDurationUnitCd()); + assertEquals(effectiveFromTime, clinicalDocument.getEffectiveFromTime()); + assertEquals(effectiveToTime, clinicalDocument.getEffectiveToTime()); + assertEquals(lastChgReasonCd, clinicalDocument.getLastChgReasonCd()); + assertEquals(lastChgTime, clinicalDocument.getLastChgTime()); + assertEquals(lastChgUserId, clinicalDocument.getLastChgUserId()); + assertEquals(localId, clinicalDocument.getLocalId()); + assertEquals(practiceSettingCd, clinicalDocument.getPracticeSettingCd()); + assertEquals(practiceSettingDescTxt, clinicalDocument.getPracticeSettingDescTxt()); + assertEquals(recordStatusCd, clinicalDocument.getRecordStatusCd()); + assertEquals(recordStatusTime, clinicalDocument.getRecordStatusTime()); + assertEquals(statusCd, clinicalDocument.getStatusCd()); + assertEquals(statusTime, clinicalDocument.getStatusTime()); + assertEquals(txt, clinicalDocument.getTxt()); + assertEquals(userAffiliationTxt, clinicalDocument.getUserAffiliationTxt()); + assertEquals(versionNbr, clinicalDocument.getVersionNbr()); + assertEquals(programJurisdictionOid, clinicalDocument.getProgramJurisdictionOid()); + assertEquals(sharedInd, clinicalDocument.getSharedInd()); + assertEquals(versionCtrlNbr, clinicalDocument.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxActivityDetailLogTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxActivityDetailLogTest.java new file mode 100644 index 000000000..10d478f9c --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxActivityDetailLogTest.java @@ -0,0 +1,50 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.log.EDXActivityDetailLogDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.log.EdxActivityDetailLog; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class EdxActivityDetailLogTest { + + @Test + void testEDXActivityDetailLogDtoConstructor() { + // Arrange + EDXActivityDetailLogDto dto = new EDXActivityDetailLogDto(); + dto.setEdxActivityLogUid(1L); + dto.setRecordId("rec-001"); + dto.setRecordType("TypeA"); + dto.setRecordName("RecordNameA"); + dto.setLogType("LogTypeA"); + dto.setComment("This is a log comment"); + + // Act + EdxActivityDetailLog log = new EdxActivityDetailLog(dto); + + // Assert + assertEquals(dto.getEdxActivityLogUid(), log.getEdxActivityLogUid()); + assertEquals(dto.getRecordId(), log.getRecordId()); + assertEquals(dto.getRecordType(), log.getRecordType()); + assertEquals(dto.getRecordName(), log.getRecordNm()); + assertEquals(dto.getLogType(), log.getLogType()); + assertEquals(dto.getComment(), log.getLogComment()); + } + + @Test + void testDefaultConstructor() { + // Arrange & Act + EdxActivityDetailLog log = new EdxActivityDetailLog(); + + // Assert + assertNull(log.getId()); + assertNull(log.getEdxActivityLogUid()); + assertNull(log.getRecordId()); + assertNull(log.getRecordType()); + assertNull(log.getRecordNm()); + assertNull(log.getLogType()); + assertNull(log.getLogComment()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxActivityLogTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxActivityLogTest.java new file mode 100644 index 000000000..c45791a2f --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxActivityLogTest.java @@ -0,0 +1,85 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.log.EDXActivityLogDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.log.EdxActivityLog; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class EdxActivityLogTest { + + @Test + void testEDXActivityLogDtoConstructor() { + // Arrange + EDXActivityLogDto dto = new EDXActivityLogDto(); + dto.setSourceUid(1L); + dto.setTargetUid(2L); + dto.setDocType("docType"); + dto.setRecordStatusCd("recordStatusCd"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setExceptionTxt("exceptionTxt"); + dto.setImpExpIndCd("impExpIndCd"); + dto.setSourceTypeCd("sourceTypeCd"); + dto.setTargetTypeCd("targetTypeCd"); + dto.setBusinessObjLocalId("businessObjLocalid"); + dto.setDocName("docNm"); + dto.setSrcName("sourceNm"); + dto.setAlgorithmAction("algorithmAction"); + dto.setAlgorithmName("algorithmName"); + dto.setMessageId("messageId"); + dto.setEntityNm("entityNm"); + dto.setAccessionNbr("accessionNbr"); + + // Act + EdxActivityLog log = new EdxActivityLog(dto); + + // Assert + assertEquals(dto.getSourceUid(), log.getSourceUid()); + assertEquals(dto.getTargetUid(), log.getTargetUid()); + assertEquals(dto.getDocType(), log.getDocType()); + assertEquals(dto.getRecordStatusCd(), log.getRecordStatusCd()); + assertEquals(dto.getRecordStatusTime(), log.getRecordStatusTime()); + assertEquals(dto.getExceptionTxt(), log.getExceptionTxt()); + assertEquals(dto.getImpExpIndCd(), log.getImpExpIndCd()); + assertEquals(dto.getSourceTypeCd(), log.getSourceTypeCd()); + assertEquals(dto.getTargetTypeCd(), log.getTargetTypeCd()); + assertEquals(dto.getBusinessObjLocalId(), log.getBusinessObjLocalid()); + assertEquals(dto.getDocName(), log.getDocNm()); + assertEquals(dto.getSrcName(), log.getSourceNm()); + assertEquals(dto.getAlgorithmAction(), log.getAlgorithmAction()); + assertEquals(dto.getAlgorithmName(), log.getAlgorithmName()); + assertEquals(dto.getMessageId(), log.getMessageId()); + assertEquals(dto.getEntityNm(), log.getEntityNm()); + assertEquals(dto.getAccessionNbr(), log.getAccessionNbr()); + } + + @Test + void testDefaultConstructor() { + // Arrange & Act + EdxActivityLog log = new EdxActivityLog(); + + // Assert + assertNull(log.getId()); + assertNull(log.getSourceUid()); + assertNull(log.getTargetUid()); + assertNull(log.getDocType()); + assertNull(log.getRecordStatusCd()); + assertNull(log.getRecordStatusTime()); + assertNull(log.getExceptionTxt()); + assertNull(log.getImpExpIndCd()); + assertNull(log.getSourceTypeCd()); + assertNull(log.getTargetTypeCd()); + assertNull(log.getBusinessObjLocalid()); + assertNull(log.getDocNm()); + assertNull(log.getSourceNm()); + assertNull(log.getAlgorithmAction()); + assertNull(log.getAlgorithmName()); + assertNull(log.getMessageId()); + assertNull(log.getEntityNm()); + assertNull(log.getAccessionNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxEntityMatchTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxEntityMatchTest.java new file mode 100644 index 000000000..6f2b2bed9 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxEntityMatchTest.java @@ -0,0 +1,78 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.matching.EdxEntityMatchDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.matching.EdxEntityMatch; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class EdxEntityMatchTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + EdxEntityMatch edxEntityMatch = new EdxEntityMatch(); + + // Assert + assertNull(edxEntityMatch.getEdxEntityMatchUid()); + assertNull(edxEntityMatch.getEntityUid()); + assertNull(edxEntityMatch.getMatchString()); + assertNull(edxEntityMatch.getTypeCd()); + assertNull(edxEntityMatch.getMatchStringHashcode()); + } + + @Test + void testDtoConstructor() { + // Arrange + Long edxEntityMatchUid = 1L; + Long entityUid = 2L; + String matchString = "testMatchString"; + String typeCd = "testTypeCd"; + Long matchStringHashcode = 123456789L; + + EdxEntityMatchDto dto = new EdxEntityMatchDto(); + dto.setEdxEntityMatchUid(edxEntityMatchUid); + dto.setEntityUid(entityUid); + dto.setMatchString(matchString); + dto.setTypeCd(typeCd); + dto.setMatchStringHashCode(matchStringHashcode); + + // Act + EdxEntityMatch edxEntityMatch = new EdxEntityMatch(dto); + + // Assert + assertEquals(edxEntityMatchUid, edxEntityMatch.getEdxEntityMatchUid()); + assertEquals(entityUid, edxEntityMatch.getEntityUid()); + assertEquals(matchString, edxEntityMatch.getMatchString()); + assertEquals(typeCd, edxEntityMatch.getTypeCd()); + assertEquals(matchStringHashcode, edxEntityMatch.getMatchStringHashcode()); + } + + @Test + void testSettersAndGetters() { + // Arrange + EdxEntityMatch edxEntityMatch = new EdxEntityMatch(); + + Long edxEntityMatchUid = 1L; + Long entityUid = 2L; + String matchString = "testMatchString"; + String typeCd = "testTypeCd"; + Long matchStringHashcode = 123456789L; + + // Act + edxEntityMatch.setEdxEntityMatchUid(edxEntityMatchUid); + edxEntityMatch.setEntityUid(entityUid); + edxEntityMatch.setMatchString(matchString); + edxEntityMatch.setTypeCd(typeCd); + edxEntityMatch.setMatchStringHashcode(matchStringHashcode); + + // Assert + assertEquals(edxEntityMatchUid, edxEntityMatch.getEdxEntityMatchUid()); + assertEquals(entityUid, edxEntityMatch.getEntityUid()); + assertEquals(matchString, edxEntityMatch.getMatchString()); + assertEquals(typeCd, edxEntityMatch.getTypeCd()); + assertEquals(matchStringHashcode, edxEntityMatch.getMatchStringHashcode()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxEventProcessTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxEventProcessTest.java new file mode 100644 index 000000000..e8005eb1d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxEventProcessTest.java @@ -0,0 +1,86 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.edx; + +import gov.cdc.dataprocessing.model.dto.edx.EDXEventProcessDto; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class EdxEventProcessTest { + + private EdxEventProcess edxEventProcess; + private Timestamp timestamp; + + @BeforeEach + void setUp() { + edxEventProcess = new EdxEventProcess(); + timestamp = new Timestamp(System.currentTimeMillis()); + } + + @Test + void testGettersAndSetters() { + // Set values + edxEventProcess.setEdxEventProcessUid(1L); + edxEventProcess.setNbsDocumentUid(2L); + edxEventProcess.setNbsEventUid(3L); + edxEventProcess.setSourceEventId("sourceEventId"); + edxEventProcess.setDocEventTypeCd("docEventTypeCd"); + edxEventProcess.setAddUserId(4L); + edxEventProcess.setAddTime(timestamp); + edxEventProcess.setParsedInd("Y"); + edxEventProcess.setEdxDocumentUid(5L); + + // Verify values + assertEquals(1L, edxEventProcess.getEdxEventProcessUid()); + assertEquals(2L, edxEventProcess.getNbsDocumentUid()); + assertEquals(3L, edxEventProcess.getNbsEventUid()); + assertEquals("sourceEventId", edxEventProcess.getSourceEventId()); + assertEquals("docEventTypeCd", edxEventProcess.getDocEventTypeCd()); + assertEquals(4L, edxEventProcess.getAddUserId()); + assertEquals(timestamp, edxEventProcess.getAddTime()); + assertEquals("Y", edxEventProcess.getParsedInd()); + assertEquals(5L, edxEventProcess.getEdxDocumentUid()); + } + + @Test + void testDefaultValues() { + // Check default values + assertNull(edxEventProcess.getEdxEventProcessUid()); + assertNull(edxEventProcess.getNbsDocumentUid()); + assertNull(edxEventProcess.getNbsEventUid()); + assertNull(edxEventProcess.getSourceEventId()); + assertNull(edxEventProcess.getDocEventTypeCd()); + assertNull(edxEventProcess.getAddUserId()); + assertNull(edxEventProcess.getAddTime()); + assertNull(edxEventProcess.getParsedInd()); + assertNull(edxEventProcess.getEdxDocumentUid()); + } + + @Test + void testConstructorWithDto() { + EDXEventProcessDto dto = new EDXEventProcessDto(); + dto.setNbsDocumentUid(2L); + dto.setNbsEventUid(3L); + dto.setSourceEventId("sourceEventId"); + dto.setDocEventTypeCd("docEventTypeCd"); + dto.setAddUserId(4L); + dto.setAddTime(timestamp); + dto.setParsedInd("Y"); + dto.setEdxDocumentUid(5L); + + EdxEventProcess edxEventProcessFromDto = new EdxEventProcess(dto); + + assertNull(edxEventProcessFromDto.getEdxEventProcessUid()); // Assuming it's auto-generated + assertEquals(2L, edxEventProcessFromDto.getNbsDocumentUid()); + assertEquals(3L, edxEventProcessFromDto.getNbsEventUid()); + assertEquals("sourceEventId", edxEventProcessFromDto.getSourceEventId()); + assertEquals("docEventTypeCd", edxEventProcessFromDto.getDocEventTypeCd()); + assertEquals(4L, edxEventProcessFromDto.getAddUserId()); + assertEquals(timestamp, edxEventProcessFromDto.getAddTime()); + assertEquals("Y", edxEventProcessFromDto.getParsedInd()); + assertEquals(5L, edxEventProcessFromDto.getEdxDocumentUid()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxPatientMatchTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxPatientMatchTest.java new file mode 100644 index 000000000..158864468 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EdxPatientMatchTest.java @@ -0,0 +1,75 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.matching.EdxPatientMatchDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.matching.EdxPatientMatch; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class EdxPatientMatchTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + EdxPatientMatch edxPatientMatch = new EdxPatientMatch(); + + // Assert + assertNull(edxPatientMatch.getEdxPatientMatchUid()); + assertNull(edxPatientMatch.getPatientUid()); + assertNull(edxPatientMatch.getMatchString()); + assertNull(edxPatientMatch.getTypeCd()); + assertNull(edxPatientMatch.getMatchStringHashcode()); + } + + @Test + void testDtoConstructor() { + // Arrange + Long patientUid = 2L; + String matchString = "testMatchString"; + String typeCd = "testTypeCd"; + Long matchStringHashcode = 123456789L; + + EdxPatientMatchDto dto = new EdxPatientMatchDto(); + dto.setPatientUid(patientUid); + dto.setMatchString(matchString); + dto.setTypeCd(typeCd); + dto.setMatchStringHashCode(matchStringHashcode); + + // Act + EdxPatientMatch edxPatientMatch = new EdxPatientMatch(dto); + + // Assert + assertEquals(patientUid, edxPatientMatch.getPatientUid()); + assertEquals(matchString, edxPatientMatch.getMatchString()); + assertEquals(typeCd, edxPatientMatch.getTypeCd()); + assertEquals(matchStringHashcode, edxPatientMatch.getMatchStringHashcode()); + } + + @Test + void testSettersAndGetters() { + // Arrange + EdxPatientMatch edxPatientMatch = new EdxPatientMatch(); + + Long edxPatientMatchUid = 1L; + Long patientUid = 2L; + String matchString = "testMatchString"; + String typeCd = "testTypeCd"; + Long matchStringHashcode = 123456789L; + + // Act + edxPatientMatch.setEdxPatientMatchUid(edxPatientMatchUid); + edxPatientMatch.setPatientUid(patientUid); + edxPatientMatch.setMatchString(matchString); + edxPatientMatch.setTypeCd(typeCd); + edxPatientMatch.setMatchStringHashcode(matchStringHashcode); + + // Assert + assertEquals(edxPatientMatchUid, edxPatientMatch.getEdxPatientMatchUid()); + assertEquals(patientUid, edxPatientMatch.getPatientUid()); + assertEquals(matchString, edxPatientMatch.getMatchString()); + assertEquals(typeCd, edxPatientMatch.getTypeCd()); + assertEquals(matchStringHashcode, edxPatientMatch.getMatchStringHashcode()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EntityGroupTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EntityGroupTest.java new file mode 100644 index 000000000..db27f59ee --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EntityGroupTest.java @@ -0,0 +1,205 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.phc.EntityGroupDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.phc.EntityGroup; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class EntityGroupTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + EntityGroup entityGroup = new EntityGroup(); + + // Assert + assertNull(entityGroup.getEntityGroupUid()); + assertNull(entityGroup.getAddReasonCd()); + assertNull(entityGroup.getAddTime()); + assertNull(entityGroup.getAddUserId()); + assertNull(entityGroup.getCd()); + assertNull(entityGroup.getCdDescTxt()); + assertNull(entityGroup.getDescription()); + assertNull(entityGroup.getDurationAmt()); + assertNull(entityGroup.getDurationUnitCd()); + assertNull(entityGroup.getFromTime()); + assertNull(entityGroup.getGroupCnt()); + assertNull(entityGroup.getLastChgReasonCd()); + assertNull(entityGroup.getLastChgTime()); + assertNull(entityGroup.getLastChgUserId()); + assertNull(entityGroup.getLocalId()); + assertNull(entityGroup.getNm()); + assertNull(entityGroup.getRecordStatusCd()); + assertNull(entityGroup.getRecordStatusTime()); + assertNull(entityGroup.getStatusCd()); + assertNull(entityGroup.getStatusTime()); + assertNull(entityGroup.getToTime()); + assertNull(entityGroup.getUserAffiliationTxt()); + assertNull(entityGroup.getVersionCtrlNbr()); + } + + @Test + void testParameterizedConstructor() { + // Arrange + Long entityGroupUid = 1L; + String addReasonCd = "reason"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String cd = "code"; + String cdDescTxt = "description"; + String description = "entity description"; + String durationAmt = "1h"; + String durationUnitCd = "hour"; + Timestamp fromTime = new Timestamp(System.currentTimeMillis()); + Integer groupCnt = 5; + String lastChgReasonCd = "last change reason"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "local123"; + String nm = "entity name"; + String recordStatusCd = "active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String statusCd = "status"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + Timestamp toTime = new Timestamp(System.currentTimeMillis()); + String userAffiliationTxt = "affiliation"; + Integer versionCtrlNbr = 1; + + EntityGroupDto dto = new EntityGroupDto(); + dto.setEntityGroupUid(entityGroupUid); + dto.setAddReasonCd(addReasonCd); + dto.setAddTime(addTime); + dto.setAddUserId(addUserId); + dto.setCd(cd); + dto.setCdDescTxt(cdDescTxt); + dto.setDescription(description); + dto.setDurationAmt(durationAmt); + dto.setDurationUnitCd(durationUnitCd); + dto.setFromTime(fromTime); + dto.setGroupCnt(groupCnt); + dto.setLastChgReasonCd(lastChgReasonCd); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setLocalId(localId); + dto.setNm(nm); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setStatusCd(statusCd); + dto.setStatusTime(statusTime); + dto.setToTime(toTime); + dto.setUserAffiliationTxt(userAffiliationTxt); + dto.setVersionCtrlNbr(versionCtrlNbr); + + // Act + EntityGroup entityGroup = new EntityGroup(dto); + + // Assert + assertEquals(entityGroupUid, entityGroup.getEntityGroupUid()); + assertEquals(addReasonCd, entityGroup.getAddReasonCd()); + assertNotNull(entityGroup.getAddTime()); + assertNull( entityGroup.getAddUserId()); + assertEquals(cd, entityGroup.getCd()); + assertEquals(cdDescTxt, entityGroup.getCdDescTxt()); + assertEquals(description, entityGroup.getDescription()); + assertEquals(durationAmt, entityGroup.getDurationAmt()); + assertEquals(durationUnitCd, entityGroup.getDurationUnitCd()); + assertEquals(fromTime, entityGroup.getFromTime()); + assertEquals(groupCnt, entityGroup.getGroupCnt()); + assertEquals(lastChgReasonCd, entityGroup.getLastChgReasonCd()); + assertEquals(lastChgTime, entityGroup.getLastChgTime()); + assertEquals(lastChgUserId, entityGroup.getLastChgUserId()); + assertEquals(localId, entityGroup.getLocalId()); + assertEquals(nm, entityGroup.getNm()); + assertEquals(recordStatusCd, entityGroup.getRecordStatusCd()); + assertEquals(recordStatusTime, entityGroup.getRecordStatusTime()); + assertEquals(statusCd, entityGroup.getStatusCd()); + assertEquals(statusTime, entityGroup.getStatusTime()); + assertEquals(toTime, entityGroup.getToTime()); + assertEquals(userAffiliationTxt, entityGroup.getUserAffiliationTxt()); + assertEquals(versionCtrlNbr, entityGroup.getVersionCtrlNbr()); + } + + @Test + void testSettersAndGetters() { + // Arrange + EntityGroup entityGroup = new EntityGroup(); + + Long entityGroupUid = 1L; + String addReasonCd = "reason"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String cd = "code"; + String cdDescTxt = "description"; + String description = "entity description"; + String durationAmt = "1h"; + String durationUnitCd = "hour"; + Timestamp fromTime = new Timestamp(System.currentTimeMillis()); + Integer groupCnt = 5; + String lastChgReasonCd = "last change reason"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "local123"; + String nm = "entity name"; + String recordStatusCd = "active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String statusCd = "status"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + Timestamp toTime = new Timestamp(System.currentTimeMillis()); + String userAffiliationTxt = "affiliation"; + Integer versionCtrlNbr = 1; + + // Act + entityGroup.setEntityGroupUid(entityGroupUid); + entityGroup.setAddReasonCd(addReasonCd); + entityGroup.setAddTime(addTime); + entityGroup.setAddUserId(addUserId); + entityGroup.setCd(cd); + entityGroup.setCdDescTxt(cdDescTxt); + entityGroup.setDescription(description); + entityGroup.setDurationAmt(durationAmt); + entityGroup.setDurationUnitCd(durationUnitCd); + entityGroup.setFromTime(fromTime); + entityGroup.setGroupCnt(groupCnt); + entityGroup.setLastChgReasonCd(lastChgReasonCd); + entityGroup.setLastChgTime(lastChgTime); + entityGroup.setLastChgUserId(lastChgUserId); + entityGroup.setLocalId(localId); + entityGroup.setNm(nm); + entityGroup.setRecordStatusCd(recordStatusCd); + entityGroup.setRecordStatusTime(recordStatusTime); + entityGroup.setStatusCd(statusCd); + entityGroup.setStatusTime(statusTime); + entityGroup.setToTime(toTime); + entityGroup.setUserAffiliationTxt(userAffiliationTxt); + entityGroup.setVersionCtrlNbr(versionCtrlNbr); + + // Assert + assertEquals(entityGroupUid, entityGroup.getEntityGroupUid()); + assertEquals(addReasonCd, entityGroup.getAddReasonCd()); + assertEquals(addTime, entityGroup.getAddTime()); + assertEquals(addUserId, entityGroup.getAddUserId()); + assertEquals(cd, entityGroup.getCd()); + assertEquals(cdDescTxt, entityGroup.getCdDescTxt()); + assertEquals(description, entityGroup.getDescription()); + assertEquals(durationAmt, entityGroup.getDurationAmt()); + assertEquals(durationUnitCd, entityGroup.getDurationUnitCd()); + assertEquals(fromTime, entityGroup.getFromTime()); + assertEquals(groupCnt, entityGroup.getGroupCnt()); + assertEquals(lastChgReasonCd, entityGroup.getLastChgReasonCd()); + assertEquals(lastChgTime, entityGroup.getLastChgTime()); + assertEquals(lastChgUserId, entityGroup.getLastChgUserId()); + assertEquals(localId, entityGroup.getLocalId()); + assertEquals(nm, entityGroup.getNm()); + assertEquals(recordStatusCd, entityGroup.getRecordStatusCd()); + assertEquals(recordStatusTime, entityGroup.getRecordStatusTime()); + assertEquals(statusCd, entityGroup.getStatusCd()); + assertEquals(statusTime, entityGroup.getStatusTime()); + assertEquals(toTime, entityGroup.getToTime()); + assertEquals(userAffiliationTxt, entityGroup.getUserAffiliationTxt()); + assertEquals(versionCtrlNbr, entityGroup.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EntityLocatorParticipationTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EntityLocatorParticipationTest.java new file mode 100644 index 000000000..f215b8fe3 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/EntityLocatorParticipationTest.java @@ -0,0 +1,85 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + +import gov.cdc.dataprocessing.model.dto.entity.EntityLocatorParticipationDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.entity.EntityLocatorParticipation; +import gov.cdc.dataprocessing.utilities.auth.AuthUtil; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.mockito.Mockito.mock; + +class EntityLocatorParticipationTest { + + private EntityLocatorParticipationDto dto; + private Timestamp timestamp; + + @BeforeEach + void setUp() { + dto = new EntityLocatorParticipationDto(); + timestamp = new Timestamp(System.currentTimeMillis()); + + // Set all values to avoid the if (null) case + dto.setEntityUid(1L); + dto.setLocatorUid(2L); + dto.setAddReasonCd("TestAddReason"); + dto.setAddUserId(3L); + dto.setAddTime(timestamp); + dto.setCd("TestCd"); + dto.setCdDescTxt("TestCdDescTxt"); + dto.setClassCd("TestClassCd"); + dto.setDurationAmt("TestDurationAmt"); + dto.setDurationUnitCd("TestDurationUnitCd"); + dto.setFromTime(timestamp); + dto.setLastChgReasonCd("TestLastChgReasonCd"); + dto.setLastChgTime(timestamp); + dto.setLastChgUserId(4L); + dto.setLocatorDescTxt("TestLocatorDescTxt"); + dto.setRecordStatusCd("TestRecordStatusCd"); + dto.setRecordStatusTime(timestamp); + dto.setStatusCd("T"); + dto.setStatusTime(timestamp); + dto.setToTime(timestamp); + dto.setUseCd("TestUseCd"); + dto.setUserAffiliationTxt("TestUserAffiliationTxt"); + dto.setValidTimeTxt("TestValidTimeTxt"); + dto.setVersionCtrlNbr(1); + dto.setAsOfDate(timestamp); + } + + @Test + void testConstructorWithDto() { + + EntityLocatorParticipation entity = new EntityLocatorParticipation(dto); + + assertEquals(dto.getEntityUid(), entity.getEntityUid()); + assertEquals(dto.getLocatorUid(), entity.getLocatorUid()); + assertEquals("TestAddReason", entity.getAddReasonCd()); + assertEquals(3L, entity.getAddUserId()); + assertEquals(timestamp, entity.getAddTime()); + assertEquals(dto.getCd(), entity.getCd()); + assertEquals(dto.getCdDescTxt(), entity.getCdDescTxt()); + assertEquals(dto.getClassCd(), entity.getClassCd()); + assertEquals(dto.getDurationAmt(), entity.getDurationAmt()); + assertEquals(dto.getDurationUnitCd(), entity.getDurationUnitCd()); + assertEquals(dto.getFromTime(), entity.getFromTime()); + assertEquals(dto.getLastChgReasonCd(), entity.getLastChgReasonCd()); + assertEquals(dto.getLastChgTime(), entity.getLastChgTime()); + assertEquals(dto.getLastChgUserId(), entity.getLastChgUserId()); + assertEquals(dto.getLocatorDescTxt(), entity.getLocatorDescTxt()); + assertEquals(dto.getRecordStatusCd(), entity.getRecordStatusCd()); + assertEquals(dto.getRecordStatusTime(), entity.getRecordStatusTime()); + assertEquals(dto.getStatusCd(), entity.getStatusCd()); + assertEquals(dto.getStatusTime(), entity.getStatusTime()); + assertEquals(dto.getToTime(), entity.getToTime()); + assertEquals(dto.getUseCd(), entity.getUseCd()); + assertEquals(dto.getUserAffiliationTxt(), entity.getUserAffiliationTxt()); + assertEquals(dto.getValidTimeTxt(), entity.getValidTimeTxt()); + assertEquals(dto.getVersionCtrlNbr(), entity.getVersionCtrlNbr()); + assertEquals(dto.getAsOfDate(), entity.getAsOfDate()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/InterventionTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/InterventionTest.java new file mode 100644 index 000000000..1e0716587 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/InterventionTest.java @@ -0,0 +1,193 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.intervention; + +import gov.cdc.dataprocessing.model.dto.phc.InterventionDto; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class InterventionTest { + + @Test + void testInterventionDtoConstructor() { + // Arrange + InterventionDto dto = new InterventionDto(); + dto.setInterventionUid(1L); + dto.setActivityDurationAmt("2 hours"); + dto.setActivityDurationUnitCd("hours"); + dto.setActivityFromTime(new Timestamp(System.currentTimeMillis())); + dto.setActivityToTime(new Timestamp(System.currentTimeMillis() + 3600000)); + dto.setAddReasonCd("new"); + dto.setAddTime(new Timestamp(System.currentTimeMillis())); + dto.setAddUserId(100L); + dto.setCd("CD001"); + dto.setCdDescTxt("Description"); + dto.setCdSystemCd("System001"); + dto.setCdSystemDescTxt("System Description"); + dto.setClassCd("Class001"); + dto.setConfidentialityCd("Confidential"); + dto.setConfidentialityDescTxt("Confidential Description"); + dto.setEffectiveDurationAmt("1 hour"); + dto.setEffectiveDurationUnitCd("hours"); + dto.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + dto.setEffectiveToTime(new Timestamp(System.currentTimeMillis() + 1800000)); + dto.setJurisdictionCd("Jurisdiction001"); + dto.setLastChgReasonCd("Updated"); + dto.setLastChgTime(new Timestamp(System.currentTimeMillis())); + dto.setLastChgUserId(200L); + dto.setLocalId("Local001"); + dto.setMethodCd("Method001"); + dto.setMethodDescTxt("Method Description"); + dto.setProgAreaCd("ProgArea001"); + dto.setPriorityCd("High"); + dto.setPriorityDescTxt("High Priority"); + dto.setQtyAmt("10"); + dto.setQtyUnitCd("Units"); + dto.setReasonCd("Reason001"); + dto.setReasonDescTxt("Reason Description"); + dto.setRecordStatusCd("Active"); + dto.setRecordStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setRepeatNbr(1); + dto.setStatusCd("Completed"); + dto.setStatusTime(new Timestamp(System.currentTimeMillis())); + dto.setTargetSiteCd("TargetSite001"); + dto.setTargetSiteDescTxt("Target Site Description"); + dto.setTxt("Text"); + dto.setUserAffiliationTxt("User Affiliation"); + dto.setProgramJurisdictionOid(300L); + dto.setSharedInd("Y"); + dto.setVersionCtrlNbr(1); + dto.setMaterialCd("Material001"); + dto.setAgeAtVacc(5); + dto.setAgeAtVaccUnitCd("years"); + dto.setVaccMfgrCd("Manufacturer001"); + dto.setMaterialLotNm("Lot001"); + dto.setMaterialExpirationTime(new Timestamp(System.currentTimeMillis() + 7200000)); + dto.setVaccDoseNbr(2); + dto.setVaccInfoSourceCd("Source001"); + dto.setElectronicInd("Y"); + + // Act + Intervention intervention = new Intervention(dto); + + // Assert + assertEquals(dto.getInterventionUid(), intervention.getInterventionUid()); + assertEquals(dto.getActivityDurationAmt(), intervention.getActivityDurationAmt()); + assertEquals(dto.getActivityDurationUnitCd(), intervention.getActivityDurationUnitCd()); + assertEquals(dto.getActivityFromTime(), intervention.getActivityFromTime()); + assertEquals(dto.getActivityToTime(), intervention.getActivityToTime()); + assertEquals(dto.getAddReasonCd(), intervention.getAddReasonCd()); + assertEquals(dto.getAddTime(), intervention.getAddTime()); + assertEquals(dto.getAddUserId(), intervention.getAddUserId()); + assertEquals(dto.getCd(), intervention.getCd()); + assertEquals(dto.getCdDescTxt(), intervention.getCdDescTxt()); + assertEquals(dto.getCdSystemCd(), intervention.getCdSystemCd()); + assertEquals(dto.getCdSystemDescTxt(), intervention.getCdSystemDescTxt()); + assertEquals(dto.getClassCd(), intervention.getClassCd()); + assertEquals(dto.getConfidentialityCd(), intervention.getConfidentialityCd()); + assertEquals(dto.getConfidentialityDescTxt(), intervention.getConfidentialityDescTxt()); + assertEquals(dto.getEffectiveDurationAmt(), intervention.getEffectiveDurationAmt()); + assertEquals(dto.getEffectiveDurationUnitCd(), intervention.getEffectiveDurationUnitCd()); + assertEquals(dto.getEffectiveFromTime(), intervention.getEffectiveFromTime()); + assertEquals(dto.getEffectiveToTime(), intervention.getEffectiveToTime()); + assertEquals(dto.getJurisdictionCd(), intervention.getJurisdictionCd()); + assertEquals(dto.getLastChgReasonCd(), intervention.getLastChgReasonCd()); + assertEquals(dto.getLastChgTime(), intervention.getLastChgTime()); + assertEquals(dto.getLastChgUserId(), intervention.getLastChgUserId()); + assertEquals(dto.getLocalId(), intervention.getLocalId()); + assertEquals(dto.getMethodCd(), intervention.getMethodCd()); + assertEquals(dto.getMethodDescTxt(), intervention.getMethodDescTxt()); + assertEquals(dto.getProgAreaCd(), intervention.getProgAreaCd()); + assertEquals(dto.getPriorityCd(), intervention.getPriorityCd()); + assertEquals(dto.getPriorityDescTxt(), intervention.getPriorityDescTxt()); + assertEquals(dto.getQtyAmt(), intervention.getQtyAmt()); + assertEquals(dto.getQtyUnitCd(), intervention.getQtyUnitCd()); + assertEquals(dto.getReasonCd(), intervention.getReasonCd()); + assertEquals(dto.getReasonDescTxt(), intervention.getReasonDescTxt()); + assertEquals(dto.getRecordStatusCd(), intervention.getRecordStatusCd()); + assertEquals(dto.getRecordStatusTime(), intervention.getRecordStatusTime()); + assertEquals(dto.getRepeatNbr(), intervention.getRepeatNbr()); + assertEquals(dto.getStatusCd(), intervention.getStatusCd()); + assertEquals(dto.getStatusTime(), intervention.getStatusTime()); + assertEquals(dto.getTargetSiteCd(), intervention.getTargetSiteCd()); + assertEquals(dto.getTargetSiteDescTxt(), intervention.getTargetSiteDescTxt()); + assertEquals(dto.getTxt(), intervention.getTxt()); + assertEquals(dto.getUserAffiliationTxt(), intervention.getUserAffiliationTxt()); + assertEquals(dto.getProgramJurisdictionOid(), intervention.getProgramJurisdictionOid()); + assertEquals(dto.getSharedInd(), intervention.getSharedInd()); + assertEquals(dto.getVersionCtrlNbr(), intervention.getVersionCtrlNbr()); + assertEquals(dto.getMaterialCd(), intervention.getMaterialCd()); + assertEquals(dto.getAgeAtVacc(), intervention.getAgeAtVacc()); + assertEquals(dto.getAgeAtVaccUnitCd(), intervention.getAgeAtVaccUnitCd()); + assertEquals(dto.getVaccMfgrCd(), intervention.getVaccMfgrCd()); + assertEquals(dto.getMaterialLotNm(), intervention.getMaterialLotNm()); + assertEquals(dto.getMaterialExpirationTime(), intervention.getMaterialExpirationTime()); + assertEquals(dto.getVaccDoseNbr(), intervention.getVaccDoseNbr()); + assertEquals(dto.getVaccInfoSourceCd(), intervention.getVaccInfoSourceCd()); + assertEquals(dto.getElectronicInd(), intervention.getElectronicInd()); + } + + @Test + void testDefaultConstructor() { + // Arrange & Act + Intervention intervention = new Intervention(); + + // Assert + assertNull(intervention.getInterventionUid()); + assertNull(intervention.getActivityDurationAmt()); + assertNull(intervention.getActivityDurationUnitCd()); + assertNull(intervention.getActivityFromTime()); + assertNull(intervention.getActivityToTime()); + assertNull(intervention.getAddReasonCd()); + assertNull(intervention.getAddTime()); + assertNull(intervention.getAddUserId()); + assertNull(intervention.getCd()); + assertNull(intervention.getCdDescTxt()); + assertNull(intervention.getCdSystemCd()); + assertNull(intervention.getCdSystemDescTxt()); + assertNull(intervention.getClassCd()); + assertNull(intervention.getConfidentialityCd()); + assertNull(intervention.getConfidentialityDescTxt()); + assertNull(intervention.getEffectiveDurationAmt()); + assertNull(intervention.getEffectiveDurationUnitCd()); + assertNull(intervention.getEffectiveFromTime()); + assertNull(intervention.getEffectiveToTime()); + assertNull(intervention.getJurisdictionCd()); + assertNull(intervention.getLastChgReasonCd()); + assertNull(intervention.getLastChgTime()); + assertNull(intervention.getLastChgUserId()); + assertNull(intervention.getLocalId()); + assertNull(intervention.getMethodCd()); + assertNull(intervention.getMethodDescTxt()); + assertNull(intervention.getProgAreaCd()); + assertNull(intervention.getPriorityCd()); + assertNull(intervention.getPriorityDescTxt()); + assertNull(intervention.getQtyAmt()); + assertNull(intervention.getQtyUnitCd()); + assertNull(intervention.getReasonCd()); + assertNull(intervention.getReasonDescTxt()); + assertNull(intervention.getRecordStatusCd()); + assertNull(intervention.getRecordStatusTime()); + assertNull(intervention.getRepeatNbr()); + assertNull(intervention.getStatusCd()); + assertNull(intervention.getStatusTime()); + assertNull(intervention.getTargetSiteCd()); + assertNull(intervention.getTargetSiteDescTxt()); + assertNull(intervention.getTxt()); + assertNull(intervention.getUserAffiliationTxt()); + assertNull(intervention.getProgramJurisdictionOid()); + assertNull(intervention.getSharedInd()); + assertNull(intervention.getVersionCtrlNbr()); + assertNull(intervention.getMaterialCd()); + assertNull(intervention.getAgeAtVacc()); + assertNull(intervention.getAgeAtVaccUnitCd()); + assertNull(intervention.getVaccMfgrCd()); + assertNull(intervention.getMaterialLotNm()); + assertNull(intervention.getMaterialExpirationTime()); + assertNull(intervention.getVaccDoseNbr()); + assertNull(intervention.getVaccInfoSourceCd()); + assertNull(intervention.getElectronicInd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/LookupAnswerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/LookupAnswerTest.java new file mode 100644 index 000000000..b43502718 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/LookupAnswerTest.java @@ -0,0 +1,98 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.repository.nbs.odse.model.lookup.LookupAnswer; +import gov.cdc.dataprocessing.repository.nbs.odse.model.lookup.LookupQuestion; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class LookupAnswerTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + LookupAnswer lookupAnswer = new LookupAnswer(); + + // Assert + assertNull(lookupAnswer.getId()); + assertNull(lookupAnswer.getLookupQuestion()); + assertNull(lookupAnswer.getFromAnswerCode()); + assertNull(lookupAnswer.getFromAnsDisplayNm()); + assertNull(lookupAnswer.getFromCodeSystemCd()); + assertNull(lookupAnswer.getFromCodeSystemDescTxt()); + assertNull(lookupAnswer.getToAnswerCode()); + assertNull(lookupAnswer.getToAnsDisplayNm()); + assertNull(lookupAnswer.getToCodeSystemCd()); + assertNull(lookupAnswer.getToCodeSystemDescTxt()); + assertNull(lookupAnswer.getAddTime()); + assertNull(lookupAnswer.getAddUserId()); + assertNull(lookupAnswer.getLastChgTime()); + assertNull(lookupAnswer.getLastChgUserId()); + assertNull(lookupAnswer.getStatusCd()); + assertNull(lookupAnswer.getStatusTime()); + } + + @Test + void testSettersAndGetters() { + // Arrange + LookupAnswer lookupAnswer = new LookupAnswer(); + LookupQuestion lookupQuestion = new LookupQuestion(); + lookupQuestion.setId(1L); + + Long id = 1L; + String fromAnswerCode = "fromAnswerCode"; + String fromAnsDisplayNm = "fromAnsDisplayNm"; + String fromCodeSystemCd = "fromCodeSystemCd"; + String fromCodeSystemDescTxt = "fromCodeSystemDescTxt"; + String toAnswerCode = "toAnswerCode"; + String toAnsDisplayNm = "toAnsDisplayNm"; + String toCodeSystemCd = "toCodeSystemCd"; + String toCodeSystemDescTxt = "toCodeSystemDescTxt"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 1L; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 2L; + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + + // Act + lookupAnswer.setId(id); + lookupAnswer.setLookupQuestion(lookupQuestion); + lookupAnswer.setFromAnswerCode(fromAnswerCode); + lookupAnswer.setFromAnsDisplayNm(fromAnsDisplayNm); + lookupAnswer.setFromCodeSystemCd(fromCodeSystemCd); + lookupAnswer.setFromCodeSystemDescTxt(fromCodeSystemDescTxt); + lookupAnswer.setToAnswerCode(toAnswerCode); + lookupAnswer.setToAnsDisplayNm(toAnsDisplayNm); + lookupAnswer.setToCodeSystemCd(toCodeSystemCd); + lookupAnswer.setToCodeSystemDescTxt(toCodeSystemDescTxt); + lookupAnswer.setAddTime(addTime); + lookupAnswer.setAddUserId(addUserId); + lookupAnswer.setLastChgTime(lastChgTime); + lookupAnswer.setLastChgUserId(lastChgUserId); + lookupAnswer.setStatusCd(statusCd); + lookupAnswer.setStatusTime(statusTime); + + // Assert + assertEquals(id, lookupAnswer.getId()); + assertEquals(lookupQuestion, lookupAnswer.getLookupQuestion()); + assertEquals(fromAnswerCode, lookupAnswer.getFromAnswerCode()); + assertEquals(fromAnsDisplayNm, lookupAnswer.getFromAnsDisplayNm()); + assertEquals(fromCodeSystemCd, lookupAnswer.getFromCodeSystemCd()); + assertEquals(fromCodeSystemDescTxt, lookupAnswer.getFromCodeSystemDescTxt()); + assertEquals(toAnswerCode, lookupAnswer.getToAnswerCode()); + assertEquals(toAnsDisplayNm, lookupAnswer.getToAnsDisplayNm()); + assertEquals(toCodeSystemCd, lookupAnswer.getToCodeSystemCd()); + assertEquals(toCodeSystemDescTxt, lookupAnswer.getToCodeSystemDescTxt()); + assertEquals(addTime, lookupAnswer.getAddTime()); + assertEquals(addUserId, lookupAnswer.getAddUserId()); + assertEquals(lastChgTime, lookupAnswer.getLastChgTime()); + assertEquals(lastChgUserId, lookupAnswer.getLastChgUserId()); + assertEquals(statusCd, lookupAnswer.getStatusCd()); + assertEquals(statusTime, lookupAnswer.getStatusTime()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/LookupQuestionTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/LookupQuestionTest.java new file mode 100644 index 000000000..e55d7cef9 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/LookupQuestionTest.java @@ -0,0 +1,120 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.repository.nbs.odse.model.lookup.LookupQuestion; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class LookupQuestionTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + LookupQuestion lookupQuestion = new LookupQuestion(); + + // Assert + assertNull(lookupQuestion.getId()); + assertNull(lookupQuestion.getFromQuestionIdentifier()); + assertNull(lookupQuestion.getFromQuestionDisplayName()); + assertNull(lookupQuestion.getFromCodeSystemCd()); + assertNull(lookupQuestion.getFromCodeSystemDescTxt()); + assertNull(lookupQuestion.getFromDataType()); + assertNull(lookupQuestion.getFromCodeSet()); + assertNull(lookupQuestion.getFromFormCd()); + assertNull(lookupQuestion.getToQuestionIdentifier()); + assertNull(lookupQuestion.getToQuestionDisplayName()); + assertNull(lookupQuestion.getToCodeSystemCd()); + assertNull(lookupQuestion.getToCodeSystemDescTxt()); + assertNull(lookupQuestion.getToDataType()); + assertNull(lookupQuestion.getToCodeSet()); + assertNull(lookupQuestion.getToFormCd()); + assertNull(lookupQuestion.getRdbColumnNm()); + assertNull(lookupQuestion.getAddTime()); + assertNull(lookupQuestion.getAddUserId()); + assertNull(lookupQuestion.getLastChgTime()); + assertNull(lookupQuestion.getLastChgUserId()); + assertNull(lookupQuestion.getStatusCd()); + assertNull(lookupQuestion.getStatusTime()); + } + + @Test + void testSettersAndGetters() { + // Arrange + LookupQuestion lookupQuestion = new LookupQuestion(); + + Long id = 1L; + String fromQuestionIdentifier = "fromQuestionIdentifier"; + String fromQuestionDisplayName = "fromQuestionDisplayName"; + String fromCodeSystemCd = "fromCodeSystemCd"; + String fromCodeSystemDescTxt = "fromCodeSystemDescTxt"; + String fromDataType = "fromDataType"; + String fromCodeSet = "fromCodeSet"; + String fromFormCd = "fromFormCd"; + String toQuestionIdentifier = "toQuestionIdentifier"; + String toQuestionDisplayName = "toQuestionDisplayName"; + String toCodeSystemCd = "toCodeSystemCd"; + String toCodeSystemDescTxt = "toCodeSystemDescTxt"; + String toDataType = "toDataType"; + String toCodeSet = "toCodeSet"; + String toFormCd = "toFormCd"; + String rdbColumnNm = "rdbColumnNm"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 1L; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 2L; + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + + // Act + lookupQuestion.setId(id); + lookupQuestion.setFromQuestionIdentifier(fromQuestionIdentifier); + lookupQuestion.setFromQuestionDisplayName(fromQuestionDisplayName); + lookupQuestion.setFromCodeSystemCd(fromCodeSystemCd); + lookupQuestion.setFromCodeSystemDescTxt(fromCodeSystemDescTxt); + lookupQuestion.setFromDataType(fromDataType); + lookupQuestion.setFromCodeSet(fromCodeSet); + lookupQuestion.setFromFormCd(fromFormCd); + lookupQuestion.setToQuestionIdentifier(toQuestionIdentifier); + lookupQuestion.setToQuestionDisplayName(toQuestionDisplayName); + lookupQuestion.setToCodeSystemCd(toCodeSystemCd); + lookupQuestion.setToCodeSystemDescTxt(toCodeSystemDescTxt); + lookupQuestion.setToDataType(toDataType); + lookupQuestion.setToCodeSet(toCodeSet); + lookupQuestion.setToFormCd(toFormCd); + lookupQuestion.setRdbColumnNm(rdbColumnNm); + lookupQuestion.setAddTime(addTime); + lookupQuestion.setAddUserId(addUserId); + lookupQuestion.setLastChgTime(lastChgTime); + lookupQuestion.setLastChgUserId(lastChgUserId); + lookupQuestion.setStatusCd(statusCd); + lookupQuestion.setStatusTime(statusTime); + + // Assert + assertEquals(id, lookupQuestion.getId()); + assertEquals(fromQuestionIdentifier, lookupQuestion.getFromQuestionIdentifier()); + assertEquals(fromQuestionDisplayName, lookupQuestion.getFromQuestionDisplayName()); + assertEquals(fromCodeSystemCd, lookupQuestion.getFromCodeSystemCd()); + assertEquals(fromCodeSystemDescTxt, lookupQuestion.getFromCodeSystemDescTxt()); + assertEquals(fromDataType, lookupQuestion.getFromDataType()); + assertEquals(fromCodeSet, lookupQuestion.getFromCodeSet()); + assertEquals(fromFormCd, lookupQuestion.getFromFormCd()); + assertEquals(toQuestionIdentifier, lookupQuestion.getToQuestionIdentifier()); + assertEquals(toQuestionDisplayName, lookupQuestion.getToQuestionDisplayName()); + assertEquals(toCodeSystemCd, lookupQuestion.getToCodeSystemCd()); + assertEquals(toCodeSystemDescTxt, lookupQuestion.getToCodeSystemDescTxt()); + assertEquals(toDataType, lookupQuestion.getToDataType()); + assertEquals(toCodeSet, lookupQuestion.getToCodeSet()); + assertEquals(toFormCd, lookupQuestion.getToFormCd()); + assertEquals(rdbColumnNm, lookupQuestion.getRdbColumnNm()); + assertEquals(addTime, lookupQuestion.getAddTime()); + assertEquals(addUserId, lookupQuestion.getAddUserId()); + assertEquals(lastChgTime, lookupQuestion.getLastChgTime()); + assertEquals(lastChgUserId, lookupQuestion.getLastChgUserId()); + assertEquals(statusCd, lookupQuestion.getStatusCd()); + assertEquals(statusTime, lookupQuestion.getStatusTime()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsActEntityHistTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsActEntityHistTest.java new file mode 100644 index 000000000..c80ff94b7 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsActEntityHistTest.java @@ -0,0 +1,121 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + +import gov.cdc.dataprocessing.model.dto.nbs.NbsActEntityDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.nbs.NbsActEntityHist; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class NbsActEntityHistTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + NbsActEntityHist nbsActEntityHist = new NbsActEntityHist(); + + // Assert + assertNull(nbsActEntityHist.getNbsActEntityUid()); + assertNull(nbsActEntityHist.getActUid()); + assertNull(nbsActEntityHist.getAddTime()); + assertNull(nbsActEntityHist.getAddUserId()); + assertNull(nbsActEntityHist.getEntityUid()); + assertNull(nbsActEntityHist.getEntityVersionCtrlNbr()); + assertNull(nbsActEntityHist.getLastChgTime()); + assertNull(nbsActEntityHist.getLastChgUserId()); + assertNull(nbsActEntityHist.getRecordStatusCd()); + assertNull(nbsActEntityHist.getRecordStatusTime()); + assertNull(nbsActEntityHist.getTypeCd()); + } + + @Test + void testDtoConstructor() { + // Arrange + Long nbsActEntityUid = 1L; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + Long entityUid = 3L; + Integer entityVersionCtrlNbr = 4; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 5L; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String typeCd = "Type1"; + Long actUid = 6L; + + NbsActEntityDto dto = new NbsActEntityDto(); + dto.setNbsActEntityUid(nbsActEntityUid); + dto.setAddTime(addTime); + dto.setAddUserId(addUserId); + dto.setEntityUid(entityUid); + dto.setEntityVersionCtrlNbr(entityVersionCtrlNbr); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setTypeCd(typeCd); + dto.setActUid(actUid); + + // Act + NbsActEntityHist nbsActEntityHist = new NbsActEntityHist(dto); + + // Assert + assertEquals(nbsActEntityUid, nbsActEntityHist.getNbsActEntityUid()); + assertEquals(addTime, nbsActEntityHist.getAddTime()); + assertEquals(addUserId, nbsActEntityHist.getAddUserId()); + assertEquals(entityUid, nbsActEntityHist.getEntityUid()); + assertEquals(entityVersionCtrlNbr, nbsActEntityHist.getEntityVersionCtrlNbr()); + assertEquals(lastChgTime, nbsActEntityHist.getLastChgTime()); + assertEquals(lastChgUserId, nbsActEntityHist.getLastChgUserId()); + assertEquals(recordStatusCd, nbsActEntityHist.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsActEntityHist.getRecordStatusTime()); + assertEquals(typeCd, nbsActEntityHist.getTypeCd()); + assertEquals(actUid, nbsActEntityHist.getActUid()); + } + + @Test + void testSettersAndGetters() { + // Arrange + NbsActEntityHist nbsActEntityHist = new NbsActEntityHist(); + + Long nbsActEntityUid = 1L; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + Long entityUid = 3L; + Integer entityVersionCtrlNbr = 4; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 5L; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String typeCd = "Type1"; + Long actUid = 6L; + + // Act + nbsActEntityHist.setNbsActEntityUid(nbsActEntityUid); + nbsActEntityHist.setAddTime(addTime); + nbsActEntityHist.setAddUserId(addUserId); + nbsActEntityHist.setEntityUid(entityUid); + nbsActEntityHist.setEntityVersionCtrlNbr(entityVersionCtrlNbr); + nbsActEntityHist.setLastChgTime(lastChgTime); + nbsActEntityHist.setLastChgUserId(lastChgUserId); + nbsActEntityHist.setRecordStatusCd(recordStatusCd); + nbsActEntityHist.setRecordStatusTime(recordStatusTime); + nbsActEntityHist.setTypeCd(typeCd); + nbsActEntityHist.setActUid(actUid); + + // Assert + assertEquals(nbsActEntityUid, nbsActEntityHist.getNbsActEntityUid()); + assertEquals(addTime, nbsActEntityHist.getAddTime()); + assertEquals(addUserId, nbsActEntityHist.getAddUserId()); + assertEquals(entityUid, nbsActEntityHist.getEntityUid()); + assertEquals(entityVersionCtrlNbr, nbsActEntityHist.getEntityVersionCtrlNbr()); + assertEquals(lastChgTime, nbsActEntityHist.getLastChgTime()); + assertEquals(lastChgUserId, nbsActEntityHist.getLastChgUserId()); + assertEquals(recordStatusCd, nbsActEntityHist.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsActEntityHist.getRecordStatusTime()); + assertEquals(typeCd, nbsActEntityHist.getTypeCd()); + assertEquals(actUid, nbsActEntityHist.getActUid()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsAnswerHistTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsAnswerHistTest.java new file mode 100644 index 000000000..3bdac8a80 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsAnswerHistTest.java @@ -0,0 +1,129 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.nbs.NbsAnswerDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.nbs.NbsAnswerHist; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class NbsAnswerHistTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + NbsAnswerHist nbsAnswerHist = new NbsAnswerHist(); + + // Assert + assertNull(nbsAnswerHist.getNbsAnswerUid()); + assertNull(nbsAnswerHist.getActUid()); + assertNull(nbsAnswerHist.getAnswerTxt()); + assertNull(nbsAnswerHist.getNbsQuestionUid()); + assertNull(nbsAnswerHist.getNbsQuestionVersionCtrlNbr()); + assertNull(nbsAnswerHist.getSeqNbr()); + assertNull(nbsAnswerHist.getAnswerLargeTxt()); + assertNull(nbsAnswerHist.getAnswerGroupSeqNbr()); + assertNull(nbsAnswerHist.getRecordStatusCd()); + assertNull(nbsAnswerHist.getRecordStatusTime()); + assertNull(nbsAnswerHist.getLastChgTime()); + assertNull(nbsAnswerHist.getLastChgUserId()); + } + + @Test + void testDtoConstructor() { + // Arrange + Long nbsAnswerUid = 1L; + Long actUid = 2L; + String answerTxt = "Sample Answer"; + Long nbsQuestionUid = 3L; + Integer nbsQuestionVersionCtrlNbr = 4; + Integer seqNbr = 5; + String answerLargeTxt = "Sample Large Answer"; + Integer answerGroupSeqNbr = 6; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 7L; + + NbsAnswerDto dto = new NbsAnswerDto(); + dto.setNbsAnswerUid(nbsAnswerUid); + dto.setActUid(actUid); + dto.setAnswerTxt(answerTxt); + dto.setNbsQuestionUid(nbsQuestionUid); + dto.setNbsQuestionVersionCtrlNbr(nbsQuestionVersionCtrlNbr); + dto.setSeqNbr(seqNbr); +// dto.setAnswerLargeTxt(answerLargeTxt); + dto.setAnswerGroupSeqNbr(answerGroupSeqNbr); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + + // Act + NbsAnswerHist nbsAnswerHist = new NbsAnswerHist(dto); + + // Assert + assertEquals(nbsAnswerUid, nbsAnswerHist.getNbsAnswerUid()); + assertEquals(actUid, nbsAnswerHist.getActUid()); + assertEquals(answerTxt, nbsAnswerHist.getAnswerTxt()); + assertEquals(nbsQuestionUid, nbsAnswerHist.getNbsQuestionUid()); + assertEquals(nbsQuestionVersionCtrlNbr, nbsAnswerHist.getNbsQuestionVersionCtrlNbr()); + assertEquals(seqNbr, nbsAnswerHist.getSeqNbr()); + assertNull(nbsAnswerHist.getAnswerLargeTxt()); + assertEquals(answerGroupSeqNbr, nbsAnswerHist.getAnswerGroupSeqNbr()); + assertEquals(recordStatusCd, nbsAnswerHist.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsAnswerHist.getRecordStatusTime()); + assertEquals(lastChgTime, nbsAnswerHist.getLastChgTime()); + assertEquals(lastChgUserId, nbsAnswerHist.getLastChgUserId()); + } + + @Test + void testSettersAndGetters() { + // Arrange + NbsAnswerHist nbsAnswerHist = new NbsAnswerHist(); + + Long nbsAnswerUid = 1L; + Long actUid = 2L; + String answerTxt = "Sample Answer"; + Long nbsQuestionUid = 3L; + Integer nbsQuestionVersionCtrlNbr = 4; + Integer seqNbr = 5; + String answerLargeTxt = "Sample Large Answer"; + Integer answerGroupSeqNbr = 6; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 7L; + + // Act + nbsAnswerHist.setNbsAnswerUid(nbsAnswerUid); + nbsAnswerHist.setActUid(actUid); + nbsAnswerHist.setAnswerTxt(answerTxt); + nbsAnswerHist.setNbsQuestionUid(nbsQuestionUid); + nbsAnswerHist.setNbsQuestionVersionCtrlNbr(nbsQuestionVersionCtrlNbr); + nbsAnswerHist.setSeqNbr(seqNbr); + nbsAnswerHist.setAnswerLargeTxt(answerLargeTxt); + nbsAnswerHist.setAnswerGroupSeqNbr(answerGroupSeqNbr); + nbsAnswerHist.setRecordStatusCd(recordStatusCd); + nbsAnswerHist.setRecordStatusTime(recordStatusTime); + nbsAnswerHist.setLastChgTime(lastChgTime); + nbsAnswerHist.setLastChgUserId(lastChgUserId); + + // Assert + assertEquals(nbsAnswerUid, nbsAnswerHist.getNbsAnswerUid()); + assertEquals(actUid, nbsAnswerHist.getActUid()); + assertEquals(answerTxt, nbsAnswerHist.getAnswerTxt()); + assertEquals(nbsQuestionUid, nbsAnswerHist.getNbsQuestionUid()); + assertEquals(nbsQuestionVersionCtrlNbr, nbsAnswerHist.getNbsQuestionVersionCtrlNbr()); + assertEquals(seqNbr, nbsAnswerHist.getSeqNbr()); + assertEquals(answerLargeTxt, nbsAnswerHist.getAnswerLargeTxt()); + assertEquals(answerGroupSeqNbr, nbsAnswerHist.getAnswerGroupSeqNbr()); + assertEquals(recordStatusCd, nbsAnswerHist.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsAnswerHist.getRecordStatusTime()); + assertEquals(lastChgTime, nbsAnswerHist.getLastChgTime()); + assertEquals(lastChgUserId, nbsAnswerHist.getLastChgUserId()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsCaseAnswerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsCaseAnswerTest.java new file mode 100644 index 000000000..420af9d49 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsCaseAnswerTest.java @@ -0,0 +1,152 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.nbs.NbsCaseAnswerDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.nbs.NbsCaseAnswer; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class NbsCaseAnswerTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + NbsCaseAnswer nbsCaseAnswer = new NbsCaseAnswer(); + + // Assert + assertNull(nbsCaseAnswer.getId()); + assertNull(nbsCaseAnswer.getActUid()); + assertNull(nbsCaseAnswer.getAddTime()); + assertNull(nbsCaseAnswer.getAddUserId()); + assertNull(nbsCaseAnswer.getAnswerTxt()); + assertNull(nbsCaseAnswer.getNbsQuestionUid()); + assertNull(nbsCaseAnswer.getNbsQuestionVersionCtrlNbr()); + assertNull(nbsCaseAnswer.getLastChgTime()); + assertNull(nbsCaseAnswer.getLastChgUserId()); + assertNull(nbsCaseAnswer.getRecordStatusCd()); + assertNull(nbsCaseAnswer.getRecordStatusTime()); + assertNull(nbsCaseAnswer.getSeqNbr()); + assertNull(nbsCaseAnswer.getAnswerLargeTxt()); + assertNull(nbsCaseAnswer.getNbsTableMetadataUid()); + assertNull(nbsCaseAnswer.getNbsUiMetadataVerCtrlNbr()); + assertNull(nbsCaseAnswer.getAnswerGroupSeqNbr()); + } + + @Test + void testDtoConstructor() { + // Arrange + Long actUid = 1L; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String answerTxt = "Sample Answer"; + Long nbsQuestionUid = 3L; + Integer nbsQuestionVersionCtrlNbr = 4; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 5L; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Integer seqNbr = 6; + String answerLargeTxt = "Sample Large Answer"; + Long nbsTableMetadataUid = 7L; + Integer nbsUiMetadataVerCtrlNbr = 8; + Integer answerGroupSeqNbr = 9; + + NbsCaseAnswerDto dto = new NbsCaseAnswerDto(); + dto.setActUid(actUid); + dto.setAddTime(addTime); + dto.setAddUserId(addUserId); + dto.setAnswerTxt(answerTxt); + dto.setNbsQuestionUid(nbsQuestionUid); + dto.setNbsQuestionVersionCtrlNbr(nbsQuestionVersionCtrlNbr); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setSeqNbr(seqNbr); + dto.setNbsTableMetadataUid(nbsTableMetadataUid); + dto.setAnswerGroupSeqNbr(answerGroupSeqNbr); + + // Act + NbsCaseAnswer nbsCaseAnswer = new NbsCaseAnswer(dto); + + // Assert + assertNull(nbsCaseAnswer.getId()); // ID should be null because it's not set in the DTO + assertEquals(actUid, nbsCaseAnswer.getActUid()); + assertEquals(addTime, nbsCaseAnswer.getAddTime()); + assertEquals(addUserId, nbsCaseAnswer.getAddUserId()); + assertEquals(answerTxt, nbsCaseAnswer.getAnswerTxt()); + assertEquals(nbsQuestionUid, nbsCaseAnswer.getNbsQuestionUid()); + assertEquals(nbsQuestionVersionCtrlNbr, nbsCaseAnswer.getNbsQuestionVersionCtrlNbr()); + assertEquals(lastChgTime, nbsCaseAnswer.getLastChgTime()); + assertEquals(lastChgUserId, nbsCaseAnswer.getLastChgUserId()); + assertEquals(recordStatusCd, nbsCaseAnswer.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsCaseAnswer.getRecordStatusTime()); + assertEquals(seqNbr, nbsCaseAnswer.getSeqNbr()); + assertNull(nbsCaseAnswer.getAnswerLargeTxt()); + assertEquals(nbsTableMetadataUid, nbsCaseAnswer.getNbsTableMetadataUid()); + assertNotNull(nbsCaseAnswer.getNbsUiMetadataVerCtrlNbr()); + assertEquals(answerGroupSeqNbr, nbsCaseAnswer.getAnswerGroupSeqNbr()); + } + + @Test + void testSettersAndGetters() { + // Arrange + NbsCaseAnswer nbsCaseAnswer = new NbsCaseAnswer(); + + Long id = 1L; + Long actUid = 2L; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 3L; + String answerTxt = "Sample Answer"; + Long nbsQuestionUid = 4L; + Integer nbsQuestionVersionCtrlNbr = 5; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 6L; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Integer seqNbr = 7; + String answerLargeTxt = "Sample Large Answer"; + Long nbsTableMetadataUid = 8L; + Integer nbsUiMetadataVerCtrlNbr = 9; + Integer answerGroupSeqNbr = 10; + + // Act + nbsCaseAnswer.setId(id); + nbsCaseAnswer.setActUid(actUid); + nbsCaseAnswer.setAddTime(addTime); + nbsCaseAnswer.setAddUserId(addUserId); + nbsCaseAnswer.setAnswerTxt(answerTxt); + nbsCaseAnswer.setNbsQuestionUid(nbsQuestionUid); + nbsCaseAnswer.setNbsQuestionVersionCtrlNbr(nbsQuestionVersionCtrlNbr); + nbsCaseAnswer.setLastChgTime(lastChgTime); + nbsCaseAnswer.setLastChgUserId(lastChgUserId); + nbsCaseAnswer.setRecordStatusCd(recordStatusCd); + nbsCaseAnswer.setRecordStatusTime(recordStatusTime); + nbsCaseAnswer.setSeqNbr(seqNbr); + nbsCaseAnswer.setAnswerLargeTxt(answerLargeTxt); + nbsCaseAnswer.setNbsTableMetadataUid(nbsTableMetadataUid); + nbsCaseAnswer.setNbsUiMetadataVerCtrlNbr(nbsUiMetadataVerCtrlNbr); + nbsCaseAnswer.setAnswerGroupSeqNbr(answerGroupSeqNbr); + + // Assert + assertEquals(id, nbsCaseAnswer.getId()); + assertEquals(actUid, nbsCaseAnswer.getActUid()); + assertEquals(addTime, nbsCaseAnswer.getAddTime()); + assertEquals(addUserId, nbsCaseAnswer.getAddUserId()); + assertEquals(answerTxt, nbsCaseAnswer.getAnswerTxt()); + assertEquals(nbsQuestionUid, nbsCaseAnswer.getNbsQuestionUid()); + assertEquals(nbsQuestionVersionCtrlNbr, nbsCaseAnswer.getNbsQuestionVersionCtrlNbr()); + assertEquals(lastChgTime, nbsCaseAnswer.getLastChgTime()); + assertEquals(lastChgUserId, nbsCaseAnswer.getLastChgUserId()); + assertEquals(recordStatusCd, nbsCaseAnswer.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsCaseAnswer.getRecordStatusTime()); + assertEquals(seqNbr, nbsCaseAnswer.getSeqNbr()); + assertEquals(answerLargeTxt, nbsCaseAnswer.getAnswerLargeTxt()); + assertEquals(nbsTableMetadataUid, nbsCaseAnswer.getNbsTableMetadataUid()); + assertEquals(nbsUiMetadataVerCtrlNbr, nbsCaseAnswer.getNbsUiMetadataVerCtrlNbr()); + assertEquals(answerGroupSeqNbr, nbsCaseAnswer.getAnswerGroupSeqNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsDocumentHistTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsDocumentHistTest.java new file mode 100644 index 000000000..125795b5d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsDocumentHistTest.java @@ -0,0 +1,260 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.nbs.NBSDocumentDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.nbs.NbsDocumentHist; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class NbsDocumentHistTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + NbsDocumentHist nbsDocumentHist = new NbsDocumentHist(); + + // Assert + assertNull(nbsDocumentHist.getNbsDocumentHistUid()); + assertNull(nbsDocumentHist.getDocPayload()); + assertNull(nbsDocumentHist.getDocTypeCd()); + assertNull(nbsDocumentHist.getLocalId()); + assertNull(nbsDocumentHist.getRecordStatusCd()); + assertNull(nbsDocumentHist.getRecordStatusTime()); + assertNull(nbsDocumentHist.getAddUserId()); + assertNull(nbsDocumentHist.getAddTime()); + assertNull(nbsDocumentHist.getProgAreaCd()); + assertNull(nbsDocumentHist.getJurisdictionCd()); + assertNull(nbsDocumentHist.getTxt()); + assertNull(nbsDocumentHist.getProgramJurisdictionOid()); + assertNull(nbsDocumentHist.getSharedInd()); + assertNull(nbsDocumentHist.getVersionCtrlNbr()); + assertNull(nbsDocumentHist.getCd()); + assertNull(nbsDocumentHist.getLastChgTime()); + assertNull(nbsDocumentHist.getLastChgUserId()); + assertNull(nbsDocumentHist.getDocPurposeCd()); + assertNull(nbsDocumentHist.getDocStatusCd()); + assertNull(nbsDocumentHist.getCdDescTxt()); + assertNull(nbsDocumentHist.getSendingFacilityNm()); + assertNull(nbsDocumentHist.getNbsInterfaceUid()); + assertNull(nbsDocumentHist.getSendingAppEventId()); + assertNull(nbsDocumentHist.getSendingAppPatientId()); + assertNull(nbsDocumentHist.getNbsDocumentUid()); + assertNull(nbsDocumentHist.getPhdcDocDerived()); + assertNull(nbsDocumentHist.getPayloadViewIndCd()); + assertNull(nbsDocumentHist.getNbsDocumentMetadataUid()); + assertNull(nbsDocumentHist.getExternalVersionCtrlNbr()); + assertNull(nbsDocumentHist.getProcessingDecisionTxt()); + assertNull(nbsDocumentHist.getProcessingDecisionCd()); + } + + @Test + void testDtoConstructor() { + // Arrange + Long nbsDocumentHistUid = 1L; + String docPayload = "Sample Payload"; + String docTypeCd = "Type1"; + String localId = "Local123"; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + String progAreaCd = "Prog1"; + String jurisdictionCd = "Jur1"; + String txt = "Sample Text"; + Long programJurisdictionOid = 3L; + String sharedInd = "Y"; + Integer versionCtrlNbr = 1; + String cd = "CD1"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 4L; + String docPurposeCd = "Purpose1"; + String docStatusCd = "Status1"; + String cdDescTxt = "Description"; + String sendingFacilityNm = "Facility1"; + Long nbsInterfaceUid = 5L; + String sendingAppEventId = "Event1"; + String sendingAppPatientId = "Patient1"; + Long nbsDocumentUid = 6L; + String phdcDocDerived = "Derived"; + String payloadViewIndCd = "View1"; + Long nbsDocumentMetadataUid = 7L; + Integer externalVersionCtrlNbr = 2; + String processingDecisionTxt = "Decision1"; + String processingDecisionCd = "DecisionCd1"; + + NBSDocumentDto dto = new NBSDocumentDto(); + dto.setNbsDocumentUid(nbsDocumentUid); + dto.setDocPayload(docPayload); + dto.setDocTypeCd(docTypeCd); + dto.setLocalId(localId); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setAddUserId(addUserId); + dto.setAddTime(addTime); + dto.setProgAreaCd(progAreaCd); + dto.setJurisdictionCd(jurisdictionCd); + dto.setTxt(txt); + dto.setProgramJurisdictionOid(programJurisdictionOid); + dto.setSharedInd(sharedInd); + dto.setVersionCtrlNbr(versionCtrlNbr); + dto.setCd(cd); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setDocPurposeCd(docPurposeCd); + dto.setDocStatusCd(docStatusCd); + dto.setCdDescTxt(cdDescTxt); + dto.setSendingFacilityNm(sendingFacilityNm); + dto.setNbsInterfaceUid(nbsInterfaceUid); + dto.setSendingAppEventId(sendingAppEventId); + dto.setSendingAppPatientId(sendingAppPatientId); + dto.setPhdcDocDerived(phdcDocDerived); + dto.setPayloadViewIndCd(payloadViewIndCd); + dto.setNbsDocumentMetadataUid(nbsDocumentMetadataUid); + dto.setExternalVersionCtrlNbr(externalVersionCtrlNbr); + dto.setProcessingDecisiontxt(processingDecisionTxt); + dto.setProcessingDecisionCd(processingDecisionCd); + + // Act + NbsDocumentHist nbsDocumentHist = new NbsDocumentHist(dto); + + // Assert + assertEquals(docPayload, nbsDocumentHist.getDocPayload()); + assertEquals(docTypeCd, nbsDocumentHist.getDocTypeCd()); + assertEquals(localId, nbsDocumentHist.getLocalId()); + assertEquals(recordStatusCd, nbsDocumentHist.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsDocumentHist.getRecordStatusTime()); + assertEquals(addUserId, nbsDocumentHist.getAddUserId()); + assertEquals(addTime, nbsDocumentHist.getAddTime()); + assertEquals(progAreaCd, nbsDocumentHist.getProgAreaCd()); + assertEquals(jurisdictionCd, nbsDocumentHist.getJurisdictionCd()); + assertEquals(txt, nbsDocumentHist.getTxt()); + assertEquals(programJurisdictionOid, nbsDocumentHist.getProgramJurisdictionOid()); + assertEquals(sharedInd, nbsDocumentHist.getSharedInd()); + assertEquals(versionCtrlNbr, nbsDocumentHist.getVersionCtrlNbr()); + assertEquals(cd, nbsDocumentHist.getCd()); + assertEquals(lastChgTime, nbsDocumentHist.getLastChgTime()); + assertEquals(lastChgUserId, nbsDocumentHist.getLastChgUserId()); + assertEquals(docPurposeCd, nbsDocumentHist.getDocPurposeCd()); + assertEquals(docStatusCd, nbsDocumentHist.getDocStatusCd()); + assertEquals(cdDescTxt, nbsDocumentHist.getCdDescTxt()); + assertEquals(sendingFacilityNm, nbsDocumentHist.getSendingFacilityNm()); + assertEquals(nbsInterfaceUid, nbsDocumentHist.getNbsInterfaceUid()); + assertEquals(sendingAppEventId, nbsDocumentHist.getSendingAppEventId()); + assertEquals(sendingAppPatientId, nbsDocumentHist.getSendingAppPatientId()); + assertEquals(nbsDocumentUid, nbsDocumentHist.getNbsDocumentUid()); + assertEquals(phdcDocDerived, nbsDocumentHist.getPhdcDocDerived()); + assertEquals(payloadViewIndCd, nbsDocumentHist.getPayloadViewIndCd()); + assertEquals(nbsDocumentMetadataUid, nbsDocumentHist.getNbsDocumentMetadataUid()); + assertEquals(externalVersionCtrlNbr, nbsDocumentHist.getExternalVersionCtrlNbr()); + assertEquals(processingDecisionTxt, nbsDocumentHist.getProcessingDecisionTxt()); + assertEquals(processingDecisionCd, nbsDocumentHist.getProcessingDecisionCd()); + } + + @Test + void testSettersAndGetters() { + // Arrange + NbsDocumentHist nbsDocumentHist = new NbsDocumentHist(); + + Long nbsDocumentHistUid = 1L; + String docPayload = "Sample Payload"; + String docTypeCd = "Type1"; + String localId = "Local123"; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + String progAreaCd = "Prog1"; + String jurisdictionCd = "Jur1"; + String txt = "Sample Text"; + Long programJurisdictionOid = 3L; + String sharedInd = "Y"; + Integer versionCtrlNbr = 1; + String cd = "CD1"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 4L; + String docPurposeCd = "Purpose1"; + String docStatusCd = "Status1"; + String cdDescTxt = "Description"; + String sendingFacilityNm = "Facility1"; + Long nbsInterfaceUid = 5L; + String sendingAppEventId = "Event1"; + String sendingAppPatientId = "Patient1"; + Long nbsDocumentUid = 6L; + String phdcDocDerived = "Derived"; + String payloadViewIndCd = "View1"; + Long nbsDocumentMetadataUid = 7L; + Integer externalVersionCtrlNbr = 2; + String processingDecisionTxt = "Decision1"; + String processingDecisionCd = "DecisionCd1"; + + // Act + nbsDocumentHist.setNbsDocumentHistUid(nbsDocumentHistUid); + nbsDocumentHist.setDocPayload(docPayload); + nbsDocumentHist.setDocTypeCd(docTypeCd); + nbsDocumentHist.setLocalId(localId); + nbsDocumentHist.setRecordStatusCd(recordStatusCd); + nbsDocumentHist.setRecordStatusTime(recordStatusTime); + nbsDocumentHist.setAddUserId(addUserId); + nbsDocumentHist.setAddTime(addTime); + nbsDocumentHist.setProgAreaCd(progAreaCd); + nbsDocumentHist.setJurisdictionCd(jurisdictionCd); + nbsDocumentHist.setTxt(txt); + nbsDocumentHist.setProgramJurisdictionOid(programJurisdictionOid); + nbsDocumentHist.setSharedInd(sharedInd); + nbsDocumentHist.setVersionCtrlNbr(versionCtrlNbr); + nbsDocumentHist.setCd(cd); + nbsDocumentHist.setLastChgTime(lastChgTime); + nbsDocumentHist.setLastChgUserId(lastChgUserId); + nbsDocumentHist.setDocPurposeCd(docPurposeCd); + nbsDocumentHist.setDocStatusCd(docStatusCd); + nbsDocumentHist.setCdDescTxt(cdDescTxt); + nbsDocumentHist.setSendingFacilityNm(sendingFacilityNm); + nbsDocumentHist.setNbsInterfaceUid(nbsInterfaceUid); + nbsDocumentHist.setSendingAppEventId(sendingAppEventId); + nbsDocumentHist.setSendingAppPatientId(sendingAppPatientId); + nbsDocumentHist.setNbsDocumentUid(nbsDocumentUid); + nbsDocumentHist.setPhdcDocDerived(phdcDocDerived); + nbsDocumentHist.setPayloadViewIndCd(payloadViewIndCd); + nbsDocumentHist.setNbsDocumentMetadataUid(nbsDocumentMetadataUid); + nbsDocumentHist.setExternalVersionCtrlNbr(externalVersionCtrlNbr); + nbsDocumentHist.setProcessingDecisionTxt(processingDecisionTxt); + nbsDocumentHist.setProcessingDecisionCd(processingDecisionCd); + + // Assert + assertEquals(nbsDocumentHistUid, nbsDocumentHist.getNbsDocumentHistUid()); + assertEquals(docPayload, nbsDocumentHist.getDocPayload()); + assertEquals(docTypeCd, nbsDocumentHist.getDocTypeCd()); + assertEquals(localId, nbsDocumentHist.getLocalId()); + assertEquals(recordStatusCd, nbsDocumentHist.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsDocumentHist.getRecordStatusTime()); + assertEquals(addUserId, nbsDocumentHist.getAddUserId()); + assertEquals(addTime, nbsDocumentHist.getAddTime()); + assertEquals(progAreaCd, nbsDocumentHist.getProgAreaCd()); + assertEquals(jurisdictionCd, nbsDocumentHist.getJurisdictionCd()); + assertEquals(txt, nbsDocumentHist.getTxt()); + assertEquals(programJurisdictionOid, nbsDocumentHist.getProgramJurisdictionOid()); + assertEquals(sharedInd, nbsDocumentHist.getSharedInd()); + assertEquals(versionCtrlNbr, nbsDocumentHist.getVersionCtrlNbr()); + assertEquals(cd, nbsDocumentHist.getCd()); + assertEquals(lastChgTime, nbsDocumentHist.getLastChgTime()); + assertEquals(lastChgUserId, nbsDocumentHist.getLastChgUserId()); + assertEquals(docPurposeCd, nbsDocumentHist.getDocPurposeCd()); + assertEquals(docStatusCd, nbsDocumentHist.getDocStatusCd()); + assertEquals(cdDescTxt, nbsDocumentHist.getCdDescTxt()); + assertEquals(sendingFacilityNm, nbsDocumentHist.getSendingFacilityNm()); + assertEquals(nbsInterfaceUid, nbsDocumentHist.getNbsInterfaceUid()); + assertEquals(sendingAppEventId, nbsDocumentHist.getSendingAppEventId()); + assertEquals(sendingAppPatientId, nbsDocumentHist.getSendingAppPatientId()); + assertEquals(nbsDocumentUid, nbsDocumentHist.getNbsDocumentUid()); + assertEquals(phdcDocDerived, nbsDocumentHist.getPhdcDocDerived()); + assertEquals(payloadViewIndCd, nbsDocumentHist.getPayloadViewIndCd()); + assertEquals(nbsDocumentMetadataUid, nbsDocumentHist.getNbsDocumentMetadataUid()); + assertEquals(externalVersionCtrlNbr, nbsDocumentHist.getExternalVersionCtrlNbr()); + assertEquals(processingDecisionTxt, nbsDocumentHist.getProcessingDecisionTxt()); + assertEquals(processingDecisionCd, nbsDocumentHist.getProcessingDecisionCd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsDocumentTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsDocumentTest.java new file mode 100644 index 000000000..b078e2e5d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsDocumentTest.java @@ -0,0 +1,248 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.nbs.NBSDocumentDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.nbs.NbsDocument; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class NbsDocumentTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + NbsDocument nbsDocument = new NbsDocument(); + + // Assert + assertNull(nbsDocument.getNbsDocumentUid()); + assertNull(nbsDocument.getDocPayload()); + assertNull(nbsDocument.getDocTypeCd()); + assertNull(nbsDocument.getLocalId()); + assertNull(nbsDocument.getRecordStatusCd()); + assertNull(nbsDocument.getRecordStatusTime()); + assertNull(nbsDocument.getAddUserId()); + assertNull(nbsDocument.getAddTime()); + assertNull(nbsDocument.getProgAreaCd()); + assertNull(nbsDocument.getJurisdictionCd()); + assertNull(nbsDocument.getTxt()); + assertNull(nbsDocument.getProgramJurisdictionOid()); + assertNull(nbsDocument.getSharedInd()); + assertNull(nbsDocument.getVersionCtrlNbr()); + assertNull(nbsDocument.getCd()); + assertNull(nbsDocument.getLastChgTime()); + assertNull(nbsDocument.getLastChgUserId()); + assertNull(nbsDocument.getDocPurposeCd()); + assertNull(nbsDocument.getDocStatusCd()); + assertNull(nbsDocument.getCdDescTxt()); + assertNull(nbsDocument.getSendingFacilityNm()); + assertNull(nbsDocument.getNbsInterfaceUid()); + assertNull(nbsDocument.getSendingAppEventId()); + assertNull(nbsDocument.getSendingAppPatientId()); + assertNull(nbsDocument.getPhdcDocDerived()); + assertNull(nbsDocument.getPayloadViewIndCd()); + assertNull(nbsDocument.getExternalVersionCtrlNbr()); + assertNull(nbsDocument.getProcessingDecisionTxt()); + assertNull(nbsDocument.getProcessingDecisionCd()); + } + + @Test + void testDtoConstructor() { + // Arrange + Long nbsDocumentUid = 1L; + String docPayload = "Sample Payload"; + String docTypeCd = "Type1"; + String localId = "Local123"; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + String progAreaCd = "Prog1"; + String jurisdictionCd = "Jur1"; + String txt = "Sample Text"; + Long programJurisdictionOid = 3L; + String sharedInd = "Y"; + Integer versionCtrlNbr = 1; + String cd = "CD1"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 4L; + String docPurposeCd = "Purpose1"; + String docStatusCd = "Status1"; + String cdDescTxt = "Description"; + String sendingFacilityNm = "Facility1"; + Long nbsInterfaceUid = 5L; + String sendingAppEventId = "Event1"; + String sendingAppPatientId = "Patient1"; + String phdcDocDerived = "Derived"; + String payloadViewIndCd = "View1"; + Integer externalVersionCtrlNbr = 2; + String processingDecisionTxt = "Decision1"; + String processingDecisionCd = "DecisionCd1"; + + NBSDocumentDto dto = new NBSDocumentDto(); + dto.setNbsDocumentUid(nbsDocumentUid); + dto.setDocPayload(docPayload); + dto.setDocTypeCd(docTypeCd); + dto.setLocalId(localId); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setAddUserId(addUserId); + dto.setAddTime(addTime); + dto.setProgAreaCd(progAreaCd); + dto.setJurisdictionCd(jurisdictionCd); + dto.setTxt(txt); + dto.setProgramJurisdictionOid(programJurisdictionOid); + dto.setSharedInd(sharedInd); + dto.setVersionCtrlNbr(versionCtrlNbr); + dto.setCd(cd); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setDocPurposeCd(docPurposeCd); + dto.setDocStatusCd(docStatusCd); + dto.setCdDescTxt(cdDescTxt); + dto.setSendingFacilityNm(sendingFacilityNm); + dto.setNbsInterfaceUid(nbsInterfaceUid); + dto.setSendingAppEventId(sendingAppEventId); + dto.setSendingAppPatientId(sendingAppPatientId); + dto.setPhdcDocDerived(phdcDocDerived); + dto.setPayloadViewIndCd(payloadViewIndCd); + dto.setExternalVersionCtrlNbr(externalVersionCtrlNbr); + dto.setProcessingDecisiontxt(processingDecisionTxt); + dto.setProcessingDecisionCd(processingDecisionCd); + + // Act + NbsDocument nbsDocument = new NbsDocument(dto); + + // Assert + assertEquals(nbsDocumentUid, nbsDocument.getNbsDocumentUid()); + assertEquals(docPayload, nbsDocument.getDocPayload()); + assertEquals(docTypeCd, nbsDocument.getDocTypeCd()); + assertEquals(localId, nbsDocument.getLocalId()); + assertEquals(recordStatusCd, nbsDocument.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsDocument.getRecordStatusTime()); + assertEquals(addUserId, nbsDocument.getAddUserId()); + assertEquals(addTime, nbsDocument.getAddTime()); + assertEquals(progAreaCd, nbsDocument.getProgAreaCd()); + assertEquals(jurisdictionCd, nbsDocument.getJurisdictionCd()); + assertEquals(txt, nbsDocument.getTxt()); + assertEquals(programJurisdictionOid, nbsDocument.getProgramJurisdictionOid()); + assertEquals(sharedInd, nbsDocument.getSharedInd()); + assertEquals(versionCtrlNbr, nbsDocument.getVersionCtrlNbr()); + assertEquals(cd, nbsDocument.getCd()); + assertEquals(lastChgTime, nbsDocument.getLastChgTime()); + assertEquals(lastChgUserId, nbsDocument.getLastChgUserId()); + assertEquals(docPurposeCd, nbsDocument.getDocPurposeCd()); + assertEquals(docStatusCd, nbsDocument.getDocStatusCd()); + assertEquals(cdDescTxt, nbsDocument.getCdDescTxt()); + assertEquals(sendingFacilityNm, nbsDocument.getSendingFacilityNm()); + assertEquals(nbsInterfaceUid, nbsDocument.getNbsInterfaceUid()); + assertEquals(sendingAppEventId, nbsDocument.getSendingAppEventId()); + assertEquals(sendingAppPatientId, nbsDocument.getSendingAppPatientId()); + assertEquals(phdcDocDerived, nbsDocument.getPhdcDocDerived()); + assertEquals(payloadViewIndCd, nbsDocument.getPayloadViewIndCd()); + assertEquals(externalVersionCtrlNbr, nbsDocument.getExternalVersionCtrlNbr()); + assertEquals(processingDecisionTxt, nbsDocument.getProcessingDecisionTxt()); + assertEquals(processingDecisionCd, nbsDocument.getProcessingDecisionCd()); + } + + @Test + void testSettersAndGetters() { + // Arrange + NbsDocument nbsDocument = new NbsDocument(); + + Long nbsDocumentUid = 1L; + String docPayload = "Sample Payload"; + String docTypeCd = "Type1"; + String localId = "Local123"; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + String progAreaCd = "Prog1"; + String jurisdictionCd = "Jur1"; + String txt = "Sample Text"; + Long programJurisdictionOid = 3L; + String sharedInd = "Y"; + Integer versionCtrlNbr = 1; + String cd = "CD1"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 4L; + String docPurposeCd = "Purpose1"; + String docStatusCd = "Status1"; + String cdDescTxt = "Description"; + String sendingFacilityNm = "Facility1"; + Long nbsInterfaceUid = 5L; + String sendingAppEventId = "Event1"; + String sendingAppPatientId = "Patient1"; + String phdcDocDerived = "Derived"; + String payloadViewIndCd = "View1"; + Integer externalVersionCtrlNbr = 2; + String processingDecisionTxt = "Decision1"; + String processingDecisionCd = "DecisionCd1"; + + // Act + nbsDocument.setNbsDocumentUid(nbsDocumentUid); + nbsDocument.setDocPayload(docPayload); + nbsDocument.setDocTypeCd(docTypeCd); + nbsDocument.setLocalId(localId); + nbsDocument.setRecordStatusCd(recordStatusCd); + nbsDocument.setRecordStatusTime(recordStatusTime); + nbsDocument.setAddUserId(addUserId); + nbsDocument.setAddTime(addTime); + nbsDocument.setProgAreaCd(progAreaCd); + nbsDocument.setJurisdictionCd(jurisdictionCd); + nbsDocument.setTxt(txt); + nbsDocument.setProgramJurisdictionOid(programJurisdictionOid); + nbsDocument.setSharedInd(sharedInd); + nbsDocument.setVersionCtrlNbr(versionCtrlNbr); + nbsDocument.setCd(cd); + nbsDocument.setLastChgTime(lastChgTime); + nbsDocument.setLastChgUserId(lastChgUserId); + nbsDocument.setDocPurposeCd(docPurposeCd); + nbsDocument.setDocStatusCd(docStatusCd); + nbsDocument.setCdDescTxt(cdDescTxt); + nbsDocument.setSendingFacilityNm(sendingFacilityNm); + nbsDocument.setNbsInterfaceUid(nbsInterfaceUid); + nbsDocument.setSendingAppEventId(sendingAppEventId); + nbsDocument.setSendingAppPatientId(sendingAppPatientId); + nbsDocument.setPhdcDocDerived(phdcDocDerived); + nbsDocument.setPayloadViewIndCd(payloadViewIndCd); + nbsDocument.setExternalVersionCtrlNbr(externalVersionCtrlNbr); + nbsDocument.setProcessingDecisionTxt(processingDecisionTxt); + nbsDocument.setProcessingDecisionCd(processingDecisionCd); + + // Assert + assertEquals(nbsDocumentUid, nbsDocument.getNbsDocumentUid()); + assertEquals(docPayload, nbsDocument.getDocPayload()); + assertEquals(docTypeCd, nbsDocument.getDocTypeCd()); + assertEquals(localId, nbsDocument.getLocalId()); + assertEquals(recordStatusCd, nbsDocument.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsDocument.getRecordStatusTime()); + assertEquals(addUserId, nbsDocument.getAddUserId()); + assertEquals(addTime, nbsDocument.getAddTime()); + assertEquals(progAreaCd, nbsDocument.getProgAreaCd()); + assertEquals(jurisdictionCd, nbsDocument.getJurisdictionCd()); + assertEquals(txt, nbsDocument.getTxt()); + assertEquals(programJurisdictionOid, nbsDocument.getProgramJurisdictionOid()); + assertEquals(sharedInd, nbsDocument.getSharedInd()); + assertEquals(versionCtrlNbr, nbsDocument.getVersionCtrlNbr()); + assertEquals(cd, nbsDocument.getCd()); + assertEquals(lastChgTime, nbsDocument.getLastChgTime()); + assertEquals(lastChgUserId, nbsDocument.getLastChgUserId()); + assertEquals(docPurposeCd, nbsDocument.getDocPurposeCd()); + assertEquals(docStatusCd, nbsDocument.getDocStatusCd()); + assertEquals(cdDescTxt, nbsDocument.getCdDescTxt()); + assertEquals(sendingFacilityNm, nbsDocument.getSendingFacilityNm()); + assertEquals(nbsInterfaceUid, nbsDocument.getNbsInterfaceUid()); + assertEquals(sendingAppEventId, nbsDocument.getSendingAppEventId()); + assertEquals(sendingAppPatientId, nbsDocument.getSendingAppPatientId()); + assertEquals(phdcDocDerived, nbsDocument.getPhdcDocDerived()); + assertEquals(payloadViewIndCd, nbsDocument.getPayloadViewIndCd()); + assertEquals(externalVersionCtrlNbr, nbsDocument.getExternalVersionCtrlNbr()); + assertEquals(processingDecisionTxt, nbsDocument.getProcessingDecisionTxt()); + assertEquals(processingDecisionCd, nbsDocument.getProcessingDecisionCd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsNoteTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsNoteTest.java new file mode 100644 index 000000000..ff15774a3 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NbsNoteTest.java @@ -0,0 +1,122 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.nbs.NbsNoteDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.nbs.NbsNote; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class NbsNoteTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + NbsNote nbsNote = new NbsNote(); + + // Assert + assertNull(nbsNote.getNbsNoteUid()); + assertNull(nbsNote.getNoteParentUid()); + assertNull(nbsNote.getRecordStatusCd()); + assertNull(nbsNote.getRecordStatusTime()); + assertNull(nbsNote.getAddTime()); + assertNull(nbsNote.getAddUserId()); + assertNull(nbsNote.getLastChgTime()); + assertNull(nbsNote.getLastChgUserId()); + assertNull(nbsNote.getNote()); + assertNull(nbsNote.getPrivateIndCd()); + assertNull(nbsNote.getTypeCd()); + } + + @Test + void testDtoConstructor() { + // Arrange + Long nbsNoteUid = 1L; + Long noteParentUid = 2L; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 3L; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 4L; + String note = "Sample Note"; + String privateIndCd = "Y"; + String typeCd = "Type1"; + + NbsNoteDto dto = new NbsNoteDto(); + dto.setNbsNoteUid(nbsNoteUid); + dto.setNoteParentUid(noteParentUid); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setAddTime(addTime); + dto.setAddUserId(addUserId); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setNote(note); + dto.setPrivateIndCd(privateIndCd); + dto.setTypeCd(typeCd); + + // Act + NbsNote nbsNote = new NbsNote(dto); + + // Assert + assertEquals(nbsNoteUid, nbsNote.getNbsNoteUid()); + assertEquals(noteParentUid, nbsNote.getNoteParentUid()); + assertEquals(recordStatusCd, nbsNote.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsNote.getRecordStatusTime()); + assertEquals(addTime, nbsNote.getAddTime()); + assertEquals(addUserId, nbsNote.getAddUserId()); + assertEquals(lastChgTime, nbsNote.getLastChgTime()); + assertEquals(lastChgUserId, nbsNote.getLastChgUserId()); + assertEquals(note, nbsNote.getNote()); + assertEquals(privateIndCd, nbsNote.getPrivateIndCd()); + assertEquals(typeCd, nbsNote.getTypeCd()); + } + + @Test + void testSettersAndGetters() { + // Arrange + NbsNote nbsNote = new NbsNote(); + + Long nbsNoteUid = 1L; + Long noteParentUid = 2L; + String recordStatusCd = "Active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 3L; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 4L; + String note = "Sample Note"; + String privateIndCd = "Y"; + String typeCd = "Type1"; + + // Act + nbsNote.setNbsNoteUid(nbsNoteUid); + nbsNote.setNoteParentUid(noteParentUid); + nbsNote.setRecordStatusCd(recordStatusCd); + nbsNote.setRecordStatusTime(recordStatusTime); + nbsNote.setAddTime(addTime); + nbsNote.setAddUserId(addUserId); + nbsNote.setLastChgTime(lastChgTime); + nbsNote.setLastChgUserId(lastChgUserId); + nbsNote.setNote(note); + nbsNote.setPrivateIndCd(privateIndCd); + nbsNote.setTypeCd(typeCd); + + // Assert + assertEquals(nbsNoteUid, nbsNote.getNbsNoteUid()); + assertEquals(noteParentUid, nbsNote.getNoteParentUid()); + assertEquals(recordStatusCd, nbsNote.getRecordStatusCd()); + assertEquals(recordStatusTime, nbsNote.getRecordStatusTime()); + assertEquals(addTime, nbsNote.getAddTime()); + assertEquals(addUserId, nbsNote.getAddUserId()); + assertEquals(lastChgTime, nbsNote.getLastChgTime()); + assertEquals(lastChgUserId, nbsNote.getLastChgUserId()); + assertEquals(note, nbsNote.getNote()); + assertEquals(privateIndCd, nbsNote.getPrivateIndCd()); + assertEquals(typeCd, nbsNote.getTypeCd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NonPersonLivingSubjectTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NonPersonLivingSubjectTest.java new file mode 100644 index 000000000..d6efaa6b7 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/NonPersonLivingSubjectTest.java @@ -0,0 +1,239 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + +import gov.cdc.dataprocessing.model.dto.phc.NonPersonLivingSubjectDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.phc.NonPersonLivingSubject; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class NonPersonLivingSubjectTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + NonPersonLivingSubject nonPersonLivingSubject = new NonPersonLivingSubject(); + + // Assert + assertNull(nonPersonLivingSubject.getNonPersonUid()); + assertNull(nonPersonLivingSubject.getAddReasonCd()); + assertNull(nonPersonLivingSubject.getAddTime()); + assertNull(nonPersonLivingSubject.getAddUserId()); + assertNull(nonPersonLivingSubject.getBirthSexCd()); + assertNull(nonPersonLivingSubject.getBirthOrderNbr()); + assertNull(nonPersonLivingSubject.getBirthTime()); + assertNull(nonPersonLivingSubject.getBreedCd()); + assertNull(nonPersonLivingSubject.getBreedDescTxt()); + assertNull(nonPersonLivingSubject.getCd()); + assertNull(nonPersonLivingSubject.getCdDescTxt()); + assertNull(nonPersonLivingSubject.getDeceasedIndCd()); + assertNull(nonPersonLivingSubject.getDeceasedTime()); + assertNull(nonPersonLivingSubject.getDescription()); + assertNull(nonPersonLivingSubject.getLastChgReasonCd()); + assertNull(nonPersonLivingSubject.getLastChgTime()); + assertNull(nonPersonLivingSubject.getLastChgUserId()); + assertNull(nonPersonLivingSubject.getLocalId()); + assertNull(nonPersonLivingSubject.getMultipleBirthInd()); + assertNull(nonPersonLivingSubject.getNm()); + assertNull(nonPersonLivingSubject.getRecordStatusCd()); + assertNull(nonPersonLivingSubject.getRecordStatusTime()); + assertNull(nonPersonLivingSubject.getStatusCd()); + assertNull(nonPersonLivingSubject.getStatusTime()); + assertNull(nonPersonLivingSubject.getTaxonomicClassificationCd()); + assertNull(nonPersonLivingSubject.getTaxonomicClassificationDesc()); + assertNull(nonPersonLivingSubject.getUserAffiliationTxt()); + assertNull(nonPersonLivingSubject.getVersionCtrlNbr()); + } + + @Test + void testParameterizedConstructor() { + // Arrange + Long nonPersonUid = 1L; + String addReasonCd = "reason"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String birthSexCd = "M"; + Integer birthOrderNbr = 1; + Timestamp birthTime = new Timestamp(System.currentTimeMillis()); + String breedCd = "breed"; + String breedDescTxt = "breed description"; + String cd = "code"; + String cdDescTxt = "code description"; + String deceasedIndCd = "N"; + Timestamp deceasedTime = new Timestamp(System.currentTimeMillis()); + String description = "description"; + String lastChgReasonCd = "change reason"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "localId"; + String multipleBirthInd = "Y"; + String nm = "name"; + String recordStatusCd = "active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String statusCd = "status"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String taxonomicClassificationCd = "classification"; + String taxonomicClassificationDesc = "classification description"; + String userAffiliationTxt = "affiliation"; + Integer versionCtrlNbr = 1; + + NonPersonLivingSubjectDto dto = new NonPersonLivingSubjectDto(); + dto.setNonPersonUid(nonPersonUid); + dto.setAddReasonCd(addReasonCd); + dto.setAddTime(addTime); + dto.setAddUserId(addUserId); + dto.setBirthSexCd(birthSexCd); + dto.setBirthOrderNbr(birthOrderNbr); + dto.setBirthTime(birthTime); + dto.setBreedCd(breedCd); + dto.setBreedDescTxt(breedDescTxt); + dto.setCd(cd); + dto.setCdDescTxt(cdDescTxt); + dto.setDeceasedIndCd(deceasedIndCd); + dto.setDeceasedTime(deceasedTime); + dto.setDescription(description); + dto.setLastChgReasonCd(lastChgReasonCd); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setLocalId(localId); + dto.setMultipleBirthInd(multipleBirthInd); + dto.setNm(nm); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setStatusCd(statusCd); + dto.setStatusTime(statusTime); + dto.setTaxonomicClassificationCd(taxonomicClassificationCd); + dto.setTaxonomicClassificationDesc(taxonomicClassificationDesc); + dto.setUserAffiliationTxt(userAffiliationTxt); + dto.setVersionCtrlNbr(versionCtrlNbr); + + // Act + NonPersonLivingSubject nonPersonLivingSubject = new NonPersonLivingSubject(dto); + + // Assert + assertEquals(nonPersonUid, nonPersonLivingSubject.getNonPersonUid()); + assertEquals(addReasonCd, nonPersonLivingSubject.getAddReasonCd()); + assertNotNull(nonPersonLivingSubject.getAddTime()); + assertNotNull( nonPersonLivingSubject.getAddUserId()); + assertEquals(birthSexCd, nonPersonLivingSubject.getBirthSexCd()); + assertEquals(birthOrderNbr, nonPersonLivingSubject.getBirthOrderNbr()); + assertEquals(birthTime, nonPersonLivingSubject.getBirthTime()); + assertEquals(breedCd, nonPersonLivingSubject.getBreedCd()); + assertEquals(breedDescTxt, nonPersonLivingSubject.getBreedDescTxt()); + assertEquals(cd, nonPersonLivingSubject.getCd()); + assertEquals(cdDescTxt, nonPersonLivingSubject.getCdDescTxt()); + assertEquals(deceasedIndCd, nonPersonLivingSubject.getDeceasedIndCd()); + assertEquals(deceasedTime, nonPersonLivingSubject.getDeceasedTime()); + assertEquals(description, nonPersonLivingSubject.getDescription()); + assertEquals(lastChgReasonCd, nonPersonLivingSubject.getLastChgReasonCd()); + assertEquals(lastChgTime, nonPersonLivingSubject.getLastChgTime()); + assertEquals(lastChgUserId, nonPersonLivingSubject.getLastChgUserId()); + assertEquals(localId, nonPersonLivingSubject.getLocalId()); + assertEquals(multipleBirthInd, nonPersonLivingSubject.getMultipleBirthInd()); + assertEquals(nm, nonPersonLivingSubject.getNm()); + assertEquals(recordStatusCd, nonPersonLivingSubject.getRecordStatusCd()); + assertEquals(recordStatusTime, nonPersonLivingSubject.getRecordStatusTime()); + assertEquals(statusCd, nonPersonLivingSubject.getStatusCd()); + assertEquals(statusTime, nonPersonLivingSubject.getStatusTime()); + assertEquals(taxonomicClassificationCd, nonPersonLivingSubject.getTaxonomicClassificationCd()); + assertEquals(taxonomicClassificationDesc, nonPersonLivingSubject.getTaxonomicClassificationDesc()); + assertEquals(userAffiliationTxt, nonPersonLivingSubject.getUserAffiliationTxt()); + assertEquals(versionCtrlNbr, nonPersonLivingSubject.getVersionCtrlNbr()); + } + + @Test + void testSettersAndGetters() { + // Arrange + NonPersonLivingSubject nonPersonLivingSubject = new NonPersonLivingSubject(); + + Long nonPersonUid = 1L; + String addReasonCd = "reason"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String birthSexCd = "M"; + Integer birthOrderNbr = 1; + Timestamp birthTime = new Timestamp(System.currentTimeMillis()); + String breedCd = "breed"; + String breedDescTxt = "breed description"; + String cd = "code"; + String cdDescTxt = "code description"; + String deceasedIndCd = "N"; + Timestamp deceasedTime = new Timestamp(System.currentTimeMillis()); + String description = "description"; + String lastChgReasonCd = "change reason"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "localId"; + String multipleBirthInd = "Y"; + String nm = "name"; + String recordStatusCd = "active"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String statusCd = "status"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String taxonomicClassificationCd = "classification"; + String taxonomicClassificationDesc = "classification description"; + String userAffiliationTxt = "affiliation"; + Integer versionCtrlNbr = 1; + + // Act + nonPersonLivingSubject.setNonPersonUid(nonPersonUid); + nonPersonLivingSubject.setAddReasonCd(addReasonCd); + nonPersonLivingSubject.setAddTime(addTime); + nonPersonLivingSubject.setAddUserId(addUserId); + nonPersonLivingSubject.setBirthSexCd(birthSexCd); + nonPersonLivingSubject.setBirthOrderNbr(birthOrderNbr); + nonPersonLivingSubject.setBirthTime(birthTime); + nonPersonLivingSubject.setBreedCd(breedCd); + nonPersonLivingSubject.setBreedDescTxt(breedDescTxt); + nonPersonLivingSubject.setCd(cd); + nonPersonLivingSubject.setCdDescTxt(cdDescTxt); + nonPersonLivingSubject.setDeceasedIndCd(deceasedIndCd); + nonPersonLivingSubject.setDeceasedTime(deceasedTime); + nonPersonLivingSubject.setDescription(description); + nonPersonLivingSubject.setLastChgReasonCd(lastChgReasonCd); + nonPersonLivingSubject.setLastChgTime(lastChgTime); + nonPersonLivingSubject.setLastChgUserId(lastChgUserId); + nonPersonLivingSubject.setLocalId(localId); + nonPersonLivingSubject.setMultipleBirthInd(multipleBirthInd); + nonPersonLivingSubject.setNm(nm); + nonPersonLivingSubject.setRecordStatusCd(recordStatusCd); + nonPersonLivingSubject.setRecordStatusTime(recordStatusTime); + nonPersonLivingSubject.setStatusCd(statusCd); + nonPersonLivingSubject.setStatusTime(statusTime); + nonPersonLivingSubject.setTaxonomicClassificationCd(taxonomicClassificationCd); + nonPersonLivingSubject.setTaxonomicClassificationDesc(taxonomicClassificationDesc); + nonPersonLivingSubject.setUserAffiliationTxt(userAffiliationTxt); + nonPersonLivingSubject.setVersionCtrlNbr(versionCtrlNbr); + + // Assert + assertEquals(nonPersonUid, nonPersonLivingSubject.getNonPersonUid()); + assertEquals(addReasonCd, nonPersonLivingSubject.getAddReasonCd()); + assertEquals(addTime, nonPersonLivingSubject.getAddTime()); + assertEquals(addUserId, nonPersonLivingSubject.getAddUserId()); + assertEquals(birthSexCd, nonPersonLivingSubject.getBirthSexCd()); + assertEquals(birthOrderNbr, nonPersonLivingSubject.getBirthOrderNbr()); + assertEquals(birthTime, nonPersonLivingSubject.getBirthTime()); + assertEquals(breedCd, nonPersonLivingSubject.getBreedCd()); + assertEquals(breedDescTxt, nonPersonLivingSubject.getBreedDescTxt()); + assertEquals(cd, nonPersonLivingSubject.getCd()); + assertEquals(cdDescTxt, nonPersonLivingSubject.getCdDescTxt()); + assertEquals(deceasedIndCd, nonPersonLivingSubject.getDeceasedIndCd()); + assertEquals(deceasedTime, nonPersonLivingSubject.getDeceasedTime()); + assertEquals(description, nonPersonLivingSubject.getDescription()); + assertEquals(lastChgReasonCd, nonPersonLivingSubject.getLastChgReasonCd()); + assertEquals(lastChgTime, nonPersonLivingSubject.getLastChgTime()); + assertEquals(lastChgUserId, nonPersonLivingSubject.getLastChgUserId()); + assertEquals(localId, nonPersonLivingSubject.getLocalId()); + assertEquals(multipleBirthInd, nonPersonLivingSubject.getMultipleBirthInd()); + assertEquals(nm, nonPersonLivingSubject.getNm()); + assertEquals(recordStatusCd, nonPersonLivingSubject.getRecordStatusCd()); + assertEquals(recordStatusTime, nonPersonLivingSubject.getRecordStatusTime()); + assertEquals(statusCd, nonPersonLivingSubject.getStatusCd()); + assertEquals(statusTime, nonPersonLivingSubject.getStatusTime()); + assertEquals(taxonomicClassificationCd, nonPersonLivingSubject.getTaxonomicClassificationCd()); + assertEquals(taxonomicClassificationDesc, nonPersonLivingSubject.getTaxonomicClassificationDesc()); + assertEquals(userAffiliationTxt, nonPersonLivingSubject.getUserAffiliationTxt()); + assertEquals(versionCtrlNbr, nonPersonLivingSubject.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/ObservationBaseTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/ObservationBaseTest.java new file mode 100644 index 000000000..35af05c6e --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/ObservationBaseTest.java @@ -0,0 +1,295 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.repository.nbs.odse.model.observation.ObservationBase; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class ObservationBaseTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + ObservationBase observation = new ObservationBase(); + + // Assert + assertNull(observation.getObservationUid()); + assertNull(observation.getActivityDurationAmt()); + assertNull(observation.getActivityDurationUnitCd()); + assertNull(observation.getActivityFromTime()); + assertNull(observation.getActivityToTime()); + assertNull(observation.getAddReasonCd()); + assertNull(observation.getAddTime()); + assertNull(observation.getAddUserId()); + assertNull(observation.getCd()); + assertNull(observation.getCdDescTxt()); + assertNull(observation.getCdSystemCd()); + assertNull(observation.getCdSystemDescTxt()); + assertNull(observation.getConfidentialityCd()); + assertNull(observation.getConfidentialityDescTxt()); + assertNull(observation.getCtrlCdDisplayForm()); + assertNull(observation.getCtrlCdUserDefined1()); + assertNull(observation.getCtrlCdUserDefined2()); + assertNull(observation.getCtrlCdUserDefined3()); + assertNull(observation.getCtrlCdUserDefined4()); + assertNull(observation.getDerivationExp()); + assertNull(observation.getEffectiveDurationAmt()); + assertNull(observation.getEffectiveDurationUnitCd()); + assertNull(observation.getEffectiveFromTime()); + assertNull(observation.getEffectiveToTime()); + assertNull(observation.getElectronicInd()); + assertNull(observation.getGroupLevelCd()); + assertNull(observation.getJurisdictionCd()); + assertNull(observation.getLabConditionCd()); + assertNull(observation.getLastChgReasonCd()); + assertNull(observation.getLastChgTime()); + assertNull(observation.getLastChgUserId()); + assertNull(observation.getLocalId()); + assertNull(observation.getMethodCd()); + assertNull(observation.getMethodDescTxt()); + assertNull(observation.getObsDomainCd()); + assertNull(observation.getObsDomainCdSt1()); + assertNull(observation.getPnuCd()); + assertNull(observation.getPriorityCd()); + assertNull(observation.getPriorityDescTxt()); + assertNull(observation.getProgAreaCd()); + assertNull(observation.getRecordStatusCd()); + assertNull(observation.getRecordStatusTime()); + assertNull(observation.getRepeatNbr()); + assertNull(observation.getStatusCd()); + assertNull(observation.getStatusTime()); + assertNull(observation.getSubjectPersonUid()); + assertNull(observation.getTargetSiteCd()); + assertNull(observation.getTargetSiteDescTxt()); + assertNull(observation.getTxt()); + assertNull(observation.getUserAffiliationTxt()); + assertNull(observation.getValueCd()); + assertNull(observation.getYnuCd()); + assertNull(observation.getProgramJurisdictionOid()); + assertNull(observation.getSharedInd()); + assertNull(observation.getVersionCtrlNbr()); + assertNull(observation.getAltCd()); + assertNull(observation.getAltCdDescTxt()); + assertNull(observation.getAltCdSystemCd()); + assertNull(observation.getAltCdSystemDescTxt()); + assertNull(observation.getCdDerivedInd()); + assertNull(observation.getRptToStateTime()); + assertNull(observation.getCdVersion()); + assertNull(observation.getProcessingDecisionCd()); + assertNull(observation.getPregnantIndCd()); + assertNull(observation.getPregnantWeek()); + assertNull(observation.getProcessingDecisionTxt()); + } + + @Test + void testSettersAndGetters() { + // Arrange + ObservationBase observation = new ObservationBase(); + + Long observationUid = 1L; + String activityDurationAmt = "durationAmt"; + String activityDurationUnitCd = "durationUnitCd"; + Timestamp activityFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp activityToTime = new Timestamp(System.currentTimeMillis()); + String addReasonCd = "reasonCd"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String cd = "cd"; + String cdDescTxt = "cdDescTxt"; + String cdSystemCd = "cdSystemCd"; + String cdSystemDescTxt = "cdSystemDescTxt"; + String confidentialityCd = "confidentialityCd"; + String confidentialityDescTxt = "confidentialityDescTxt"; + String ctrlCdDisplayForm = "ctrlCdDisplayForm"; + String ctrlCdUserDefined1 = "ctrlCdUserDefined1"; + String ctrlCdUserDefined2 = "ctrlCdUserDefined2"; + String ctrlCdUserDefined3 = "ctrlCdUserDefined3"; + String ctrlCdUserDefined4 = "ctrlCdUserDefined4"; + Integer derivationExp = 3; + String effectiveDurationAmt = "effectiveDurationAmt"; + String effectiveDurationUnitCd = "effectiveDurationUnitCd"; + Timestamp effectiveFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp effectiveToTime = new Timestamp(System.currentTimeMillis()); + String electronicInd = "electronicInd"; + String groupLevelCd = "groupLevelCd"; + String jurisdictionCd = "jurisdictionCd"; + String labConditionCd = "labConditionCd"; + String lastChgReasonCd = "lastChgReasonCd"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 4L; + String localId = "localId"; + String methodCd = "methodCd"; + String methodDescTxt = "methodDescTxt"; + String obsDomainCd = "obsDomainCd"; + String obsDomainCdSt1 = "obsDomainCdSt1"; + String pnuCd = "pnuCd"; + String priorityCd = "priorityCd"; + String priorityDescTxt = "priorityDescTxt"; + String progAreaCd = "progAreaCd"; + String recordStatusCd = "recordStatusCd"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Integer repeatNbr = 5; + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + Long subjectPersonUid = 6L; + String targetSiteCd = "targetSiteCd"; + String targetSiteDescTxt = "targetSiteDescTxt"; + String txt = "txt"; + String userAffiliationTxt = "userAffiliationTxt"; + String valueCd = "valueCd"; + String ynuCd = "ynuCd"; + Long programJurisdictionOid = 7L; + String sharedInd = "Y"; + Integer versionCtrlNbr = 1; + String altCd = "altCd"; + String altCdDescTxt = "altCdDescTxt"; + String altCdSystemCd = "altCdSystemCd"; + String altCdSystemDescTxt = "altCdSystemDescTxt"; + String cdDerivedInd = "cdDerivedInd"; + Timestamp rptToStateTime = new Timestamp(System.currentTimeMillis()); + String cdVersion = "cdVersion"; + String processingDecisionCd = "processingDecisionCd"; + String pregnantIndCd = "pregnantIndCd"; + Integer pregnantWeek = 10; + String processingDecisionTxt = "processingDecisionTxt"; + + // Act + observation.setObservationUid(observationUid); + observation.setActivityDurationAmt(activityDurationAmt); + observation.setActivityDurationUnitCd(activityDurationUnitCd); + observation.setActivityFromTime(activityFromTime); + observation.setActivityToTime(activityToTime); + observation.setAddReasonCd(addReasonCd); + observation.setAddTime(addTime); + observation.setAddUserId(addUserId); + observation.setCd(cd); + observation.setCdDescTxt(cdDescTxt); + observation.setCdSystemCd(cdSystemCd); + observation.setCdSystemDescTxt(cdSystemDescTxt); + observation.setConfidentialityCd(confidentialityCd); + observation.setConfidentialityDescTxt(confidentialityDescTxt); + observation.setCtrlCdDisplayForm(ctrlCdDisplayForm); + observation.setCtrlCdUserDefined1(ctrlCdUserDefined1); + observation.setCtrlCdUserDefined2(ctrlCdUserDefined2); + observation.setCtrlCdUserDefined3(ctrlCdUserDefined3); + observation.setCtrlCdUserDefined4(ctrlCdUserDefined4); + observation.setDerivationExp(derivationExp); + observation.setEffectiveDurationAmt(effectiveDurationAmt); + observation.setEffectiveDurationUnitCd(effectiveDurationUnitCd); + observation.setEffectiveFromTime(effectiveFromTime); + observation.setEffectiveToTime(effectiveToTime); + observation.setElectronicInd(electronicInd); + observation.setGroupLevelCd(groupLevelCd); + observation.setJurisdictionCd(jurisdictionCd); + observation.setLabConditionCd(labConditionCd); + observation.setLastChgReasonCd(lastChgReasonCd); + observation.setLastChgTime(lastChgTime); + observation.setLastChgUserId(lastChgUserId); + observation.setLocalId(localId); + observation.setMethodCd(methodCd); + observation.setMethodDescTxt(methodDescTxt); + observation.setObsDomainCd(obsDomainCd); + observation.setObsDomainCdSt1(obsDomainCdSt1); + observation.setPnuCd(pnuCd); + observation.setPriorityCd(priorityCd); + observation.setPriorityDescTxt(priorityDescTxt); + observation.setProgAreaCd(progAreaCd); + observation.setRecordStatusCd(recordStatusCd); + observation.setRecordStatusTime(recordStatusTime); + observation.setRepeatNbr(repeatNbr); + observation.setStatusCd(statusCd); + observation.setStatusTime(statusTime); + observation.setSubjectPersonUid(subjectPersonUid); + observation.setTargetSiteCd(targetSiteCd); + observation.setTargetSiteDescTxt(targetSiteDescTxt); + observation.setTxt(txt); + observation.setUserAffiliationTxt(userAffiliationTxt); + observation.setValueCd(valueCd); + observation.setYnuCd(ynuCd); + observation.setProgramJurisdictionOid(programJurisdictionOid); + observation.setSharedInd(sharedInd); + observation.setVersionCtrlNbr(versionCtrlNbr); + observation.setAltCd(altCd); + observation.setAltCdDescTxt(altCdDescTxt); + observation.setAltCdSystemCd(altCdSystemCd); + observation.setAltCdSystemDescTxt(altCdSystemDescTxt); + observation.setCdDerivedInd(cdDerivedInd); + observation.setRptToStateTime(rptToStateTime); + observation.setCdVersion(cdVersion); + observation.setProcessingDecisionCd(processingDecisionCd); + observation.setPregnantIndCd(pregnantIndCd); + observation.setPregnantWeek(pregnantWeek); + observation.setProcessingDecisionTxt(processingDecisionTxt); + + // Assert + assertEquals(observationUid, observation.getObservationUid()); + assertEquals(activityDurationAmt, observation.getActivityDurationAmt()); + assertEquals(activityDurationUnitCd, observation.getActivityDurationUnitCd()); + assertEquals(activityFromTime, observation.getActivityFromTime()); + assertEquals(activityToTime, observation.getActivityToTime()); + assertEquals(addReasonCd, observation.getAddReasonCd()); + assertEquals(addTime, observation.getAddTime()); + assertEquals(addUserId, observation.getAddUserId()); + assertEquals(cd, observation.getCd()); + assertEquals(cdDescTxt, observation.getCdDescTxt()); + assertEquals(cdSystemCd, observation.getCdSystemCd()); + assertEquals(cdSystemDescTxt, observation.getCdSystemDescTxt()); + assertEquals(confidentialityCd, observation.getConfidentialityCd()); + assertEquals(confidentialityDescTxt, observation.getConfidentialityDescTxt()); + assertEquals(ctrlCdDisplayForm, observation.getCtrlCdDisplayForm()); + assertEquals(ctrlCdUserDefined1, observation.getCtrlCdUserDefined1()); + assertEquals(ctrlCdUserDefined2, observation.getCtrlCdUserDefined2()); + assertEquals(ctrlCdUserDefined3, observation.getCtrlCdUserDefined3()); + assertEquals(ctrlCdUserDefined4, observation.getCtrlCdUserDefined4()); + assertEquals(derivationExp, observation.getDerivationExp()); + assertEquals(effectiveDurationAmt, observation.getEffectiveDurationAmt()); + assertEquals(effectiveDurationUnitCd, observation.getEffectiveDurationUnitCd()); + assertEquals(effectiveFromTime, observation.getEffectiveFromTime()); + assertEquals(effectiveToTime, observation.getEffectiveToTime()); + assertEquals(electronicInd, observation.getElectronicInd()); + assertEquals(groupLevelCd, observation.getGroupLevelCd()); + assertEquals(jurisdictionCd, observation.getJurisdictionCd()); + assertEquals(labConditionCd, observation.getLabConditionCd()); + assertEquals(lastChgReasonCd, observation.getLastChgReasonCd()); + assertEquals(lastChgTime, observation.getLastChgTime()); + assertEquals(lastChgUserId, observation.getLastChgUserId()); + assertEquals(localId, observation.getLocalId()); + assertEquals(methodCd, observation.getMethodCd()); + assertEquals(methodDescTxt, observation.getMethodDescTxt()); + assertEquals(obsDomainCd, observation.getObsDomainCd()); + assertEquals(obsDomainCdSt1, observation.getObsDomainCdSt1()); + assertEquals(pnuCd, observation.getPnuCd()); + assertEquals(priorityCd, observation.getPriorityCd()); + assertEquals(priorityDescTxt, observation.getPriorityDescTxt()); + assertEquals(progAreaCd, observation.getProgAreaCd()); + assertEquals(recordStatusCd, observation.getRecordStatusCd()); + assertEquals(recordStatusTime, observation.getRecordStatusTime()); + assertEquals(repeatNbr, observation.getRepeatNbr()); + assertEquals(statusCd, observation.getStatusCd()); + assertEquals(statusTime, observation.getStatusTime()); + assertEquals(subjectPersonUid, observation.getSubjectPersonUid()); + assertEquals(targetSiteCd, observation.getTargetSiteCd()); + assertEquals(targetSiteDescTxt, observation.getTargetSiteDescTxt()); + assertEquals(txt, observation.getTxt()); + assertEquals(userAffiliationTxt, observation.getUserAffiliationTxt()); + assertEquals(valueCd, observation.getValueCd()); + assertEquals(ynuCd, observation.getYnuCd()); + assertEquals(programJurisdictionOid, observation.getProgramJurisdictionOid()); + assertEquals(sharedInd, observation.getSharedInd()); + assertEquals(versionCtrlNbr, observation.getVersionCtrlNbr()); + assertEquals(altCd, observation.getAltCd()); + assertEquals(altCdDescTxt, observation.getAltCdDescTxt()); + assertEquals(altCdSystemCd, observation.getAltCdSystemCd()); + assertEquals(altCdSystemDescTxt, observation.getAltCdSystemDescTxt()); + assertEquals(cdDerivedInd, observation.getCdDerivedInd()); + assertEquals(rptToStateTime, observation.getRptToStateTime()); + assertEquals(cdVersion, observation.getCdVersion()); + assertEquals(processingDecisionCd, observation.getProcessingDecisionCd()); + assertEquals(pregnantIndCd, observation.getPregnantIndCd()); + assertEquals(pregnantWeek, observation.getPregnantWeek()); + assertEquals(processingDecisionTxt, observation.getProcessingDecisionTxt()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/OrganizationHistTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/OrganizationHistTest.java new file mode 100644 index 000000000..95e59fd4d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/OrganizationHistTest.java @@ -0,0 +1,175 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.repository.nbs.odse.model.organization.OrganizationHist; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class OrganizationHistTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + OrganizationHist organizationHist = new OrganizationHist(); + + // Assert + assertNull(organizationHist.getOrganizationUid()); + assertEquals(0, organizationHist.getVersionCtrlNbr()); + assertNull(organizationHist.getAddReasonCd()); + assertNull(organizationHist.getAddTime()); + assertNull(organizationHist.getAddUserId()); + assertNull(organizationHist.getCd()); + assertNull(organizationHist.getCdDescTxt()); + assertNull(organizationHist.getDescription()); + assertNull(organizationHist.getDurationAmt()); + assertNull(organizationHist.getDurationUnitCd()); + assertNull(organizationHist.getFromTime()); + assertNull(organizationHist.getLastChgReasonCd()); + assertNull(organizationHist.getLastChgTime()); + assertNull(organizationHist.getLastChgUserId()); + assertNull(organizationHist.getLocalId()); + assertNull(organizationHist.getRecordStatusCd()); + assertNull(organizationHist.getRecordStatusTime()); + assertNull(organizationHist.getStandardIndustryClassCd()); + assertNull(organizationHist.getStandardIndustryDescTxt()); + assertNull(organizationHist.getStatusCd()); + assertNull(organizationHist.getStatusTime()); + assertNull(organizationHist.getToTime()); + assertNull(organizationHist.getUserAffiliationTxt()); + assertNull(organizationHist.getDisplayNm()); + assertNull(organizationHist.getStreetAddr1()); + assertNull(organizationHist.getStreetAddr2()); + assertNull(organizationHist.getCityCd()); + assertNull(organizationHist.getCityDescTxt()); + assertNull(organizationHist.getStateCd()); + assertNull(organizationHist.getCntyCd()); + assertNull(organizationHist.getCntryCd()); + assertNull(organizationHist.getZipCd()); + assertNull(organizationHist.getPhoneNbr()); + assertNull(organizationHist.getPhoneCntryCd()); + assertNull(organizationHist.getElectronicInd()); + assertNull(organizationHist.getEdxInd()); + } + + @Test + void testSettersAndGetters() { + // Arrange + OrganizationHist organizationHist = new OrganizationHist(); + + Long organizationUid = 1L; + int versionCtrlNbr = 1; + String addReasonCd = "reasonCd"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String cd = "cd"; + String cdDescTxt = "cdDescTxt"; + String description = "description"; + String durationAmt = "durationAmt"; + String durationUnitCd = "durationUnitCd"; + Timestamp fromTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "lastChgReasonCd"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 4L; + String localId = "localId"; + String recordStatusCd = "recordStatusCd"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String standardIndustryClassCd = "standardIndustryClassCd"; + String standardIndustryDescTxt = "standardIndustryDescTxt"; + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + Timestamp toTime = new Timestamp(System.currentTimeMillis()); + String userAffiliationTxt = "userAffiliationTxt"; + String displayNm = "displayNm"; + String streetAddr1 = "streetAddr1"; + String streetAddr2 = "streetAddr2"; + String cityCd = "cityCd"; + String cityDescTxt = "cityDescTxt"; + String stateCd = "stateCd"; + String cntyCd = "cntyCd"; + String cntryCd = "cntryCd"; + String zipCd = "zipCd"; + String phoneNbr = "phoneNbr"; + String phoneCntryCd = "phoneCntryCd"; + String electronicInd = "electronicInd"; + String edxInd = "Y"; + + // Act + organizationHist.setOrganizationUid(organizationUid); + organizationHist.setVersionCtrlNbr(versionCtrlNbr); + organizationHist.setAddReasonCd(addReasonCd); + organizationHist.setAddTime(addTime); + organizationHist.setAddUserId(addUserId); + organizationHist.setCd(cd); + organizationHist.setCdDescTxt(cdDescTxt); + organizationHist.setDescription(description); + organizationHist.setDurationAmt(durationAmt); + organizationHist.setDurationUnitCd(durationUnitCd); + organizationHist.setFromTime(fromTime); + organizationHist.setLastChgReasonCd(lastChgReasonCd); + organizationHist.setLastChgTime(lastChgTime); + organizationHist.setLastChgUserId(lastChgUserId); + organizationHist.setLocalId(localId); + organizationHist.setRecordStatusCd(recordStatusCd); + organizationHist.setRecordStatusTime(recordStatusTime); + organizationHist.setStandardIndustryClassCd(standardIndustryClassCd); + organizationHist.setStandardIndustryDescTxt(standardIndustryDescTxt); + organizationHist.setStatusCd(statusCd); + organizationHist.setStatusTime(statusTime); + organizationHist.setToTime(toTime); + organizationHist.setUserAffiliationTxt(userAffiliationTxt); + organizationHist.setDisplayNm(displayNm); + organizationHist.setStreetAddr1(streetAddr1); + organizationHist.setStreetAddr2(streetAddr2); + organizationHist.setCityCd(cityCd); + organizationHist.setCityDescTxt(cityDescTxt); + organizationHist.setStateCd(stateCd); + organizationHist.setCntyCd(cntyCd); + organizationHist.setCntryCd(cntryCd); + organizationHist.setZipCd(zipCd); + organizationHist.setPhoneNbr(phoneNbr); + organizationHist.setPhoneCntryCd(phoneCntryCd); + organizationHist.setElectronicInd(electronicInd); + organizationHist.setEdxInd(edxInd); + + // Assert + assertEquals(organizationUid, organizationHist.getOrganizationUid()); + assertEquals(versionCtrlNbr, organizationHist.getVersionCtrlNbr()); + assertEquals(addReasonCd, organizationHist.getAddReasonCd()); + assertEquals(addTime, organizationHist.getAddTime()); + assertEquals(addUserId, organizationHist.getAddUserId()); + assertEquals(cd, organizationHist.getCd()); + assertEquals(cdDescTxt, organizationHist.getCdDescTxt()); + assertEquals(description, organizationHist.getDescription()); + assertEquals(durationAmt, organizationHist.getDurationAmt()); + assertEquals(durationUnitCd, organizationHist.getDurationUnitCd()); + assertEquals(fromTime, organizationHist.getFromTime()); + assertEquals(lastChgReasonCd, organizationHist.getLastChgReasonCd()); + assertEquals(lastChgTime, organizationHist.getLastChgTime()); + assertEquals(lastChgUserId, organizationHist.getLastChgUserId()); + assertEquals(localId, organizationHist.getLocalId()); + assertEquals(recordStatusCd, organizationHist.getRecordStatusCd()); + assertEquals(recordStatusTime, organizationHist.getRecordStatusTime()); + assertEquals(standardIndustryClassCd, organizationHist.getStandardIndustryClassCd()); + assertEquals(standardIndustryDescTxt, organizationHist.getStandardIndustryDescTxt()); + assertEquals(statusCd, organizationHist.getStatusCd()); + assertEquals(statusTime, organizationHist.getStatusTime()); + assertEquals(toTime, organizationHist.getToTime()); + assertEquals(userAffiliationTxt, organizationHist.getUserAffiliationTxt()); + assertEquals(displayNm, organizationHist.getDisplayNm()); + assertEquals(streetAddr1, organizationHist.getStreetAddr1()); + assertEquals(streetAddr2, organizationHist.getStreetAddr2()); + assertEquals(cityCd, organizationHist.getCityCd()); + assertEquals(cityDescTxt, organizationHist.getCityDescTxt()); + assertEquals(stateCd, organizationHist.getStateCd()); + assertEquals(cntyCd, organizationHist.getCntyCd()); + assertEquals(cntryCd, organizationHist.getCntryCd()); + assertEquals(zipCd, organizationHist.getZipCd()); + assertEquals(phoneNbr, organizationHist.getPhoneNbr()); + assertEquals(phoneCntryCd, organizationHist.getPhoneCntryCd()); + assertEquals(electronicInd, organizationHist.getElectronicInd()); + assertEquals(edxInd, organizationHist.getEdxInd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/OrganizationNameHistTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/OrganizationNameHistTest.java new file mode 100644 index 000000000..b212e4f65 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/OrganizationNameHistTest.java @@ -0,0 +1,57 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.repository.nbs.odse.model.organization.OrganizationNameHist; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class OrganizationNameHistTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + OrganizationNameHist organizationNameHist = new OrganizationNameHist(); + + // Assert + assertNull(organizationNameHist.getOrganizationUid()); + assertEquals(0, organizationNameHist.getOrganizationNameSeq()); + assertEquals(0, organizationNameHist.getVersionCtrlNbr()); + assertNull(organizationNameHist.getNmTxt()); + assertNull(organizationNameHist.getNmUseCd()); + assertNull(organizationNameHist.getRecordStatusCd()); + assertNull(organizationNameHist.getDefaultNmInd()); + } + + @Test + void testSettersAndGetters() { + // Arrange + OrganizationNameHist organizationNameHist = new OrganizationNameHist(); + + Long organizationUid = 1L; + int organizationNameSeq = 1; + int versionCtrlNbr = 1; + String nmTxt = "Test Name"; + String nmUseCd = "USE_CODE"; + String recordStatusCd = "ACTIVE"; + String defaultNmInd = "Y"; + + // Act + organizationNameHist.setOrganizationUid(organizationUid); + organizationNameHist.setOrganizationNameSeq(organizationNameSeq); + organizationNameHist.setVersionCtrlNbr(versionCtrlNbr); + organizationNameHist.setNmTxt(nmTxt); + organizationNameHist.setNmUseCd(nmUseCd); + organizationNameHist.setRecordStatusCd(recordStatusCd); + organizationNameHist.setDefaultNmInd(defaultNmInd); + + // Assert + assertEquals(organizationUid, organizationNameHist.getOrganizationUid()); + assertEquals(organizationNameSeq, organizationNameHist.getOrganizationNameSeq()); + assertEquals(versionCtrlNbr, organizationNameHist.getVersionCtrlNbr()); + assertEquals(nmTxt, organizationNameHist.getNmTxt()); + assertEquals(nmUseCd, organizationNameHist.getNmUseCd()); + assertEquals(recordStatusCd, organizationNameHist.getRecordStatusCd()); + assertEquals(defaultNmInd, organizationNameHist.getDefaultNmInd()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/ParticipationHistTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/ParticipationHistTest.java new file mode 100644 index 000000000..659cfe765 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/ParticipationHistTest.java @@ -0,0 +1,225 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.participation.ParticipationHist; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class ParticipationHistTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + ParticipationHist participationHist = new ParticipationHist(); + + // Assert + assertNull(participationHist.getSubjectEntityUid()); + assertNull(participationHist.getActUid()); + assertNull(participationHist.getTypeCd()); + assertNull(participationHist.getVersionCtrlNbr()); + assertNull(participationHist.getActClassCd()); + assertNull(participationHist.getAddReasonCd()); + assertNull(participationHist.getAddTime()); + assertNull(participationHist.getAddUserId()); + assertNull(participationHist.getAwarenessCd()); + assertNull(participationHist.getAwarenessDescTxt()); + assertNull(participationHist.getCd()); + assertNull(participationHist.getDurationAmt()); + assertNull(participationHist.getDurationUnitCd()); + assertNull(participationHist.getFromTime()); + assertNull(participationHist.getLastChgReasonCd()); + assertNull(participationHist.getLastChgTime()); + assertNull(participationHist.getLastChgUserId()); + assertNull(participationHist.getRecordStatusCd()); + assertNull(participationHist.getRecordStatusTime()); + assertNull(participationHist.getRoleSeq()); + assertNull(participationHist.getStatusCd()); + assertNull(participationHist.getStatusTime()); + assertNull(participationHist.getSubjectClassCd()); + assertNull(participationHist.getToTime()); + assertNull(participationHist.getTypeDescTxt()); + assertNull(participationHist.getUserAffiliationTxt()); + } + + @Test + void testParameterizedConstructor() { + // Arrange + Long subjectEntityUid = 1L; + Long actUid = 2L; + String typeCd = "TYPE_CD"; + Integer versionCtrlNbr = 1; + String actClassCd = "ACT_CLASS_CD"; + String addReasonCd = "ADD_REASON_CD"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 3L; + String awarenessCd = "AWARENESS_CD"; + String awarenessDescTxt = "AWARENESS_DESC_TXT"; + String cd = "CD"; + String durationAmt = "DURATION_AMT"; + String durationUnitCd = "DURATION_UNIT_CD"; + Timestamp fromTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "LAST_CHG_REASON_CD"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 4L; + String recordStatusCd = "RECORD_STATUS_CD"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Long roleSeq = 5L; + String statusCd = "STATUS_CD"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String subjectClassCd = "SUBJECT_CLASS_CD"; + Timestamp toTime = new Timestamp(System.currentTimeMillis()); + String typeDescTxt = "TYPE_DESC_TXT"; + String userAffiliationTxt = "USER_AFFILIATION_TXT"; + + ParticipationDto dto = new ParticipationDto(); + dto.setSubjectEntityUid(subjectEntityUid); + dto.setActUid(actUid); + dto.setTypeCd(typeCd); + dto.setActClassCd(actClassCd); + dto.setAddReasonCd(addReasonCd); + dto.setAddTime(addTime); + dto.setAddUserId(addUserId); + dto.setAwarenessCd(awarenessCd); + dto.setAwarenessDescTxt(awarenessDescTxt); + dto.setCd(cd); + dto.setDurationAmt(durationAmt); + dto.setDurationUnitCd(durationUnitCd); + dto.setFromTime(fromTime); + dto.setLastChgReasonCd(lastChgReasonCd); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setRoleSeq(roleSeq); + dto.setStatusCd(statusCd); + dto.setStatusTime(statusTime); + dto.setSubjectClassCd(subjectClassCd); + dto.setToTime(toTime); + dto.setTypeDescTxt(typeDescTxt); + dto.setUserAffiliationTxt(userAffiliationTxt); + + // Act + ParticipationHist participationHist = new ParticipationHist(dto); + + // Assert + assertEquals(subjectEntityUid, participationHist.getSubjectEntityUid()); + assertEquals(actUid, participationHist.getActUid()); + assertEquals(typeCd, participationHist.getTypeCd()); + assertNull(participationHist.getVersionCtrlNbr()); + assertEquals(actClassCd, participationHist.getActClassCd()); + assertEquals(addReasonCd, participationHist.getAddReasonCd()); + assertEquals(addTime, participationHist.getAddTime()); + assertEquals(addUserId, participationHist.getAddUserId()); + assertEquals(awarenessCd, participationHist.getAwarenessCd()); + assertEquals(awarenessDescTxt, participationHist.getAwarenessDescTxt()); + assertEquals(cd, participationHist.getCd()); + assertEquals(durationAmt, participationHist.getDurationAmt()); + assertEquals(durationUnitCd, participationHist.getDurationUnitCd()); + assertEquals(fromTime, participationHist.getFromTime()); + assertEquals(lastChgReasonCd, participationHist.getLastChgReasonCd()); + assertEquals(lastChgTime, participationHist.getLastChgTime()); + assertEquals(lastChgUserId, participationHist.getLastChgUserId()); + assertEquals(recordStatusCd, participationHist.getRecordStatusCd()); + assertEquals(recordStatusTime, participationHist.getRecordStatusTime()); + assertEquals(roleSeq, participationHist.getRoleSeq()); + assertEquals(statusCd, participationHist.getStatusCd()); + assertEquals(statusTime, participationHist.getStatusTime()); + assertEquals(subjectClassCd, participationHist.getSubjectClassCd()); + assertEquals(toTime, participationHist.getToTime()); + assertEquals(typeDescTxt, participationHist.getTypeDescTxt()); + assertEquals(userAffiliationTxt, participationHist.getUserAffiliationTxt()); + } + + @Test + void testSettersAndGetters() { + // Arrange + ParticipationHist participationHist = new ParticipationHist(); + + Long subjectEntityUid = 1L; + Long actUid = 2L; + String typeCd = "TYPE_CD"; + Integer versionCtrlNbr = 1; + String actClassCd = "ACT_CLASS_CD"; + String addReasonCd = "ADD_REASON_CD"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 3L; + String awarenessCd = "AWARENESS_CD"; + String awarenessDescTxt = "AWARENESS_DESC_TXT"; + String cd = "CD"; + String durationAmt = "DURATION_AMT"; + String durationUnitCd = "DURATION_UNIT_CD"; + Timestamp fromTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "LAST_CHG_REASON_CD"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 4L; + String recordStatusCd = "RECORD_STATUS_CD"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Long roleSeq = 5L; + String statusCd = "STATUS_CD"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String subjectClassCd = "SUBJECT_CLASS_CD"; + Timestamp toTime = new Timestamp(System.currentTimeMillis()); + String typeDescTxt = "TYPE_DESC_TXT"; + String userAffiliationTxt = "USER_AFFILIATION_TXT"; + + // Act + participationHist.setSubjectEntityUid(subjectEntityUid); + participationHist.setActUid(actUid); + participationHist.setTypeCd(typeCd); + participationHist.setVersionCtrlNbr(versionCtrlNbr); + participationHist.setActClassCd(actClassCd); + participationHist.setAddReasonCd(addReasonCd); + participationHist.setAddTime(addTime); + participationHist.setAddUserId(addUserId); + participationHist.setAwarenessCd(awarenessCd); + participationHist.setAwarenessDescTxt(awarenessDescTxt); + participationHist.setCd(cd); + participationHist.setDurationAmt(durationAmt); + participationHist.setDurationUnitCd(durationUnitCd); + participationHist.setFromTime(fromTime); + participationHist.setLastChgReasonCd(lastChgReasonCd); + participationHist.setLastChgTime(lastChgTime); + participationHist.setLastChgUserId(lastChgUserId); + participationHist.setRecordStatusCd(recordStatusCd); + participationHist.setRecordStatusTime(recordStatusTime); + participationHist.setRoleSeq(roleSeq); + participationHist.setStatusCd(statusCd); + participationHist.setStatusTime(statusTime); + participationHist.setSubjectClassCd(subjectClassCd); + participationHist.setToTime(toTime); + participationHist.setTypeDescTxt(typeDescTxt); + participationHist.setUserAffiliationTxt(userAffiliationTxt); + + // Assert + assertEquals(subjectEntityUid, participationHist.getSubjectEntityUid()); + assertEquals(actUid, participationHist.getActUid()); + assertEquals(typeCd, participationHist.getTypeCd()); + assertEquals(versionCtrlNbr, participationHist.getVersionCtrlNbr()); + assertEquals(actClassCd, participationHist.getActClassCd()); + assertEquals(addReasonCd, participationHist.getAddReasonCd()); + assertEquals(addTime, participationHist.getAddTime()); + assertEquals(addUserId, participationHist.getAddUserId()); + assertEquals(awarenessCd, participationHist.getAwarenessCd()); + assertEquals(awarenessDescTxt, participationHist.getAwarenessDescTxt()); + assertEquals(cd, participationHist.getCd()); + assertEquals(durationAmt, participationHist.getDurationAmt()); + assertEquals(durationUnitCd, participationHist.getDurationUnitCd()); + assertEquals(fromTime, participationHist.getFromTime()); + assertEquals(lastChgReasonCd, participationHist.getLastChgReasonCd()); + assertEquals(lastChgTime, participationHist.getLastChgTime()); + assertEquals(lastChgUserId, participationHist.getLastChgUserId()); + assertEquals(recordStatusCd, participationHist.getRecordStatusCd()); + assertEquals(recordStatusTime, participationHist.getRecordStatusTime()); + assertEquals(roleSeq, participationHist.getRoleSeq()); + assertEquals(statusCd, participationHist.getStatusCd()); + assertEquals(statusTime, participationHist.getStatusTime()); + assertEquals(subjectClassCd, participationHist.getSubjectClassCd()); + assertEquals(toTime, participationHist.getToTime()); + assertEquals(typeDescTxt, participationHist.getTypeDescTxt()); + assertEquals(userAffiliationTxt, participationHist.getUserAffiliationTxt()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/PatientEncounterTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/PatientEncounterTest.java new file mode 100644 index 000000000..92884b38c --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/PatientEncounterTest.java @@ -0,0 +1,317 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.phc.PatientEncounterDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.phc.PatientEncounter; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class PatientEncounterTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + PatientEncounter patientEncounter = new PatientEncounter(); + + // Assert + assertNull(patientEncounter.getPatientEncounterUid()); + assertNull(patientEncounter.getActivityDurationAmt()); + assertNull(patientEncounter.getActivityDurationUnitCd()); + assertNull(patientEncounter.getActivityFromTime()); + assertNull(patientEncounter.getActivityToTime()); + assertNull(patientEncounter.getAcuityLevelCd()); + assertNull(patientEncounter.getAcuityLevelDescTxt()); + assertNull(patientEncounter.getAddReasonCd()); + assertNull(patientEncounter.getAddTime()); + assertNull(patientEncounter.getAddUserId()); + assertNull(patientEncounter.getAdmissionSourceCd()); + assertNull(patientEncounter.getAdmissionSourceDescTxt()); + assertNull(patientEncounter.getBirthEncounterInd()); + assertNull(patientEncounter.getCd()); + assertNull(patientEncounter.getCdDescTxt()); + assertNull(patientEncounter.getConfidentialityCd()); + assertNull(patientEncounter.getConfidentialityDescTxt()); + assertNull(patientEncounter.getEffectiveDurationAmt()); + assertNull(patientEncounter.getEffectiveDurationUnitCd()); + assertNull(patientEncounter.getEffectiveFromTime()); + assertNull(patientEncounter.getEffectiveToTime()); + assertNull(patientEncounter.getLastChgReasonCd()); + assertNull(patientEncounter.getLastChgTime()); + assertNull(patientEncounter.getLastChgUserId()); + assertNull(patientEncounter.getLocalId()); + assertNull(patientEncounter.getPriorityCd()); + assertNull(patientEncounter.getPriorityDescTxt()); + assertNull(patientEncounter.getRecordStatusCd()); + assertNull(patientEncounter.getRecordStatusTime()); + assertNull(patientEncounter.getReferralSourceCd()); + assertNull(patientEncounter.getReferralSourceDescTxt()); + assertNull(patientEncounter.getRepeatNbr()); + assertNull(patientEncounter.getStatusCd()); + assertNull(patientEncounter.getStatusTime()); + assertNull(patientEncounter.getTxt()); + assertNull(patientEncounter.getUserAffiliationTxt()); + assertNull(patientEncounter.getProgramJurisdictionOid()); + assertNull(patientEncounter.getSharedInd()); + assertNull(patientEncounter.getVersionCtrlNbr()); + } + + @Test + void testParameterizedConstructor() { + // Arrange + Long patientEncounterUid = 1L; + String activityDurationAmt = "durationAmt"; + String activityDurationUnitCd = "unitCd"; + Timestamp activityFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp activityToTime = new Timestamp(System.currentTimeMillis()); + String acuityLevelCd = "acuityCd"; + String acuityLevelDescTxt = "acuityDesc"; + String addReasonCd = "reasonCd"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String admissionSourceCd = "admissionCd"; + String admissionSourceDescTxt = "admissionDesc"; + String birthEncounterInd = "Y"; + String cd = "code"; + String cdDescTxt = "codeDesc"; + String confidentialityCd = "confCd"; + String confidentialityDescTxt = "confDesc"; + String effectiveDurationAmt = "effDuration"; + String effectiveDurationUnitCd = "effUnitCd"; + Timestamp effectiveFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp effectiveToTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "chgReason"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "localId"; + String priorityCd = "priorityCd"; + String priorityDescTxt = "priorityDesc"; + String recordStatusCd = "statusCd"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String referralSourceCd = "referralCd"; + String referralSourceDescTxt = "referralDesc"; + Integer repeatNbr = 1; + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String txt = "text"; + String userAffiliationTxt = "affiliation"; + Long programJurisdictionOid = 4L; + String sharedInd = "shared"; + Integer versionCtrlNbr = 1; + + PatientEncounterDto dto = new PatientEncounterDto(); + dto.setPatientEncounterUid(patientEncounterUid); + dto.setActivityDurationAmt(activityDurationAmt); + dto.setActivityDurationUnitCd(activityDurationUnitCd); + dto.setActivityFromTime(activityFromTime); + dto.setActivityToTime(activityToTime); + dto.setAcuityLevelCd(acuityLevelCd); + dto.setAcuityLevelDescTxt(acuityLevelDescTxt); + dto.setAddReasonCd(addReasonCd); + dto.setAddTime(addTime); + dto.setAddUserId(addUserId); + dto.setAdmissionSourceCd(admissionSourceCd); + dto.setAdmissionSourceDescTxt(admissionSourceDescTxt); + dto.setBirthEncounterInd(birthEncounterInd); + dto.setCd(cd); + dto.setCdDescTxt(cdDescTxt); + dto.setConfidentialityCd(confidentialityCd); + dto.setConfidentialityDescTxt(confidentialityDescTxt); + dto.setEffectiveDurationAmt(effectiveDurationAmt); + dto.setEffectiveDurationUnitCd(effectiveDurationUnitCd); + dto.setEffectiveFromTime(effectiveFromTime); + dto.setEffectiveToTime(effectiveToTime); + dto.setLastChgReasonCd(lastChgReasonCd); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setLocalId(localId); + dto.setPriorityCd(priorityCd); + dto.setPriorityDescTxt(priorityDescTxt); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setReferralSourceCd(referralSourceCd); + dto.setReferralSourceDescTxt(referralSourceDescTxt); + dto.setRepeatNbr(repeatNbr); + dto.setStatusCd(statusCd); + dto.setStatusTime(statusTime); + dto.setTxt(txt); + dto.setUserAffiliationTxt(userAffiliationTxt); + dto.setProgramJurisdictionOid(programJurisdictionOid); + dto.setSharedInd(sharedInd); + dto.setVersionCtrlNbr(versionCtrlNbr); + + // Act + PatientEncounter patientEncounter = new PatientEncounter(dto); + + // Assert + assertEquals(patientEncounterUid, patientEncounter.getPatientEncounterUid()); + assertEquals(activityDurationAmt, patientEncounter.getActivityDurationAmt()); + assertEquals(activityDurationUnitCd, patientEncounter.getActivityDurationUnitCd()); + assertEquals(activityFromTime, patientEncounter.getActivityFromTime()); + assertEquals(activityToTime, patientEncounter.getActivityToTime()); + assertEquals(acuityLevelCd, patientEncounter.getAcuityLevelCd()); + assertEquals(acuityLevelDescTxt, patientEncounter.getAcuityLevelDescTxt()); + assertEquals(addReasonCd, patientEncounter.getAddReasonCd()); + assertEquals(addTime, patientEncounter.getAddTime()); + assertEquals(addUserId, patientEncounter.getAddUserId()); + assertEquals(admissionSourceCd, patientEncounter.getAdmissionSourceCd()); + assertEquals(admissionSourceDescTxt, patientEncounter.getAdmissionSourceDescTxt()); + assertEquals(birthEncounterInd, patientEncounter.getBirthEncounterInd()); + assertEquals(cd, patientEncounter.getCd()); + assertEquals(cdDescTxt, patientEncounter.getCdDescTxt()); + assertEquals(confidentialityCd, patientEncounter.getConfidentialityCd()); + assertEquals(confidentialityDescTxt, patientEncounter.getConfidentialityDescTxt()); + assertEquals(effectiveDurationAmt, patientEncounter.getEffectiveDurationAmt()); + assertEquals(effectiveDurationUnitCd, patientEncounter.getEffectiveDurationUnitCd()); + assertEquals(effectiveFromTime, patientEncounter.getEffectiveFromTime()); + assertEquals(effectiveToTime, patientEncounter.getEffectiveToTime()); + assertEquals(lastChgReasonCd, patientEncounter.getLastChgReasonCd()); + assertEquals(lastChgTime, patientEncounter.getLastChgTime()); + assertEquals(lastChgUserId, patientEncounter.getLastChgUserId()); + assertEquals(localId, patientEncounter.getLocalId()); + assertEquals(priorityCd, patientEncounter.getPriorityCd()); + assertEquals(priorityDescTxt, patientEncounter.getPriorityDescTxt()); + assertEquals(recordStatusCd, patientEncounter.getRecordStatusCd()); + assertEquals(recordStatusTime, patientEncounter.getRecordStatusTime()); + assertEquals(referralSourceCd, patientEncounter.getReferralSourceCd()); + assertEquals(referralSourceDescTxt, patientEncounter.getReferralSourceDescTxt()); + assertEquals(repeatNbr, patientEncounter.getRepeatNbr()); + assertEquals(statusCd, patientEncounter.getStatusCd()); + assertEquals(statusTime, patientEncounter.getStatusTime()); + assertEquals(txt, patientEncounter.getTxt()); + assertEquals(userAffiliationTxt, patientEncounter.getUserAffiliationTxt()); + assertEquals(programJurisdictionOid, patientEncounter.getProgramJurisdictionOid()); + assertEquals(sharedInd, patientEncounter.getSharedInd()); + assertEquals(versionCtrlNbr, patientEncounter.getVersionCtrlNbr()); + } + + @Test + void testSettersAndGetters() { + // Arrange + PatientEncounter patientEncounter = new PatientEncounter(); + + Long patientEncounterUid = 1L; + String activityDurationAmt = "durationAmt"; + String activityDurationUnitCd = "unitCd"; + Timestamp activityFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp activityToTime = new Timestamp(System.currentTimeMillis()); + String acuityLevelCd = "acuityCd"; + String acuityLevelDescTxt = "acuityDesc"; + String addReasonCd = "reasonCd"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String admissionSourceCd = "admissionCd"; + String admissionSourceDescTxt = "admissionDesc"; + String birthEncounterInd = "Y"; + String cd = "code"; + String cdDescTxt = "codeDesc"; + String confidentialityCd = "confCd"; + String confidentialityDescTxt = "confDesc"; + String effectiveDurationAmt = "effDuration"; + String effectiveDurationUnitCd = "effUnitCd"; + Timestamp effectiveFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp effectiveToTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "chgReason"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "localId"; + String priorityCd = "priorityCd"; + String priorityDescTxt = "priorityDesc"; + String recordStatusCd = "statusCd"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String referralSourceCd = "referralCd"; + String referralSourceDescTxt = "referralDesc"; + Integer repeatNbr = 1; + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String txt = "text"; + String userAffiliationTxt = "affiliation"; + Long programJurisdictionOid = 4L; + String sharedInd = "shared"; + Integer versionCtrlNbr = 1; + + // Act + patientEncounter.setPatientEncounterUid(patientEncounterUid); + patientEncounter.setActivityDurationAmt(activityDurationAmt); + patientEncounter.setActivityDurationUnitCd(activityDurationUnitCd); + patientEncounter.setActivityFromTime(activityFromTime); + patientEncounter.setActivityToTime(activityToTime); + patientEncounter.setAcuityLevelCd(acuityLevelCd); + patientEncounter.setAcuityLevelDescTxt(acuityLevelDescTxt); + patientEncounter.setAddReasonCd(addReasonCd); + patientEncounter.setAddTime(addTime); + patientEncounter.setAddUserId(addUserId); + patientEncounter.setAdmissionSourceCd(admissionSourceCd); + patientEncounter.setAdmissionSourceDescTxt(admissionSourceDescTxt); + patientEncounter.setBirthEncounterInd(birthEncounterInd); + patientEncounter.setCd(cd); + patientEncounter.setCdDescTxt(cdDescTxt); + patientEncounter.setConfidentialityCd(confidentialityCd); + patientEncounter.setConfidentialityDescTxt(confidentialityDescTxt); + patientEncounter.setEffectiveDurationAmt(effectiveDurationAmt); + patientEncounter.setEffectiveDurationUnitCd(effectiveDurationUnitCd); + patientEncounter.setEffectiveFromTime(effectiveFromTime); + patientEncounter.setEffectiveToTime(effectiveToTime); + patientEncounter.setLastChgReasonCd(lastChgReasonCd); + patientEncounter.setLastChgTime(lastChgTime); + patientEncounter.setLastChgUserId(lastChgUserId); + patientEncounter.setLocalId(localId); + patientEncounter.setPriorityCd(priorityCd); + patientEncounter.setPriorityDescTxt(priorityDescTxt); + patientEncounter.setRecordStatusCd(recordStatusCd); + patientEncounter.setRecordStatusTime(recordStatusTime); + patientEncounter.setReferralSourceCd(referralSourceCd); + patientEncounter.setReferralSourceDescTxt(referralSourceDescTxt); + patientEncounter.setRepeatNbr(repeatNbr); + patientEncounter.setStatusCd(statusCd); + patientEncounter.setStatusTime(statusTime); + patientEncounter.setTxt(txt); + patientEncounter.setUserAffiliationTxt(userAffiliationTxt); + patientEncounter.setProgramJurisdictionOid(programJurisdictionOid); + patientEncounter.setSharedInd(sharedInd); + patientEncounter.setVersionCtrlNbr(versionCtrlNbr); + + // Assert + assertEquals(patientEncounterUid, patientEncounter.getPatientEncounterUid()); + assertEquals(activityDurationAmt, patientEncounter.getActivityDurationAmt()); + assertEquals(activityDurationUnitCd, patientEncounter.getActivityDurationUnitCd()); + assertEquals(activityFromTime, patientEncounter.getActivityFromTime()); + assertEquals(activityToTime, patientEncounter.getActivityToTime()); + assertEquals(acuityLevelCd, patientEncounter.getAcuityLevelCd()); + assertEquals(acuityLevelDescTxt, patientEncounter.getAcuityLevelDescTxt()); + assertEquals(addReasonCd, patientEncounter.getAddReasonCd()); + assertEquals(addTime, patientEncounter.getAddTime()); + assertEquals(addUserId, patientEncounter.getAddUserId()); + assertEquals(admissionSourceCd, patientEncounter.getAdmissionSourceCd()); + assertEquals(admissionSourceDescTxt, patientEncounter.getAdmissionSourceDescTxt()); + assertEquals(birthEncounterInd, patientEncounter.getBirthEncounterInd()); + assertEquals(cd, patientEncounter.getCd()); + assertEquals(cdDescTxt, patientEncounter.getCdDescTxt()); + assertEquals(confidentialityCd, patientEncounter.getConfidentialityCd()); + assertEquals(confidentialityDescTxt, patientEncounter.getConfidentialityDescTxt()); + assertEquals(effectiveDurationAmt, patientEncounter.getEffectiveDurationAmt()); + assertEquals(effectiveDurationUnitCd, patientEncounter.getEffectiveDurationUnitCd()); + assertEquals(effectiveFromTime, patientEncounter.getEffectiveFromTime()); + assertEquals(effectiveToTime, patientEncounter.getEffectiveToTime()); + assertEquals(lastChgReasonCd, patientEncounter.getLastChgReasonCd()); + assertEquals(lastChgTime, patientEncounter.getLastChgTime()); + assertEquals(lastChgUserId, patientEncounter.getLastChgUserId()); + assertEquals(localId, patientEncounter.getLocalId()); + assertEquals(priorityCd, patientEncounter.getPriorityCd()); + assertEquals(priorityDescTxt, patientEncounter.getPriorityDescTxt()); + assertEquals(recordStatusCd, patientEncounter.getRecordStatusCd()); + assertEquals(recordStatusTime, patientEncounter.getRecordStatusTime()); + assertEquals(referralSourceCd, patientEncounter.getReferralSourceCd()); + assertEquals(referralSourceDescTxt, patientEncounter.getReferralSourceDescTxt()); + assertEquals(repeatNbr, patientEncounter.getRepeatNbr()); + assertEquals(statusCd, patientEncounter.getStatusCd()); + assertEquals(statusTime, patientEncounter.getStatusTime()); + assertEquals(txt, patientEncounter.getTxt()); + assertEquals(userAffiliationTxt, patientEncounter.getUserAffiliationTxt()); + assertEquals(programJurisdictionOid, patientEncounter.getProgramJurisdictionOid()); + assertEquals(sharedInd, patientEncounter.getSharedInd()); + assertEquals(versionCtrlNbr, patientEncounter.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/PlaceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/PlaceTest.java new file mode 100644 index 000000000..cd712a96e --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/PlaceTest.java @@ -0,0 +1,258 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.phc.PlaceDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.phc.Place; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class PlaceTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + Place place = new Place(); + + // Assert + assertNull(place.getPlaceUid()); + assertNull(place.getAddReasonCd()); + assertNull(place.getAddTime()); + assertNull(place.getAddUserId()); + assertNull(place.getCd()); + assertNull(place.getCdDescTxt()); + assertNull(place.getDescription()); + assertNull(place.getDurationAmt()); + assertNull(place.getDurationUnitCd()); + assertNull(place.getFromTime()); + assertNull(place.getLastChgReasonCd()); + assertNull(place.getLastChgTime()); + assertNull(place.getLastChgUserId()); + assertNull(place.getLocalId()); + assertNull(place.getNm()); + assertNull(place.getRecordStatusCd()); + assertNull(place.getRecordStatusTime()); + assertNull(place.getStatusCd()); + assertNull(place.getStatusTime()); + assertNull(place.getToTime()); + assertNull(place.getUserAffiliationTxt()); + assertNull(place.getStreetAddr1()); + assertNull(place.getStreetAddr2()); + assertNull(place.getCityCd()); + assertNull(place.getCityDescTxt()); + assertNull(place.getStateCd()); + assertNull(place.getZipCd()); + assertNull(place.getCntyCd()); + assertNull(place.getCntryCd()); + assertNull(place.getPhoneNbr()); + assertNull(place.getPhoneCntryCd()); + assertNull(place.getVersionCtrlNbr()); + } + + @Test + void testParameterizedConstructor() { + // Arrange + Long placeUid = 1L; + String addReasonCd = "reasonCd"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String cd = "cd"; + String cdDescTxt = "cdDesc"; + String description = "description"; + String durationAmt = "durationAmt"; + String durationUnitCd = "durationUnitCd"; + Timestamp fromTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "chgReasonCd"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "localId"; + String nm = "name"; + String recordStatusCd = "statusCd"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + Timestamp toTime = new Timestamp(System.currentTimeMillis()); + String userAffiliationTxt = "affiliation"; + String streetAddr1 = "street1"; + String streetAddr2 = "street2"; + String cityCd = "cityCd"; + String cityDescTxt = "cityDesc"; + String stateCd = "stateCd"; + String zipCd = "zipCd"; + String cntyCd = "cntyCd"; + String cntryCd = "cntryCd"; + String phoneNbr = "phoneNbr"; + String phoneCntryCd = "phoneCntryCd"; + Integer versionCtrlNbr = 1; + + PlaceDto placeDto = new PlaceDto(); + placeDto.setPlaceUid(placeUid); + placeDto.setAddReasonCd(addReasonCd); + placeDto.setAddTime(addTime); + placeDto.setAddUserId(addUserId); + placeDto.setCd(cd); + placeDto.setCdDescTxt(cdDescTxt); + placeDto.setDescription(description); + placeDto.setDurationAmt(durationAmt); + placeDto.setDurationUnitCd(durationUnitCd); + placeDto.setFromTime(fromTime); + placeDto.setLastChgReasonCd(lastChgReasonCd); + placeDto.setLastChgTime(lastChgTime); + placeDto.setLastChgUserId(lastChgUserId); + placeDto.setLocalId(localId); + placeDto.setNm(nm); + placeDto.setRecordStatusCd(recordStatusCd); + placeDto.setRecordStatusTime(recordStatusTime); + placeDto.setStatusCd(statusCd); + placeDto.setStatusTime(statusTime); + placeDto.setToTime(toTime); + placeDto.setUserAffiliationTxt(userAffiliationTxt); + placeDto.setVersionCtrlNbr(versionCtrlNbr); + + // Act + Place place = new Place(placeDto); + + // Assert + assertEquals(placeUid, place.getPlaceUid()); + assertEquals(addReasonCd, place.getAddReasonCd()); + assertEquals(addTime, place.getAddTime()); + assertEquals(addUserId, place.getAddUserId()); + assertEquals(cd, place.getCd()); + assertEquals(cdDescTxt, place.getCdDescTxt()); + assertEquals(description, place.getDescription()); + assertEquals(durationAmt, place.getDurationAmt()); + assertEquals(durationUnitCd, place.getDurationUnitCd()); + assertEquals(fromTime, place.getFromTime()); + assertEquals(lastChgReasonCd, place.getLastChgReasonCd()); + assertEquals(lastChgTime, place.getLastChgTime()); + assertEquals(lastChgUserId, place.getLastChgUserId()); + assertEquals(localId, place.getLocalId()); + assertEquals(nm, place.getNm()); + assertEquals(recordStatusCd, place.getRecordStatusCd()); + assertEquals(recordStatusTime, place.getRecordStatusTime()); + assertEquals(statusCd, place.getStatusCd()); + assertEquals(statusTime, place.getStatusTime()); + assertEquals(toTime, place.getToTime()); + assertEquals(userAffiliationTxt, place.getUserAffiliationTxt()); +// assertEquals(streetAddr1, place.getStreetAddr1()); +// assertEquals(streetAddr2, place.getStreetAddr2()); +// assertEquals(cityCd, place.getCityCd()); +// assertEquals(cityDescTxt, place.getCityDescTxt()); +// assertEquals(stateCd, place.getStateCd()); +// assertEquals(zipCd, place.getZipCd()); +// assertEquals(cntyCd, place.getCntyCd()); +// assertEquals(cntryCd, place.getCntryCd()); +// assertEquals(phoneNbr, place.getPhoneNbr()); +// assertEquals(phoneCntryCd, place.getPhoneCntryCd()); + assertEquals(versionCtrlNbr, place.getVersionCtrlNbr()); + } + + @Test + void testSettersAndGetters() { + // Arrange + Place place = new Place(); + + Long placeUid = 1L; + String addReasonCd = "reasonCd"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String cd = "cd"; + String cdDescTxt = "cdDesc"; + String description = "description"; + String durationAmt = "durationAmt"; + String durationUnitCd = "durationUnitCd"; + Timestamp fromTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "chgReasonCd"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "localId"; + String nm = "name"; + String recordStatusCd = "statusCd"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + Timestamp toTime = new Timestamp(System.currentTimeMillis()); + String userAffiliationTxt = "affiliation"; + String streetAddr1 = "street1"; + String streetAddr2 = "street2"; + String cityCd = "cityCd"; + String cityDescTxt = "cityDesc"; + String stateCd = "stateCd"; + String zipCd = "zipCd"; + String cntyCd = "cntyCd"; + String cntryCd = "cntryCd"; + String phoneNbr = "phoneNbr"; + String phoneCntryCd = "phoneCntryCd"; + Integer versionCtrlNbr = 1; + + // Act + place.setPlaceUid(placeUid); + place.setAddReasonCd(addReasonCd); + place.setAddTime(addTime); + place.setAddUserId(addUserId); + place.setCd(cd); + place.setCdDescTxt(cdDescTxt); + place.setDescription(description); + place.setDurationAmt(durationAmt); + place.setDurationUnitCd(durationUnitCd); + place.setFromTime(fromTime); + place.setLastChgReasonCd(lastChgReasonCd); + place.setLastChgTime(lastChgTime); + place.setLastChgUserId(lastChgUserId); + place.setLocalId(localId); + place.setNm(nm); + place.setRecordStatusCd(recordStatusCd); + place.setRecordStatusTime(recordStatusTime); + place.setStatusCd(statusCd); + place.setStatusTime(statusTime); + place.setToTime(toTime); + place.setUserAffiliationTxt(userAffiliationTxt); + place.setStreetAddr1(streetAddr1); + place.setStreetAddr2(streetAddr2); + place.setCityCd(cityCd); + place.setCityDescTxt(cityDescTxt); + place.setStateCd(stateCd); + place.setZipCd(zipCd); + place.setCntyCd(cntyCd); + place.setCntryCd(cntryCd); + place.setPhoneNbr(phoneNbr); + place.setPhoneCntryCd(phoneCntryCd); + place.setVersionCtrlNbr(versionCtrlNbr); + + // Assert + assertEquals(placeUid, place.getPlaceUid()); + assertEquals(addReasonCd, place.getAddReasonCd()); + assertEquals(addTime, place.getAddTime()); + assertEquals(addUserId, place.getAddUserId()); + assertEquals(cd, place.getCd()); + assertEquals(cdDescTxt, place.getCdDescTxt()); + assertEquals(description, place.getDescription()); + assertEquals(durationAmt, place.getDurationAmt()); + assertEquals(durationUnitCd, place.getDurationUnitCd()); + assertEquals(fromTime, place.getFromTime()); + assertEquals(lastChgReasonCd, place.getLastChgReasonCd()); + assertEquals(lastChgTime, place.getLastChgTime()); + assertEquals(lastChgUserId, place.getLastChgUserId()); + assertEquals(localId, place.getLocalId()); + assertEquals(nm, place.getNm()); + assertEquals(recordStatusCd, place.getRecordStatusCd()); + assertEquals(recordStatusTime, place.getRecordStatusTime()); + assertEquals(statusCd, place.getStatusCd()); + assertEquals(statusTime, place.getStatusTime()); + assertEquals(toTime, place.getToTime()); + assertEquals(userAffiliationTxt, place.getUserAffiliationTxt()); + assertEquals(streetAddr1, place.getStreetAddr1()); + assertEquals(streetAddr2, place.getStreetAddr2()); + assertEquals(cityCd, place.getCityCd()); + assertEquals(cityDescTxt, place.getCityDescTxt()); + assertEquals(stateCd, place.getStateCd()); + assertEquals(zipCd, place.getZipCd()); + assertEquals(cntyCd, place.getCntyCd()); + assertEquals(cntryCd, place.getCntryCd()); + assertEquals(phoneNbr, place.getPhoneNbr()); + assertEquals(phoneCntryCd, place.getPhoneCntryCd()); + assertEquals(versionCtrlNbr, place.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/QuestionMetadataTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/QuestionMetadataTest.java new file mode 100644 index 000000000..2b0f6da21 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/QuestionMetadataTest.java @@ -0,0 +1,305 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.repository.nbs.odse.model.question.QuestionMetadata; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class QuestionMetadataTest { + + @Test + void testConstructorWithObjectArray() { + // Arrange + Object[] data = new Object[44]; + data[0] = 1.0; + data[1] = "2024-07-14 10:10:10.0"; + data[2] = 2.0; + data[3] = "codeSetGroupId"; + data[4] = "dataType"; + data[5] = "mask"; + data[6] = "investigationFormCd"; + data[7] = "2024-07-14 10:10:10.0"; + data[8] = 3.0; + data[9] = "questionLabel"; + data[10] = "questionToolTip"; + data[11] = 1; + data[12] = "tabId"; + data[13] = true; + data[14] = 10; + data[15] = "defaultValue"; + data[16] = true; + data[17] = true; + data[18] = "coinfectionIndCd"; + data[19] = "nndMetadataUid"; + data[20] = "questionIdentifier"; + data[21] = "questionIdentifierNnd"; + data[22] = "questionRequiredNnd"; + data[23] = "questionOid"; + data[24] = "questionOidSystemTxt"; + data[25] = "codeSetNm"; + data[26] = "codeSetClassCd"; + data[27] = "dataLocation"; + data[28] = "dataCd"; + data[29] = "dataUseCd"; + data[30] = 100; + data[31] = "parentUid"; + data[32] = "ldfPageId"; + data[33] = 4L; + data[34] = 5L; + data[35] = "unitTypeCd"; + data[36] = "unitValue"; + data[37] = "nbsTableUid"; + data[38] = "partTypeCd"; + data[39] = "standardNndIndCd"; + data[40] = "subGroupNm"; + data[41] = "hl7SegmentField"; + data[42] = 20; + data[43] = "questionUnitIdentifier"; + + // Act + QuestionMetadata questionMetadata = new QuestionMetadata(data); + + // Assert + assertEquals(1L, questionMetadata.getNbsQuestionUid()); + assertEquals(Timestamp.valueOf("2024-07-14 10:10:10.0"), questionMetadata.getAddTime()); + assertEquals(2L, questionMetadata.getAddUserId()); + assertEquals("codeSetGroupId", questionMetadata.getCodeSetGroupId()); + assertEquals("dataType", questionMetadata.getDataType()); + assertEquals("mask", questionMetadata.getMask()); + assertEquals("investigationFormCd", questionMetadata.getInvestigationFormCd()); + assertEquals(Timestamp.valueOf("2024-07-14 10:10:10.0"), questionMetadata.getLastChgTime()); + assertEquals(3L, questionMetadata.getLastChgUserId()); + assertEquals("questionLabel", questionMetadata.getQuestionLabel()); + assertEquals("questionToolTip", questionMetadata.getQuestionToolTip()); + assertEquals(1, questionMetadata.getQuestionVersionNbr()); + assertEquals("tabId", questionMetadata.getTabId()); + assertTrue(questionMetadata.isEnableInd()); + assertEquals(10, questionMetadata.getOrderNbr()); + assertEquals("defaultValue", questionMetadata.getDefaultValue()); + assertTrue(questionMetadata.isRequiredInd()); + assertTrue(questionMetadata.isDisplayInd()); + assertEquals("coinfectionIndCd", questionMetadata.getCoinfectionIndCd()); + assertEquals("nndMetadataUid", questionMetadata.getNndMetadataUid()); + assertEquals("questionIdentifier", questionMetadata.getQuestionIdentifier()); + assertEquals("questionIdentifierNnd", questionMetadata.getQuestionIdentifierNnd()); + assertEquals("questionRequiredNnd", questionMetadata.getQuestionRequiredNnd()); + assertEquals("questionOid", questionMetadata.getQuestionOid()); + assertEquals("questionOidSystemTxt", questionMetadata.getQuestionOidSystemTxt()); + assertEquals("codeSetNm", questionMetadata.getCodeSetNm()); + assertEquals("codeSetClassCd", questionMetadata.getCodeSetClassCd()); + assertEquals("dataLocation", questionMetadata.getDataLocation()); + assertEquals("dataCd", questionMetadata.getDataCd()); + assertEquals("dataUseCd", questionMetadata.getDataUseCd()); + assertEquals(100, questionMetadata.getFieldSize()); + assertEquals("parentUid", questionMetadata.getParentUid()); + assertEquals("ldfPageId", questionMetadata.getLdfPageId()); + assertEquals(4L, questionMetadata.getNbsUiMetadataUid()); + assertEquals(5L, questionMetadata.getNbsUiComponentUid()); + assertEquals("unitTypeCd", questionMetadata.getUnitTypeCd()); + assertEquals("unitValue", questionMetadata.getUnitValue()); + assertEquals("nbsTableUid", questionMetadata.getNbsTableUid()); + assertEquals("partTypeCd", questionMetadata.getPartTypeCd()); + assertEquals("standardNndIndCd", questionMetadata.getStandardNndIndCd()); + assertEquals("subGroupNm", questionMetadata.getSubGroupNm()); + assertEquals("hl7SegmentField", questionMetadata.getHl7SegmentField()); + assertEquals(20, questionMetadata.getQuestionGroupSeqNbr()); + assertEquals("questionUnitIdentifier", questionMetadata.getQuestionUnitIdentifier()); + } + + @Test + void testDefaultConstructor() { + // Act + QuestionMetadata questionMetadata = new QuestionMetadata(); + + // Assert + assertNull(questionMetadata.getNbsQuestionUid()); + assertNull(questionMetadata.getAddTime()); + assertNull(questionMetadata.getAddUserId()); + assertNull(questionMetadata.getCodeSetGroupId()); + assertNull(questionMetadata.getDataType()); + assertNull(questionMetadata.getMask()); + assertNull(questionMetadata.getInvestigationFormCd()); + assertNull(questionMetadata.getLastChgTime()); + assertNull(questionMetadata.getLastChgUserId()); + assertNull(questionMetadata.getQuestionLabel()); + assertNull(questionMetadata.getQuestionToolTip()); + assertNull(questionMetadata.getQuestionVersionNbr()); + assertNull(questionMetadata.getTabId()); + assertFalse(questionMetadata.isEnableInd()); + assertNull(questionMetadata.getOrderNbr()); + assertNull(questionMetadata.getDefaultValue()); + assertFalse(questionMetadata.isRequiredInd()); + assertFalse(questionMetadata.isDisplayInd()); + assertNull(questionMetadata.getCoinfectionIndCd()); + assertNull(questionMetadata.getNndMetadataUid()); + assertNull(questionMetadata.getQuestionIdentifier()); + assertNull(questionMetadata.getQuestionIdentifierNnd()); + assertNull(questionMetadata.getQuestionRequiredNnd()); + assertNull(questionMetadata.getQuestionOid()); + assertNull(questionMetadata.getQuestionOidSystemTxt()); + assertNull(questionMetadata.getCodeSetNm()); + assertNull(questionMetadata.getCodeSetClassCd()); + assertNull(questionMetadata.getDataLocation()); + assertNull(questionMetadata.getDataCd()); + assertNull(questionMetadata.getDataUseCd()); + assertNull(questionMetadata.getFieldSize()); + assertNull(questionMetadata.getParentUid()); + assertNull(questionMetadata.getLdfPageId()); + assertNull(questionMetadata.getNbsUiMetadataUid()); + assertNull(questionMetadata.getNbsUiComponentUid()); + assertNull(questionMetadata.getUnitTypeCd()); + assertNull(questionMetadata.getUnitValue()); + assertNull(questionMetadata.getNbsTableUid()); + assertNull(questionMetadata.getPartTypeCd()); + assertNull(questionMetadata.getStandardNndIndCd()); + assertNull(questionMetadata.getSubGroupNm()); + assertNull(questionMetadata.getHl7SegmentField()); + assertNull(questionMetadata.getQuestionGroupSeqNbr()); + assertNull(questionMetadata.getQuestionUnitIdentifier()); + } + + @Test + void testSettersAndGetters() { + // Arrange + QuestionMetadata questionMetadata = new QuestionMetadata(); + Long nbsQuestionUid = 1L; + Timestamp addTime = Timestamp.valueOf("2024-07-14 10:10:10.0"); + Long addUserId = 2L; + String codeSetGroupId = "codeSetGroupId"; + String dataType = "dataType"; + String mask = "mask"; + String investigationFormCd = "investigationFormCd"; + Timestamp lastChgTime = Timestamp.valueOf("2024-07-14 10:10:10.0"); + Long lastChgUserId = 3L; + String questionLabel = "questionLabel"; + String questionToolTip = "questionToolTip"; + Integer questionVersionNbr = 1; + String tabId = "tabId"; + boolean enableInd = true; + Integer orderNbr = 10; + String defaultValue = "defaultValue"; + boolean requiredInd = true; + boolean displayInd = true; + String coinfectionIndCd = "coinfectionIndCd"; + String nndMetadataUid = "nndMetadataUid"; + String questionIdentifier = "questionIdentifier"; + String questionIdentifierNnd = "questionIdentifierNnd"; + String questionRequiredNnd = "questionRequiredNnd"; + String questionOid = "questionOid"; + String questionOidSystemTxt = "questionOidSystemTxt"; + String codeSetNm = "codeSetNm"; + String codeSetClassCd = "codeSetClassCd"; + String dataLocation = "dataLocation"; + String dataCd = "dataCd"; + String dataUseCd = "dataUseCd"; + Integer fieldSize = 100; + String parentUid = "parentUid"; + String ldfPageId = "ldfPageId"; + Long nbsUiMetadataUid = 4L; + Long nbsUiComponentUid = 5L; + String unitTypeCd = "unitTypeCd"; + String unitValue = "unitValue"; + String nbsTableUid = "nbsTableUid"; + String partTypeCd = "partTypeCd"; + String standardNndIndCd = "standardNndIndCd"; + String subGroupNm = "subGroupNm"; + String hl7SegmentField = "hl7SegmentField"; + Integer questionGroupSeqNbr = 20; + String questionUnitIdentifier = "questionUnitIdentifier"; + + // Act + questionMetadata.setNbsQuestionUid(nbsQuestionUid); + questionMetadata.setAddTime(addTime); + questionMetadata.setAddUserId(addUserId); + questionMetadata.setCodeSetGroupId(codeSetGroupId); + questionMetadata.setDataType(dataType); + questionMetadata.setMask(mask); + questionMetadata.setInvestigationFormCd(investigationFormCd); + questionMetadata.setLastChgTime(lastChgTime); + questionMetadata.setLastChgUserId(lastChgUserId); + questionMetadata.setQuestionLabel(questionLabel); + questionMetadata.setQuestionToolTip(questionToolTip); + questionMetadata.setQuestionVersionNbr(questionVersionNbr); + questionMetadata.setTabId(tabId); + questionMetadata.setEnableInd(enableInd); + questionMetadata.setOrderNbr(orderNbr); + questionMetadata.setDefaultValue(defaultValue); + questionMetadata.setRequiredInd(requiredInd); + questionMetadata.setDisplayInd(displayInd); + questionMetadata.setCoinfectionIndCd(coinfectionIndCd); + questionMetadata.setNndMetadataUid(nndMetadataUid); + questionMetadata.setQuestionIdentifier(questionIdentifier); + questionMetadata.setQuestionIdentifierNnd(questionIdentifierNnd); + questionMetadata.setQuestionRequiredNnd(questionRequiredNnd); + questionMetadata.setQuestionOid(questionOid); + questionMetadata.setQuestionOidSystemTxt(questionOidSystemTxt); + questionMetadata.setCodeSetNm(codeSetNm); + questionMetadata.setCodeSetClassCd(codeSetClassCd); + questionMetadata.setDataLocation(dataLocation); + questionMetadata.setDataCd(dataCd); + questionMetadata.setDataUseCd(dataUseCd); + questionMetadata.setFieldSize(fieldSize); + questionMetadata.setParentUid(parentUid); + questionMetadata.setLdfPageId(ldfPageId); + questionMetadata.setNbsUiMetadataUid(nbsUiMetadataUid); + questionMetadata.setNbsUiComponentUid(nbsUiComponentUid); + questionMetadata.setUnitTypeCd(unitTypeCd); + questionMetadata.setUnitValue(unitValue); + questionMetadata.setNbsTableUid(nbsTableUid); + questionMetadata.setPartTypeCd(partTypeCd); + questionMetadata.setStandardNndIndCd(standardNndIndCd); + questionMetadata.setSubGroupNm(subGroupNm); + questionMetadata.setHl7SegmentField(hl7SegmentField); + questionMetadata.setQuestionGroupSeqNbr(questionGroupSeqNbr); + questionMetadata.setQuestionUnitIdentifier(questionUnitIdentifier); + + // Assert + assertEquals(nbsQuestionUid, questionMetadata.getNbsQuestionUid()); + assertEquals(addTime, questionMetadata.getAddTime()); + assertEquals(addUserId, questionMetadata.getAddUserId()); + assertEquals(codeSetGroupId, questionMetadata.getCodeSetGroupId()); + assertEquals(dataType, questionMetadata.getDataType()); + assertEquals(mask, questionMetadata.getMask()); + assertEquals(investigationFormCd, questionMetadata.getInvestigationFormCd()); + assertEquals(lastChgTime, questionMetadata.getLastChgTime()); + assertEquals(lastChgUserId, questionMetadata.getLastChgUserId()); + assertEquals(questionLabel, questionMetadata.getQuestionLabel()); + assertEquals(questionToolTip, questionMetadata.getQuestionToolTip()); + assertEquals(questionVersionNbr, questionMetadata.getQuestionVersionNbr()); + assertEquals(tabId, questionMetadata.getTabId()); + assertEquals(enableInd, questionMetadata.isEnableInd()); + assertEquals(orderNbr, questionMetadata.getOrderNbr()); + assertEquals(defaultValue, questionMetadata.getDefaultValue()); + assertEquals(requiredInd, questionMetadata.isRequiredInd()); + assertEquals(displayInd, questionMetadata.isDisplayInd()); + assertEquals(coinfectionIndCd, questionMetadata.getCoinfectionIndCd()); + assertEquals(nndMetadataUid, questionMetadata.getNndMetadataUid()); + assertEquals(questionIdentifier, questionMetadata.getQuestionIdentifier()); + assertEquals(questionIdentifierNnd, questionMetadata.getQuestionIdentifierNnd()); + assertEquals(questionRequiredNnd, questionMetadata.getQuestionRequiredNnd()); + assertEquals(questionOid, questionMetadata.getQuestionOid()); + assertEquals(questionOidSystemTxt, questionMetadata.getQuestionOidSystemTxt()); + assertEquals(codeSetNm, questionMetadata.getCodeSetNm()); + assertEquals(codeSetClassCd, questionMetadata.getCodeSetClassCd()); + assertEquals(dataLocation, questionMetadata.getDataLocation()); + assertEquals(dataCd, questionMetadata.getDataCd()); + assertEquals(dataUseCd, questionMetadata.getDataUseCd()); + assertEquals(fieldSize, questionMetadata.getFieldSize()); + assertEquals(parentUid, questionMetadata.getParentUid()); + assertEquals(ldfPageId, questionMetadata.getLdfPageId()); + assertEquals(nbsUiMetadataUid, questionMetadata.getNbsUiMetadataUid()); + assertEquals(nbsUiComponentUid, questionMetadata.getNbsUiComponentUid()); + assertEquals(unitTypeCd, questionMetadata.getUnitTypeCd()); + assertEquals(unitValue, questionMetadata.getUnitValue()); + assertEquals(nbsTableUid, questionMetadata.getNbsTableUid()); + assertEquals(partTypeCd, questionMetadata.getPartTypeCd()); + assertEquals(standardNndIndCd, questionMetadata.getStandardNndIndCd()); + assertEquals(subGroupNm, questionMetadata.getSubGroupNm()); + assertEquals(hl7SegmentField, questionMetadata.getHl7SegmentField()); + assertEquals(questionGroupSeqNbr, questionMetadata.getQuestionGroupSeqNbr()); + assertEquals(questionUnitIdentifier, questionMetadata.getQuestionUnitIdentifier()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/ReferralTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/ReferralTest.java new file mode 100644 index 000000000..7944eac18 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/ReferralTest.java @@ -0,0 +1,268 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.model.dto.phc.ReferralDto; +import gov.cdc.dataprocessing.repository.nbs.odse.model.phc.Referral; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class ReferralTest { + + @Test + void testDefaultConstructor() { + // Arrange & Act + Referral referral = new Referral(); + + // Assert + assertNull(referral.getReferralUid()); + assertNull(referral.getActivityDurationAmt()); + assertNull(referral.getActivityDurationUnitCd()); + assertNull(referral.getActivityFromTime()); + assertNull(referral.getActivityToTime()); + assertNull(referral.getAddReasonCd()); + assertNull(referral.getAddTime()); + assertNull(referral.getAddUserId()); + assertNull(referral.getCd()); + assertNull(referral.getCdDescTxt()); + assertNull(referral.getConfidentialityCd()); + assertNull(referral.getConfidentialityDescTxt()); + assertNull(referral.getEffectiveDurationAmt()); + assertNull(referral.getEffectiveDurationUnitCd()); + assertNull(referral.getEffectiveFromTime()); + assertNull(referral.getEffectiveToTime()); + assertNull(referral.getLastChgReasonCd()); + assertNull(referral.getLastChgTime()); + assertNull(referral.getLastChgUserId()); + assertNull(referral.getLocalId()); + assertNull(referral.getReasonTxt()); + assertNull(referral.getRecordStatusCd()); + assertNull(referral.getRecordStatusTime()); + assertNull(referral.getReferralDescTxt()); + assertNull(referral.getRepeatNbr()); + assertNull(referral.getStatusCd()); + assertNull(referral.getStatusTime()); + assertNull(referral.getTxt()); + assertNull(referral.getUserAffiliationTxt()); + assertNull(referral.getProgramJurisdictionOid()); + assertNull(referral.getSharedInd()); + assertNull(referral.getVersionCtrlNbr()); + } + + @Test + void testParameterizedConstructor() { + // Arrange + Long referralUid = 1L; + String activityDurationAmt = "durationAmt"; + String activityDurationUnitCd = "durationUnitCd"; + Timestamp activityFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp activityToTime = new Timestamp(System.currentTimeMillis()); + String addReasonCd = "reasonCd"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String cd = "cd"; + String cdDescTxt = "cdDesc"; + String confidentialityCd = "confidentialityCd"; + String confidentialityDescTxt = "confidentialityDesc"; + String effectiveDurationAmt = "effectiveDurationAmt"; + String effectiveDurationUnitCd = "effectiveDurationUnitCd"; + Timestamp effectiveFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp effectiveToTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "chgReasonCd"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "localId"; + String reasonTxt = "reasonTxt"; + String recordStatusCd = "statusCd"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String referralDescTxt = "referralDescTxt"; + Integer repeatNbr = 1; + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String txt = "txt"; + String userAffiliationTxt = "affiliation"; + Long programJurisdictionOid = 4L; + String sharedInd = "sharedInd"; + Integer versionCtrlNbr = 1; + + ReferralDto referralDto = new ReferralDto(); + referralDto.setReferralUid(referralUid); + referralDto.setActivityDurationAmt(activityDurationAmt); + referralDto.setActivityDurationUnitCd(activityDurationUnitCd); + referralDto.setActivityFromTime(activityFromTime); + referralDto.setActivityToTime(activityToTime); + referralDto.setAddReasonCd(addReasonCd); + referralDto.setAddTime(addTime); + referralDto.setAddUserId(addUserId); + referralDto.setCd(cd); + referralDto.setCdDescTxt(cdDescTxt); + referralDto.setConfidentialityCd(confidentialityCd); + referralDto.setConfidentialityDescTxt(confidentialityDescTxt); + referralDto.setEffectiveDurationAmt(effectiveDurationAmt); + referralDto.setEffectiveDurationUnitCd(effectiveDurationUnitCd); + referralDto.setEffectiveFromTime(effectiveFromTime); + referralDto.setEffectiveToTime(effectiveToTime); + referralDto.setLastChgReasonCd(lastChgReasonCd); + referralDto.setLastChgTime(lastChgTime); + referralDto.setLastChgUserId(lastChgUserId); + referralDto.setLocalId(localId); + referralDto.setReasonTxt(reasonTxt); + referralDto.setRecordStatusCd(recordStatusCd); + referralDto.setRecordStatusTime(recordStatusTime); + referralDto.setReferralDescTxt(referralDescTxt); + referralDto.setRepeatNbr(repeatNbr); + referralDto.setStatusCd(statusCd); + referralDto.setStatusTime(statusTime); + referralDto.setTxt(txt); + referralDto.setUserAffiliationTxt(userAffiliationTxt); + referralDto.setProgramJurisdictionOid(programJurisdictionOid); + referralDto.setSharedInd(sharedInd); + referralDto.setVersionCtrlNbr(versionCtrlNbr); + + // Act + Referral referral = new Referral(referralDto); + + // Assert + assertEquals(referralUid, referral.getReferralUid()); + assertEquals(activityDurationAmt, referral.getActivityDurationAmt()); + assertEquals(activityDurationUnitCd, referral.getActivityDurationUnitCd()); + assertEquals(activityFromTime, referral.getActivityFromTime()); + assertEquals(activityToTime, referral.getActivityToTime()); + assertEquals(addReasonCd, referral.getAddReasonCd()); + assertEquals(addTime, referral.getAddTime()); + assertEquals(addUserId, referral.getAddUserId()); + assertEquals(cd, referral.getCd()); + assertEquals(cdDescTxt, referral.getCdDescTxt()); + assertEquals(confidentialityCd, referral.getConfidentialityCd()); + assertEquals(confidentialityDescTxt, referral.getConfidentialityDescTxt()); + assertEquals(effectiveDurationAmt, referral.getEffectiveDurationAmt()); + assertEquals(effectiveDurationUnitCd, referral.getEffectiveDurationUnitCd()); + assertEquals(effectiveFromTime, referral.getEffectiveFromTime()); + assertEquals(effectiveToTime, referral.getEffectiveToTime()); + assertEquals(lastChgReasonCd, referral.getLastChgReasonCd()); + assertEquals(lastChgTime, referral.getLastChgTime()); + assertEquals(lastChgUserId, referral.getLastChgUserId()); + assertEquals(localId, referral.getLocalId()); + assertEquals(reasonTxt, referral.getReasonTxt()); + assertEquals(recordStatusCd, referral.getRecordStatusCd()); + assertEquals(recordStatusTime, referral.getRecordStatusTime()); + assertEquals(referralDescTxt, referral.getReferralDescTxt()); + assertEquals(repeatNbr, referral.getRepeatNbr()); + assertEquals(statusCd, referral.getStatusCd()); + assertEquals(statusTime, referral.getStatusTime()); + assertEquals(txt, referral.getTxt()); + assertEquals(userAffiliationTxt, referral.getUserAffiliationTxt()); + assertEquals(programJurisdictionOid, referral.getProgramJurisdictionOid()); + assertEquals(sharedInd, referral.getSharedInd()); + assertEquals(versionCtrlNbr, referral.getVersionCtrlNbr()); + } + + @Test + void testSettersAndGetters() { + // Arrange + Referral referral = new Referral(); + + Long referralUid = 1L; + String activityDurationAmt = "durationAmt"; + String activityDurationUnitCd = "durationUnitCd"; + Timestamp activityFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp activityToTime = new Timestamp(System.currentTimeMillis()); + String addReasonCd = "reasonCd"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 2L; + String cd = "cd"; + String cdDescTxt = "cdDesc"; + String confidentialityCd = "confidentialityCd"; + String confidentialityDescTxt = "confidentialityDesc"; + String effectiveDurationAmt = "effectiveDurationAmt"; + String effectiveDurationUnitCd = "effectiveDurationUnitCd"; + Timestamp effectiveFromTime = new Timestamp(System.currentTimeMillis()); + Timestamp effectiveToTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "chgReasonCd"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 3L; + String localId = "localId"; + String reasonTxt = "reasonTxt"; + String recordStatusCd = "statusCd"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + String referralDescTxt = "referralDescTxt"; + Integer repeatNbr = 1; + String statusCd = "statusCd"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String txt = "txt"; + String userAffiliationTxt = "affiliation"; + Long programJurisdictionOid = 4L; + String sharedInd = "sharedInd"; + Integer versionCtrlNbr = 1; + + // Act + referral.setReferralUid(referralUid); + referral.setActivityDurationAmt(activityDurationAmt); + referral.setActivityDurationUnitCd(activityDurationUnitCd); + referral.setActivityFromTime(activityFromTime); + referral.setActivityToTime(activityToTime); + referral.setAddReasonCd(addReasonCd); + referral.setAddTime(addTime); + referral.setAddUserId(addUserId); + referral.setCd(cd); + referral.setCdDescTxt(cdDescTxt); + referral.setConfidentialityCd(confidentialityCd); + referral.setConfidentialityDescTxt(confidentialityDescTxt); + referral.setEffectiveDurationAmt(effectiveDurationAmt); + referral.setEffectiveDurationUnitCd(effectiveDurationUnitCd); + referral.setEffectiveFromTime(effectiveFromTime); + referral.setEffectiveToTime(effectiveToTime); + referral.setLastChgReasonCd(lastChgReasonCd); + referral.setLastChgTime(lastChgTime); + referral.setLastChgUserId(lastChgUserId); + referral.setLocalId(localId); + referral.setReasonTxt(reasonTxt); + referral.setRecordStatusCd(recordStatusCd); + referral.setRecordStatusTime(recordStatusTime); + referral.setReferralDescTxt(referralDescTxt); + referral.setRepeatNbr(repeatNbr); + referral.setStatusCd(statusCd); + referral.setStatusTime(statusTime); + referral.setTxt(txt); + referral.setUserAffiliationTxt(userAffiliationTxt); + referral.setProgramJurisdictionOid(programJurisdictionOid); + referral.setSharedInd(sharedInd); + referral.setVersionCtrlNbr(versionCtrlNbr); + + // Assert + assertEquals(referralUid, referral.getReferralUid()); + assertEquals(activityDurationAmt, referral.getActivityDurationAmt()); + assertEquals(activityDurationUnitCd, referral.getActivityDurationUnitCd()); + assertEquals(activityFromTime, referral.getActivityFromTime()); + assertEquals(activityToTime, referral.getActivityToTime()); + assertEquals(addReasonCd, referral.getAddReasonCd()); + assertEquals(addTime, referral.getAddTime()); + assertEquals(addUserId, referral.getAddUserId()); + assertEquals(cd, referral.getCd()); + assertEquals(cdDescTxt, referral.getCdDescTxt()); + assertEquals(confidentialityCd, referral.getConfidentialityCd()); + assertEquals(confidentialityDescTxt, referral.getConfidentialityDescTxt()); + assertEquals(effectiveDurationAmt, referral.getEffectiveDurationAmt()); + assertEquals(effectiveDurationUnitCd, referral.getEffectiveDurationUnitCd()); + assertEquals(effectiveFromTime, referral.getEffectiveFromTime()); + assertEquals(effectiveToTime, referral.getEffectiveToTime()); + assertEquals(lastChgReasonCd, referral.getLastChgReasonCd()); + assertEquals(lastChgTime, referral.getLastChgTime()); + assertEquals(lastChgUserId, referral.getLastChgUserId()); + assertEquals(localId, referral.getLocalId()); + assertEquals(reasonTxt, referral.getReasonTxt()); + assertEquals(recordStatusCd, referral.getRecordStatusCd()); + assertEquals(recordStatusTime, referral.getRecordStatusTime()); + assertEquals(referralDescTxt, referral.getReferralDescTxt()); + assertEquals(repeatNbr, referral.getRepeatNbr()); + assertEquals(statusCd, referral.getStatusCd()); + assertEquals(statusTime, referral.getStatusTime()); + assertEquals(txt, referral.getTxt()); + assertEquals(userAffiliationTxt, referral.getUserAffiliationTxt()); + assertEquals(programJurisdictionOid, referral.getProgramJurisdictionOid()); + assertEquals(sharedInd, referral.getSharedInd()); + assertEquals(versionCtrlNbr, referral.getVersionCtrlNbr()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/StateDefinedFieldDataTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/StateDefinedFieldDataTest.java new file mode 100644 index 000000000..a606be29c --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/StateDefinedFieldDataTest.java @@ -0,0 +1,59 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model; + + +import gov.cdc.dataprocessing.repository.nbs.odse.model.generic_helper.StateDefinedFieldData; +import org.junit.jupiter.api.Test; + +import java.util.Date; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class StateDefinedFieldDataTest { + + @Test + void testGettersAndSetters() { + // Arrange + StateDefinedFieldData stateDefinedFieldData = new StateDefinedFieldData(); + Long ldfUid = 1L; + Long businessObjectUid = 2L; + Date addTime = new Date(); + String businessObjectName = "BusinessObjectName"; + Date lastChangeTime = new Date(); + String ldfValue = "LdfValue"; + Short versionControlNumber = 1; + + // Act + stateDefinedFieldData.setLdfUid(ldfUid); + stateDefinedFieldData.setBusinessObjectUid(businessObjectUid); + stateDefinedFieldData.setAddTime(addTime); + stateDefinedFieldData.setBusinessObjectName(businessObjectName); + stateDefinedFieldData.setLastChangeTime(lastChangeTime); + stateDefinedFieldData.setLdfValue(ldfValue); + stateDefinedFieldData.setVersionControlNumber(versionControlNumber); + + // Assert + assertEquals(ldfUid, stateDefinedFieldData.getLdfUid()); + assertEquals(businessObjectUid, stateDefinedFieldData.getBusinessObjectUid()); + assertEquals(addTime, stateDefinedFieldData.getAddTime()); + assertEquals(businessObjectName, stateDefinedFieldData.getBusinessObjectName()); + assertEquals(lastChangeTime, stateDefinedFieldData.getLastChangeTime()); + assertEquals(ldfValue, stateDefinedFieldData.getLdfValue()); + assertEquals(versionControlNumber, stateDefinedFieldData.getVersionControlNumber()); + } + + @Test + void testDefaultValues() { + // Arrange + StateDefinedFieldData stateDefinedFieldData = new StateDefinedFieldData(); + + // Assert + assertNull(stateDefinedFieldData.getLdfUid()); + assertNull(stateDefinedFieldData.getBusinessObjectUid()); + assertNull(stateDefinedFieldData.getAddTime()); + assertNull(stateDefinedFieldData.getBusinessObjectName()); + assertNull(stateDefinedFieldData.getLastChangeTime()); + assertNull(stateDefinedFieldData.getLdfValue()); + assertNull(stateDefinedFieldData.getVersionControlNumber()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActRelationshipHistoryTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActRelationshipHistoryTest.java new file mode 100644 index 000000000..25f4139ff --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActRelationshipHistoryTest.java @@ -0,0 +1,116 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.act; + +import gov.cdc.dataprocessing.model.dto.act.ActRelationshipDto; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class ActRelationshipHistoryTest { + + @Test + void testDefaultConstructor() { + ActRelationshipHistory history = new ActRelationshipHistory(); + + assertNull(history.getSourceActUid()); + assertNull(history.getTargetActUid()); + assertNull(history.getTypeCd()); + assertNull(history.getVersionCrl()); + assertNull(history.getAddReasonCd()); + assertNull(history.getAddTime()); + assertNull(history.getAddUserId()); + assertNull(history.getDurationAmt()); + assertNull(history.getDurationUnitCd()); + assertNull(history.getFromTime()); + assertNull(history.getLastChgReasonCd()); + assertNull(history.getLastChgTime()); + assertNull(history.getLastChgUserId()); + assertNull(history.getRecordStatusCd()); + assertNull(history.getRecordStatusTime()); + assertNull(history.getSequenceNbr()); + assertNull(history.getStatusCd()); + assertNull(history.getStatusTime()); + assertNull(history.getSourceClassCd()); + assertNull(history.getTargetClassCd()); + assertNull(history.getToTime()); + assertNull(history.getTypeDescTxt()); + assertNull(history.getUserAffiliationTxt()); + } + + @Test + void testParameterizedConstructor() { + Long sourceActUid = 1L; + Long targetActUid = 2L; + String typeCd = "Type"; + String addReasonCd = "AddReason"; + Timestamp addTime = new Timestamp(System.currentTimeMillis()); + Long addUserId = 3L; + String durationAmt = "DurationAmt"; + String durationUnitCd = "DurationUnit"; + Timestamp fromTime = new Timestamp(System.currentTimeMillis()); + String lastChgReasonCd = "LastChgReason"; + Timestamp lastChgTime = new Timestamp(System.currentTimeMillis()); + Long lastChgUserId = 4L; + String recordStatusCd = "RecordStatus"; + Timestamp recordStatusTime = new Timestamp(System.currentTimeMillis()); + Integer sequenceNbr = 5; + String statusCd = "Status"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String sourceClassCd = "SourceClass"; + String targetClassCd = "TargetClass"; + Timestamp toTime = new Timestamp(System.currentTimeMillis()); + String typeDescTxt = "TypeDesc"; + String userAffiliationTxt = "UserAffiliation"; + + ActRelationshipDto dto = new ActRelationshipDto(); + dto.setSourceActUid(sourceActUid); + dto.setTargetActUid(targetActUid); + dto.setTypeCd(typeCd); + dto.setAddReasonCd(addReasonCd); + dto.setAddTime(addTime); + dto.setAddUserId(addUserId); + dto.setDurationAmt(durationAmt); + dto.setDurationUnitCd(durationUnitCd); + dto.setFromTime(fromTime); + dto.setLastChgReasonCd(lastChgReasonCd); + dto.setLastChgTime(lastChgTime); + dto.setLastChgUserId(lastChgUserId); + dto.setRecordStatusCd(recordStatusCd); + dto.setRecordStatusTime(recordStatusTime); + dto.setSequenceNbr(sequenceNbr); + dto.setStatusCd(statusCd); + dto.setStatusTime(statusTime); + dto.setSourceClassCd(sourceClassCd); + dto.setTargetClassCd(targetClassCd); + dto.setToTime(toTime); + dto.setTypeDescTxt(typeDescTxt); + dto.setUserAffiliationTxt(userAffiliationTxt); + + ActRelationshipHistory history = new ActRelationshipHistory(dto); + + assertEquals(sourceActUid, history.getSourceActUid()); + assertEquals(targetActUid, history.getTargetActUid()); + assertEquals(typeCd, history.getTypeCd()); + assertEquals(1, history.getVersionCrl()); // Default value set in the constructor + assertEquals(addReasonCd, history.getAddReasonCd()); + assertEquals(addTime, history.getAddTime()); + assertEquals(addUserId, history.getAddUserId()); + assertEquals(durationAmt, history.getDurationAmt()); + assertEquals(durationUnitCd, history.getDurationUnitCd()); + assertEquals(fromTime, history.getFromTime()); + assertEquals(lastChgReasonCd, history.getLastChgReasonCd()); + assertEquals(lastChgTime, history.getLastChgTime()); + assertEquals(lastChgUserId, history.getLastChgUserId()); + assertEquals(recordStatusCd, history.getRecordStatusCd()); + assertEquals(recordStatusTime, history.getRecordStatusTime()); + assertEquals(sequenceNbr, history.getSequenceNbr()); + assertEquals(statusCd, history.getStatusCd()); + assertEquals(statusTime, history.getStatusTime()); + assertEquals(sourceClassCd, history.getSourceClassCd()); + assertEquals(targetClassCd, history.getTargetClassCd()); + assertEquals(toTime, history.getToTime()); + assertEquals(typeDescTxt, history.getTypeDescTxt()); + assertEquals(userAffiliationTxt, history.getUserAffiliationTxt()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActTest.java new file mode 100644 index 000000000..9a338ce1d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/act/ActTest.java @@ -0,0 +1,33 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.act; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class ActTest { + + @Test + void testGettersAndSetters() { + Act act = new Act(); + + // Set values + act.setActUid(1L); + act.setClassCode("Class123"); + act.setMoodCode("Mood123"); + + // Assert values + assertEquals(1L, act.getActUid()); + assertEquals("Class123", act.getClassCode()); + assertEquals("Mood123", act.getMoodCode()); + } + + @Test + void testNoArgsConstructor() { + Act act = new Act(); + + assertNotNull(act); + assertNull(act.getActUid()); + assertNull(act.getClassCode()); + assertNull(act.getMoodCode()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUserRealizedRoleTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUserRealizedRoleTest.java new file mode 100644 index 000000000..8ed4ab5d1 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUserRealizedRoleTest.java @@ -0,0 +1,81 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.auth; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class AuthUserRealizedRoleTest { + + private AuthUserRealizedRole authUserRealizedRole; + private Timestamp timestamp; + + @BeforeEach + void setUp() { + authUserRealizedRole = new AuthUserRealizedRole(); + timestamp = new Timestamp(System.currentTimeMillis()); + } + + @Test + void testGettersAndSetters() { + // Set values + authUserRealizedRole.setPermSetNm("PermissionSetName"); + authUserRealizedRole.setAuthUserRoleUid(1L); + authUserRealizedRole.setAuthRoleNm("RoleName"); + authUserRealizedRole.setProgAreaCd("ProgramAreaCode"); + authUserRealizedRole.setJurisdictionCd("JurisdictionCode"); + authUserRealizedRole.setAuthUserUid(2L); + authUserRealizedRole.setAuthPermSetUid(3L); + authUserRealizedRole.setRoleGuestInd("Y"); + authUserRealizedRole.setReadOnlyInd("N"); + authUserRealizedRole.setDispSeqNbr(1); + authUserRealizedRole.setAddTime(timestamp); + authUserRealizedRole.setAddUserId(4L); + authUserRealizedRole.setLastChgTime(timestamp); + authUserRealizedRole.setLastChgUserId(5L); + authUserRealizedRole.setRecordStatusCd("Active"); + authUserRealizedRole.setRecordStatusTime(timestamp); + + // Verify values + assertEquals("PermissionSetName", authUserRealizedRole.getPermSetNm()); + assertEquals(1L, authUserRealizedRole.getAuthUserRoleUid()); + assertEquals("RoleName", authUserRealizedRole.getAuthRoleNm()); + assertEquals("ProgramAreaCode", authUserRealizedRole.getProgAreaCd()); + assertEquals("JurisdictionCode", authUserRealizedRole.getJurisdictionCd()); + assertEquals(2L, authUserRealizedRole.getAuthUserUid()); + assertEquals(3L, authUserRealizedRole.getAuthPermSetUid()); + assertEquals("Y", authUserRealizedRole.getRoleGuestInd()); + assertEquals("N", authUserRealizedRole.getReadOnlyInd()); + assertEquals(1, authUserRealizedRole.getDispSeqNbr()); + assertEquals(timestamp, authUserRealizedRole.getAddTime()); + assertEquals(4L, authUserRealizedRole.getAddUserId()); + assertEquals(timestamp, authUserRealizedRole.getLastChgTime()); + assertEquals(5L, authUserRealizedRole.getLastChgUserId()); + assertEquals("Active", authUserRealizedRole.getRecordStatusCd()); + assertEquals(timestamp, authUserRealizedRole.getRecordStatusTime()); + } + + @Test + void testDefaultValues() { + // Check default values + assertNull(authUserRealizedRole.getPermSetNm()); + assertNull(authUserRealizedRole.getAuthUserRoleUid()); + assertNull(authUserRealizedRole.getAuthRoleNm()); + assertNull(authUserRealizedRole.getProgAreaCd()); + assertNull(authUserRealizedRole.getJurisdictionCd()); + assertNull(authUserRealizedRole.getAuthUserUid()); + assertNull(authUserRealizedRole.getAuthPermSetUid()); + assertNull(authUserRealizedRole.getRoleGuestInd()); + assertNull(authUserRealizedRole.getReadOnlyInd()); + assertNull(authUserRealizedRole.getDispSeqNbr()); + assertNull(authUserRealizedRole.getAddTime()); + assertNull(authUserRealizedRole.getAddUserId()); + assertNull(authUserRealizedRole.getLastChgTime()); + assertNull(authUserRealizedRole.getLastChgUserId()); + assertNull(authUserRealizedRole.getRecordStatusCd()); + assertNull(authUserRealizedRole.getRecordStatusTime()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUserTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUserTest.java new file mode 100644 index 000000000..a809840ec --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/auth/AuthUserTest.java @@ -0,0 +1,105 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.auth; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class AuthUserTest { + + private AuthUser authUser; + private Timestamp timestamp; + + @BeforeEach + void setUp() { + authUser = new AuthUser(); + timestamp = new Timestamp(System.currentTimeMillis()); + } + + @Test + void testGettersAndSetters() { + // Set values + authUser.setAuthUserUid(1L); + authUser.setUserId("user123"); + authUser.setUserType("type"); + authUser.setUserTitle("title"); + authUser.setUserDepartment("department"); + authUser.setUserFirstNm("firstName"); + authUser.setUserLastNm("lastName"); + authUser.setUserWorkEmail("email@example.com"); + authUser.setUserWorkPhone("123-456-7890"); + authUser.setUserMobilePhone("098-765-4321"); + authUser.setMasterSecAdminInd("Y"); + authUser.setProgAreaAdminInd("N"); + authUser.setNedssEntryId(2L); + authUser.setExternalOrgUid(3L); + authUser.setUserPassword("password"); + authUser.setUserComments("comments"); + authUser.setAddTime(timestamp); + authUser.setAddUserId(4L); + authUser.setLastChgTime(timestamp); + authUser.setLastChgUserId(5L); + authUser.setRecordStatusCd("active"); + authUser.setRecordStatusTime(timestamp); + authUser.setJurisdictionDerivationInd("Y"); + authUser.setProviderUid(6L); + + // Verify values + assertEquals(1L, authUser.getAuthUserUid()); + assertEquals("user123", authUser.getUserId()); + assertEquals("type", authUser.getUserType()); + assertEquals("title", authUser.getUserTitle()); + assertEquals("department", authUser.getUserDepartment()); + assertEquals("firstName", authUser.getUserFirstNm()); + assertEquals("lastName", authUser.getUserLastNm()); + assertEquals("email@example.com", authUser.getUserWorkEmail()); + assertEquals("123-456-7890", authUser.getUserWorkPhone()); + assertEquals("098-765-4321", authUser.getUserMobilePhone()); + assertEquals("Y", authUser.getMasterSecAdminInd()); + assertEquals("N", authUser.getProgAreaAdminInd()); + assertEquals(2L, authUser.getNedssEntryId()); + assertEquals(3L, authUser.getExternalOrgUid()); + assertEquals("password", authUser.getUserPassword()); + assertEquals("comments", authUser.getUserComments()); + assertEquals(timestamp, authUser.getAddTime()); + assertEquals(4L, authUser.getAddUserId()); + assertEquals(timestamp, authUser.getLastChgTime()); + assertEquals(5L, authUser.getLastChgUserId()); + assertEquals("active", authUser.getRecordStatusCd()); + assertEquals(timestamp, authUser.getRecordStatusTime()); + assertEquals("Y", authUser.getJurisdictionDerivationInd()); + assertEquals(6L, authUser.getProviderUid()); + } + + @Test + void testDefaultValues() { + // Check default values + assertNull(authUser.getAuthUserUid()); + assertNull(authUser.getUserId()); + assertNull(authUser.getUserType()); + assertNull(authUser.getUserTitle()); + assertNull(authUser.getUserDepartment()); + assertNull(authUser.getUserFirstNm()); + assertNull(authUser.getUserLastNm()); + assertNull(authUser.getUserWorkEmail()); + assertNull(authUser.getUserWorkPhone()); + assertNull(authUser.getUserMobilePhone()); + assertNull(authUser.getMasterSecAdminInd()); + assertNull(authUser.getProgAreaAdminInd()); + assertNull(authUser.getNedssEntryId()); + assertNull(authUser.getExternalOrgUid()); + assertNull(authUser.getUserPassword()); + assertNull(authUser.getUserComments()); + assertNull(authUser.getAddTime()); + assertNull(authUser.getAddUserId()); + assertNull(authUser.getLastChgTime()); + assertNull(authUser.getLastChgUserId()); + assertNull(authUser.getRecordStatusCd()); + assertNull(authUser.getRecordStatusTime()); + assertNull(authUser.getJurisdictionDerivationInd()); + assertNull(authUser.getProviderUid()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActIdIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActIdIdTest.java new file mode 100644 index 000000000..51cb9450d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActIdIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class ActIdIdTest { + + @Test + void testGettersAndSetters() { + // Arrange + ActIdId actIdId = new ActIdId(); + Long actUid = 123L; + Integer actIdSeq = 456; + + // Act + actIdId.setActUid(actUid); + actIdId.setActIdSeq(actIdSeq); + + // Assert + assertEquals(actUid, actIdId.getActUid()); + assertEquals(actIdSeq, actIdId.getActIdSeq()); + } + + @Test + void testDefaultValues() { + // Arrange + ActIdId actIdId = new ActIdId(); + + // Assert + assertNull(actIdId.getActUid()); + assertNull(actIdId.getActIdSeq()); + } + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActRelationshipIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActRelationshipIdTest.java new file mode 100644 index 000000000..7eb876ce7 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ActRelationshipIdTest.java @@ -0,0 +1,42 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class ActRelationshipIdTest { + + @Test + public void testGettersAndSetters() { + ActRelationshipId id = new ActRelationshipId(); + id.setSourceActUid(1L); + id.setTargetActUid(2L); + id.setTypeCd("type"); + + assertEquals(1L, id.getSourceActUid()); + assertEquals(2L, id.getTargetActUid()); + assertEquals("type", id.getTypeCd()); + } + + @Test + public void testEqualsAndHashCode() { + ActRelationshipId id1 = new ActRelationshipId(); + id1.setSourceActUid(1L); + id1.setTargetActUid(2L); + id1.setTypeCd("type"); + + ActRelationshipId id2 = new ActRelationshipId(); + id2.setSourceActUid(1L); + id2.setTargetActUid(2L); + id2.setTypeCd("type"); + + ActRelationshipId id3 = new ActRelationshipId(); + id3.setSourceActUid(1L); + id3.setTargetActUid(3L); + id3.setTypeCd("type"); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityIdIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityIdIdTest.java new file mode 100644 index 000000000..5fb8ab92c --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityIdIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class EntityIdIdTest { + + @Test + public void testGettersAndSetters() { + EntityIdId id = new EntityIdId(); + id.setEntityUid(1L); + id.setEntityIdSeq(2); + + assertEquals(1L, id.getEntityUid()); + assertEquals(2, id.getEntityIdSeq()); + } + + @Test + public void testEqualsAndHashCode() { + EntityIdId id1 = new EntityIdId(); + id1.setEntityUid(1L); + id1.setEntityIdSeq(2); + + EntityIdId id2 = new EntityIdId(); + id2.setEntityUid(1L); + id2.setEntityIdSeq(2); + + EntityIdId id3 = new EntityIdId(); + id3.setEntityUid(1L); + id3.setEntityIdSeq(3); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityLocatorParticipationIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityLocatorParticipationIdTest.java new file mode 100644 index 000000000..1981758a6 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/EntityLocatorParticipationIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class EntityLocatorParticipationIdTest { + + @Test + public void testGettersAndSetters() { + EntityLocatorParticipationId id = new EntityLocatorParticipationId(); + id.setEntityUid(1L); + id.setLocatorUid(2L); + + assertEquals(1L, id.getEntityUid()); + assertEquals(2L, id.getLocatorUid()); + } + + @Test + public void testEqualsAndHashCode() { + EntityLocatorParticipationId id1 = new EntityLocatorParticipationId(); + id1.setEntityUid(1L); + id1.setLocatorUid(2L); + + EntityLocatorParticipationId id2 = new EntityLocatorParticipationId(); + id2.setEntityUid(1L); + id2.setLocatorUid(2L); + + EntityLocatorParticipationId id3 = new EntityLocatorParticipationId(); + id3.setEntityUid(1L); + id3.setLocatorUid(3L); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ManufacturedMaterialIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ManufacturedMaterialIdTest.java new file mode 100644 index 000000000..6ee69f2a6 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ManufacturedMaterialIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class ManufacturedMaterialIdTest { + + @Test + public void testGettersAndSetters() { + ManufacturedMaterialId id = new ManufacturedMaterialId(); + id.setMaterialUid(1L); + id.setManufacturedMaterialSeq(2); + + assertEquals(1L, id.getMaterialUid()); + assertEquals(2, id.getManufacturedMaterialSeq()); + } + + @Test + public void testEqualsAndHashCode() { + ManufacturedMaterialId id1 = new ManufacturedMaterialId(); + id1.setMaterialUid(1L); + id1.setManufacturedMaterialSeq(2); + + ManufacturedMaterialId id2 = new ManufacturedMaterialId(); + id2.setMaterialUid(1L); + id2.setManufacturedMaterialSeq(2); + + ManufacturedMaterialId id3 = new ManufacturedMaterialId(); + id3.setMaterialUid(1L); + id3.setManufacturedMaterialSeq(3); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/NNDActivityLogIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/NNDActivityLogIdTest.java new file mode 100644 index 000000000..617dc8154 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/NNDActivityLogIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class NNDActivityLogIdTest { + + @Test + public void testGettersAndSetters() { + NNDActivityLogId id = new NNDActivityLogId(); + id.setNndActivityLogUid(1L); + id.setNndActivityLogSeq(2); + + assertEquals(1L, id.getNndActivityLogUid()); + assertEquals(2, id.getNndActivityLogSeq()); + } + + @Test + public void testEqualsAndHashCode() { + NNDActivityLogId id1 = new NNDActivityLogId(); + id1.setNndActivityLogUid(1L); + id1.setNndActivityLogSeq(2); + + NNDActivityLogId id2 = new NNDActivityLogId(); + id2.setNndActivityLogUid(1L); + id2.setNndActivityLogSeq(2); + + NNDActivityLogId id3 = new NNDActivityLogId(); + id3.setNndActivityLogUid(1L); + id3.setNndActivityLogSeq(3); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueCodedIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueCodedIdTest.java new file mode 100644 index 000000000..ce716cf84 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueCodedIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class ObsValueCodedIdTest { + + @Test + public void testGettersAndSetters() { + ObsValueCodedId id = new ObsValueCodedId(); + id.setObservationUid(1L); + id.setCode("testCode"); + + assertEquals(1L, id.getObservationUid()); + assertEquals("testCode", id.getCode()); + } + + @Test + public void testEqualsAndHashCode() { + ObsValueCodedId id1 = new ObsValueCodedId(); + id1.setObservationUid(1L); + id1.setCode("testCode"); + + ObsValueCodedId id2 = new ObsValueCodedId(); + id2.setObservationUid(1L); + id2.setCode("testCode"); + + ObsValueCodedId id3 = new ObsValueCodedId(); + id3.setObservationUid(1L); + id3.setCode("differentCode"); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueDateIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueDateIdTest.java new file mode 100644 index 000000000..148b04433 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueDateIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class ObsValueDateIdTest { + + @Test + public void testGettersAndSetters() { + ObsValueDateId id = new ObsValueDateId(); + id.setObservationUid(1L); + id.setObsValueDateSeq(2); + + assertEquals(1L, id.getObservationUid()); + assertEquals(2, id.getObsValueDateSeq()); + } + + @Test + public void testEqualsAndHashCode() { + ObsValueDateId id1 = new ObsValueDateId(); + id1.setObservationUid(1L); + id1.setObsValueDateSeq(2); + + ObsValueDateId id2 = new ObsValueDateId(); + id2.setObservationUid(1L); + id2.setObsValueDateSeq(2); + + ObsValueDateId id3 = new ObsValueDateId(); + id3.setObservationUid(1L); + id3.setObsValueDateSeq(3); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueNumericIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueNumericIdTest.java new file mode 100644 index 000000000..9021c5d1f --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueNumericIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class ObsValueNumericIdTest { + + @Test + public void testGettersAndSetters() { + ObsValueNumericId id = new ObsValueNumericId(); + id.setObservationUid(1L); + id.setObsValueNumericSeq(2); + + assertEquals(1L, id.getObservationUid()); + assertEquals(2, id.getObsValueNumericSeq()); + } + + @Test + public void testEqualsAndHashCode() { + ObsValueNumericId id1 = new ObsValueNumericId(); + id1.setObservationUid(1L); + id1.setObsValueNumericSeq(2); + + ObsValueNumericId id2 = new ObsValueNumericId(); + id2.setObservationUid(1L); + id2.setObsValueNumericSeq(2); + + ObsValueNumericId id3 = new ObsValueNumericId(); + id3.setObservationUid(1L); + id3.setObsValueNumericSeq(3); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueTxtIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueTxtIdTest.java new file mode 100644 index 000000000..9a224369c --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObsValueTxtIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class ObsValueTxtIdTest { + + @Test + public void testGettersAndSetters() { + ObsValueTxtId id = new ObsValueTxtId(); + id.setObservationUid(1L); + id.setObsValueTxtSeq(2); + + assertEquals(1L, id.getObservationUid()); + assertEquals(2, id.getObsValueTxtSeq()); + } + + @Test + public void testEqualsAndHashCode() { + ObsValueTxtId id1 = new ObsValueTxtId(); + id1.setObservationUid(1L); + id1.setObsValueTxtSeq(2); + + ObsValueTxtId id2 = new ObsValueTxtId(); + id2.setObservationUid(1L); + id2.setObsValueTxtSeq(2); + + ObsValueTxtId id3 = new ObsValueTxtId(); + id3.setObservationUid(1L); + id3.setObsValueTxtSeq(3); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationInterpIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationInterpIdTest.java new file mode 100644 index 000000000..3c292d884 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationInterpIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class ObservationInterpIdTest { + + @Test + public void testGettersAndSetters() { + ObservationInterpId id = new ObservationInterpId(); + id.setObservationUid(1L); + id.setInterpretationCd("testCd"); + + assertEquals(1L, id.getObservationUid()); + assertEquals("testCd", id.getInterpretationCd()); + } + + @Test + public void testEqualsAndHashCode() { + ObservationInterpId id1 = new ObservationInterpId(); + id1.setObservationUid(1L); + id1.setInterpretationCd("testCd"); + + ObservationInterpId id2 = new ObservationInterpId(); + id2.setObservationUid(1L); + id2.setInterpretationCd("testCd"); + + ObservationInterpId id3 = new ObservationInterpId(); + id3.setObservationUid(1L); + id3.setInterpretationCd("differentCd"); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationReasonIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationReasonIdTest.java new file mode 100644 index 000000000..27dd0f7ba --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ObservationReasonIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class ObservationReasonIdTest { + + @Test + public void testGettersAndSetters() { + ObservationReasonId id = new ObservationReasonId(); + id.setObservationUid(1L); + id.setReasonCd("reason"); + + assertEquals(1L, id.getObservationUid()); + assertEquals("reason", id.getReasonCd()); + } + + @Test + public void testEqualsAndHashCode() { + ObservationReasonId id1 = new ObservationReasonId(); + id1.setObservationUid(1L); + id1.setReasonCd("reason"); + + ObservationReasonId id2 = new ObservationReasonId(); + id2.setObservationUid(1L); + id2.setReasonCd("reason"); + + ObservationReasonId id3 = new ObservationReasonId(); + id3.setObservationUid(1L); + id3.setReasonCd("differentReason"); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationHistIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationHistIdTest.java new file mode 100644 index 000000000..0d55830fd --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationHistIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class OrganizationHistIdTest { + + @Test + public void testGettersAndSetters() { + OrganizationHistId id = new OrganizationHistId(); + id.setOrganizationUid(1L); + id.setVersionCtrlNbr(2); + + assertEquals(1L, id.getOrganizationUid()); + assertEquals(2, id.getVersionCtrlNbr()); + } + + @Test + public void testEqualsAndHashCode() { + OrganizationHistId id1 = new OrganizationHistId(); + id1.setOrganizationUid(1L); + id1.setVersionCtrlNbr(2); + + OrganizationHistId id2 = new OrganizationHistId(); + id2.setOrganizationUid(1L); + id2.setVersionCtrlNbr(2); + + OrganizationHistId id3 = new OrganizationHistId(); + id3.setOrganizationUid(1L); + id3.setVersionCtrlNbr(3); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameHistIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameHistIdTest.java new file mode 100644 index 000000000..1a9710568 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameHistIdTest.java @@ -0,0 +1,40 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class OrganizationNameHistIdTest { + + @Test + public void testGettersAndSetters() { + OrganizationNameHistId id = new OrganizationNameHistId(); + id.setOrganizationUid(1L); + id.setOrganizationNameSeq(2); + id.setVersionCtrlNbr(3); + + assertEquals(1L, id.getOrganizationUid()); + assertEquals(2, id.getOrganizationNameSeq()); + assertEquals(3, id.getVersionCtrlNbr()); + } + + @Test + public void testEqualsAndHashCode() { + OrganizationNameHistId id1 = new OrganizationNameHistId(); + id1.setOrganizationUid(1L); + id1.setOrganizationNameSeq(2); + id1.setVersionCtrlNbr(3); + + OrganizationNameHistId id2 = new OrganizationNameHistId(); + id2.setOrganizationUid(1L); + id2.setOrganizationNameSeq(2); + id2.setVersionCtrlNbr(3); + + OrganizationNameHistId id3 = new OrganizationNameHistId(); + id3.setOrganizationUid(1L); + id3.setOrganizationNameSeq(2); + id3.setVersionCtrlNbr(4); + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameIdTest.java new file mode 100644 index 000000000..bce47906c --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/OrganizationNameIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class OrganizationNameIdTest { + + @Test + public void testGettersAndSetters() { + OrganizationNameId id = new OrganizationNameId(); + id.setOrganizationUid(1L); + id.setOrganizationNameSeq(2); + + assertEquals(1L, id.getOrganizationUid()); + assertEquals(2, id.getOrganizationNameSeq()); + } + + @Test + public void testEqualsAndHashCode() { + OrganizationNameId id1 = new OrganizationNameId(); + id1.setOrganizationUid(1L); + id1.setOrganizationNameSeq(2); + + OrganizationNameId id2 = new OrganizationNameId(); + id2.setOrganizationUid(1L); + id2.setOrganizationNameSeq(2); + + OrganizationNameId id3 = new OrganizationNameId(); + id3.setOrganizationUid(1L); + id3.setOrganizationNameSeq(3); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationHistIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationHistIdTest.java new file mode 100644 index 000000000..37006b65f --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationHistIdTest.java @@ -0,0 +1,46 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class ParticipationHistIdTest { + + @Test + public void testGettersAndSetters() { + ParticipationHistId id = new ParticipationHistId(); + id.setSubjectEntityUid(1L); + id.setActUid(2L); + id.setTypeCd("testType"); + id.setVersionCtrlNbr(3); + + assertEquals(1L, id.getSubjectEntityUid()); + assertEquals(2L, id.getActUid()); + assertEquals("testType", id.getTypeCd()); + assertEquals(3, id.getVersionCtrlNbr()); + } + + @Test + public void testEqualsAndHashCode() { + ParticipationHistId id1 = new ParticipationHistId(); + id1.setSubjectEntityUid(1L); + id1.setActUid(2L); + id1.setTypeCd("testType"); + id1.setVersionCtrlNbr(3); + + ParticipationHistId id2 = new ParticipationHistId(); + id2.setSubjectEntityUid(1L); + id2.setActUid(2L); + id2.setTypeCd("testType"); + id2.setVersionCtrlNbr(3); + + ParticipationHistId id3 = new ParticipationHistId(); + id3.setSubjectEntityUid(1L); + id3.setActUid(2L); + id3.setTypeCd("differentType"); + id3.setVersionCtrlNbr(3); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationIdTest.java new file mode 100644 index 000000000..bddd1c6fa --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/ParticipationIdTest.java @@ -0,0 +1,41 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class ParticipationIdTest { + + @Test + public void testGettersAndSetters() { + ParticipationId id = new ParticipationId(); + id.setSubjectEntityUid(1L); + id.setActUid(2L); + id.setTypeCode("testType"); + + assertEquals(1L, id.getSubjectEntityUid()); + assertEquals(2L, id.getActUid()); + assertEquals("testType", id.getTypeCode()); + } + + @Test + public void testEqualsAndHashCode() { + ParticipationId id1 = new ParticipationId(); + id1.setSubjectEntityUid(1L); + id1.setActUid(2L); + id1.setTypeCode("testType"); + + ParticipationId id2 = new ParticipationId(); + id2.setSubjectEntityUid(1L); + id2.setActUid(2L); + id2.setTypeCode("testType"); + + ParticipationId id3 = new ParticipationId(); + id3.setSubjectEntityUid(1L); + id3.setActUid(2L); + id3.setTypeCode("differentType"); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonEthnicGroupIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonEthnicGroupIdTest.java new file mode 100644 index 000000000..7f0ced1d5 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonEthnicGroupIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class PersonEthnicGroupIdTest { + + @Test + public void testGettersAndSetters() { + PersonEthnicGroupId id = new PersonEthnicGroupId(); + id.setPersonUid(1L); + id.setEthnicGroupCd("testGroup"); + + assertEquals(1L, id.getPersonUid()); + assertEquals("testGroup", id.getEthnicGroupCd()); + } + + @Test + public void testEqualsAndHashCode() { + PersonEthnicGroupId id1 = new PersonEthnicGroupId(); + id1.setPersonUid(1L); + id1.setEthnicGroupCd("testGroup"); + + PersonEthnicGroupId id2 = new PersonEthnicGroupId(); + id2.setPersonUid(1L); + id2.setEthnicGroupCd("testGroup"); + + PersonEthnicGroupId id3 = new PersonEthnicGroupId(); + id3.setPersonUid(1L); + id3.setEthnicGroupCd("differentGroup"); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonNameIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonNameIdTest.java new file mode 100644 index 000000000..5eea7f63d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonNameIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class PersonNameIdTest { + + @Test + public void testGettersAndSetters() { + PersonNameId id = new PersonNameId(); + id.setPersonUid(1L); + id.setPersonNameSeq(2); + + assertEquals(1L, id.getPersonUid()); + assertEquals(2, id.getPersonNameSeq()); + } + + @Test + public void testEqualsAndHashCode() { + PersonNameId id1 = new PersonNameId(); + id1.setPersonUid(1L); + id1.setPersonNameSeq(2); + + PersonNameId id2 = new PersonNameId(); + id2.setPersonUid(1L); + id2.setPersonNameSeq(2); + + PersonNameId id3 = new PersonNameId(); + id3.setPersonUid(1L); + id3.setPersonNameSeq(3); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonRaceIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonRaceIdTest.java new file mode 100644 index 000000000..169b95b83 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/model/id_class/PersonRaceIdTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.odse.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class PersonRaceIdTest { + + @Test + public void testGettersAndSetters() { + PersonRaceId id = new PersonRaceId(); + id.setPersonUid(1L); + id.setRaceCd("raceCd"); + + assertEquals(1L, id.getPersonUid()); + assertEquals("raceCd", id.getRaceCd()); + } + + @Test + public void testEqualsAndHashCode() { + PersonRaceId id1 = new PersonRaceId(); + id1.setPersonUid(1L); + id1.setRaceCd("raceCd"); + + PersonRaceId id2 = new PersonRaceId(); + id2.setPersonUid(1L); + id2.setRaceCd("raceCd"); + + PersonRaceId id3 = new PersonRaceId(); + id3.setPersonUid(1L); + id3.setRaceCd("differentRaceCd"); + + assertNotEquals(id1, id2); + assertNotEquals(id1, id3); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomAuthUserRepositoryImplTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomAuthUserRepositoryImplTest.java index 487cdf83a..9f97aa3b4 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomAuthUserRepositoryImplTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomAuthUserRepositoryImplTest.java @@ -16,6 +16,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.when; + class CustomAuthUserRepositoryImplTest { @Mock diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomNbsQuestionRepositoryImplTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomNbsQuestionRepositoryImplTest.java index 60f436358..da75e60df 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomNbsQuestionRepositoryImplTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomNbsQuestionRepositoryImplTest.java @@ -15,6 +15,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.when; + class CustomNbsQuestionRepositoryImplTest { @Mock diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomRepositoryImplTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomRepositoryImplTest.java index 51f9277b9..1f723d65f 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomRepositoryImplTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/CustomRepositoryImplTest.java @@ -37,6 +37,7 @@ void setUp() { MockitoAnnotations.openMocks(this); customRepositoryImpl.entityManager = entityManager; } + @Test void getLdfCollection_shouldReturnListOfStateDefinedFieldDataDto_whenResultsAreNotEmpty() { // Arrange @@ -898,7 +899,7 @@ void getContactByPatientInfo_shouldReturnCollectionOfCTContactSummaryDto_whenRes // Arrange String queryString = "SELECT * FROM contacts WHERE patient_id = 1"; Query mockQuery = mock(Query.class); - var objList = new Object[]{"2021-01-01 10:00:00", 1L, "LocalId", 2L, 3L, "PriorityCd", "DispositionCd", "ProgAreaCd", 4L, "ContactReferralBasisCd", 5L, 6L, "ContactProcessingDecision", "SourceDispositionCd", "SourceConditionCd", "SourceCurrentSexCd", "1",1L, "2021-01-02 10:00:00", "2021-01-03 10:00:00", "1", 8L, "1", 9L}; + var objList = new Object[]{"2021-01-01 10:00:00", 1L, "LocalId", 2L, 3L, "PriorityCd", "DispositionCd", "ProgAreaCd", 4L, "ContactReferralBasisCd", 5L, 6L, "ContactProcessingDecision", "SourceDispositionCd", "SourceConditionCd", "SourceCurrentSexCd", "1", 1L, "2021-01-02 10:00:00", "2021-01-03 10:00:00", "1", 8L, "1", 9L}; List mockResults = new ArrayList<>(); mockResults.add(objList); when(entityManager.createNativeQuery(any())).thenReturn(mockQuery); @@ -951,7 +952,7 @@ void getNbsDocument_shouldReturnNbsDocumentContainer_whenResultsAreNotEmpty() th } @Test - void getInvListForCoInfectionId_shouldReturnListOfCoinfectionSummaryContainer_whenResultsAreNotEmpty() { + void getInvListForCoInfectionId_shouldReturnListOfCoinfectionSummaryContainer_whenResultsAreNotEmpty() { // Arrange Long mprUid = 1L; String coInfectionId = "CoInfectionIdExample"; @@ -983,5 +984,4 @@ void getInvListForCoInfectionId_shouldReturnListOfCoinfectionSummaryContainer_wh } - } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/implementation/Observation_SummaryRepositoryImplTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/implementation/Observation_SummaryRepositoryImplTest.java index 75c83a747..70763aca8 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/implementation/Observation_SummaryRepositoryImplTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/observation/implementation/Observation_SummaryRepositoryImplTest.java @@ -21,6 +21,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.*; + class Observation_SummaryRepositoryImplTest { @Mock private EntityManager entityManager; @@ -40,7 +41,6 @@ void setUp() { } - @Test void testFindAllActiveLabReportUidListForManage_NoResults() { Long investigationUid = 1L; diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/EdxPatientMatchStoredProcRepositoryTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/EdxPatientMatchStoredProcRepositoryTest.java index 3fb9667e0..8915dd167 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/EdxPatientMatchStoredProcRepositoryTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/EdxPatientMatchStoredProcRepositoryTest.java @@ -17,6 +17,7 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; + class EdxPatientMatchStoredProcRepositoryTest { @Mock private EntityManager entityManager; diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/ParticipationStoredProcRepositoryTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/ParticipationStoredProcRepositoryTest.java index ffa637bdc..be86da0ec 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/ParticipationStoredProcRepositoryTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/ParticipationStoredProcRepositoryTest.java @@ -15,6 +15,7 @@ import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; + class ParticipationStoredProcRepositoryTest { @Mock @@ -33,7 +34,7 @@ void setUp() { @SuppressWarnings("java:S5961") @Test - void testInsertParticipation() { + void testInsertParticipation() { ParticipationDto participationDto = new ParticipationDto(); participationDto.setSubjectEntityUid(1L); participationDto.setActUid(2L); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/PrepareEntityStoredProcRepositoryTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/PrepareEntityStoredProcRepositoryTest.java index ed19587eb..e4e392f91 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/PrepareEntityStoredProcRepositoryTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/PrepareEntityStoredProcRepositoryTest.java @@ -17,6 +17,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.when; + class PrepareEntityStoredProcRepositoryTest { @Mock diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/PublicHealthCaseStoredProcRepositoryTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/PublicHealthCaseStoredProcRepositoryTest.java index 0c00d7c92..6cebe557a 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/PublicHealthCaseStoredProcRepositoryTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/odse/repos/stored_proc/PublicHealthCaseStoredProcRepositoryTest.java @@ -23,6 +23,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.when; + class PublicHealthCaseStoredProcRepositoryTest { @Mock diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/BaseConditionCodeTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/BaseConditionCodeTest.java new file mode 100644 index 000000000..41fbee7d8 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/BaseConditionCodeTest.java @@ -0,0 +1,87 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class BaseConditionCodeTest { + + @Test + void testGettersAndSetters() { + BaseConditionCode baseConditionCode = new BaseConditionCode(); + + // Set values + baseConditionCode.setConditionCd("ConditionCd"); + baseConditionCode.setConditionCodesetNm("ConditionCodesetNm"); + baseConditionCode.setConditionSeqNum(1); + baseConditionCode.setAssigningAuthorityCd("AssigningAuthorityCd"); + baseConditionCode.setAssigningAuthorityDescTxt("AssigningAuthorityDescTxt"); + baseConditionCode.setCodeSystemCd("CodeSystemCd"); + baseConditionCode.setCodeSystemDescTxt("CodeSystemDescTxt"); + baseConditionCode.setConditionDescTxt("ConditionDescTxt"); + baseConditionCode.setConditionShortNm("ConditionShortNm"); + baseConditionCode.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + baseConditionCode.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + baseConditionCode.setIndentLevelNbr(2); + baseConditionCode.setInvestigationFormCd("InvestigationFormCd"); + baseConditionCode.setIsModifiableInd("IsModifiableInd"); + baseConditionCode.setNbsUid(3L); + baseConditionCode.setNndInd("NndInd"); + baseConditionCode.setParentIsCd("ParentIsCd"); + baseConditionCode.setProgAreaCd("ProgAreaCd"); + baseConditionCode.setReportableMorbidityInd("ReportableMorbidityInd"); + baseConditionCode.setReportableSummaryInd("ReportableSummaryInd"); + baseConditionCode.setStatusCd("StatusCd"); + baseConditionCode.setStatusTime(new Timestamp(System.currentTimeMillis())); + baseConditionCode.setNndEntityIdentifier("NndEntityIdentifier"); + baseConditionCode.setNndSummaryEntityIdentifier("NndSummaryEntityIdentifier"); + baseConditionCode.setSummaryInvestigationFormCd("SummaryInvestigationFormCd"); + baseConditionCode.setContactTracingEnableInd("ContactTracingEnableInd"); + baseConditionCode.setVaccineEnableInd("VaccineEnableInd"); + baseConditionCode.setTreatmentEnableInd("TreatmentEnableInd"); + baseConditionCode.setLabReportEnableInd("LabReportEnableInd"); + baseConditionCode.setMorbReportEnableInd("MorbReportEnableInd"); + baseConditionCode.setPortReqIndCd("PortReqIndCd"); + baseConditionCode.setFamilyCd("FamilyCd"); + baseConditionCode.setCoinfectionGrpCd("CoinfectionGrpCd"); + + // Assert values + assertEquals("ConditionCd", baseConditionCode.getConditionCd()); + assertEquals("ConditionCodesetNm", baseConditionCode.getConditionCodesetNm()); + assertEquals(1, baseConditionCode.getConditionSeqNum()); + assertEquals("AssigningAuthorityCd", baseConditionCode.getAssigningAuthorityCd()); + assertEquals("AssigningAuthorityDescTxt", baseConditionCode.getAssigningAuthorityDescTxt()); + assertEquals("CodeSystemCd", baseConditionCode.getCodeSystemCd()); + assertEquals("CodeSystemDescTxt", baseConditionCode.getCodeSystemDescTxt()); + assertEquals("ConditionDescTxt", baseConditionCode.getConditionDescTxt()); + assertEquals("ConditionShortNm", baseConditionCode.getConditionShortNm()); + assertNotNull(baseConditionCode.getEffectiveFromTime()); + assertNotNull(baseConditionCode.getEffectiveToTime()); + assertEquals(2, baseConditionCode.getIndentLevelNbr()); + assertEquals("InvestigationFormCd", baseConditionCode.getInvestigationFormCd()); + assertEquals("IsModifiableInd", baseConditionCode.getIsModifiableInd()); + assertEquals(3L, baseConditionCode.getNbsUid()); + assertEquals("NndInd", baseConditionCode.getNndInd()); + assertEquals("ParentIsCd", baseConditionCode.getParentIsCd()); + assertEquals("ProgAreaCd", baseConditionCode.getProgAreaCd()); + assertEquals("ReportableMorbidityInd", baseConditionCode.getReportableMorbidityInd()); + assertEquals("ReportableSummaryInd", baseConditionCode.getReportableSummaryInd()); + assertEquals("StatusCd", baseConditionCode.getStatusCd()); + assertNotNull(baseConditionCode.getStatusTime()); + assertEquals("NndEntityIdentifier", baseConditionCode.getNndEntityIdentifier()); + assertEquals("NndSummaryEntityIdentifier", baseConditionCode.getNndSummaryEntityIdentifier()); + assertEquals("SummaryInvestigationFormCd", baseConditionCode.getSummaryInvestigationFormCd()); + assertEquals("ContactTracingEnableInd", baseConditionCode.getContactTracingEnableInd()); + assertEquals("VaccineEnableInd", baseConditionCode.getVaccineEnableInd()); + assertEquals("TreatmentEnableInd", baseConditionCode.getTreatmentEnableInd()); + assertEquals("LabReportEnableInd", baseConditionCode.getLabReportEnableInd()); + assertEquals("MorbReportEnableInd", baseConditionCode.getMorbReportEnableInd()); + assertEquals("PortReqIndCd", baseConditionCode.getPortReqIndCd()); + assertEquals("FamilyCd", baseConditionCode.getFamilyCd()); + assertEquals("CoinfectionGrpCd", baseConditionCode.getCoinfectionGrpCd()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CityCodeValueTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CityCodeValueTest.java new file mode 100644 index 000000000..2d8806d65 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CityCodeValueTest.java @@ -0,0 +1,55 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class CityCodeValueTest { + + @Test + void testGettersAndSetters() { + CityCodeValue cityCodeValue = new CityCodeValue(); + + // Set values + cityCodeValue.setCode("Code"); + cityCodeValue.setAssigningAuthorityCd("AssigningAuthorityCd"); + cityCodeValue.setAssigningAuthorityDescTxt("AssigningAuthorityDescTxt"); + cityCodeValue.setCodeDescTxt("CodeDescTxt"); + cityCodeValue.setCodeShortDescTxt("CodeShortDescTxt"); + cityCodeValue.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + cityCodeValue.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + cityCodeValue.setExcludedTxt("ExcludedTxt"); + cityCodeValue.setIndentLevelNbr(1); + cityCodeValue.setIsModifiableInd("IsModifiableInd"); + cityCodeValue.setParentIsCd("ParentIsCd"); + cityCodeValue.setStatusCd("StatusCd"); + cityCodeValue.setStatusTime(new Timestamp(System.currentTimeMillis())); + cityCodeValue.setCodeSetNm("CodeSetNm"); + cityCodeValue.setSeqNum(2); + cityCodeValue.setNbsUid(3); + cityCodeValue.setSourceConceptId("SourceConceptId"); + + // Assert values + assertEquals("Code", cityCodeValue.getCode()); + assertEquals("AssigningAuthorityCd", cityCodeValue.getAssigningAuthorityCd()); + assertEquals("AssigningAuthorityDescTxt", cityCodeValue.getAssigningAuthorityDescTxt()); + assertEquals("CodeDescTxt", cityCodeValue.getCodeDescTxt()); + assertEquals("CodeShortDescTxt", cityCodeValue.getCodeShortDescTxt()); + assertNotNull(cityCodeValue.getEffectiveFromTime()); + assertNotNull(cityCodeValue.getEffectiveToTime()); + assertEquals("ExcludedTxt", cityCodeValue.getExcludedTxt()); + assertEquals(1, cityCodeValue.getIndentLevelNbr()); + assertEquals("IsModifiableInd", cityCodeValue.getIsModifiableInd()); + assertEquals("ParentIsCd", cityCodeValue.getParentIsCd()); + assertEquals("StatusCd", cityCodeValue.getStatusCd()); + assertNotNull(cityCodeValue.getStatusTime()); + assertEquals("CodeSetNm", cityCodeValue.getCodeSetNm()); + assertEquals(2, cityCodeValue.getSeqNum()); + assertEquals(3, cityCodeValue.getNbsUid()); + assertEquals("SourceConceptId", cityCodeValue.getSourceConceptId()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CodeValueGeneralTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CodeValueGeneralTest.java new file mode 100644 index 000000000..c40903a2d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/CodeValueGeneralTest.java @@ -0,0 +1,76 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.util.Date; + +import static org.junit.jupiter.api.Assertions.*; + +class CodeValueGeneralTest { + + @Test + void testGettersAndSetters() { + CodeValueGeneral codeValueGeneral = new CodeValueGeneral(); + + // Set values + codeValueGeneral.setCodeSetNm("CodeSetNm"); + codeValueGeneral.setCode("Code"); + codeValueGeneral.setCodeDescTxt("CodeDescTxt"); + codeValueGeneral.setCodeShortDescTxt("CodeShortDescTxt"); + codeValueGeneral.setCodeSystemCd("CodeSystemCd"); + codeValueGeneral.setCodeSystemDescTxt("CodeSystemDescTxt"); + codeValueGeneral.setEffectiveFromTime(new Date()); + codeValueGeneral.setEffectiveToTime(new Date()); + codeValueGeneral.setIndentLevelNbr((short) 1); + codeValueGeneral.setIsModifiableInd('Y'); + codeValueGeneral.setNbsUid(123); + codeValueGeneral.setParentIsCd("ParentIsCd"); + codeValueGeneral.setSourceConceptId("SourceConceptId"); + codeValueGeneral.setSuperCodeSetNm("SuperCodeSetNm"); + codeValueGeneral.setSuperCode("SuperCode"); + codeValueGeneral.setStatusCd('A'); + codeValueGeneral.setStatusTime(new Date()); + codeValueGeneral.setConceptTypeCd("ConceptTypeCd"); + codeValueGeneral.setConceptCode("ConceptCode"); + codeValueGeneral.setConceptNm("ConceptNm"); + codeValueGeneral.setConceptPreferredNm("ConceptPreferredNm"); + codeValueGeneral.setConceptStatusCd("ConceptStatusCd"); + codeValueGeneral.setConceptStatusTime(new Date()); + codeValueGeneral.setCodeSystemVersionNbr("CodeSystemVersionNbr"); + codeValueGeneral.setConceptOrderNbr(456); + codeValueGeneral.setAdminComments("AdminComments"); + codeValueGeneral.setAddTime(new Date()); + codeValueGeneral.setAddUserId(789L); + + // Assert values + assertEquals("CodeSetNm", codeValueGeneral.getCodeSetNm()); + assertEquals("Code", codeValueGeneral.getCode()); + assertEquals("CodeDescTxt", codeValueGeneral.getCodeDescTxt()); + assertEquals("CodeShortDescTxt", codeValueGeneral.getCodeShortDescTxt()); + assertEquals("CodeSystemCd", codeValueGeneral.getCodeSystemCd()); + assertEquals("CodeSystemDescTxt", codeValueGeneral.getCodeSystemDescTxt()); + assertNotNull(codeValueGeneral.getEffectiveFromTime()); + assertNotNull(codeValueGeneral.getEffectiveToTime()); + assertEquals((short) 1, codeValueGeneral.getIndentLevelNbr()); + assertEquals('Y', codeValueGeneral.getIsModifiableInd()); + assertEquals(123, codeValueGeneral.getNbsUid()); + assertEquals("ParentIsCd", codeValueGeneral.getParentIsCd()); + assertEquals("SourceConceptId", codeValueGeneral.getSourceConceptId()); + assertEquals("SuperCodeSetNm", codeValueGeneral.getSuperCodeSetNm()); + assertEquals("SuperCode", codeValueGeneral.getSuperCode()); + assertEquals('A', codeValueGeneral.getStatusCd()); + assertNotNull(codeValueGeneral.getStatusTime()); + assertEquals("ConceptTypeCd", codeValueGeneral.getConceptTypeCd()); + assertEquals("ConceptCode", codeValueGeneral.getConceptCode()); + assertEquals("ConceptNm", codeValueGeneral.getConceptNm()); + assertEquals("ConceptPreferredNm", codeValueGeneral.getConceptPreferredNm()); + assertEquals("ConceptStatusCd", codeValueGeneral.getConceptStatusCd()); + assertNotNull(codeValueGeneral.getConceptStatusTime()); + assertEquals("CodeSystemVersionNbr", codeValueGeneral.getCodeSystemVersionNbr()); + assertEquals(456, codeValueGeneral.getConceptOrderNbr()); + assertEquals("AdminComments", codeValueGeneral.getAdminComments()); + assertNotNull(codeValueGeneral.getAddTime()); + assertEquals(789L, codeValueGeneral.getAddUserId()); + } + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ConditionCodeWithPATest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ConditionCodeWithPATest.java new file mode 100644 index 000000000..2ff0dc283 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ConditionCodeWithPATest.java @@ -0,0 +1,42 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import gov.cdc.dataprocessing.model.container.model.ProgramAreaContainer; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class ConditionCodeWithPATest { + + @Test + void testGettersAndSetters() { + ConditionCodeWithPA conditionCodeWithPA = new ConditionCodeWithPA(); + + // Set values + conditionCodeWithPA.setStateProgAreaCode("StateProgAreaCode"); + conditionCodeWithPA.setStateProgAreaCdDesc("StateProgAreaCdDesc"); + + // Assert values + assertEquals("StateProgAreaCode", conditionCodeWithPA.getStateProgAreaCode()); + assertEquals("StateProgAreaCdDesc", conditionCodeWithPA.getStateProgAreaCdDesc()); + } + + @Test + void testCompareTo() { + ConditionCodeWithPA conditionCodeWithPA1 = new ConditionCodeWithPA(); + conditionCodeWithPA1.setConditionShortNm("ShortNameA"); + + ProgramAreaContainer programAreaContainer = new ProgramAreaContainer(); + programAreaContainer.setConditionShortNm("ShortNameB"); + + // Assert comparison + assertTrue(conditionCodeWithPA1.compareTo(programAreaContainer) < 0); + + conditionCodeWithPA1.setConditionShortNm("ShortNameB"); + assertEquals(0, conditionCodeWithPA1.compareTo(programAreaContainer)); + + conditionCodeWithPA1.setConditionShortNm("ShortNameC"); + assertTrue(conditionCodeWithPA1.compareTo(programAreaContainer) > 0); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ElrXrefTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ElrXrefTest.java new file mode 100644 index 000000000..c68d67d25 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ElrXrefTest.java @@ -0,0 +1,45 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.util.Date; + +import static org.junit.jupiter.api.Assertions.*; + +class ElrXrefTest { + + @Test + void testGettersAndSetters() { + ElrXref elrXref = new ElrXref(); + + // Set values + elrXref.setFromCodeSetNm("FromCodeSetNm"); + elrXref.setFromSeqNum((short) 1); + elrXref.setFromCode("FromCode"); + elrXref.setToCodeSetNm("ToCodeSetNm"); + elrXref.setToSeqNum((short) 2); + elrXref.setToCode("ToCode"); + elrXref.setEffectiveFromTime(new Date()); + elrXref.setEffectiveToTime(new Date()); + elrXref.setStatusCd('A'); + elrXref.setStatusTime(new Date()); + elrXref.setLaboratoryId("LaboratoryId"); + elrXref.setNbsUid(123); + + // Assert values + assertEquals("FromCodeSetNm", elrXref.getFromCodeSetNm()); + assertEquals((short) 1, elrXref.getFromSeqNum()); + assertEquals("FromCode", elrXref.getFromCode()); + assertEquals("ToCodeSetNm", elrXref.getToCodeSetNm()); + assertEquals((short) 2, elrXref.getToSeqNum()); + assertEquals("ToCode", elrXref.getToCode()); + assertNotNull(elrXref.getEffectiveFromTime()); + assertNotNull(elrXref.getEffectiveToTime()); + assertEquals('A', elrXref.getStatusCd()); + assertNotNull(elrXref.getStatusTime()); + assertEquals("LaboratoryId", elrXref.getLaboratoryId()); + assertEquals(123, elrXref.getNbsUid()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionCodeTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionCodeTest.java new file mode 100644 index 000000000..c45e8c042 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionCodeTest.java @@ -0,0 +1,63 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class JurisdictionCodeTest { + + @Test + void testGettersAndSetters() { + JurisdictionCode jurisdictionCode = new JurisdictionCode(); + + // Set values + jurisdictionCode.setCode("Code"); + jurisdictionCode.setTypeCd("TypeCd"); + jurisdictionCode.setAssigningAuthorityCd("AssigningAuthorityCd"); + jurisdictionCode.setAssigningAuthorityDescTxt("AssigningAuthorityDescTxt"); + jurisdictionCode.setCodeDescTxt("CodeDescTxt"); + jurisdictionCode.setCodeShortDescTxt("CodeShortDescTxt"); + jurisdictionCode.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + jurisdictionCode.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + jurisdictionCode.setIndentLevelNbr(1); + jurisdictionCode.setIsModifiableInd("Y"); + jurisdictionCode.setParentIsCd("ParentIsCd"); + jurisdictionCode.setStateDomainCd("StateDomainCd"); + jurisdictionCode.setStatusCd("A"); + jurisdictionCode.setStatusTime(new Timestamp(System.currentTimeMillis())); + jurisdictionCode.setCodeSetNm("CodeSetNm"); + jurisdictionCode.setCodeSeqNum(2); + jurisdictionCode.setNbsUid(123); + jurisdictionCode.setSourceConceptId("SourceConceptId"); + jurisdictionCode.setCodeSystemCd("CodeSystemCd"); + jurisdictionCode.setCodeSystemDescTxt("CodeSystemDescTxt"); + jurisdictionCode.setExportInd("Y"); + + // Assert values + assertEquals("Code", jurisdictionCode.getCode()); + assertEquals("TypeCd", jurisdictionCode.getTypeCd()); + assertEquals("AssigningAuthorityCd", jurisdictionCode.getAssigningAuthorityCd()); + assertEquals("AssigningAuthorityDescTxt", jurisdictionCode.getAssigningAuthorityDescTxt()); + assertEquals("CodeDescTxt", jurisdictionCode.getCodeDescTxt()); + assertEquals("CodeShortDescTxt", jurisdictionCode.getCodeShortDescTxt()); + assertNotNull(jurisdictionCode.getEffectiveFromTime()); + assertNotNull(jurisdictionCode.getEffectiveToTime()); + assertEquals(1, jurisdictionCode.getIndentLevelNbr()); + assertEquals("Y", jurisdictionCode.getIsModifiableInd()); + assertEquals("ParentIsCd", jurisdictionCode.getParentIsCd()); + assertEquals("StateDomainCd", jurisdictionCode.getStateDomainCd()); + assertEquals("A", jurisdictionCode.getStatusCd()); + assertNotNull(jurisdictionCode.getStatusTime()); + assertEquals("CodeSetNm", jurisdictionCode.getCodeSetNm()); + assertEquals(2, jurisdictionCode.getCodeSeqNum()); + assertEquals(123, jurisdictionCode.getNbsUid()); + assertEquals("SourceConceptId", jurisdictionCode.getSourceConceptId()); + assertEquals("CodeSystemCd", jurisdictionCode.getCodeSystemCd()); + assertEquals("CodeSystemDescTxt", jurisdictionCode.getCodeSystemDescTxt()); + assertEquals("Y", jurisdictionCode.getExportInd()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionParticipationIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionParticipationIdTest.java new file mode 100644 index 000000000..d550624d9 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionParticipationIdTest.java @@ -0,0 +1,46 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model.id_class; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class JurisdictionParticipationIdTest { + + @Test + void testGettersAndSetters() { + JurisdictionParticipationId id = new JurisdictionParticipationId(); + + // Set values + id.setJurisdictionCd("JurisdictionCd"); + id.setFipsCd("FipsCd"); + id.setTypeCd("TypeCd"); + + // Assert values + assertEquals("JurisdictionCd", id.getJurisdictionCd()); + assertEquals("FipsCd", id.getFipsCd()); + assertEquals("TypeCd", id.getTypeCd()); + } + + @Test + void testEqualsAndHashCode() { + JurisdictionParticipationId id1 = new JurisdictionParticipationId(); + id1.setJurisdictionCd("JurisdictionCd"); + id1.setFipsCd("FipsCd"); + id1.setTypeCd("TypeCd"); + + JurisdictionParticipationId id2 = new JurisdictionParticipationId(); + id2.setJurisdictionCd("JurisdictionCd"); + id2.setFipsCd("FipsCd"); + id2.setTypeCd("TypeCd"); + + JurisdictionParticipationId id3 = new JurisdictionParticipationId(); + id3.setJurisdictionCd("DifferentJurisdictionCd"); + id3.setFipsCd("DifferentFipsCd"); + id3.setTypeCd("DifferentTypeCd"); + + + assertNotEquals(id1, id3); + assertNotEquals(id1.hashCode(), id3.hashCode()); + } + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionParticipationTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionParticipationTest.java new file mode 100644 index 000000000..ed8597796 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/JurisdictionParticipationTest.java @@ -0,0 +1,31 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class JurisdictionParticipationTest { + + @Test + void testGettersAndSetters() { + JurisdictionParticipation jurisdictionParticipation = new JurisdictionParticipation(); + + // Set values + jurisdictionParticipation.setJurisdictionCd("JurisdictionCd"); + jurisdictionParticipation.setFipsCd("FipsCd"); + jurisdictionParticipation.setTypeCd("TypeCd"); + jurisdictionParticipation.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + jurisdictionParticipation.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + + // Assert values + assertEquals("JurisdictionCd", jurisdictionParticipation.getJurisdictionCd()); + assertEquals("FipsCd", jurisdictionParticipation.getFipsCd()); + assertEquals("TypeCd", jurisdictionParticipation.getTypeCd()); + assertNotNull(jurisdictionParticipation.getEffectiveFromTime()); + assertNotNull(jurisdictionParticipation.getEffectiveToTime()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCodeConditionTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCodeConditionTest.java new file mode 100644 index 000000000..68961a83e --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCodeConditionTest.java @@ -0,0 +1,38 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class LOINCCodeConditionTest { + + @Test + void testGettersAndSetters() { + LOINCCodeCondition loincCodeCondition = new LOINCCodeCondition(); + + // Set values + loincCodeCondition.setLoincCd("LoincCd"); + loincCodeCondition.setConditionCd("ConditionCd"); + loincCodeCondition.setDiseaseNm("DiseaseNm"); + loincCodeCondition.setReportedValue("ReportedValue"); + loincCodeCondition.setReportedNumericValue("ReportedNumericValue"); + loincCodeCondition.setStatusCd("A"); + loincCodeCondition.setStatusTime(new Timestamp(System.currentTimeMillis())); + loincCodeCondition.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + loincCodeCondition.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + + // Assert values + assertEquals("LoincCd", loincCodeCondition.getLoincCd()); + assertEquals("ConditionCd", loincCodeCondition.getConditionCd()); + assertEquals("DiseaseNm", loincCodeCondition.getDiseaseNm()); + assertEquals("ReportedValue", loincCodeCondition.getReportedValue()); + assertEquals("ReportedNumericValue", loincCodeCondition.getReportedNumericValue()); + assertEquals("A", loincCodeCondition.getStatusCd()); + assertNotNull(loincCodeCondition.getStatusTime()); + assertNotNull(loincCodeCondition.getEffectiveFromTime()); + assertNotNull(loincCodeCondition.getEffectiveToTime()); + } + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCodeTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCodeTest.java new file mode 100644 index 000000000..fb8a25d24 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LOINCCodeTest.java @@ -0,0 +1,47 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class LOINCCodeTest { + + @Test + void testGettersAndSetters() { + LOINCCode loincCode = new LOINCCode(); + + // Set values + loincCode.setLoincCode("LOINCCode"); + loincCode.setComponentName("ComponentName"); + loincCode.setProperty("Property"); + loincCode.setTimeAspect("TimeAspect"); + loincCode.setSystemCode("SystemCode"); + loincCode.setScaleType("ScaleType"); + loincCode.setMethodType("MethodType"); + loincCode.setDisplayName("DisplayName"); + loincCode.setNbsUid(123L); + loincCode.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + loincCode.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + loincCode.setRelatedClassCode("RelatedClassCode"); + loincCode.setPaDerivationExcludeCode("ExcludeCode"); + + // Assert values + assertEquals("LOINCCode", loincCode.getLoincCode()); + assertEquals("ComponentName", loincCode.getComponentName()); + assertEquals("Property", loincCode.getProperty()); + assertEquals("TimeAspect", loincCode.getTimeAspect()); + assertEquals("SystemCode", loincCode.getSystemCode()); + assertEquals("ScaleType", loincCode.getScaleType()); + assertEquals("MethodType", loincCode.getMethodType()); + assertEquals("DisplayName", loincCode.getDisplayName()); + assertEquals(123L, loincCode.getNbsUid()); + assertNotNull(loincCode.getEffectiveFromTime()); + assertNotNull(loincCode.getEffectiveToTime()); + assertEquals("RelatedClassCode", loincCode.getRelatedClassCode()); + assertEquals("ExcludeCode", loincCode.getPaDerivationExcludeCode()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResultSnomedTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResultSnomedTest.java new file mode 100644 index 000000000..05102ef4d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResultSnomedTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class LabResultSnomedTest { + + @Test + void testGettersAndSetters() { + LabResultSnomed labResultSnomed = new LabResultSnomed(); + + // Set values + labResultSnomed.setLabResultCd("LabResultCd"); + labResultSnomed.setLaboratoryId("LaboratoryId"); + labResultSnomed.setSnomedCd("SnomedCd"); + labResultSnomed.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + labResultSnomed.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + labResultSnomed.setStatusCd('A'); + labResultSnomed.setStatusTime(new Timestamp(System.currentTimeMillis())); + + // Assert values + assertEquals("LabResultCd", labResultSnomed.getLabResultCd()); + assertEquals("LaboratoryId", labResultSnomed.getLaboratoryId()); + assertEquals("SnomedCd", labResultSnomed.getSnomedCd()); + assertNotNull(labResultSnomed.getEffectiveFromTime()); + assertNotNull(labResultSnomed.getEffectiveToTime()); + assertEquals('A', labResultSnomed.getStatusCd()); + assertNotNull(labResultSnomed.getStatusTime()); + } + + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResultTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResultTest.java new file mode 100644 index 000000000..249441193 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabResultTest.java @@ -0,0 +1,45 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class LabResultTest { + + @Test + void testGettersAndSetters() { + LabResult labResult = new LabResult(); + + // Set values + labResult.setLabResultCd("LabResultCd"); + labResult.setLaboratoryId("LaboratoryId"); + labResult.setLabResultDescTxt("LabResultDescTxt"); + labResult.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + labResult.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + labResult.setNbsUid(123L); + labResult.setDefaultProgAreaCd("DefaultProgAreaCd"); + labResult.setOrganismNameInd("Y"); + labResult.setDefaultConditionCd("DefaultConditionCd"); + labResult.setPaDerivationExcludeCd("N"); + labResult.setCodeSystemCd("CodeSystemCd"); + labResult.setCodeSetNm("CodeSetNm"); + + // Assert values + assertEquals("LabResultCd", labResult.getLabResultCd()); + assertEquals("LaboratoryId", labResult.getLaboratoryId()); + assertEquals("LabResultDescTxt", labResult.getLabResultDescTxt()); + assertNotNull(labResult.getEffectiveFromTime()); + assertNotNull(labResult.getEffectiveToTime()); + assertEquals(123L, labResult.getNbsUid()); + assertEquals("DefaultProgAreaCd", labResult.getDefaultProgAreaCd()); + assertEquals("Y", labResult.getOrganismNameInd()); + assertEquals("DefaultConditionCd", labResult.getDefaultConditionCd()); + assertEquals("N", labResult.getPaDerivationExcludeCd()); + assertEquals("CodeSystemCd", labResult.getCodeSystemCd()); + assertEquals("CodeSetNm", labResult.getCodeSetNm()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTestLoincTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTestLoincTest.java new file mode 100644 index 000000000..8bf54d795 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTestLoincTest.java @@ -0,0 +1,35 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class LabTestLoincTest { + + @Test + void testGettersAndSetters() { + LabTestLoinc labTestLoinc = new LabTestLoinc(); + + // Set values + labTestLoinc.setLabTestCd("LabTestCd"); + labTestLoinc.setLaboratoryId("LaboratoryId"); + labTestLoinc.setLoincCd("LoincCd"); + labTestLoinc.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + labTestLoinc.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + labTestLoinc.setStatusCd('A'); + labTestLoinc.setStatusTime(new Timestamp(System.currentTimeMillis())); + + // Assert values + assertEquals("LabTestCd", labTestLoinc.getLabTestCd()); + assertEquals("LaboratoryId", labTestLoinc.getLaboratoryId()); + assertEquals("LoincCd", labTestLoinc.getLoincCd()); + assertNotNull(labTestLoinc.getEffectiveFromTime()); + assertNotNull(labTestLoinc.getEffectiveToTime()); + assertEquals('A', labTestLoinc.getStatusCd()); + assertNotNull(labTestLoinc.getStatusTime()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTestTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTestTest.java new file mode 100644 index 000000000..13b150633 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/LabTestTest.java @@ -0,0 +1,48 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class LabTestTest { + + @Test + void testGettersAndSetters() { + LabTest labTest = new LabTest(); + + // Set values + labTest.setLabTestCd("LabTestCd"); + labTest.setLaboratoryId("LaboratoryId"); + labTest.setLabResultDescTxt("LabResultDescTxt"); + labTest.setTestTypeCd("TestTypeCd"); + labTest.setNbsUid(123L); + labTest.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + labTest.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + labTest.setDefaultProgAreaCd("DefaultProgAreaCd"); + labTest.setDefaultConditionCd("DefaultConditionCd"); + labTest.setDrugTestInd("Y"); + labTest.setOrganismResultTestInd("N"); + labTest.setIndentLevelNbr(1); + labTest.setPaDerivationExcludeCd("N"); + + // Assert values + assertEquals("LabTestCd", labTest.getLabTestCd()); + assertEquals("LaboratoryId", labTest.getLaboratoryId()); + assertEquals("LabResultDescTxt", labTest.getLabResultDescTxt()); + assertEquals("TestTypeCd", labTest.getTestTypeCd()); + assertEquals(123L, labTest.getNbsUid()); + assertNotNull(labTest.getEffectiveFromTime()); + assertNotNull(labTest.getEffectiveToTime()); + assertEquals("DefaultProgAreaCd", labTest.getDefaultProgAreaCd()); + assertEquals("DefaultConditionCd", labTest.getDefaultConditionCd()); + assertEquals("Y", labTest.getDrugTestInd()); + assertEquals("N", labTest.getOrganismResultTestInd()); + assertEquals(1, labTest.getIndentLevelNbr()); + assertEquals("N", labTest.getPaDerivationExcludeCd()); + } + + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ProgramAreaCodeTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ProgramAreaCodeTest.java new file mode 100644 index 000000000..e41726666 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/ProgramAreaCodeTest.java @@ -0,0 +1,52 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class ProgramAreaCodeTest { + + @Test + void testSettersAndGetters() { + ProgramAreaCode programAreaCode = new ProgramAreaCode(); + + String progAreaCd = "PA01"; + String progAreaDescTxt = "Program Area Description"; + Integer nbsUid = 12345; + String statusCd = "Active"; + Timestamp statusTime = new Timestamp(System.currentTimeMillis()); + String codeSetNm = "CodeSetName"; + Integer codeSeq = 1; + + programAreaCode.setProgAreaCd(progAreaCd); + programAreaCode.setProgAreaDescTxt(progAreaDescTxt); + programAreaCode.setNbsUid(nbsUid); + programAreaCode.setStatusCd(statusCd); + programAreaCode.setStatusTime(statusTime); + programAreaCode.setCodeSetNm(codeSetNm); + programAreaCode.setCodeSeq(codeSeq); + + assertEquals(progAreaCd, programAreaCode.getProgAreaCd()); + assertEquals(progAreaDescTxt, programAreaCode.getProgAreaDescTxt()); + assertEquals(nbsUid, programAreaCode.getNbsUid()); + assertEquals(statusCd, programAreaCode.getStatusCd()); + assertEquals(statusTime, programAreaCode.getStatusTime()); + assertEquals(codeSetNm, programAreaCode.getCodeSetNm()); + assertEquals(codeSeq, programAreaCode.getCodeSeq()); + } + + @Test + void testDefaultConstructor() { + ProgramAreaCode programAreaCode = new ProgramAreaCode(); + + assertNull(programAreaCode.getProgAreaCd()); + assertNull(programAreaCode.getProgAreaDescTxt()); + assertNull(programAreaCode.getNbsUid()); + assertNull(programAreaCode.getStatusCd()); + assertNull(programAreaCode.getStatusTime()); + assertNull(programAreaCode.getCodeSetNm()); + assertNull(programAreaCode.getCodeSeq()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/RaceCodeTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/RaceCodeTest.java new file mode 100644 index 000000000..c993d5612 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/RaceCodeTest.java @@ -0,0 +1,60 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.util.Date; + +import static org.junit.jupiter.api.Assertions.*; + +class RaceCodeTest { + + @Test + void testGettersAndSetters() { + RaceCode raceCode = new RaceCode(); + + // Set values + raceCode.setCode("Code"); + raceCode.setAssigningAuthorityCd("AssigningAuthorityCd"); + raceCode.setAssigningAuthorityDescTxt("AssigningAuthorityDescTxt"); + raceCode.setCodeDescTxt("CodeDescTxt"); + raceCode.setCodeShortDescTxt("CodeShortDescTxt"); + raceCode.setEffectiveFromTime(new Date()); + raceCode.setEffectiveToTime(new Date()); + raceCode.setExcludedTxt("ExcludedTxt"); + raceCode.setKeyInfoTxt("KeyInfoTxt"); + raceCode.setIndentLevelNbr(1); + raceCode.setIsModifiableInd("Y"); + raceCode.setParentIsCd("ParentIsCd"); + raceCode.setStatusCd("A"); + raceCode.setStatusTime(new Date()); + raceCode.setCodeSetNm("CodeSetNm"); + raceCode.setSeqNum(1); + raceCode.setNbsUid(123); + raceCode.setSourceConceptId("SourceConceptId"); + raceCode.setCodeSystemCd("CodeSystemCd"); + raceCode.setCodeSystemDescTxt("CodeSystemDescTxt"); + + // Assert values + assertEquals("Code", raceCode.getCode()); + assertEquals("AssigningAuthorityCd", raceCode.getAssigningAuthorityCd()); + assertEquals("AssigningAuthorityDescTxt", raceCode.getAssigningAuthorityDescTxt()); + assertEquals("CodeDescTxt", raceCode.getCodeDescTxt()); + assertEquals("CodeShortDescTxt", raceCode.getCodeShortDescTxt()); + assertNotNull(raceCode.getEffectiveFromTime()); + assertNotNull(raceCode.getEffectiveToTime()); + assertEquals("ExcludedTxt", raceCode.getExcludedTxt()); + assertEquals("KeyInfoTxt", raceCode.getKeyInfoTxt()); + assertEquals(1, raceCode.getIndentLevelNbr()); + assertEquals("Y", raceCode.getIsModifiableInd()); + assertEquals("ParentIsCd", raceCode.getParentIsCd()); + assertEquals("A", raceCode.getStatusCd()); + assertNotNull(raceCode.getStatusTime()); + assertEquals("CodeSetNm", raceCode.getCodeSetNm()); + assertEquals(1, raceCode.getSeqNum()); + assertEquals(123, raceCode.getNbsUid()); + assertEquals("SourceConceptId", raceCode.getSourceConceptId()); + assertEquals("CodeSystemCd", raceCode.getCodeSystemCd()); + assertEquals("CodeSystemDescTxt", raceCode.getCodeSystemDescTxt()); + } + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedCodeTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedCodeTest.java new file mode 100644 index 000000000..8aa581e89 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedCodeTest.java @@ -0,0 +1,41 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class SnomedCodeTest { + + @Test + void testGettersAndSetters() { + SnomedCode snomedCode = new SnomedCode(); + + // Set values + snomedCode.setSnomedCd("SnomedCd"); + snomedCode.setSnomedDescTxt("SnomedDescTxt"); + snomedCode.setSourceConceptId("SourceConceptId"); + snomedCode.setSourceVersionId("SourceVersionId"); + snomedCode.setStatusCd("A"); + snomedCode.setStatusTime(new Timestamp(System.currentTimeMillis())); + snomedCode.setNbsUid(123); + snomedCode.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + snomedCode.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + snomedCode.setPaDerivationExcludeCd("ExcludeCd"); + + // Assert values + assertEquals("SnomedCd", snomedCode.getSnomedCd()); + assertEquals("SnomedDescTxt", snomedCode.getSnomedDescTxt()); + assertEquals("SourceConceptId", snomedCode.getSourceConceptId()); + assertEquals("SourceVersionId", snomedCode.getSourceVersionId()); + assertEquals("A", snomedCode.getStatusCd()); + assertNotNull(snomedCode.getStatusTime()); + assertEquals(123, snomedCode.getNbsUid()); + assertNotNull(snomedCode.getEffectiveFromTime()); + assertNotNull(snomedCode.getEffectiveToTime()); + assertEquals("ExcludeCd", snomedCode.getPaDerivationExcludeCd()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedConditionTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedConditionTest.java new file mode 100644 index 000000000..b80ad06a8 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/SnomedConditionTest.java @@ -0,0 +1,36 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +class SnomedConditionTest { + + @Test + void testGettersAndSetters() { + SnomedCondition snomedCondition = new SnomedCondition(); + + // Set values + snomedCondition.setSnomedCd("SnomedCd"); + snomedCondition.setConditionCd("ConditionCd"); + snomedCondition.setDiseaseNm("DiseaseNm"); + snomedCondition.setOrganismSetNm("OrganismSetNm"); + snomedCondition.setStatusCd("A"); + snomedCondition.setStatusTime(new Timestamp(System.currentTimeMillis())); + snomedCondition.setEffectiveFromTime(new Timestamp(System.currentTimeMillis())); + snomedCondition.setEffectiveToTime(new Timestamp(System.currentTimeMillis())); + + // Assert values + assertEquals("SnomedCd", snomedCondition.getSnomedCd()); + assertEquals("ConditionCd", snomedCondition.getConditionCd()); + assertEquals("DiseaseNm", snomedCondition.getDiseaseNm()); + assertEquals("OrganismSetNm", snomedCondition.getOrganismSetNm()); + assertEquals("A", snomedCondition.getStatusCd()); + assertNotNull(snomedCondition.getStatusTime()); + assertNotNull(snomedCondition.getEffectiveFromTime()); + assertNotNull(snomedCondition.getEffectiveToTime()); + } + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCodeTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCodeTest.java new file mode 100644 index 000000000..5134a3827 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCodeTest.java @@ -0,0 +1,63 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.util.Date; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + +class StateCodeTest { + + @Test + void testGettersAndSetters() { + StateCode stateCode = new StateCode(); + + Date currentDate = new Date(); + + // Set values + stateCode.setStateCd("CA"); + stateCode.setAssigningAuthorityCd("AuthCd"); + stateCode.setAssigningAuthorityDescTxt("AuthorityDesc"); + stateCode.setStateNm("California"); + stateCode.setCodeDescTxt("CodeDesc"); + stateCode.setEffectiveFromTime(currentDate); + stateCode.setEffectiveToTime(currentDate); + stateCode.setExcludedTxt("Excluded"); + stateCode.setIndentLevelNbr((short) 1); + stateCode.setIsModifiableInd('Y'); + stateCode.setKeyInfoTxt("KeyInfo"); + stateCode.setParentIsCd("ParentCd"); + stateCode.setStatusCd('A'); + stateCode.setStatusTime(currentDate); + stateCode.setCodeSetNm("CodeSetNm"); + stateCode.setSeqNum((short) 1); + stateCode.setNbsUid(123); + stateCode.setSourceConceptId("SourceConceptId"); + stateCode.setCodeSystemCd("CodeSystemCd"); + stateCode.setCodeSystemDescTxt("CodeSystemDesc"); + + // Assert values + assertEquals("CA", stateCode.getStateCd()); + assertEquals("AuthCd", stateCode.getAssigningAuthorityCd()); + assertEquals("AuthorityDesc", stateCode.getAssigningAuthorityDescTxt()); + assertEquals("California", stateCode.getStateNm()); + assertEquals("CodeDesc", stateCode.getCodeDescTxt()); + assertEquals(currentDate, stateCode.getEffectiveFromTime()); + assertEquals(currentDate, stateCode.getEffectiveToTime()); + assertEquals("Excluded", stateCode.getExcludedTxt()); + assertEquals((short) 1, stateCode.getIndentLevelNbr()); + assertEquals('Y', stateCode.getIsModifiableInd()); + assertEquals("KeyInfo", stateCode.getKeyInfoTxt()); + assertEquals("ParentCd", stateCode.getParentIsCd()); + assertEquals('A', stateCode.getStatusCd()); + assertEquals(currentDate, stateCode.getStatusTime()); + assertEquals("CodeSetNm", stateCode.getCodeSetNm()); + assertEquals((short) 1, stateCode.getSeqNum()); + assertEquals(123, stateCode.getNbsUid()); + assertEquals("SourceConceptId", stateCode.getSourceConceptId()); + assertEquals("CodeSystemCd", stateCode.getCodeSystemCd()); + assertEquals("CodeSystemDesc", stateCode.getCodeSystemDescTxt()); + } + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCountyCodeValueTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCountyCodeValueTest.java new file mode 100644 index 000000000..f42806907 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/model/StateCountyCodeValueTest.java @@ -0,0 +1,62 @@ +package gov.cdc.dataprocessing.repository.nbs.srte.model; + +import org.junit.jupiter.api.Test; + +import java.util.Date; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + +class StateCountyCodeValueTest { + + @Test + void testGettersAndSetters() { + StateCountyCodeValue stateCountyCodeValue = new StateCountyCodeValue(); + + Date currentDate = new Date(); + + // Set values + stateCountyCodeValue.setCode("001"); + stateCountyCodeValue.setAssigningAuthorityCd("AuthCd"); + stateCountyCodeValue.setAssigningAuthorityDescTxt("AuthorityDesc"); + stateCountyCodeValue.setCodeDescTxt("CodeDesc"); + stateCountyCodeValue.setCodeShortDescTxt("ShortDesc"); + stateCountyCodeValue.setEffectiveFromTime(currentDate); + stateCountyCodeValue.setEffectiveToTime(currentDate); + stateCountyCodeValue.setExcludedTxt("Excluded"); + stateCountyCodeValue.setIndentLevelNbr((short) 1); + stateCountyCodeValue.setIsModifiableInd('Y'); + stateCountyCodeValue.setParentIsCd("ParentCd"); + stateCountyCodeValue.setStatusCd("A"); + stateCountyCodeValue.setStatusTime(currentDate); + stateCountyCodeValue.setCodeSetNm("CodeSetNm"); + stateCountyCodeValue.setSeqNum((short) 1); + stateCountyCodeValue.setNbsUid(123); + stateCountyCodeValue.setSourceConceptId("SourceConceptId"); + stateCountyCodeValue.setCodeSystemCd("CodeSystemCd"); + stateCountyCodeValue.setCodeSystemDescTxt("CodeSystemDesc"); + + // Assert values + assertEquals("001", stateCountyCodeValue.getCode()); + assertEquals("AuthCd", stateCountyCodeValue.getAssigningAuthorityCd()); + assertEquals("AuthorityDesc", stateCountyCodeValue.getAssigningAuthorityDescTxt()); + assertEquals("CodeDesc", stateCountyCodeValue.getCodeDescTxt()); + assertEquals("ShortDesc", stateCountyCodeValue.getCodeShortDescTxt()); + assertEquals(currentDate, stateCountyCodeValue.getEffectiveFromTime()); + assertEquals(currentDate, stateCountyCodeValue.getEffectiveToTime()); + assertEquals("Excluded", stateCountyCodeValue.getExcludedTxt()); + assertEquals((short) 1, stateCountyCodeValue.getIndentLevelNbr()); + assertEquals('Y', stateCountyCodeValue.getIsModifiableInd()); + assertEquals("ParentCd", stateCountyCodeValue.getParentIsCd()); + assertEquals("A", stateCountyCodeValue.getStatusCd()); + assertEquals(currentDate, stateCountyCodeValue.getStatusTime()); + assertEquals("CodeSetNm", stateCountyCodeValue.getCodeSetNm()); + assertEquals((short) 1, stateCountyCodeValue.getSeqNum()); + assertEquals(123, stateCountyCodeValue.getNbsUid()); + assertEquals("SourceConceptId", stateCountyCodeValue.getSourceConceptId()); + assertEquals("CodeSystemCd", stateCountyCodeValue.getCodeSystemCd()); + assertEquals("CodeSystemDesc", stateCountyCodeValue.getCodeSystemDescTxt()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/custom/SrteCustomRepositoryImplTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/custom/SrteCustomRepositoryImplTest.java index 2c75118fc..19dcbd43f 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/custom/SrteCustomRepositoryImplTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/repository/nbs/srte/repository/custom/SrteCustomRepositoryImplTest.java @@ -16,6 +16,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; + class SrteCustomRepositoryImplTest { @Mock private EntityManager entityManager; @@ -36,8 +37,8 @@ void testGetAllLabResultJoinWithLabCodingSystemWithOrganismNameInd() { String codeSql = "Select Lab_result.LAB_RESULT_CD , lab_result_desc_txt FROM " + " Lab_result Lab_result, " - + " Lab_coding_system Lab_coding_system WHERE "+ - " Lab_coding_system.laboratory_id = 'DEFAULT' and "+ + + " Lab_coding_system Lab_coding_system WHERE " + + " Lab_coding_system.laboratory_id = 'DEFAULT' and " + " Lab_result.organism_name_ind = 'Y'"; when(entityManager.createNativeQuery(codeSql)).thenReturn(query); @@ -61,14 +62,13 @@ void testGetAllLabResultJoinWithLabCodingSystemWithOrganismNameInd() { } - @Test void testGetAllLabResultJoinWithLabCodingSystemWithOrganismNameInd_NoResults() { String codeSql = "Select Lab_result.LAB_RESULT_CD , lab_result_desc_txt FROM " + " Lab_result Lab_result, " - + " Lab_coding_system Lab_coding_system WHERE "+ - " Lab_coding_system.laboratory_id = 'DEFAULT' and "+ + + " Lab_coding_system Lab_coding_system WHERE " + + " Lab_coding_system.laboratory_id = 'DEFAULT' and " + " Lab_result.organism_name_ind = 'Y'"; when(entityManager.createNativeQuery(codeSql)).thenReturn(query); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/act/ActRelationshipServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/act/ActRelationshipServiceTest.java index 7d802ae9f..5f283cf04 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/act/ActRelationshipServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/act/ActRelationshipServiceTest.java @@ -25,12 +25,12 @@ import static org.mockito.Mockito.*; class ActRelationshipServiceTest { + @Mock + AuthUtil authUtil; @Mock private ActRelationshipRepository actRelationshipRepository; @InjectMocks private ActRelationshipService actRelationshipService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -41,7 +41,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -54,7 +54,7 @@ void loadActRelationshipBySrcIdAndTypeCode_Success() { long uid = 10L; String type = "type"; - var actCol = new ArrayList(); + var actCol = new ArrayList(); var act = new ActRelationship(); actCol.add(act); when(actRelationshipRepository.loadActRelationshipBySrcIdAndTypeCode(10L, type)) @@ -100,7 +100,6 @@ void saveActRelationship_Test_2() throws DataProcessingException { } - @Test void saveActRelationship_Success_New() throws DataProcessingException { var dto = new ActRelationshipDto(); @@ -204,11 +203,10 @@ void saveActRelationship_Success_Delete() throws DataProcessingException { } @Test - void saveActRelationship_Exception() { + void saveActRelationship_Exception() { ActRelationshipDto dto = null; - DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { actRelationshipService.saveActRelationship(dto); }); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/action/LabReportProcessingTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/action/LabReportProcessingTest.java index d21803af9..d552c2f2c 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/action/LabReportProcessingTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/action/LabReportProcessingTest.java @@ -22,12 +22,12 @@ import static org.mockito.Mockito.*; class LabReportProcessingTest { + @Mock + AuthUtil authUtil; @Mock private IObservationService observationService; @InjectMocks private LabReportProcessing labReportProcessing; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -38,7 +38,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/answer/AnswerServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/answer/AnswerServiceTest.java index 7d350136c..cb5251cb7 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/answer/AnswerServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/answer/AnswerServiceTest.java @@ -32,6 +32,8 @@ import static org.mockito.Mockito.*; class AnswerServiceTest { + @Mock + AuthUtil authUtil; @Mock private NbsAnswerRepository nbsAnswerRepository; @Mock @@ -42,8 +44,6 @@ class AnswerServiceTest { private NbsActEntityHistRepository nbsActEntityHistRepository; @InjectMocks private AnswerService answerService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -54,7 +54,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -355,7 +355,7 @@ void storePageAnswer_Success() throws DataProcessingException { @Test - void storePageAnswer_Exception() { + void storePageAnswer_Exception() { PageContainer pageContainer = new PageContainer(); var answerMap = new HashMap(); var ansDto = new NbsAnswerDto(buildNbsAnswer(11L, 11L, 1, 1)); @@ -458,7 +458,7 @@ void storePageAnswer_Exception() { @Test - void storeActEntityDTCollectionWithPublicHealthCase_Success() { + void storeActEntityDTCollectionWithPublicHealthCase_Success() { Collection pamDTCollection = new ArrayList<>(); var nbsActEntity = new NbsActEntityDto(); nbsActEntity.setItNew(true); @@ -514,7 +514,7 @@ void storeActEntityDTCollectionWithPublicHealthCase_Success() { } @Test - void getNbsAnswerAndAssociation_Exception() { + void getNbsAnswerAndAssociation_Exception() { when(nbsActEntityRepository.getNbsActEntitiesByActUid(any())).thenThrow(new RuntimeException("TEST")); @@ -522,12 +522,12 @@ void getNbsAnswerAndAssociation_Exception() { answerService.getNbsAnswerAndAssociation(null); }); - assertEquals("InterviewAnswerRootDAOImpl:answerCollection- could not be returned",thrown.getMessage()); + assertEquals("InterviewAnswerRootDAOImpl:answerCollection- could not be returned", thrown.getMessage()); } @Test - void getPageAnswerDTMaps_Test() { + void getPageAnswerDTMaps_Test() { Long uid = 10L; var ansCol = new ArrayList(); @@ -585,7 +585,7 @@ void delete_Exp() { } @Test - void insertAnswerHistoryDTCollection_Test_1() { + void insertAnswerHistoryDTCollection_Test_1() { var anCol1 = new ArrayList<>(); var an1 = new NbsAnswerDto(); anCol1.add(an1); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/auth_user/AuthUserServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/auth_user/AuthUserServiceTest.java index 0b02f2444..5c7a18ab1 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/auth_user/AuthUserServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/auth_user/AuthUserServiceTest.java @@ -23,14 +23,14 @@ import static org.mockito.Mockito.when; class AuthUserServiceTest { + @Mock + AuthUtil authUtil; @Mock private AuthUserRepository authUserRepository; @Mock private CustomAuthUserRepository customAuthUserRepository; @InjectMocks private AuthUserService authUserService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -41,7 +41,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -66,7 +66,7 @@ void getAuthUserInfo_Success() throws DataProcessingException { } @Test - void getAuthUserInfo_Exception() { + void getAuthUserInfo_Exception() { String authUserId = "Test"; when(authUserRepository.findAuthUserByUserId(authUserId)).thenReturn(Optional.empty()); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/cache/CachingValueServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/cache/CachingValueServiceTest.java index 242a8bd1c..a9c74735e 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/cache/CachingValueServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/cache/CachingValueServiceTest.java @@ -28,6 +28,8 @@ import static org.mockito.Mockito.*; class CachingValueServiceTest { + @Mock + AuthUtil authUtil; @Mock private JurisdictionCodeRepository jurisdictionCodeRepository; @Mock @@ -56,17 +58,12 @@ class CachingValueServiceTest { private SnomedCodeRepository snomedCodeRepository; @Mock private SrteCustomRepository srteCustomRepository; - @Mock private Cache cacheMock; - @Mock private Cache.ValueWrapper valueWrapperMock; - @InjectMocks private CachingValueService cachingValueService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -77,7 +74,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); SrteCache.codedValuesMap.clear(); SrteCache.codeDescTxtMap.clear(); SrteCache.countyCodeByDescMap.clear(); @@ -86,14 +83,14 @@ void setUp() { @AfterEach void tearDown() { Mockito.reset(cacheMock, valueWrapperMock, - jurisdictionCodeRepository, codeValueGeneralRepository,elrXrefRepository, raceCodeRepository, - stateCountyCodeValueRepository, stateCodeRepository, loincCodeRepository,cacheManager, + jurisdictionCodeRepository, codeValueGeneralRepository, elrXrefRepository, raceCodeRepository, + stateCountyCodeValueRepository, stateCodeRepository, loincCodeRepository, cacheManager, programAreaService, jurisdictionService, conditionCodeRepository, labResultRepository, snomedCodeRepository, srteCustomRepository, authUtil); } @Test - void getAllLoinCodeWithComponentName_1 () throws DataProcessingException { + void getAllLoinCodeWithComponentName_1() throws DataProcessingException { var lstRes = new ArrayList(); var code = new LOINCCode(); code.setLoincCode("TEST"); @@ -105,7 +102,7 @@ void getAllLoinCodeWithComponentName_1 () throws DataProcessingException { } @Test - void getAllLoinCodeWithComponentName_Exception () { + void getAllLoinCodeWithComponentName_Exception() { when(loincCodeRepository.findAll()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getAllLoinCodeWithComponentName(); @@ -114,7 +111,7 @@ void getAllLoinCodeWithComponentName_Exception () { } @Test - void getAllLabResultJoinWithLabCodingSystemWithOrganismNameInd_Success () throws DataProcessingException { + void getAllLabResultJoinWithLabCodingSystemWithOrganismNameInd_Success() throws DataProcessingException { var lstRes = new ArrayList(); var code = new LabResult(); code.setLabResultCd("TEST"); @@ -126,7 +123,7 @@ void getAllLabResultJoinWithLabCodingSystemWithOrganismNameInd_Success () throws } @Test - void getAllLabResultJoinWithLabCodingSystemWithOrganismNameInd_Exception () { + void getAllLabResultJoinWithLabCodingSystemWithOrganismNameInd_Exception() { when(srteCustomRepository.getAllLabResultJoinWithLabCodingSystemWithOrganismNameInd()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getAllLabResultJoinWithLabCodingSystemWithOrganismNameInd(); @@ -135,7 +132,7 @@ void getAllLabResultJoinWithLabCodingSystemWithOrganismNameInd_Exception () { } @Test - void getAllSnomedCode_Success () throws DataProcessingException { + void getAllSnomedCode_Success() throws DataProcessingException { var lstRes = new ArrayList(); var code = new SnomedCode(); code.setSnomedCd("TEST"); @@ -147,7 +144,7 @@ void getAllSnomedCode_Success () throws DataProcessingException { } @Test - void getAllSnomedCode_Exception () { + void getAllSnomedCode_Exception() { when(snomedCodeRepository.findAll()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getAllSnomedCode(); @@ -156,7 +153,7 @@ void getAllSnomedCode_Exception () { } @Test - void getLabResultDesc_Success () throws DataProcessingException { + void getLabResultDesc_Success() throws DataProcessingException { var lstRes = new ArrayList(); var code = new LabResult(); code.setLabResultCd("TEST"); @@ -168,7 +165,7 @@ void getLabResultDesc_Success () throws DataProcessingException { } @Test - void getLabResultDesc_Exception () { + void getLabResultDesc_Exception() { when(labResultRepository.findLabResultByDefaultLabAndOrgNameN()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getLabResultDesc(); @@ -178,7 +175,7 @@ void getLabResultDesc_Exception () { @Test - void getAOELOINCCodes_Success () throws DataProcessingException { + void getAOELOINCCodes_Success() throws DataProcessingException { var lstRes = new ArrayList(); var code = new LOINCCode(); code.setLoincCode("TEST"); @@ -190,7 +187,7 @@ void getAOELOINCCodes_Success () throws DataProcessingException { } @Test - void getAOELOINCCodesException () { + void getAOELOINCCodesException() { when(loincCodeRepository.findLoincCodes()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getAOELOINCCodes(); @@ -199,7 +196,7 @@ void getAOELOINCCodesException () { } @Test - void getRaceCodes_Success () throws DataProcessingException { + void getRaceCodes_Success() throws DataProcessingException { var lstRes = new ArrayList(); var code = new RaceCode(); code.setCode("TEST"); @@ -211,7 +208,7 @@ void getRaceCodes_Success () throws DataProcessingException { } @Test - void getRaceCodes_Exception () { + void getRaceCodes_Exception() { when(raceCodeRepository.findAllActiveRaceCodes()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getRaceCodes(); @@ -221,7 +218,7 @@ void getRaceCodes_Exception () { @Test - void getAllProgramAreaCodes_Success () throws DataProcessingException { + void getAllProgramAreaCodes_Success() throws DataProcessingException { var lstRes = new ArrayList(); var code = new ProgramAreaCode(); code.setProgAreaCd("TEST"); @@ -233,7 +230,7 @@ void getAllProgramAreaCodes_Success () throws DataProcessingException { } @Test - void getAllProgramAreaCodes_Exception () { + void getAllProgramAreaCodes_Exception() { when(programAreaService.getAllProgramAreaCode()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getAllProgramAreaCodes(); @@ -242,7 +239,7 @@ void getAllProgramAreaCodes_Exception () { } @Test - void getAllProgramAreaCodesWithNbsUid_Success () throws DataProcessingException { + void getAllProgramAreaCodesWithNbsUid_Success() throws DataProcessingException { var lstRes = new ArrayList(); var code = new ProgramAreaCode(); code.setProgAreaCd("TEST"); @@ -254,7 +251,7 @@ void getAllProgramAreaCodesWithNbsUid_Success () throws DataProcessingException } @Test - void getAllProgramAreaCodesWithNbsUid_Exception () { + void getAllProgramAreaCodesWithNbsUid_Exception() { when(programAreaService.getAllProgramAreaCode()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getAllProgramAreaCodesWithNbsUid(); @@ -263,7 +260,7 @@ void getAllProgramAreaCodesWithNbsUid_Exception () { } @Test - void getAllJurisdictionCode_Success () throws DataProcessingException { + void getAllJurisdictionCode_Success() throws DataProcessingException { var lstRes = new ArrayList(); var code = new JurisdictionCode(); code.setCode("TEST"); @@ -275,7 +272,7 @@ void getAllJurisdictionCode_Success () throws DataProcessingException { } @Test - void getAllJurisdictionCode_Exception () { + void getAllJurisdictionCode_Exception() { when(jurisdictionService.getJurisdictionCode()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getAllJurisdictionCode(); @@ -284,7 +281,7 @@ void getAllJurisdictionCode_Exception () { } @Test - void getAllJurisdictionCodeWithNbsUid_Success () throws DataProcessingException { + void getAllJurisdictionCodeWithNbsUid_Success() throws DataProcessingException { var lstRes = new ArrayList(); var code = new JurisdictionCode(); code.setCode("TEST"); @@ -296,7 +293,7 @@ void getAllJurisdictionCodeWithNbsUid_Success () throws DataProcessingException } @Test - void getAllJurisdictionCodeWithNbsUid_Exception () { + void getAllJurisdictionCodeWithNbsUid_Exception() { when(jurisdictionService.getJurisdictionCode()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getAllJurisdictionCodeWithNbsUid(); @@ -305,7 +302,7 @@ void getAllJurisdictionCodeWithNbsUid_Exception () { } @Test - void getAllElrXref_Success () throws DataProcessingException { + void getAllElrXref_Success() throws DataProcessingException { var lstRes = new ArrayList(); var code = new ElrXref(); code.setToCode("TEST"); @@ -317,7 +314,7 @@ void getAllElrXref_Success () throws DataProcessingException { } @Test - void getAllElrXref_Exception () { + void getAllElrXref_Exception() { when(elrXrefRepository.findAll()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getAllElrXref(); @@ -326,7 +323,7 @@ void getAllElrXref_Exception () { } @Test - void getAllOnInfectionConditionCode_Success () throws DataProcessingException { + void getAllOnInfectionConditionCode_Success() throws DataProcessingException { var lstRes = new ArrayList(); var code = new ConditionCode(); code.setConditionCd("TEST"); @@ -338,7 +335,7 @@ void getAllOnInfectionConditionCode_Success () throws DataProcessingException { } @Test - void getAllOnInfectionConditionCode_Exception () { + void getAllOnInfectionConditionCode_Exception() { when(conditionCodeRepository.findCoInfectionConditionCode()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getAllOnInfectionConditionCode(); @@ -347,7 +344,7 @@ void getAllOnInfectionConditionCode_Exception () { } @Test - void getAllConditionCode_Success () throws DataProcessingException { + void getAllConditionCode_Success() throws DataProcessingException { var lstRes = new ArrayList(); var code = new ConditionCode(); code.setConditionCd("TEST"); @@ -359,7 +356,7 @@ void getAllConditionCode_Success () throws DataProcessingException { } @Test - void getAllConditionCode_Exception () { + void getAllConditionCode_Exception() { when(conditionCodeRepository.findAllConditionCode()).thenThrow(new RuntimeException("TEST")); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.getAllConditionCode(); @@ -477,7 +474,7 @@ void findToCode_Exception() { DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { cachingValueService.findToCode(fromCodeSetNm, fromCode, toCodeSetNm); }); - assertEquals("TEST",thrown.getMessage()); + assertEquals("TEST", thrown.getMessage()); } @Test @@ -567,7 +564,7 @@ void findStateCodeByStateNm_1() { when(stateCodeRepository.findStateCdByStateName(stateNm)).thenReturn(Optional.of(codeValue)); var res = cachingValueService.findStateCodeByStateNm(stateNm); - assertEquals("TEST", res.getCodeDescTxt()); + assertEquals("TEST", res.getCodeDescTxt()); } @Test @@ -588,7 +585,7 @@ void getGeneralCodedValue_1() { when(codeValueGeneralRepository.findCodeValuesByCodeSetNm(code)).thenReturn(Optional.of(lstCode)); var res = cachingValueService.getGeneralCodedValue(code); - assertEquals(1, res.size()); + assertEquals(1, res.size()); } @Test @@ -663,7 +660,7 @@ void getCodedValue_2() throws DataProcessingException { } @Test - void getCodedValue_Exception() { + void getCodedValue_Exception() { String code = ELRConstant.ELR_LOG_PROCESS; @@ -690,7 +687,7 @@ void getCountyCdByDescCallRepos_1() throws DataProcessingException { when(stateCountyCodeValueRepository.findByIndentLevelNbr()) .thenReturn(Optional.of(lstState)); - var res= cachingValueService.getCountyCdByDescCallRepos(stateCd); + var res = cachingValueService.getCountyCdByDescCallRepos(stateCd); assertEquals("TEST", res.get("TEST COUNTY")); } @@ -707,7 +704,7 @@ void getCountyCdByDescCallRepos_2() throws DataProcessingException { when(stateCountyCodeValueRepository.findByIndentLevelNbrAndParentIsCdOrderByCodeDescTxt(stateCd)) .thenReturn(Optional.of(lstState)); - var res= cachingValueService.getCountyCdByDescCallRepos(stateCd); + var res = cachingValueService.getCountyCdByDescCallRepos(stateCd); assertEquals("TEST", res.get("TEST COUNTY")); } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/entity/EntityLocatorParticipationServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/entity/EntityLocatorParticipationServiceTest.java index 867440da2..2be9f88af 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/entity/EntityLocatorParticipationServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/entity/EntityLocatorParticipationServiceTest.java @@ -37,19 +37,19 @@ class EntityLocatorParticipationServiceTest { @Mock - private EntityLocatorParticipationRepository entityLocatorParticipationRepository; + AuthUtil authUtil; + @Mock + private EntityLocatorParticipationRepository entityLocatorParticipationRepository; @Mock - private TeleLocatorRepository teleLocatorRepository; + private TeleLocatorRepository teleLocatorRepository; @Mock - private PostalLocatorRepository postalLocatorRepository; + private PostalLocatorRepository postalLocatorRepository; @Mock - private PhysicalLocatorRepository physicalLocatorRepository; + private PhysicalLocatorRepository physicalLocatorRepository; @Mock - private OdseIdGeneratorService odseIdGeneratorService; + private OdseIdGeneratorService odseIdGeneratorService; @InjectMocks private EntityLocatorParticipationService entityLocatorParticipationService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -60,7 +60,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/AutoInvestigationServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/AutoInvestigationServiceTest.java index ca01e131d..d2fbf0a50 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/AutoInvestigationServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/AutoInvestigationServiceTest.java @@ -10,6 +10,7 @@ import gov.cdc.dataprocessing.model.dto.edx.EdxRuleManageDto; import gov.cdc.dataprocessing.model.dto.lab_result.EdxLabInformationDto; import gov.cdc.dataprocessing.model.dto.lookup.PrePopMappingDto; +import gov.cdc.dataprocessing.model.dto.nbs.NbsActEntityDto; import gov.cdc.dataprocessing.model.dto.nbs.NbsQuestionMetadata; import gov.cdc.dataprocessing.model.dto.observation.*; import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; @@ -27,32 +28,48 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.MockitoAnnotations; +import org.mockito.*; import java.math.BigDecimal; import java.util.*; import static gov.cdc.dataprocessing.cache.SrteCache.jurisdictionCodeMapWithNbsUid; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.*; class AutoInvestigationServiceTest { + @Mock + AuthUtil authUtil; @Mock private ConditionCodeRepository conditionCodeRepository; @Mock private ICatchingValueService catchingValueService; @Mock private ILookupService lookupService; - @InjectMocks + @Spy private AutoInvestigationService autoInvestigationService; @Mock - AuthUtil authUtil; + private PageActProxyContainer pageActProxyContainerMock; + + @Mock + private PamProxyContainer pamActProxyVOMock; + + @Mock + private PersonContainer personVOMock; + + @Mock + private ObservationContainer rootObservationVOMock; + + @Mock + private NbsActEntityDto nbsActEntityDTOMock; + + @Mock + private ParticipationDto participationDTOMock; + + @Mock + private EdxRuleManageDto edxRuleManageDTOMock; @BeforeEach void setUp() { @@ -63,7 +80,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); jurisdictionCodeMapWithNbsUid.put("STATE", 1); OdseCache.fromPrePopFormMapping.clear(); @@ -110,7 +127,6 @@ void autoCreateInvestigation_Success2_InvestigationTypeIsNull() throws DataProce edxLabInformationDT.setInvestigationType(null); - // createPublicHealthCaseVO 59 var conditionCodeWithPACol = new ArrayList(); var conditionCodeWithPA = new ConditionCodeWithPA(); @@ -161,7 +177,7 @@ void autoCreateInvestigation_Success2_InvestigationTypeIsNull() throws DataProce void transferValuesTOActProxyVO_Success() throws DataProcessingException { PageActProxyContainer pageActProxyContainer = new PageActProxyContainer(); PamProxyContainer pamActProxyVO = new PamProxyContainer(); - Collection< PersonContainer > personVOCollection = new ArrayList<>(); + Collection personVOCollection = new ArrayList<>(); ObservationContainer rootObservationVO = new ObservationContainer(); Collection entities = new ArrayList<>(); Map questionIdentifierMap = new TreeMap<>(); @@ -219,7 +235,7 @@ void transferValuesTOActProxyVO_Success() throws DataProcessingException { entities.add(entityEdxRule); // createActEntityObject 162 - var tree =new TreeMap(); + var tree = new TreeMap(); tree.put("PAT", "PAT"); when(catchingValueService.getCodedValue(any())) .thenReturn(tree); @@ -364,8 +380,6 @@ void populateProxyFromPrePopMapping_Test() throws DataProcessingException { OdseCache.fromPrePopFormMapping.put(NEDSSConstant.LAB_FORM_CD, mapTree); - - var proxLab = new LabResultProxyContainer(); var obsColl = new ArrayList(); var obsConn = new ObservationContainer(); @@ -499,4 +513,180 @@ void populateProxyFromPrePopMapping_Test() throws DataProcessingException { verify(lookupService, times(1)).getToPrePopFormMapping("INVES"); } + @Test + void testAutoCreateInvestigationTypeFormRvctCheck_Valid() { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + edxLabInformationDto.setInvestigationType(NEDSSConstant.INV_FORM_RVCT); + + boolean result = autoInvestigationService.autoCreateInvestigationTypeFormRvctCheck(edxLabInformationDto); + assertTrue(result); + } + + @Test + void testAutoCreateInvestigationTypeFormRvctCheck_NullInvestigationType() { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + edxLabInformationDto.setInvestigationType(null); + + boolean result = autoInvestigationService.autoCreateInvestigationTypeFormRvctCheck(edxLabInformationDto); + assertFalse(result); + } + + @Test + void testAutoCreateInvestigationTypeFormRvctCheck_InvalidInvestigationType() { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + edxLabInformationDto.setInvestigationType("INVALID_TYPE"); + + boolean result = autoInvestigationService.autoCreateInvestigationTypeFormRvctCheck(edxLabInformationDto); + assertFalse(result); + } + + @Test + void testAutoCreateInvestigationRvctAndFormVarCheck_ValidRVCT() { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + edxLabInformationDto.setInvestigationType(NEDSSConstant.INV_FORM_RVCT); + + boolean result = autoInvestigationService.autoCreateInvestigationRvctAndFormVarCheck(edxLabInformationDto); + assertTrue(result); + } + + @Test + void testAutoCreateInvestigationRvctAndFormVarCheck_ValidVAR() { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + edxLabInformationDto.setInvestigationType(NEDSSConstant.INV_FORM_VAR); + + boolean result = autoInvestigationService.autoCreateInvestigationRvctAndFormVarCheck(edxLabInformationDto); + assertTrue(result); + } + + @Test + void testAutoCreateInvestigationRvctAndFormVarCheck_NullInvestigationType() { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + edxLabInformationDto.setInvestigationType(null); + + boolean result = autoInvestigationService.autoCreateInvestigationRvctAndFormVarCheck(edxLabInformationDto); + assertFalse(result); + } + + @Test + void testAutoCreateInvestigationRvctAndFormVarCheck_InvalidInvestigationType() { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + edxLabInformationDto.setInvestigationType("INVALID_TYPE"); + + boolean result = autoInvestigationService.autoCreateInvestigationRvctAndFormVarCheck(edxLabInformationDto); + assertFalse(result); + } + + @Test + void testAutoCreateInvestigation_Exception() throws DataProcessingException { + ObservationContainer observationVO = mock(ObservationContainer.class); + EdxLabInformationDto edxLabInformationDT = mock(EdxLabInformationDto.class); + + // Simulate a condition that throws an exception + doThrow(new RuntimeException("Simulated exception")).when(autoInvestigationService).populateProxyFromPrePopMapping(any(), any()); + + assertThrows(NullPointerException.class, () -> { + autoInvestigationService.autoCreateInvestigation(observationVO, edxLabInformationDT); + }); + } + + @Test + void testTransferValuesTOActProxyVO_Exception() throws DataProcessingException { + PageActProxyContainer pageActProxyContainer = mock(PageActProxyContainer.class); + PamProxyContainer pamActProxyVO = mock(PamProxyContainer.class); + Collection personVOCollection = mock(Collection.class); + ObservationContainer rootObservationVO = mock(ObservationContainer.class); + Collection entities = mock(Collection.class); + Map questionIdentifierMap = mock(Map.class); + + // Simulate a condition that throws an exception + doThrow(new RuntimeException("Simulated exception")).when(autoInvestigationService).createActEntityObject(any(), any(), any(), any(), any()); + + assertThrows(DataProcessingException.class, () -> { + autoInvestigationService.transferValuesTOActProxyVO(pageActProxyContainer, pamActProxyVO, personVOCollection, rootObservationVO, entities, questionIdentifierMap); + }); + } + + @Test + public void testPageActProxyContainerNotNull() throws DataProcessingException { + // Mocked values and objects + PublicHealthCaseContainer publicHealthCaseContainerMock = mock(PublicHealthCaseContainer.class); + PublicHealthCaseDto publicHealthCaseDtoMock = mock(PublicHealthCaseDto.class); + when(publicHealthCaseDtoMock.getPublicHealthCaseUid()).thenReturn(1L); + when(publicHealthCaseContainerMock.getThePublicHealthCaseDto()).thenReturn(publicHealthCaseDtoMock); + when(pageActProxyContainerMock.getPublicHealthCaseContainer()).thenReturn(publicHealthCaseContainerMock); + when(personVOMock.getThePersonDto()).thenReturn(mock(PersonDto.class)); + when(personVOMock.getThePersonDto().getCd()).thenReturn("PAT"); + + Collection personVOCollectionMock = new ArrayList<>(); + personVOCollectionMock.add(personVOMock); + + // Call the method + autoInvestigationService.transferValuesTOActProxyVO(pageActProxyContainerMock, null, personVOCollectionMock, rootObservationVOMock, null, null); + + // Assertions + verify(pageActProxyContainerMock).setThePersonContainerCollection(anyCollection()); + } + + + @Test + public void testEntitiesNotNullElseCases() throws DataProcessingException { + // Mocked values and objects + when(edxRuleManageDTOMock.getParticipationTypeCode()).thenReturn("typeCode"); + when(edxRuleManageDTOMock.getParticipationUid()).thenReturn(1L); + when(edxRuleManageDTOMock.getParticipationClassCode()).thenReturn("classCode"); + + var phc = new PublicHealthCaseContainer(); + phc.getThePublicHealthCaseDto().setPublicHealthCaseUid(0L); + when(pamActProxyVOMock.getPublicHealthCaseContainer()).thenReturn(phc); + + Collection entitiesMock = new ArrayList<>(); + entitiesMock.add(edxRuleManageDTOMock); + + // Call the method + autoInvestigationService.transferValuesTOActProxyVO(null, pamActProxyVOMock, null, rootObservationVOMock, entitiesMock, null); + + // Assertions + verify(pamActProxyVOMock).setTheParticipationDTCollection(anyCollection()); + } + + @Test + public void testInnerIfConditions() throws DataProcessingException { + // Mocked values and objects + Collection collMock = new ArrayList<>(); + when(rootObservationVOMock.getTheParticipationDtoCollection()).thenReturn(collMock); + ParticipationDto partDTMock = mock(ParticipationDto.class); + when(partDTMock.getTypeCd()).thenReturn(EdxELRConstant.ELR_ORDER_CD); + when(partDTMock.getSubjectClassCd()).thenReturn(EdxELRConstant.ELR_PERSON_CD); + collMock.add(partDTMock); + var phc = new PublicHealthCaseContainer(); + phc.getThePublicHealthCaseDto().setPublicHealthCaseUid(0L); + when(pamActProxyVOMock.getPublicHealthCaseContainer()).thenReturn(phc); + // Call the method + autoInvestigationService.transferValuesTOActProxyVO(null, pamActProxyVOMock, null, rootObservationVOMock, null, null); + + // Assertions + verify(pamActProxyVOMock).setTheParticipationDTCollection(anyCollection()); + } + + @Test + public void testPageActProxyContainerWithInnerIf() throws DataProcessingException { + // Mocked values and objects + PublicHealthCaseContainer publicHealthCaseContainerMock = mock(PublicHealthCaseContainer.class); + PublicHealthCaseDto publicHealthCaseDtoMock = mock(PublicHealthCaseDto.class); + when(publicHealthCaseDtoMock.getPublicHealthCaseUid()).thenReturn(1L); + when(publicHealthCaseContainerMock.getThePublicHealthCaseDto()).thenReturn(publicHealthCaseDtoMock); + when(pageActProxyContainerMock.getPublicHealthCaseContainer()).thenReturn(publicHealthCaseContainerMock); + when(pageActProxyContainerMock.getPageVO()).thenReturn(mock(BasePamContainer.class)); + Collection collMock = new ArrayList<>(); + when(rootObservationVOMock.getTheParticipationDtoCollection()).thenReturn(collMock); + + // Call the method + autoInvestigationService.transferValuesTOActProxyVO(pageActProxyContainerMock, null, null, rootObservationVOMock, null, null); + + // Assertions + verify(pageActProxyContainerMock).setTheParticipationDtoCollection(anyCollection()); + verify(pageActProxyContainerMock).setPageVO(any(BasePamContainer.class)); + } + + } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/DecisionSupportServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/DecisionSupportServiceTest.java index c6eef7474..443f22715 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/DecisionSupportServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/DecisionSupportServiceTest.java @@ -43,6 +43,8 @@ import static org.mockito.Mockito.*; class DecisionSupportServiceTest { + @Mock + AuthUtil authUtil; @Mock private EdxPhcrDocumentUtil edxPhcrDocumentUtil; @Mock @@ -59,8 +61,6 @@ class DecisionSupportServiceTest { private WdsObjectChecker wdsObjectChecker; @InjectMocks private DecisionSupportService decisionSupportService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -71,13 +71,13 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach void tearDown() { Mockito.reset(edxPhcrDocumentUtil, autoInvestigationService, validateDecisionSupport, publicHealthCaseStoredProcRepository, - dsmAlgorithmService , authUtil, advancedCriteria, wdsObjectChecker); + dsmAlgorithmService, authUtil, advancedCriteria, wdsObjectChecker); } @@ -89,7 +89,8 @@ void validateProxyContainer_Success_MarkedAsReview() throws DataProcessingExcept TestDataReader test = new TestDataReader(); LabResultProxyContainer labProxyContainer = test.readDataFromJsonPath("wds/wds_reviewed_lab.json", LabResultProxyContainer.class); EdxLabInformationDto edxLab = test.readDataFromJsonPath("wds/wds_reviewed_edx.json", EdxLabInformationDto.class); - Type collectionType = new TypeToken>(){}.getType(); + Type collectionType = new TypeToken>() { + }.getType(); Collection algoCol = gson.fromJson(alsoCol, collectionType); @@ -111,7 +112,8 @@ void validateProxyContainer_Success_Investigation() throws DataProcessingExcepti TestDataReader test = new TestDataReader(); LabResultProxyContainer labProxyContainer = test.readDataFromJsonPath("wds/wds_reviewed_lab.json", LabResultProxyContainer.class); EdxLabInformationDto edxLab = test.readDataFromJsonPath("wds/wds_reviewed_edx.json", EdxLabInformationDto.class); - Type collectionType = new TypeToken>(){}.getType(); + Type collectionType = new TypeToken>() { + }.getType(); Collection algoCol = gson.fromJson(alsoCol, collectionType); @@ -140,7 +142,8 @@ void validateProxyContainer_Success_Notification() throws DataProcessingExceptio TestDataReader test = new TestDataReader(); LabResultProxyContainer labProxyContainer = test.readDataFromJsonPath("wds/wds_reviewed_lab.json", LabResultProxyContainer.class); EdxLabInformationDto edxLab = test.readDataFromJsonPath("wds/wds_reviewed_edx.json", EdxLabInformationDto.class); - Type collectionType = new TypeToken>(){}.getType(); + Type collectionType = new TypeToken>() { + }.getType(); Collection algoCol = gson.fromJson(alsoCol, collectionType); @@ -399,8 +402,6 @@ void updateObservationBasedOnAction_Test_2() throws DataProcessingException { questionMap.put("_REQUIRED", new HashMap<>()); - - when(edxPhcrDocumentUtil.loadQuestions(any())) .thenReturn(questionMap); @@ -592,7 +593,7 @@ void checkAdvancedInvCriteria_Test() throws DataProcessingException { var lst = new ArrayList<>(); edxRule = new EdxRuleManageDto(); lst.add(edxRule); - advanceInvCriteriaMap.put("2",lst); + advanceInvCriteriaMap.put("2", lst); when(advancedCriteria.getAdvancedInvCriteriaMap(any())).thenReturn(advanceInvCriteriaMap); when(wdsObjectChecker.checkNbsObject(any(), any(), any())).thenReturn(true); @@ -630,7 +631,7 @@ void checkAdvancedInvCriteria_Test_2() throws DataProcessingException { var lst = new ArrayList<>(); edxRule = new EdxRuleManageDto(); lst.add(edxRule); - advanceInvCriteriaMap.put("2",lst); + advanceInvCriteriaMap.put("2", lst); when(advancedCriteria.getAdvancedInvCriteriaMap(any())).thenReturn(advanceInvCriteriaMap); when(wdsObjectChecker.checkNbsObject(any(), any(), any())).thenReturn(false); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/DsmAlgorithmServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/DsmAlgorithmServiceTest.java index 4d2e66e0d..86f1ad39a 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/DsmAlgorithmServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/DsmAlgorithmServiceTest.java @@ -21,12 +21,12 @@ import static org.mockito.Mockito.when; class DsmAlgorithmServiceTest { + @Mock + AuthUtil authUtil; @Mock private DsmAlgorithmRepository dsmAlgorithmRepository; @InjectMocks private DsmAlgorithmService dsmAlgorithmService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -37,12 +37,12 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach void tearDown() { - Mockito.reset(dsmAlgorithmRepository , authUtil); + Mockito.reset(dsmAlgorithmRepository, authUtil); } @Test diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/LookupServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/LookupServiceTest.java index 6315bfbf2..dc3ce1ed9 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/LookupServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/investigation/LookupServiceTest.java @@ -35,6 +35,8 @@ class LookupServiceTest { + @Mock + AuthUtil authUtil; @Mock private LookupMappingRepository lookupMappingRepository; @Mock @@ -45,8 +47,6 @@ class LookupServiceTest { private ICatchingValueService catchingValueService; @InjectMocks private LookupService lookupService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -57,7 +57,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); OdseCache.toPrePopFormMapping.clear(); OdseCache.fromPrePopFormMapping.clear(); @@ -106,9 +106,9 @@ void testGetToPrePopFormMapping_Test2() throws DataProcessingException { lookQLst.add(lookQ); when(lookupMappingRepository.getLookupMappings()).thenReturn(Optional.of(lookQLst)); - var res = lookupService.getToPrePopFormMapping(formCd); + var res = lookupService.getToPrePopFormMapping(formCd); - assertEquals(2, res.size()); + assertEquals(2, res.size()); } @@ -124,7 +124,7 @@ void getQuestionMap_Test_1() { var questCol = new ArrayList<>(); var nbs = new NbsQuestionMetadata(); - nbs.setInvestigationFormCd( NBSConstantUtil.INV_FORM_RVCT); + nbs.setInvestigationFormCd(NBSConstantUtil.INV_FORM_RVCT); nbs.setQuestionIdentifier("IDENTIFIER"); questCol.add(nbs); when(nbsUiMetaDataRepository.findPamQuestionMetaData()).thenReturn(Optional.of(questCol)); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/JurisdictionServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/JurisdictionServiceTest.java index b3394a8b9..621874b0d 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/JurisdictionServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/JurisdictionServiceTest.java @@ -38,6 +38,8 @@ import static org.mockito.Mockito.*; class JurisdictionServiceTest { + @Mock + AuthUtil authUtil; @Mock private PatientRepositoryUtil patientRepositoryUtil; @Mock @@ -46,8 +48,6 @@ class JurisdictionServiceTest { private JurisdictionParticipationRepository jurisdictionParticipationRepository; @Mock private JurisdictionCodeRepository jurisdictionCodeRepository; - @Mock - AuthUtil authUtil; @InjectMocks private JurisdictionService jurisdictionService; @@ -58,7 +58,7 @@ void setUp() { AuthUser user = new AuthUser(); user.setAuthUserUid(1L); authUserProfileInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(authUserProfileInfo); + AuthUtil.setGlobalAuthUser(authUserProfileInfo); } @AfterEach @@ -300,7 +300,7 @@ void deriveJurisdictionCd_all() throws DataProcessingException { when(organizationRepositoryUtil.loadObject(any(), any())).thenReturn(organizationContainer2); jurisdictionService.deriveJurisdictionCd(labResultProxyContainer, rootObsDT); - verify(organizationRepositoryUtil,times(2)).loadObject(any(), any()); + verify(organizationRepositoryUtil, times(2)).loadObject(any(), any()); } @Test @@ -323,7 +323,7 @@ void deriveJurisdictionCd_provider() throws DataProcessingException { when(patientRepositoryUtil.loadPerson(any())).thenReturn(personContainer); jurisdictionService.deriveJurisdictionCd(labResultProxyContainer, rootObsDT); - verify(patientRepositoryUtil,times(1)).loadPerson(123L); + verify(patientRepositoryUtil, times(1)).loadPerson(123L); } @Test @@ -349,7 +349,7 @@ void deriveJurisdictionCd_patient() throws DataProcessingException { personContainerCol.add(new PersonContainer()); labResultProxyContainer.setThePersonContainerCollection(personContainerCol); - String result=jurisdictionService.deriveJurisdictionCd(labResultProxyContainer, rootObsDT); + String result = jurisdictionService.deriveJurisdictionCd(labResultProxyContainer, rootObsDT); assertNull(result); } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/ProgramAreaServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/ProgramAreaServiceTest.java index f1cf63cba..a496cee07 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/ProgramAreaServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/jurisdiction/ProgramAreaServiceTest.java @@ -55,14 +55,15 @@ void tearDown() { @Test void getAllProgramAreaCode() { - ProgramAreaCode programAreaCode= getProgramAreaCode(); + ProgramAreaCode programAreaCode = getProgramAreaCode(); when(programAreaCodeRepository.findAll()).thenReturn(List.of(programAreaCode)); List programAreaCodeList = programAreaService.getAllProgramAreaCode(); assertEquals(1, programAreaCodeList.size()); } + @Test void getAllProgramAreaCode_empty_list() { - List programAreaCodeList=new ArrayList<>(); + List programAreaCodeList = new ArrayList<>(); when(programAreaCodeRepository.findAll()).thenReturn(programAreaCodeList); List programAreaCodeListResult = programAreaService.getAllProgramAreaCode(); assertEquals(0, programAreaCodeListResult.size()); @@ -70,16 +71,16 @@ void getAllProgramAreaCode_empty_list() { @Test void getProgramArea_SNOMED() throws DataProcessingException { - Collection observationResults=new ArrayList<>(); + Collection observationResults = new ArrayList<>(); //1 - ObservationContainer observationContainer1=new ObservationContainer(); - ObservationDto obsDt1=new ObservationDto(); + ObservationContainer observationContainer1 = new ObservationContainer(); + ObservationDto obsDt1 = new ObservationDto(); obsDt1.setObsDomainCdSt1(ELRConstant.ELR_OBSERVATION_RESULT); obsDt1.setCd("TEST_CD1"); observationContainer1.setTheObservationDto(obsDt1); //2 - ObservationContainer observationContainer2=new ObservationContainer(); - ObservationDto obsDt2=new ObservationDto(); + ObservationContainer observationContainer2 = new ObservationContainer(); + ObservationDto obsDt2 = new ObservationDto(); obsDt2.setObsDomainCdSt1(ELRConstant.ELR_OBSERVATION_RESULT); obsDt2.setCd("TEST_CD2"); observationContainer2.setTheObservationDto(obsDt2); @@ -87,27 +88,28 @@ void getProgramArea_SNOMED() throws DataProcessingException { observationResults.add(observationContainer1); observationResults.add(observationContainer2); - ObservationContainer observationRequest=new ObservationContainer(); + ObservationContainer observationRequest = new ObservationContainer(); ObservationDto observationDto = new ObservationDto(); observationDto.setElectronicInd(NEDSSConstant.ELECTRONIC_IND_ELR); observationRequest.setTheObservationDto(observationDto); - when(srteCodeObsService.getPAFromSNOMEDCodes(any(),any())).thenReturn("TEST_PA"); - programAreaService.getProgramArea(observationResults,observationRequest,"TEST"); - verify(srteCodeObsService,times(2)).getPAFromSNOMEDCodes(any(), any()); + when(srteCodeObsService.getPAFromSNOMEDCodes(any(), any())).thenReturn("TEST_PA"); + programAreaService.getProgramArea(observationResults, observationRequest, "TEST"); + verify(srteCodeObsService, times(2)).getPAFromSNOMEDCodes(any(), any()); } + @Test void getProgramArea_LOINC() throws DataProcessingException { - Collection observationResults=new ArrayList<>(); + Collection observationResults = new ArrayList<>(); //1 - ObservationContainer observationContainer1=new ObservationContainer(); - ObservationDto obsDt1=new ObservationDto(); + ObservationContainer observationContainer1 = new ObservationContainer(); + ObservationDto obsDt1 = new ObservationDto(); obsDt1.setObsDomainCdSt1(ELRConstant.ELR_OBSERVATION_RESULT); obsDt1.setCd("TEST_CD1"); observationContainer1.setTheObservationDto(obsDt1); //2 - ObservationContainer observationContainer2=new ObservationContainer(); - ObservationDto obsDt2=new ObservationDto(); + ObservationContainer observationContainer2 = new ObservationContainer(); + ObservationDto obsDt2 = new ObservationDto(); obsDt2.setObsDomainCdSt1(ELRConstant.ELR_OBSERVATION_RESULT); obsDt2.setCd("TEST_CD2"); observationContainer2.setTheObservationDto(obsDt2); @@ -115,29 +117,30 @@ void getProgramArea_LOINC() throws DataProcessingException { observationResults.add(observationContainer1); observationResults.add(observationContainer2); - ObservationContainer observationRequest=new ObservationContainer(); + ObservationContainer observationRequest = new ObservationContainer(); ObservationDto observationDto = new ObservationDto(); observationDto.setElectronicInd(NEDSSConstant.ELECTRONIC_IND_ELR); observationRequest.setTheObservationDto(observationDto); - when(srteCodeObsService.getPAFromSNOMEDCodes(any(),any())).thenReturn(null); - when(srteCodeObsService.getPAFromLOINCCode(any(),any())).thenReturn("TEST_PA"); + when(srteCodeObsService.getPAFromSNOMEDCodes(any(), any())).thenReturn(null); + when(srteCodeObsService.getPAFromLOINCCode(any(), any())).thenReturn("TEST_PA"); - programAreaService.getProgramArea(observationResults,observationRequest,"TEST"); - verify(srteCodeObsService,times(2)).getPAFromLOINCCode(any(), any()); + programAreaService.getProgramArea(observationResults, observationRequest, "TEST"); + verify(srteCodeObsService, times(2)).getPAFromLOINCCode(any(), any()); } + @Test void getProgramArea_LocalResult() throws DataProcessingException { - Collection observationResults=new ArrayList<>(); + Collection observationResults = new ArrayList<>(); //1 - ObservationContainer observationContainer1=new ObservationContainer(); - ObservationDto obsDt1=new ObservationDto(); + ObservationContainer observationContainer1 = new ObservationContainer(); + ObservationDto obsDt1 = new ObservationDto(); obsDt1.setObsDomainCdSt1(ELRConstant.ELR_OBSERVATION_RESULT); obsDt1.setCd("TEST_CD1"); observationContainer1.setTheObservationDto(obsDt1); //2 - ObservationContainer observationContainer2=new ObservationContainer(); - ObservationDto obsDt2=new ObservationDto(); + ObservationContainer observationContainer2 = new ObservationContainer(); + ObservationDto obsDt2 = new ObservationDto(); obsDt2.setObsDomainCdSt1(ELRConstant.ELR_OBSERVATION_RESULT); obsDt2.setCd("TEST_CD2"); observationContainer2.setTheObservationDto(obsDt2); @@ -145,86 +148,89 @@ void getProgramArea_LocalResult() throws DataProcessingException { observationResults.add(observationContainer1); observationResults.add(observationContainer2); - ObservationContainer observationRequest=new ObservationContainer(); + ObservationContainer observationRequest = new ObservationContainer(); ObservationDto observationDto = new ObservationDto(); observationDto.setElectronicInd(NEDSSConstant.ELECTRONIC_IND_ELR); observationRequest.setTheObservationDto(observationDto); - when(srteCodeObsService.getPAFromSNOMEDCodes(any(),any())).thenReturn(null); - when(srteCodeObsService.getPAFromLOINCCode(any(),any())).thenReturn(null); - when(srteCodeObsService.getPAFromLocalResultCode(any(),any())).thenReturn("TEST_PA"); + when(srteCodeObsService.getPAFromSNOMEDCodes(any(), any())).thenReturn(null); + when(srteCodeObsService.getPAFromLOINCCode(any(), any())).thenReturn(null); + when(srteCodeObsService.getPAFromLocalResultCode(any(), any())).thenReturn("TEST_PA"); - programAreaService.getProgramArea(observationResults,observationRequest,"TEST"); - verify(srteCodeObsService,times(2)).getPAFromLocalResultCode(any(), any()); + programAreaService.getProgramArea(observationResults, observationRequest, "TEST"); + verify(srteCodeObsService, times(2)).getPAFromLocalResultCode(any(), any()); } + @Test void getProgramArea_LocalTestCode() throws DataProcessingException { - Collection observationResults=new ArrayList<>(); + Collection observationResults = new ArrayList<>(); - ObservationContainer observationContainer1=new ObservationContainer(); - ObservationDto obsDt1=new ObservationDto(); + ObservationContainer observationContainer1 = new ObservationContainer(); + ObservationDto obsDt1 = new ObservationDto(); obsDt1.setObsDomainCdSt1(ELRConstant.ELR_OBSERVATION_RESULT); obsDt1.setCd("TEST_CD1"); observationContainer1.setTheObservationDto(obsDt1); observationResults.add(observationContainer1); //observationRequest - ObservationContainer observationRequest=new ObservationContainer(); + ObservationContainer observationRequest = new ObservationContainer(); ObservationDto observationDto = new ObservationDto(); observationDto.setElectronicInd(NEDSSConstant.ELECTRONIC_IND_ELR); observationRequest.setTheObservationDto(observationDto); - when(srteCodeObsService.getPAFromSNOMEDCodes(any(),any())).thenReturn(null); - when(srteCodeObsService.getPAFromLOINCCode(any(),any())).thenReturn(null); - when(srteCodeObsService.getPAFromLocalResultCode(any(),any())).thenReturn(null); - when(srteCodeObsService.getPAFromLocalTestCode(any(),any())).thenReturn("TEST_PA"); + when(srteCodeObsService.getPAFromSNOMEDCodes(any(), any())).thenReturn(null); + when(srteCodeObsService.getPAFromLOINCCode(any(), any())).thenReturn(null); + when(srteCodeObsService.getPAFromLocalResultCode(any(), any())).thenReturn(null); + when(srteCodeObsService.getPAFromLocalTestCode(any(), any())).thenReturn("TEST_PA"); - programAreaService.getProgramArea(observationResults,observationRequest,"TEST"); - verify(srteCodeObsService,times(1)).getPAFromLocalTestCode(any(), any()); + programAreaService.getProgramArea(observationResults, observationRequest, "TEST"); + verify(srteCodeObsService, times(1)).getPAFromLocalTestCode(any(), any()); } + @Test void getProgramArea_empty_PA() throws DataProcessingException { - Collection observationResults=new ArrayList<>(); + Collection observationResults = new ArrayList<>(); //1 - ObservationContainer observationContainer1=new ObservationContainer(); - ObservationDto obsDt1=new ObservationDto(); + ObservationContainer observationContainer1 = new ObservationContainer(); + ObservationDto obsDt1 = new ObservationDto(); obsDt1.setObsDomainCdSt1(ELRConstant.ELR_OBSERVATION_RESULT); obsDt1.setCd("TEST_CD1"); observationContainer1.setTheObservationDto(obsDt1); observationResults.add(observationContainer1); //observationRequest - ObservationContainer observationRequest=new ObservationContainer(); + ObservationContainer observationRequest = new ObservationContainer(); ObservationDto observationDto = new ObservationDto(); observationDto.setElectronicInd(NEDSSConstant.ELECTRONIC_IND_ELR); observationRequest.setTheObservationDto(observationDto); - when(srteCodeObsService.getPAFromSNOMEDCodes(any(),any())).thenReturn(null); - when(srteCodeObsService.getPAFromLOINCCode(any(),any())).thenReturn(null); - when(srteCodeObsService.getPAFromLocalResultCode(any(),any())).thenReturn(null); - when(srteCodeObsService.getPAFromLocalTestCode(any(),any())).thenReturn(null); + when(srteCodeObsService.getPAFromSNOMEDCodes(any(), any())).thenReturn(null); + when(srteCodeObsService.getPAFromLOINCCode(any(), any())).thenReturn(null); + when(srteCodeObsService.getPAFromLocalResultCode(any(), any())).thenReturn(null); + when(srteCodeObsService.getPAFromLocalTestCode(any(), any())).thenReturn(null); - programAreaService.getProgramArea(observationResults,observationRequest,"TEST"); - verify(srteCodeObsService,times(1)).getPAFromLocalTestCode(any(), any()); + programAreaService.getProgramArea(observationResults, observationRequest, "TEST"); + verify(srteCodeObsService, times(1)).getPAFromLocalTestCode(any(), any()); } + @Test void getProgramArea_multi_PA() throws DataProcessingException { - Collection observationResults=new ArrayList<>(); + Collection observationResults = new ArrayList<>(); //1 - ObservationContainer observationContainer1=new ObservationContainer(); - ObservationDto obsDt1=new ObservationDto(); + ObservationContainer observationContainer1 = new ObservationContainer(); + ObservationDto obsDt1 = new ObservationDto(); obsDt1.setObsDomainCdSt1(ELRConstant.ELR_OBSERVATION_RESULT); obsDt1.setCd("TEST_CD1"); observationContainer1.setTheObservationDto(obsDt1); - ObsValueCodedDto obsValueCodedDto=new ObsValueCodedDto(); + ObsValueCodedDto obsValueCodedDto = new ObsValueCodedDto(); obsValueCodedDto.setCode("TEST_CODE"); - Collection obsValueCodedDtoCol=new ArrayList<>(); + Collection obsValueCodedDtoCol = new ArrayList<>(); obsValueCodedDtoCol.add(obsValueCodedDto); observationContainer1.setTheObsValueCodedDtoCollection(obsValueCodedDtoCol); - ObservationContainer observationContainer2=new ObservationContainer(); - ObservationDto obsDt2=new ObservationDto(); + ObservationContainer observationContainer2 = new ObservationContainer(); + ObservationDto obsDt2 = new ObservationDto(); obsDt2.setObsDomainCdSt1(ELRConstant.ELR_OBSERVATION_RESULT); obsDt2.setCd("TEST_CD2"); observationContainer2.setTheObservationDto(obsDt2); @@ -232,22 +238,23 @@ void getProgramArea_multi_PA() throws DataProcessingException { observationResults.add(observationContainer1); observationResults.add(observationContainer2); - ObservationContainer observationRequest=new ObservationContainer(); + ObservationContainer observationRequest = new ObservationContainer(); ObservationDto observationDto = new ObservationDto(); observationDto.setElectronicInd(NEDSSConstant.ELECTRONIC_IND_ELR); observationRequest.setTheObservationDto(observationDto); - when(srteCodeObsService.getPAFromSNOMEDCodes(any(),eq(null))).thenReturn("TEST_PA1"); - when(srteCodeObsService.getPAFromSNOMEDCodes(any(),eq(observationContainer1.getTheObsValueCodedDtoCollection()))).thenReturn("TEST_PA2"); + when(srteCodeObsService.getPAFromSNOMEDCodes(any(), eq(null))).thenReturn("TEST_PA1"); + when(srteCodeObsService.getPAFromSNOMEDCodes(any(), eq(observationContainer1.getTheObsValueCodedDtoCollection()))).thenReturn("TEST_PA2"); - programAreaService.getProgramArea(observationResults,observationRequest,"TEST"); - verify(srteCodeObsService,times(2)).getPAFromSNOMEDCodes(any(), any()); + programAreaService.getProgramArea(observationResults, observationRequest, "TEST"); + verify(srteCodeObsService, times(2)).getPAFromSNOMEDCodes(any(), any()); } + @Test void deriveProgramAreaCd() throws DataProcessingException { - LabResultProxyContainer labResultProxyVO=new LabResultProxyContainer(); + LabResultProxyContainer labResultProxyVO = new LabResultProxyContainer(); Collection obsContainerList = new ArrayList<>(); - ObservationContainer obsVO1 =new ObservationContainer(); + ObservationContainer obsVO1 = new ObservationContainer(); obsVO1.getTheObservationDto().setObsDomainCdSt1(NEDSSConstant.RESULTED_TEST_OBS_DOMAIN_CD); obsContainerList.add(obsVO1); labResultProxyVO.setTheObservationContainerCollection(obsContainerList); @@ -255,24 +262,25 @@ void deriveProgramAreaCd() throws DataProcessingException { labResultProxyVO.setLabClia("TEST123"); labResultProxyVO.setManualLab(true); - ObservationContainer orderTest=new ObservationContainer(); + ObservationContainer orderTest = new ObservationContainer(); orderTest.getTheObservationDto().setElectronicInd(NEDSSConstant.RESULTED_TEST_OBS_DOMAIN_CD); - HashMap paResults=new HashMap<>(); + HashMap paResults = new HashMap<>(); paResults.put(ELRConstant.PROGRAM_AREA_HASHMAP_KEY, "TEST_PA"); paResults.put("ERROR", "ERROR_PA"); when(srteCodeObsService.getProgramArea(any(), any(), any())).thenReturn(paResults); - String result= programAreaService.deriveProgramAreaCd(labResultProxyVO,orderTest); - assertEquals("ERROR_PA",result); + String result = programAreaService.deriveProgramAreaCd(labResultProxyVO, orderTest); + assertEquals("ERROR_PA", result); verify(srteCodeObsService).getProgramArea(any(), any(), any()); } + @Test void deriveProgramAreaCd_labClia_null() throws DataProcessingException { - LabResultProxyContainer labResultProxyVO=new LabResultProxyContainer(); + LabResultProxyContainer labResultProxyVO = new LabResultProxyContainer(); Collection obsContainerList = new ArrayList<>(); - ObservationContainer obsVO1 =new ObservationContainer(); + ObservationContainer obsVO1 = new ObservationContainer(); obsVO1.getTheObservationDto().setObsDomainCdSt1(NEDSSConstant.RESULTED_TEST_OBS_DOMAIN_CD); obsContainerList.add(obsVO1); labResultProxyVO.setTheObservationContainerCollection(obsContainerList); @@ -280,15 +288,15 @@ void deriveProgramAreaCd_labClia_null() throws DataProcessingException { labResultProxyVO.setLabClia(null); labResultProxyVO.setManualLab(false); - ObservationContainer orderTest=new ObservationContainer(); + ObservationContainer orderTest = new ObservationContainer(); orderTest.getTheObservationDto().setElectronicInd(NEDSSConstant.RESULTED_TEST_OBS_DOMAIN_CD); when(observationCodeService.getReportingLabCLIA(any())).thenReturn(null); when(srteCodeObsService.getProgramArea(any(), any(), any())).thenReturn(null); - String result= programAreaService.deriveProgramAreaCd(labResultProxyVO,orderTest); + String result = programAreaService.deriveProgramAreaCd(labResultProxyVO, orderTest); assertNull(result); - verify(srteCodeObsService,times(1)).getProgramArea(any(), any(), any()); + verify(srteCodeObsService, times(1)).getProgramArea(any(), any(), any()); } private ProgramAreaCode getProgramAreaCode() { diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/log/EdxLogServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/log/EdxLogServiceTest.java index be72bf736..1b960d160 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/log/EdxLogServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/log/EdxLogServiceTest.java @@ -38,6 +38,8 @@ import static org.mockito.Mockito.*; class EdxLogServiceTest { + @Mock + AuthUtil authUtil; @Mock private EdxActivityLogRepository edxActivityLogRepository; @Mock @@ -48,8 +50,6 @@ class EdxLogServiceTest { private EdxLabInformationDto edxLabInformationDto; @InjectMocks private EdxLogService edxLogService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -60,7 +60,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/lookup_data/SrteCodeObsServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/lookup_data/SrteCodeObsServiceTest.java index b835d6800..094c9d446 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/lookup_data/SrteCodeObsServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/lookup_data/SrteCodeObsServiceTest.java @@ -31,6 +31,8 @@ import static org.mockito.Mockito.when; class SrteCodeObsServiceTest { + @Mock + AuthUtil authUtil; @Mock private ProgAreaSnomeCodeStoredProcRepository progAreaSnomeCodeStoredProcRepository; @Mock @@ -49,11 +51,8 @@ class SrteCodeObsServiceTest { private SnomedCodeRepository snomedCodeRepository; @Mock private ConditionCodeRepository conditionCodeRepository; - @InjectMocks private SrteCodeObsService srteCodeObsService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -64,7 +63,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -136,7 +135,7 @@ void getDefaultConditionForLocalResultCodeSuccess_1() { String snomedCd = "code"; var lst = new ArrayList(); lst.add("TEST"); - when(labResultRepository.findDefaultConditionCdByLabResultCdAndLaboratoryId(snomedCd , "TEST")).thenReturn(Optional.of(lst)); + when(labResultRepository.findDefaultConditionCdByLabResultCdAndLaboratoryId(snomedCd, "TEST")).thenReturn(Optional.of(lst)); var res = srteCodeObsService.getDefaultConditionForLocalResultCode(snomedCd, "TEST"); assertNotNull(res); assertEquals("TEST", res); @@ -156,7 +155,7 @@ void getDefaultConditionForLabTest_Success_1() { String snomedCd = "code"; var lst = new ArrayList(); lst.add("TEST"); - when(labTestRepository.findDefaultConditionForLabTest(snomedCd , "TEST")).thenReturn(Optional.of(lst)); + when(labTestRepository.findDefaultConditionForLabTest(snomedCd, "TEST")).thenReturn(Optional.of(lst)); var res = srteCodeObsService.getDefaultConditionForLabTest(snomedCd, "TEST"); assertNotNull(res); assertEquals("TEST", res); @@ -179,7 +178,7 @@ void labLoincSnomedLookup_Success_null() { observationContainer.setTheObservationDto(obsDt); String labClia = null; - var res = srteCodeObsService.labLoincSnomedLookup(observationContainer,labClia); + var res = srteCodeObsService.labLoincSnomedLookup(observationContainer, labClia); assertNotNull(res); } @@ -192,7 +191,7 @@ void labLoincSnomedLookup_Success_null_2() { observationContainer.setTheObservationDto(obsDt); String labClia = null; - var res = srteCodeObsService.labLoincSnomedLookup(observationContainer,labClia); + var res = srteCodeObsService.labLoincSnomedLookup(observationContainer, labClia); assertNotNull(res); } @@ -220,14 +219,13 @@ void labLoincSnomedLookup_Success() { observationContainer.setTheObservationDto(obsDt); - var lst = new ArrayList(); lst.add("TEST"); when(labTestLoincRepository.findLoincCds(labClia, "CODE")).thenReturn(Optional.of(lst)); when(labResultSnomedRepository.findSnomedCds(labClia, "CODE")).thenReturn(Optional.of(lst)); - var res = srteCodeObsService.labLoincSnomedLookup(observationContainer,labClia); + var res = srteCodeObsService.labLoincSnomedLookup(observationContainer, labClia); assertNotNull(res); assertEquals(2, res.getTheObsValueCodedDtoCollection().size()); @@ -272,7 +270,7 @@ void getProgramArea_Success_Electronic_Found_1() throws DataProcessingException snomedMap.put("COUNT", 1); snomedMap.put("LOINC", "TEST"); - when(progAreaSnomeCodeStoredProcRepository.getSnomed("CODE", "LR" ,"CLIA")) + when(progAreaSnomeCodeStoredProcRepository.getSnomed("CODE", "LR", "CLIA")) .thenReturn(snomedMap); @@ -336,7 +334,7 @@ void getProgramArea_Success_Electronic_Found_2_LOINC() throws DataProcessingExce snomedMap.put("NULL", 1); snomedMap.put("LOINC", "TEST"); - when(progAreaSnomeCodeStoredProcRepository.getSnomed("CODE", "LR" ,"CLIA")) + when(progAreaSnomeCodeStoredProcRepository.getSnomed("CODE", "LR", "CLIA")) .thenReturn(snomedMap); @@ -574,7 +572,6 @@ void getPAFromLOINCCode_Null_8() throws DataProcessingException { } - @Test void getPAFromLOINCCode_Null_9() throws DataProcessingException { String reportingLabCLIA = "CLIA"; @@ -631,7 +628,6 @@ void getPAFromLocalResultCode_Success_Null() { } - @Test void getPAFromLocalResultCode_Success_NotNull() { String reportingLabCLIA = "CLIA"; @@ -755,7 +751,7 @@ void getPAFromLocalTestCode_NotNull_1() { var res = srteCodeObsService.getPAFromLocalTestCode(reportingLabCLIA, resultTestVO); - assertEquals("TEST",res); + assertEquals("TEST", res); } @Test @@ -785,11 +781,10 @@ void getPAFromLocalTestCode_NotNull_2() { var res = srteCodeObsService.getPAFromLocalTestCode(reportingLabCLIA, resultTestVO); - assertEquals("TEST",res); + assertEquals("TEST", res); } - @Test void findLocalResultDefaultConditionProgramAreaCdFromLabTestWithoutJoin_Null() { Vector codeVector = new Vector<>(); @@ -805,6 +800,4 @@ void findLocalResultDefaultConditionProgramAreaCdFromLabTestWithoutJoin_Null() { } - - } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerAggregationServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerAggregationServiceTest.java index 7cef31ad6..0201a8960 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerAggregationServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerAggregationServiceTest.java @@ -33,10 +33,7 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; +import java.util.*; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -45,6 +42,8 @@ import static org.mockito.Mockito.*; class ManagerAggregationServiceTest { + @Mock + AuthUtil authUtil; @Mock private IOrganizationService organizationService; @Mock @@ -63,9 +62,6 @@ class ManagerAggregationServiceTest { private IRoleService roleService; @InjectMocks private ManagerAggregationService managerAggregationService; - @Mock - AuthUtil authUtil; - @Mock private LabResultProxyContainer labResult; @@ -110,13 +106,13 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach void tearDown() { Mockito.reset(organizationService, patientService, uidService, observationService, - observationMatchingService, programAreaService,jurisdictionService,roleService, authUtil, + observationMatchingService, programAreaService, jurisdictionService, roleService, authUtil, labResult, edxLabInformationDto, personAggContainer, organizationContainer, observationContainerCollection, personContainerCollection, observationContainer, observationDto, actIdDto, personContainer, labResultProxyContainer, personDto); @@ -368,10 +364,10 @@ void testObservationAggregation_HappyPath() { when(observationDto.getObservationUid()).thenReturn(123L); when(edxLabInformationDto.getRootObserbationUid()).thenReturn(123L); - Collection actIdDtoCollection = Arrays.asList(actIdDto); + Collection actIdDtoCollection = List.of(actIdDto); when(observationContainer.getTheActIdDtoCollection()).thenReturn(actIdDtoCollection); - Collection observationContainerCollection = Arrays.asList(observationContainer); + Collection observationContainerCollection = List.of(observationContainer); // Call the method under test managerAggregationService.observationAggregation(labResult, edxLabInformationDto, observationContainerCollection); @@ -391,7 +387,7 @@ void testObservationAggregation_NoMatchingObservationUid() { when(observationDto.getObservationUid()).thenReturn(123L); when(edxLabInformationDto.getRootObserbationUid()).thenReturn(456L); - Collection observationContainerCollection = Arrays.asList(observationContainer); + Collection observationContainerCollection = List.of(observationContainer); // Call the method under test managerAggregationService.observationAggregation(labResult, edxLabInformationDto, observationContainerCollection); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerServiceTest.java index 6f2fd72b4..df177b1f7 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/manager/ManagerServiceTest.java @@ -53,36 +53,35 @@ class ManagerServiceTest { @Mock - private IObservationService observationService; + AuthUtil authUtil; + @Mock + private IObservationService observationService; @Mock - private IEdxLogService edxLogService; + private IEdxLogService edxLogService; @Mock - private IDataExtractionService dataExtractionService; + private IDataExtractionService dataExtractionService; @Mock - private NbsInterfaceRepository nbsInterfaceRepository; + private NbsInterfaceRepository nbsInterfaceRepository; @Mock - private IDecisionSupportService decisionSupportService; + private IDecisionSupportService decisionSupportService; @Mock - private ManagerUtil managerUtil; + private ManagerUtil managerUtil; @Mock - private KafkaManagerProducer kafkaManagerProducer; + private KafkaManagerProducer kafkaManagerProducer; @Mock - private IManagerAggregationService managerAggregationService; + private IManagerAggregationService managerAggregationService; @Mock - private ILabReportProcessing labReportProcessing; + private ILabReportProcessing labReportProcessing; @Mock - private IPageService pageService; + private IPageService pageService; @Mock - private IPamService pamService; + private IPamService pamService; @Mock - private IInvestigationNotificationService investigationNotificationService; + private IInvestigationNotificationService investigationNotificationService; @Mock private IManagerCacheService managerCacheService; - @InjectMocks private ManagerService managerService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -93,7 +92,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); SrteCache.programAreaCodesMap.clear(); SrteCache.jurisdictionCodeMap.clear(); @@ -103,7 +102,7 @@ void setUp() { void tearDown() { Mockito.reset(observationService, edxLogService, dataExtractionService, nbsInterfaceRepository, managerCacheService, decisionSupportService, managerUtil, kafkaManagerProducer, managerAggregationService, - labReportProcessing, pageService,pamService, investigationNotificationService, authUtil); + labReportProcessing, pageService, pamService, investigationNotificationService, authUtil); } @@ -117,7 +116,7 @@ void processDistribution_Test() throws DataProcessingConsumerException, JAXBExce String data = gson.toJson(labData); - // managerService.processDistribution(eventType, data); + // managerService.processDistribution(eventType, data); CompletableFuture mockedFuture = mock(CompletableFuture.class); when(managerCacheService.loadAndInitCachedValueAsync()).thenReturn(mockedFuture); when(mockedFuture.join()).thenReturn(null); // You can adjust this to simulate different behaviors @@ -135,7 +134,6 @@ void processDistribution_Test() throws DataProcessingConsumerException, JAXBExce when(managerAggregationService.processingObservationMatching(any(), any(), any())).thenReturn(edxLabInformationDto); - ObservationDto observationDto = new ObservationDto(); observationDto.setLocalId("LOCAL"); observationDto.setObservationUid(10L); @@ -508,7 +506,6 @@ void initiatingLabProcessing_Test_Investigation_Notification_Page() throws DataP .thenReturn(detail); - managerService.initiatingLabProcessing(publicHealthCaseFlowContainer); verify(nbsInterfaceRepository, times(1)).save(any()); } @@ -559,7 +556,6 @@ void initiatingLabProcessing_Error_1() throws DataProcessingException { .thenReturn(detail); - managerService.initiatingLabProcessing(publicHealthCaseFlowContainer); verify(nbsInterfaceRepository, times(1)).save(any()); } @@ -610,7 +606,6 @@ void initiatingLabProcessing_Error_2() throws DataProcessingException { .thenReturn(detail); - managerService.initiatingLabProcessing(publicHealthCaseFlowContainer); verify(nbsInterfaceRepository, times(1)).save(any()); } @@ -666,7 +661,6 @@ void initiatingLabProcessing_Error_3() throws DataProcessingException { .thenReturn(detailLog); - managerService.initiatingLabProcessing(publicHealthCaseFlowContainer); verify(nbsInterfaceRepository, times(1)).save(any()); } @@ -722,7 +716,6 @@ void initiatingLabProcessing_Error_4() throws DataProcessingException { .thenReturn(detailLog); - managerService.initiatingLabProcessing(publicHealthCaseFlowContainer); verify(nbsInterfaceRepository, times(1)).save(any()); } @@ -758,7 +751,6 @@ void processDistribution_Error_1() throws DataProcessingConsumerException, JAXBE when(managerAggregationService.processingObservationMatching(any(), any(), any())).thenReturn(edxLabInformationDto); - ObservationDto observationDto = new ObservationDto(); observationDto.setLocalId("LOCAL"); observationDto.setObservationUid(10L); @@ -767,7 +759,7 @@ void processDistribution_Error_1() throws DataProcessingConsumerException, JAXBE observationDto.setJurisdictionCd("A"); SrteCache.jurisdictionCodeMap.put("A", "A"); - when(observationService.processingLabResultContainer(any())) .thenThrow(new DataProcessingException("Invalid XML")); + when(observationService.processingLabResultContainer(any())).thenThrow(new DataProcessingException("Invalid XML")); managerService.processDistribution(eventType, data); @@ -806,7 +798,6 @@ void processDistribution_Error_2() throws DataProcessingConsumerException, JAXBE when(managerAggregationService.processingObservationMatching(any(), any(), any())).thenReturn(edxLabInformationDto); - ObservationDto observationDto = new ObservationDto(); observationDto.setLocalId("LOCAL"); observationDto.setObservationUid(10L); @@ -815,7 +806,7 @@ void processDistribution_Error_2() throws DataProcessingConsumerException, JAXBE observationDto.setJurisdictionCd("A"); SrteCache.jurisdictionCodeMap.put("A", "A"); - when(observationService.processingLabResultContainer(any())) .thenThrow(new DataProcessingException(EdxELRConstant.SQL_FIELD_TRUNCATION_ERROR_MSG)); + when(observationService.processingLabResultContainer(any())).thenThrow(new DataProcessingException(EdxELRConstant.SQL_FIELD_TRUNCATION_ERROR_MSG)); managerService.processDistribution(eventType, data); @@ -855,7 +846,6 @@ void processDistribution_Error_3() throws DataProcessingConsumerException, JAXBE when(managerAggregationService.processingObservationMatching(any(), any(), any())).thenReturn(edxLabInformationDto); - ObservationDto observationDto = new ObservationDto(); observationDto.setLocalId("LOCAL"); observationDto.setObservationUid(10L); @@ -864,7 +854,7 @@ void processDistribution_Error_3() throws DataProcessingConsumerException, JAXBE observationDto.setJurisdictionCd("A"); SrteCache.jurisdictionCodeMap.put("A", "A"); - when(observationService.processingLabResultContainer(any())) .thenThrow(new DataProcessingException(EdxELRConstant.SQL_FIELD_TRUNCATION_ERROR_MSG)); + when(observationService.processingLabResultContainer(any())).thenThrow(new DataProcessingException(EdxELRConstant.SQL_FIELD_TRUNCATION_ERROR_MSG)); managerService.processDistribution(eventType, data); @@ -905,7 +895,6 @@ void processDistribution_Error_4() throws DataProcessingConsumerException, JAXBE when(managerAggregationService.processingObservationMatching(any(), any(), any())).thenReturn(edxLabInformationDto); - ObservationDto observationDto = new ObservationDto(); observationDto.setLocalId("LOCAL"); observationDto.setObservationUid(10L); @@ -914,7 +903,7 @@ void processDistribution_Error_4() throws DataProcessingConsumerException, JAXBE observationDto.setJurisdictionCd("A"); SrteCache.jurisdictionCodeMap.put("A", "A"); - when(observationService.processingLabResultContainer(any())) .thenThrow(new DataProcessingException(EdxELRConstant.SQL_FIELD_TRUNCATION_ERROR_MSG)); + when(observationService.processingLabResultContainer(any())).thenThrow(new DataProcessingException(EdxELRConstant.SQL_FIELD_TRUNCATION_ERROR_MSG)); managerService.processDistribution(eventType, data); @@ -955,7 +944,6 @@ void processDistribution_Error_5() throws DataProcessingConsumerException, JAXBE when(managerAggregationService.processingObservationMatching(any(), any(), any())).thenReturn(edxLabInformationDto); - ObservationDto observationDto = new ObservationDto(); observationDto.setLocalId("LOCAL"); observationDto.setObservationUid(10L); @@ -964,7 +952,7 @@ void processDistribution_Error_5() throws DataProcessingConsumerException, JAXBE observationDto.setJurisdictionCd("A"); SrteCache.jurisdictionCodeMap.put("A", "A"); - when(observationService.processingLabResultContainer(any())) .thenThrow(new DataProcessingException(EdxELRConstant.SQL_FIELD_TRUNCATION_ERROR_MSG)); + when(observationService.processingLabResultContainer(any())).thenThrow(new DataProcessingException(EdxELRConstant.SQL_FIELD_TRUNCATION_ERROR_MSG)); managerService.processDistribution(eventType, data); @@ -1005,7 +993,6 @@ void processDistribution_Error_6() throws DataProcessingConsumerException, JAXBE when(managerAggregationService.processingObservationMatching(any(), any(), any())).thenReturn(edxLabInformationDto); - ObservationDto observationDto = new ObservationDto(); observationDto.setLocalId("LOCAL"); observationDto.setObservationUid(10L); @@ -1014,7 +1001,7 @@ void processDistribution_Error_6() throws DataProcessingConsumerException, JAXBE observationDto.setJurisdictionCd("A"); SrteCache.jurisdictionCodeMap.put("A", "A"); - when(observationService.processingLabResultContainer(any())) .thenThrow(new DataProcessingException(EdxELRConstant.DATE_VALIDATION)); + when(observationService.processingLabResultContainer(any())).thenThrow(new DataProcessingException(EdxELRConstant.DATE_VALIDATION)); managerService.processDistribution(eventType, data); @@ -1055,7 +1042,6 @@ void processDistribution_Error_7() throws DataProcessingConsumerException, JAXBE when(managerAggregationService.processingObservationMatching(any(), any(), any())).thenReturn(edxLabInformationDto); - ObservationDto observationDto = new ObservationDto(); observationDto.setLocalId("LOCAL"); observationDto.setObservationUid(10L); @@ -1064,7 +1050,7 @@ void processDistribution_Error_7() throws DataProcessingConsumerException, JAXBE observationDto.setJurisdictionCd("A"); SrteCache.jurisdictionCodeMap.put("A", "A"); - when(observationService.processingLabResultContainer(any())) .thenThrow(new DataProcessingException("BLAH")); + when(observationService.processingLabResultContainer(any())).thenThrow(new DataProcessingException("BLAH")); managerService.processDistribution(eventType, data); @@ -1072,4 +1058,5 @@ void processDistribution_Error_7() throws DataProcessingConsumerException, JAXBE verify(kafkaManagerProducer, times(1)).sendDataEdxActivityLog(any()); } + } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/material/MaterialServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/material/MaterialServiceTest.java index aa33afb61..547a56609 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/material/MaterialServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/material/MaterialServiceTest.java @@ -233,7 +233,7 @@ private List getManMaterialsDto() { return manufacturedMaterials; } - private List getEntityIdDto() { + private List getEntityIdDto() { EntityIdDto entityIdDto = new EntityIdDto(); entityIdDto.setEntityUid(2L); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/notification/NotificationServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/notification/NotificationServiceTest.java index 7c2f53754..aac27cd21 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/notification/NotificationServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/notification/NotificationServiceTest.java @@ -27,8 +27,7 @@ import java.util.Collection; import java.util.Optional; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.when; @@ -73,7 +72,7 @@ void getNotificationById() { void getNotificationByIdNull() { Long uid = 1L; when(notificationRepository.findById(uid)).thenReturn(Optional.empty()); - assertEquals(null, notificationService.getNotificationById(uid)); + assertNull(notificationService.getNotificationById(uid)); } private Notification getNotification() { @@ -89,7 +88,7 @@ void saveNotification() { when(notificationRepository.save(Mockito.any())).thenReturn(null); Long result = notificationService.saveNotification(notificationContainer); - assertEquals(1l, result); + assertEquals(1L, result); } private NotificationDto getNotificationDto() { @@ -147,21 +146,21 @@ private NotificationProxyContainer getNotificationProxy() { NotificationProxyContainer notificationProxyContainer = new NotificationProxyContainer(); notificationProxyContainer.setTheNotificationContainer(getNotificationContainer()); notificationProxyContainer.setThePublicHealthCaseContainer(getPublicHealthContainer()); - return notificationProxyContainer; + return notificationProxyContainer; } private NotificationProxyContainer getNotificationProxyDirty() { NotificationProxyContainer notificationProxyContainer = new NotificationProxyContainer(); notificationProxyContainer.setTheNotificationContainer(getNotificationContainerDirty()); notificationProxyContainer.setThePublicHealthCaseContainer(getPublicHealthContainer()); - return notificationProxyContainer; + return notificationProxyContainer; } private NotificationProxyContainer getNotificationProxyNull() { NotificationProxyContainer notificationProxyContainer = new NotificationProxyContainer(); notificationProxyContainer.setTheNotificationContainer(null); notificationProxyContainer.setThePublicHealthCaseContainer(getPublicHealthContainer()); - return notificationProxyContainer; + return notificationProxyContainer; } @Test @@ -170,7 +169,7 @@ void checkForExistingNotification() throws DataProcessingException { when(notificationRepository.getCountOfExistingNotifications(1L, NEDSSConstant.CLASS_CD_OBS)).thenReturn(1L); boolean result = notificationService.checkForExistingNotification(labResultProxyContainer); - assertEquals(true, result); + assertTrue(result); } @Test @@ -179,7 +178,7 @@ void checkForExistingNotificationFalse() throws DataProcessingException { when(notificationRepository.getCountOfExistingNotifications(1L, NEDSSConstant.CLASS_CD_OBS)).thenReturn(0L); boolean result = notificationService.checkForExistingNotification(labResultProxyContainer); - assertEquals(false, result); + assertFalse(result); } @Test @@ -222,7 +221,8 @@ void setNotificationProxyIsNull() { assertThrows(DataProcessingException.class, () -> notificationService.setNotificationProxy(null)); } - @Test void setNotificationProxy() throws DataProcessingException { + @Test + void setNotificationProxy() throws DataProcessingException { when(propertyUtil.isHIVProgramArea(any())).thenReturn(true); when(prepareAssocModelHelper.prepareVO(any(), any(), any(), any(), any(), any())).thenReturn(getNotificationDto()); @@ -236,7 +236,8 @@ void setNotificationProxyIsNull() { assertEquals(1L, notificationService.setNotificationProxy(getNotificationProxy())); } - @Test void setNotificationProxyDirty() throws DataProcessingException { + @Test + void setNotificationProxyDirty() throws DataProcessingException { when(propertyUtil.isHIVProgramArea(any())).thenReturn(true); when(prepareAssocModelHelper.prepareVO(any(), any(), any(), any(), any(), any())).thenReturn(getNotificationDto()); @@ -250,7 +251,8 @@ void setNotificationProxyIsNull() { assertEquals(1L, notificationService.setNotificationProxy(getNotificationProxyDirty())); } - @Test void setNotificationProxyNull() { + @Test + void setNotificationProxyNull() { assertThrows(DataProcessingException.class, () -> notificationService.setNotificationProxy(getNotificationProxyNull())); } } \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/EdxDocumentServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/EdxDocumentServiceTest.java index 69e10a965..b59f1d5a3 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/EdxDocumentServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/EdxDocumentServiceTest.java @@ -24,12 +24,12 @@ import static org.mockito.Mockito.*; class EdxDocumentServiceTest { + @Mock + AuthUtil authUtil; @Mock private EdxDocumentRepository edxDocumentRepository; @InjectMocks private EdxDocumentService edxDocumentService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -40,7 +40,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationCodeServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationCodeServiceTest.java index f8dce83f3..dc79aaef4 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationCodeServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationCodeServiceTest.java @@ -34,6 +34,8 @@ import static org.mockito.Mockito.when; class ObservationCodeServiceTest { + @Mock + AuthUtil authUtil; @Mock private ISrteCodeObsService srteCodeObsService; @Mock @@ -42,8 +44,6 @@ class ObservationCodeServiceTest { private ObservationUtil observationUtil; @InjectMocks private ObservationCodeService observationCodeService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -54,7 +54,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -161,7 +161,7 @@ void deriveTheConditionCodeList_Test_3() throws DataProcessingException { when(observationUtil.getUid(any(), any(), any(), any(), any(), any(), any())).thenReturn(10L); - OrganizationContainer orgConn =new OrganizationContainer(); + OrganizationContainer orgConn = new OrganizationContainer(); var enCol = new ArrayList(); var en = new EntityIdDto(); en.setAssigningAuthorityCd(null); @@ -205,7 +205,7 @@ void deriveTheConditionCodeList_Test_4() throws DataProcessingException { when(observationUtil.getUid(any(), any(), any(), any(), any(), any(), any())).thenThrow(new DataProcessingException("TEST")); - OrganizationContainer orgConn =new OrganizationContainer(); + OrganizationContainer orgConn = new OrganizationContainer(); var enCol = new ArrayList(); var en = new EntityIdDto(); en.setAssigningAuthorityCd(null); @@ -284,7 +284,7 @@ void deriveTheConditionCodeList_Test_5() throws DataProcessingException { when(observationUtil.getUid(any(), any(), any(), any(), any(), any(), any())).thenReturn(10L); - OrganizationContainer orgConn =new OrganizationContainer(); + OrganizationContainer orgConn = new OrganizationContainer(); var enCol = new ArrayList(); var en = new EntityIdDto(); en.setAssigningAuthorityCd(null); @@ -348,7 +348,7 @@ void deriveTheConditionCodeList_Test_Empty_1() throws DataProcessingException { when(observationUtil.getUid(any(), any(), any(), any(), any(), any(), any())).thenReturn(10L); - OrganizationContainer orgConn =new OrganizationContainer(); + OrganizationContainer orgConn = new OrganizationContainer(); var enCol = new ArrayList(); var en = new EntityIdDto(); en.setAssigningAuthorityCd(null); @@ -407,7 +407,7 @@ void deriveTheConditionCodeList_Test_Empty_2() throws DataProcessingException { when(observationUtil.getUid(any(), any(), any(), any(), any(), any(), any())).thenReturn(10L); - OrganizationContainer orgConn =new OrganizationContainer(); + OrganizationContainer orgConn = new OrganizationContainer(); var enCol = new ArrayList(); var en = new EntityIdDto(); en.setAssigningAuthorityCd(null); @@ -449,7 +449,6 @@ void deriveTheConditionCodeList_Test_Empty_3() throws DataProcessingException { codedCol.add(codedObs); - obsConn.setTheObsValueCodedDtoCollection(codedCol); obsConnCol.add(obsConn); labResultProxyVO.setTheObservationContainerCollection(obsConnCol); @@ -468,7 +467,7 @@ void deriveTheConditionCodeList_Test_Empty_3() throws DataProcessingException { when(observationUtil.getUid(any(), any(), any(), any(), any(), any(), any())).thenReturn(10L); - OrganizationContainer orgConn =new OrganizationContainer(); + OrganizationContainer orgConn = new OrganizationContainer(); var enCol = new ArrayList(); var en = new EntityIdDto(); en.setAssigningAuthorityCd(null); @@ -501,14 +500,13 @@ void deriveTheConditionCodeList_Test_Empty_4() throws DataProcessingException { obsDt.setCd("CODE"); obsConn.setTheObservationDto(obsDt); - when(srteCodeObsService.getDefaultConditionForLabTest(eq("CODE"),any())).thenReturn("BLAH"); + when(srteCodeObsService.getDefaultConditionForLabTest(eq("CODE"), any())).thenReturn("BLAH"); var codedCol = new ArrayList(); var codedObs = new ObsValueCodedDto(); codedCol.add(codedObs); - obsConn.setTheObsValueCodedDtoCollection(codedCol); obsConnCol.add(obsConn); labResultProxyVO.setTheObservationContainerCollection(obsConnCol); @@ -527,7 +525,7 @@ void deriveTheConditionCodeList_Test_Empty_4() throws DataProcessingException { when(observationUtil.getUid(any(), any(), any(), any(), any(), any(), any())).thenReturn(10L); - OrganizationContainer orgConn =new OrganizationContainer(); + OrganizationContainer orgConn = new OrganizationContainer(); var enCol = new ArrayList(); var en = new EntityIdDto(); en.setAssigningAuthorityCd(null); @@ -565,7 +563,6 @@ void deriveTheConditionCodeList_Test_Empty_5_NONE() throws DataProcessingExcepti codedCol.add(codedObs); - obsConn.setTheObsValueCodedDtoCollection(codedCol); obsConnCol.add(obsConn); labResultProxyVO.setTheObservationContainerCollection(obsConnCol); @@ -584,7 +581,7 @@ void deriveTheConditionCodeList_Test_Empty_5_NONE() throws DataProcessingExcepti when(observationUtil.getUid(any(), any(), any(), any(), any(), any(), any())).thenReturn(10L); - OrganizationContainer orgConn =new OrganizationContainer(); + OrganizationContainer orgConn = new OrganizationContainer(); var enCol = new ArrayList(); var en = new EntityIdDto(); en.setAssigningAuthorityCd(null); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationMatchingServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationMatchingServiceTest.java index f44430d88..cbffaf039 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationMatchingServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationMatchingServiceTest.java @@ -33,14 +33,14 @@ import static org.mockito.Mockito.when; class ObservationMatchingServiceTest { + @Mock + AuthUtil authUtil; @Mock private ObservationMatchStoredProcRepository observationMatchStoredProcRepository; @Mock private ObservationRepository observationRepository; @InjectMocks private ObservationMatchingService observationMatchingService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -51,7 +51,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationServiceTest.java index 92e96ff1a..97e042500 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationServiceTest.java @@ -54,6 +54,8 @@ import static org.mockito.Mockito.*; class ObservationServiceTest { + @Mock + AuthUtil authUtil; @Mock private INNDActivityLogService nndActivityLogService; @Mock @@ -96,16 +98,11 @@ class ObservationServiceTest { private PrepareAssocModelHelper prepareAssocModelHelper; @Mock private IUidService uidService; - @Mock private IInvestigationService investigationService; - @InjectMocks private ObservationService observationService; - @Mock - AuthUtil authUtil; - @BeforeEach void setUp() { MockitoAnnotations.openMocks(this); @@ -115,8 +112,9 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } + @AfterEach void tearDown() { Mockito.reset(nndActivityLogService, messageLogService, observationRepositoryUtil, notificationService, @@ -204,8 +202,8 @@ void getObservationToLabResultContainer_ReturnData_ELRisTrue() throws DataProces when(observationRepositoryUtil.loadObject(obsUid)).thenReturn(observationContainer); // retrieveEntityFromParticipationForContainer - // - retrievePersonAndRoleFromParticipation - // - retrieveScopedPersons + // - retrievePersonAndRoleFromParticipation + // - retrieveScopedPersons var patContainer = new PersonContainer(); var rolCol = new ArrayList(); var role = new RoleDto(); @@ -233,10 +231,9 @@ void getObservationToLabResultContainer_ReturnData_ELRisTrue() throws DataProces when(materialService.loadMaterialObject(14L)).thenReturn(new MaterialContainer()); - // retrieveActForLabResultContainer // - retrieveInterventionFromActRelationship - // NOTE: This will return intervention which is not relevant at the time this test is created + // NOTE: This will return intervention which is not relevant at the time this test is created // - retrieveObservationFromActRelationship // NEDSSConstant.ACT_TYPE_PROCESSING_DECISION @@ -485,8 +482,6 @@ void processingLabResultContainer_Success() throws DataProcessingException { labResult.setEDXDocumentCollection(edxCol); - - // - storeObservationVOCollection 1162 when(observationRepositoryUtil.saveObservation(obsCon)).thenReturn(12L); @@ -621,6 +616,7 @@ void testProcessObservationWithProcessingDecision_Exception() throws DataProcess assertEquals("Test Exception", exception.getMessage()); } + @Test void testPerformOrderTestStateTransition_NewWithProcessingDecision() throws DataProcessingException { LabResultProxyContainer labResultProxyVO = mock(LabResultProxyContainer.class); @@ -634,7 +630,7 @@ void testPerformOrderTestStateTransition_NewWithProcessingDecision() throws Data observationService.performOrderTestStateTransition(labResultProxyVO, orderTest, false); - verify(prepareAssocModelHelper).prepareVO(any(),any(), + verify(prepareAssocModelHelper).prepareVO(any(), any(), any(), any(), any(), any()); } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationSummaryServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationSummaryServiceTest.java index 4d1b4f13f..47f42f7bd 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationSummaryServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/observation/ObservationSummaryServiceTest.java @@ -32,6 +32,8 @@ import static org.mockito.Mockito.*; class ObservationSummaryServiceTest { + @Mock + AuthUtil authUtil; @Mock private Observation_SummaryRepository observationSummaryRepository; @Mock @@ -40,8 +42,6 @@ class ObservationSummaryServiceTest { private QueryHelper queryHelper; @InjectMocks private ObservationSummaryService observationSummaryService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -52,7 +52,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -81,7 +81,7 @@ void findAllActiveLabReportUidListForManage_Success() throws DataProcessingExcep } @Test - void findAllActiveLabReportUidListForManage_Exception() { + void findAllActiveLabReportUidListForManage_Exception() { long investUid = 10L; String where = ""; @@ -383,7 +383,7 @@ void getTestAndSusceptibilities_Sucess() { any(LabReportSummaryContainer.class), eq("REFR"), eq(11L))) .thenReturn(uidSumCol); - var resTestSumCol = new ArrayList(); + var resTestSumCol = new ArrayList(); var resTestSum = new ResultedTestSummaryContainer(); resTestSumCol.add(resTestSum); when(customRepository.getSusceptibilityResultedTestSummary("COMP", 12L)) @@ -430,7 +430,7 @@ void getAssociatedInvList_Success_2() throws DataProcessingException { } @Test - void getAssociatedInvList_Exception() { + void getAssociatedInvList_Exception() { long uid = 10L; String sourceClassCode = "TEST"; @@ -438,7 +438,6 @@ void getAssociatedInvList_Exception() { .thenThrow(new RuntimeException("TEST")); - DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { observationSummaryService.getAssociatedInvList(uid, sourceClassCode); }); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/organization/OrganizationServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/organization/OrganizationServiceTest.java index 511a83031..28f8a9888 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/organization/OrganizationServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/organization/OrganizationServiceTest.java @@ -37,6 +37,7 @@ class OrganizationServiceTest { void setUp() { MockitoAnnotations.openMocks(this); } + @AfterEach void tearDown() { Mockito.reset(iOrganizationMatchingServiceMock); @@ -45,9 +46,9 @@ void tearDown() { @Test void processingOrganization_with_role_sf() throws DataProcessingConsumerException { - LabResultProxyContainer labResultProxyContainer= new LabResultProxyContainer(); - Collection theOrganizationContainerCollection= new ArrayList<>(); - OrganizationContainer organizationContainer= new OrganizationContainer(); + LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); + Collection theOrganizationContainerCollection = new ArrayList<>(); + OrganizationContainer organizationContainer = new OrganizationContainer(); //set role organizationContainer.setRole(EdxELRConstant.ELR_SENDING_FACILITY_CD); labResultProxyContainer.setSendingFacilityUid(123L); @@ -61,34 +62,35 @@ void processingOrganization_with_role_sf() throws DataProcessingConsumerExceptio @Test void processingOrganization_with_role_op() throws DataProcessingConsumerException, DataProcessingException { - LabResultProxyContainer labResultProxyContainer= new LabResultProxyContainer(); - Collection theOrganizationContainerCollection= new ArrayList<>(); - OrganizationContainer organizationContainer= new OrganizationContainer(); + LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); + Collection theOrganizationContainerCollection = new ArrayList<>(); + OrganizationContainer organizationContainer = new OrganizationContainer(); //set role organizationContainer.setRole(EdxELRConstant.ELR_OP_CD); theOrganizationContainerCollection.add(organizationContainer); labResultProxyContainer.setTheOrganizationContainerCollection(theOrganizationContainerCollection); - EDXActivityDetailLogDto eDXActivityDetailLogDto= new EDXActivityDetailLogDto(); + EDXActivityDetailLogDto eDXActivityDetailLogDto = new EDXActivityDetailLogDto(); eDXActivityDetailLogDto.setRecordId("123"); when(iOrganizationMatchingServiceMock.getMatchingOrganization(organizationContainer)).thenReturn(eDXActivityDetailLogDto); OrganizationContainer organizationContainerResult = organizationService.processingOrganization(labResultProxyContainer); assertNotNull(organizationContainerResult); } + @Test void processingOrganization_with_role_null() throws DataProcessingConsumerException, DataProcessingException { - LabResultProxyContainer labResultProxyContainer= new LabResultProxyContainer(); - Collection theOrganizationContainerCollection= new ArrayList<>(); - OrganizationContainer organizationContainer= new OrganizationContainer(); + LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); + Collection theOrganizationContainerCollection = new ArrayList<>(); + OrganizationContainer organizationContainer = new OrganizationContainer(); //set role organizationContainer.setRole(null); theOrganizationContainerCollection.add(organizationContainer); labResultProxyContainer.setTheOrganizationContainerCollection(theOrganizationContainerCollection); - EDXActivityDetailLogDto eDXActivityDetailLogDto= new EDXActivityDetailLogDto(); + EDXActivityDetailLogDto eDXActivityDetailLogDto = new EDXActivityDetailLogDto(); eDXActivityDetailLogDto.setRecordId("123"); when(iOrganizationMatchingServiceMock.getMatchingOrganization(organizationContainer)).thenReturn(eDXActivityDetailLogDto); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/other/DataExtractionServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/other/DataExtractionServiceTest.java index c8dcdf932..175243378 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/other/DataExtractionServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/other/DataExtractionServiceTest.java @@ -1,14 +1,16 @@ package gov.cdc.dataprocessing.service.implementation.other; import com.google.gson.Gson; +import gov.cdc.dataprocessing.constant.elr.EdxELRConstant; import gov.cdc.dataprocessing.constant.enums.NbsInterfaceStatus; -import gov.cdc.dataprocessing.exception.DataProcessingConsumerException; import gov.cdc.dataprocessing.exception.DataProcessingException; import gov.cdc.dataprocessing.model.container.model.LabResultProxyContainer; +import gov.cdc.dataprocessing.model.container.model.ObservationContainer; import gov.cdc.dataprocessing.model.container.model.OrganizationContainer; import gov.cdc.dataprocessing.model.dto.entity.EntityIdDto; import gov.cdc.dataprocessing.model.dto.entity.RoleDto; import gov.cdc.dataprocessing.model.dto.lab_result.EdxLabInformationDto; +import gov.cdc.dataprocessing.model.dto.observation.ObservationDto; import gov.cdc.dataprocessing.model.dto.organization.OrganizationDto; import gov.cdc.dataprocessing.model.dto.organization.OrganizationNameDto; import gov.cdc.dataprocessing.model.dto.participation.ParticipationDto; @@ -32,9 +34,9 @@ import java.math.BigInteger; import java.sql.Timestamp; import java.util.ArrayList; +import java.util.List; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.*; class DataExtractionServiceTest { @@ -65,12 +67,12 @@ void setUp() { AuthUser user = new AuthUser(); user.setAuthUserUid(1L); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @Test - void testParsingDataToObjectSuccess() throws DataProcessingConsumerException, JAXBException, DataProcessingException { + void testParsingDataToObjectSuccess() throws JAXBException, DataProcessingException { Gson gson = new Gson(); NbsInterfaceModel nbsInterfaceModel = null; nbsInterfaceModel = gson.fromJson(getData(), NbsInterfaceModel.class); @@ -400,8 +402,8 @@ private String getDataThrowsException() { } private String getDataThrowGreaterThanOnePatientException() { - String data = "{\"nbsInterfaceUid\":10000052,\"payload\":\"\\u003c?xml version\\u003d\\\"1.0\\\" encoding\\u003d\\\"UTF-8\\\" standalone\\u003d\\\"yes\\\"?\\u003e\\n\\u003cContainer xmlns\\u003d\\\"http://www.cdc.gov/NEDSS\\\"\\u003e\\n \\u003cHL7LabReport\\u003e\\n \\u003cHL7MSH\\u003e\\n \\u003cFieldSeparator\\u003e|\\u003c/FieldSeparator\\u003e\\n \\u003cEncodingCharacters\\u003e^~\\\\\\u0026amp;\\u003c/EncodingCharacters\\u003e\\n \\u003cSendingApplication\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP-CORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/SendingApplication\\u003e\\n \\u003cSendingFacility\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/SendingFacility\\u003e\\n \\u003cReceivingApplication\\u003e\\n \\u003cHL7NamespaceID\\u003eALDOH\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/ReceivingApplication\\u003e\\n \\u003cReceivingFacility\\u003e\\n \\u003cHL7NamespaceID\\u003eAL\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/ReceivingFacility\\u003e\\n \\u003cDateTimeOfMessage\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e4\\u003c/month\\u003e\\n \\u003cday\\u003e4\\u003c/day\\u003e\\n \\u003chours\\u003e1\\u003c/hours\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/DateTimeOfMessage\\u003e\\n \\u003cSecurity\\u003e\\u003c/Security\\u003e\\n \\u003cMessageType\\u003e\\n \\u003cMessageCode\\u003eORU\\u003c/MessageCode\\u003e\\n \\u003cTriggerEvent\\u003eR01\\u003c/TriggerEvent\\u003e\\n \\u003cMessageStructure\\u003eORU_R01\\u003c/MessageStructure\\u003e\\n \\u003c/MessageType\\u003e\\n \\u003cMessageControlID\\u003e20120509010020114_251.2\\u003c/MessageControlID\\u003e\\n \\u003cProcessingID\\u003e\\n \\u003cHL7ProcessingID\\u003eD\\u003c/HL7ProcessingID\\u003e\\n \\u003cHL7ProcessingMode\\u003e\\u003c/HL7ProcessingMode\\u003e\\n \\u003c/ProcessingID\\u003e\\n \\u003cVersionID\\u003e\\n \\u003cHL7VersionID\\u003e2.5.1\\u003c/HL7VersionID\\u003e\\n \\u003c/VersionID\\u003e\\n \\u003cAcceptAcknowledgmentType\\u003eNE\\u003c/AcceptAcknowledgmentType\\u003e\\n \\u003cApplicationAcknowledgmentType\\u003eNE\\u003c/ApplicationAcknowledgmentType\\u003e\\n \\u003cCountryCode\\u003eUSA\\u003c/CountryCode\\u003e\\n \\u003cMessageProfileIdentifier\\u003e\\n \\u003cHL7EntityIdentifier\\u003eV251_IG_LB_LABRPTPH_R1_INFORM_2010FEB\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7UniversalID\\u003e2.16.840.1.114222.4.3.2.5.2.5\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/MessageProfileIdentifier\\u003e\\n \\u003c/HL7MSH\\u003e\\n \\u003cHL7SoftwareSegment\\u003e\\n \\u003cSoftwareVendorOrganization\\u003e\\n \\u003cHL7OrganizationName\\u003eMirth Corp.\\u003c/HL7OrganizationName\\u003e\\n \\u003cHL7IDNumber/\\u003e\\n \\u003cHL7CheckDigit/\\u003e\\n \\u003c/SoftwareVendorOrganization\\u003e\\n \\u003cSoftwareCertifiedVersionOrReleaseNumber\\u003e2.0\\u003c/SoftwareCertifiedVersionOrReleaseNumber\\u003e\\n \\u003cSoftwareProductName\\u003eMirth Connect\\u003c/SoftwareProductName\\u003e\\n \\u003cSoftwareBinaryID\\u003e789654\\u003c/SoftwareBinaryID\\u003e\\n \\u003cSoftwareProductInformation/\\u003e\\n \\u003cSoftwareInstallDate\\u003e\\n \\u003cyear\\u003e2011\\u003c/year\\u003e\\n \\u003cmonth\\u003e1\\u003c/month\\u003e\\n \\u003cday\\u003e1\\u003c/day\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/SoftwareInstallDate\\u003e\\n \\u003c/HL7SoftwareSegment\\u003e\\n \\u003cHL7PATIENT_RESULT\\u003e\\n \\u003cPATIENT\\u003e\\n \\u003cPatientIdentification\\u003e\\n \\u003cSetIDPID\\u003e\\n \\u003cHL7SequenceID\\u003e1\\u003c/HL7SequenceID\\u003e\\n \\u003c/SetIDPID\\u003e\\n \\u003cPatientIdentifierList\\u003e\\n \\u003cHL7IDNumber\\u003e05540205114\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7AssigningAuthority\\u003e\\n \\u003cHL7NamespaceID\\u003eLABC\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/HL7AssigningAuthority\\u003e\\n \\u003cHL7IdentifierTypeCode\\u003ePN\\u003c/HL7IdentifierTypeCode\\u003e\\n \\u003c/PatientIdentifierList\\u003e\\n \\u003cPatientIdentifierList\\u003e\\n \\u003cHL7IDNumber\\u003e17485458372\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7AssigningAuthority\\u003e\\n \\u003cHL7NamespaceID\\u003eAssignAuth\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/HL7AssigningAuthority\\u003e\\n \\u003cHL7IdentifierTypeCode\\u003ePI\\u003c/HL7IdentifierTypeCode\\u003e\\n \\u003cHL7AssigningFacility\\u003e\\n \\u003cHL7NamespaceID\\u003eNE CLINIC\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e24D1040593\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/HL7AssigningFacility\\u003e\\n \\u003c/PatientIdentifierList\\u003e\\n \\u003cPatientName\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eDooley\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eFIRSTMAX251\\u003c/HL7GivenName\\u003e\\n \\u003c/PatientName\\u003e\\n \\u003cMothersMaidenName\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eMOTHER\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003ePATERSON\\u003c/HL7GivenName\\u003e\\n \\u003c/MothersMaidenName\\u003e\\n \\u003cDateTimeOfBirth\\u003e\\n \\u003cyear\\u003e1960\\u003c/year\\u003e\\n \\u003cmonth\\u003e11\\u003c/month\\u003e\\n \\u003cday\\u003e9\\u003c/day\\u003e\\n \\u003chours\\u003e20\\u003c/hours\\u003e\\n \\u003cminutes\\u003e25\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/DateTimeOfBirth\\u003e\\n \\u003cAdministrativeSex\\u003eF\\u003c/AdministrativeSex\\u003e\\n \\u003cRace\\u003e\\n \\u003cHL7Identifier\\u003eW\\u003c/HL7Identifier\\u003e\\n \\u003cHL7Text\\u003eWHITE\\u003c/HL7Text\\u003e\\n \\u003cHL7NameofCodingSystem\\u003eHL70005\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003c/Race\\u003e\\n \\u003cPatientAddress\\u003e\\n \\u003cHL7StreetAddress\\u003e\\n \\u003cHL7StreetOrMailingAddress\\u003e5000 Staples Dr\\u003c/HL7StreetOrMailingAddress\\u003e\\n \\u003c/HL7StreetAddress\\u003e\\n \\u003cHL7OtherDesignation\\u003eAPT100\\u003c/HL7OtherDesignation\\u003e\\n \\u003cHL7City\\u003eSOMECITY\\u003c/HL7City\\u003e\\n \\u003cHL7StateOrProvince\\u003eME\\u003c/HL7StateOrProvince\\u003e\\n \\u003cHL7ZipOrPostalCode\\u003e30342\\u003c/HL7ZipOrPostalCode\\u003e\\n \\u003cHL7AddressType\\u003eH\\u003c/HL7AddressType\\u003e\\n \\u003c/PatientAddress\\u003e\\n \\u003cBirthOrder/\\u003e\\n \\u003c/PatientIdentification\\u003e\\n \\u003cNextofKinAssociatedParties\\u003e\\n \\u003cSetIDNK1\\u003e1\\u003c/SetIDNK1\\u003e\\n \\u003cName\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eTESTNOK114B\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eFIRSTNOK1\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eX\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/Name\\u003e\\n \\u003cRelationship\\u003e\\n \\u003cHL7Identifier\\u003eFTH\\u003c/HL7Identifier\\u003e\\n \\u003c/Relationship\\u003e\\n \\u003cAddress\\u003e\\n \\u003cHL7StreetAddress\\u003e\\n \\u003cHL7StreetOrMailingAddress\\u003e12 MAIN STREET\\u003c/HL7StreetOrMailingAddress\\u003e\\n \\u003c/HL7StreetAddress\\u003e\\n \\u003cHL7OtherDesignation\\u003eSUITE 16\\u003c/HL7OtherDesignation\\u003e\\n \\u003cHL7City\\u003eCOLUMBIA\\u003c/HL7City\\u003e\\n \\u003cHL7StateOrProvince\\u003eSC\\u003c/HL7StateOrProvince\\u003e\\n \\u003cHL7ZipOrPostalCode\\u003e30329\\u003c/HL7ZipOrPostalCode\\u003e\\n \\u003cHL7Country\\u003eUSA\\u003c/HL7Country\\u003e\\n \\u003cHL7CountyParishCode\\u003eRICHLAND\\u003c/HL7CountyParishCode\\u003e\\n \\u003c/Address\\u003e\\n \\u003cPhoneNumber\\u003e\\n \\u003cHL7CountryCode/\\u003e\\n \\u003cHL7AreaCityCode\\u003e\\n \\u003cHL7Numeric\\u003e803\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7AreaCityCode\\u003e\\n \\u003cHL7LocalNumber\\u003e\\n \\u003cHL7Numeric\\u003e5551212\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7LocalNumber\\u003e\\n \\u003cHL7Extension\\u003e\\n \\u003cHL7Numeric\\u003e123\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7Extension\\u003e\\n \\u003c/PhoneNumber\\u003e\\n \\u003c/NextofKinAssociatedParties\\u003e\\n \\u003c/PATIENT\\u003e\\n \\u003cORDER_OBSERVATION\\u003e\\n \\u003cObservationRequest\\u003e\\n \\u003cSetIDOBR\\u003e\\n \\u003cHL7SequenceID\\u003e1\\u003c/HL7SequenceID\\u003e\\n \\u003c/SetIDOBR\\u003e\\n \\u003cFillerOrderNumber\\u003e\\n \\u003cHL7EntityIdentifier\\u003e20120601114\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/FillerOrderNumber\\u003e\\n \\u003cUniversalServiceIdentifier\\u003e\\n \\u003cHL7Identifier\\u003e778-9\\u003c/HL7Identifier\\u003e\\n \\u003cHL7Text\\u003eORGANISM COUNT\\u003c/HL7Text\\u003e\\n \\u003cHL7NameofCodingSystem\\u003eLN\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003cHL7AlternateIdentifier\\u003e080186\\u003c/HL7AlternateIdentifier\\u003e\\n \\u003cHL7AlternateText\\u003eCULTURE\\u003c/HL7AlternateText\\u003e\\n \\u003c/UniversalServiceIdentifier\\u003e\\n \\u003cObservationDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/ObservationDateTime\\u003e\\n \\u003cObservationEndDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/ObservationEndDateTime\\u003e\\n \\u003cCollectorIdentifier\\u003e\\n \\u003cHL7IDNumber\\u003e342384\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eJONES\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eSUSAN\\u003c/HL7GivenName\\u003e\\n \\u003c/CollectorIdentifier\\u003e\\n \\u003cOrderingProvider\\u003e\\n \\u003cHL7IDNumber\\u003e46466\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eBRENTNALL\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eGERRY\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eSR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/OrderingProvider\\u003e\\n \\u003cOrderCallbackPhoneNumber\\u003e\\n \\u003cHL7CountryCode/\\u003e\\n \\u003cHL7AreaCityCode\\u003e\\n \\u003cHL7Numeric\\u003e256\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7AreaCityCode\\u003e\\n \\u003cHL7LocalNumber\\u003e\\n \\u003cHL7Numeric\\u003e2495780\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7LocalNumber\\u003e\\n \\u003cHL7Extension/\\u003e\\n \\u003c/OrderCallbackPhoneNumber\\u003e\\n \\u003cResultsRptStatusChngDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e4\\u003c/month\\u003e\\n \\u003cday\\u003e4\\u003c/day\\u003e\\n \\u003chours\\u003e1\\u003c/hours\\u003e\\n \\u003cminutes\\u003e39\\u003c/minutes\\u003e\\n \\u003cseconds\\u003e0\\u003c/seconds\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/ResultsRptStatusChngDateTime\\u003e\\n \\u003cResultStatus\\u003eF\\u003c/ResultStatus\\u003e\\n \\u003cResultCopiesTo\\u003e\\n \\u003cHL7IDNumber\\u003e46214\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eMATHIS\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eGERRY\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eSR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/ResultCopiesTo\\u003e\\n \\u003cResultCopiesTo\\u003e\\n \\u003cHL7IDNumber\\u003e44582\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eJONES\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTHOMAS\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eIII\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/ResultCopiesTo\\u003e\\n \\u003cResultCopiesTo\\u003e\\n \\u003cHL7IDNumber\\u003e46111\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eMARTIN\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eJERRY\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eL\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/ResultCopiesTo\\u003e\\n \\u003cReasonforStudy\\u003e\\n \\u003cHL7Identifier\\u003e12365-4\\u003c/HL7Identifier\\u003e\\n \\u003cHL7Text\\u003eTOTALLY CRAZY\\u003c/HL7Text\\u003e\\n \\u003cHL7NameofCodingSystem\\u003eI9\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003c/ReasonforStudy\\u003e\\n \\u003cPrincipalResultInterpreter\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e22582\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eJONES\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTOM\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eL\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/PrincipalResultInterpreter\\u003e\\n \\u003cAssistantResultInterpreter\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e22582\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eMOORE\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTHOMAS\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eIII\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/AssistantResultInterpreter\\u003e\\n \\u003cTechnician\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e44\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eJONES\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eSAM\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eA\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eMR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMT\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/Technician\\u003e\\n \\u003cTranscriptionist\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e82\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eJONES\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTHOMASINA\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE ANN\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eII\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eMS\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eRA\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/Transcriptionist\\u003e\\n \\u003cNumberofSampleContainers/\\u003e\\n \\u003c/ObservationRequest\\u003e\\n \\u003cPatientResultOrderObservation/\\u003e\\n \\u003cPatientResultOrderSPMObservation\\u003e\\n \\u003cSPECIMEN\\u003e\\n \\u003cSPECIMEN\\u003e\\n \\u003cSetIDSPM\\u003e\\n\\u003cHL7SequenceID\\u003e1\\u003c/HL7SequenceID\\u003e\\n \\u003c/SetIDSPM\\u003e\\n \\u003cSpecimenID\\u003e\\n\\u003cHL7FillerAssignedIdentifier\\u003e\\n \\u003cHL7EntityIdentifier\\u003e56789\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n\\u003c/HL7FillerAssignedIdentifier\\u003e\\n \\u003c/SpecimenID\\u003e\\n \\u003cSpecimenParentIDs\\u003e\\n\\u003cHL7FillerAssignedIdentifier\\u003e\\n \\u003cHL7EntityIdentifier\\u003e20120601114\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n\\u003c/HL7FillerAssignedIdentifier\\u003e\\n \\u003c/SpecimenParentIDs\\u003e\\n \\u003cSpecimenType\\u003e\\n\\u003cHL7AlternateIdentifier\\u003eBLD\\u003c/HL7AlternateIdentifier\\u003e\\n\\u003cHL7AlternateText\\u003eBLOOD\\u003c/HL7AlternateText\\u003e\\n\\u003cHL7NameofAlternateCodingSystem\\u003eL\\u003c/HL7NameofAlternateCodingSystem\\u003e\\n \\u003c/SpecimenType\\u003e\\n \\u003cSpecimenSourceSite\\u003e\\n\\u003cHL7Identifier\\u003eLA\\u003c/HL7Identifier\\u003e\\n\\u003cHL7NameofCodingSystem\\u003eHL70070\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003c/SpecimenSourceSite\\u003e\\n \\u003cGroupedSpecimenCount/\\u003e\\n \\u003cSpecimenDescription\\u003eSOURCE NOT SPECIFIED\\u003c/SpecimenDescription\\u003e\\n \\u003cSpecimenCollectionDateTime\\u003e\\n\\u003cHL7RangeStartDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n\\u003c/HL7RangeStartDateTime\\u003e\\n\\u003cHL7RangeEndDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n\\u003c/HL7RangeEndDateTime\\u003e\\n \\u003c/SpecimenCollectionDateTime\\u003e\\n \\u003cSpecimenReceivedDateTime\\u003e\\n\\u003cyear\\u003e2006\\u003c/year\\u003e\\n\\u003cmonth\\u003e3\\u003c/month\\u003e\\n\\u003cday\\u003e25\\u003c/day\\u003e\\n\\u003chours\\u003e1\\u003c/hours\\u003e\\n\\u003cminutes\\u003e37\\u003c/minutes\\u003e\\n\\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/SpecimenReceivedDateTime\\u003e\\n \\u003cNumberOfSpecimenContainers/\\u003e\\n \\u003c/SPECIMEN\\u003e\\n \\u003c/SPECIMEN\\u003e\\n \\u003c/PatientResultOrderSPMObservation\\u003e\\n \\u003c/ORDER_OBSERVATION\\u003e\\n \\u003c/HL7PATIENT_RESULT\\u003e\\n \\u003cHL7PATIENT_RESULT\\u003e\\n \\u003cPATIENT\\u003e\\n \\u003cPatientIdentification\\u003e\\n \\u003cSetIDPID\\u003e\\n \\u003cHL7SequenceID\\u003e2\\u003c/HL7SequenceID\\u003e\\n \\u003c/SetIDPID\\u003e\\n \\u003cPatientIdentifierList\\u003e\\n \\u003cHL7IDNumber\\u003e05540205114\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7AssigningAuthority\\u003e\\n \\u003cHL7NamespaceID\\u003eLABC\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/HL7AssigningAuthority\\u003e\\n \\u003cHL7IdentifierTypeCode\\u003ePN\\u003c/HL7IdentifierTypeCode\\u003e\\n \\u003c/PatientIdentifierList\\u003e\\n \\u003cPatientIdentifierList\\u003e\\n \\u003cHL7IDNumber\\u003e17485458372\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7AssigningAuthority\\u003e\\n \\u003cHL7NamespaceID\\u003eAssignAuth\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/HL7AssigningAuthority\\u003e\\n \\u003cHL7IdentifierTypeCode\\u003ePI\\u003c/HL7IdentifierTypeCode\\u003e\\n \\u003cHL7AssigningFacility\\u003e\\n \\u003cHL7NamespaceID\\u003eNE CLINIC\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e24D1040593\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/HL7AssigningFacility\\u003e\\n \\u003c/PatientIdentifierList\\u003e\\n \\u003cPatientName\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eTorphy\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eFIRSTMAX251\\u003c/HL7GivenName\\u003e\\n \\u003c/PatientName\\u003e\\n \\u003cMothersMaidenName\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eMOTHER\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003ePATERSON\\u003c/HL7GivenName\\u003e\\n \\u003c/MothersMaidenName\\u003e\\n \\u003cDateTimeOfBirth\\u003e\\n \\u003cyear\\u003e1960\\u003c/year\\u003e\\n \\u003cmonth\\u003e11\\u003c/month\\u003e\\n \\u003cday\\u003e9\\u003c/day\\u003e\\n \\u003chours\\u003e20\\u003c/hours\\u003e\\n \\u003cminutes\\u003e25\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/DateTimeOfBirth\\u003e\\n \\u003cAdministrativeSex\\u003eF\\u003c/AdministrativeSex\\u003e\\n \\u003cRace\\u003e\\n \\u003cHL7Identifier\\u003eW\\u003c/HL7Identifier\\u003e\\n \\u003cHL7Text\\u003eWHITE\\u003c/HL7Text\\u003e\\n \\u003cHL7NameofCodingSystem\\u003eHL70005\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003c/Race\\u003e\\n \\u003cPatientAddress\\u003e\\n \\u003cHL7StreetAddress\\u003e\\n \\u003cHL7StreetOrMailingAddress\\u003e5000 Staples Dr\\u003c/HL7StreetOrMailingAddress\\u003e\\n \\u003c/HL7StreetAddress\\u003e\\n \\u003cHL7OtherDesignation\\u003eAPT100\\u003c/HL7OtherDesignation\\u003e\\n \\u003cHL7City\\u003eSOMECITY\\u003c/HL7City\\u003e\\n \\u003cHL7StateOrProvince\\u003eME\\u003c/HL7StateOrProvince\\u003e\\n \\u003cHL7ZipOrPostalCode\\u003e30342\\u003c/HL7ZipOrPostalCode\\u003e\\n \\u003cHL7AddressType\\u003eH\\u003c/HL7AddressType\\u003e\\n \\u003c/PatientAddress\\u003e\\n \\u003cBirthOrder/\\u003e\\n \\u003c/PatientIdentification\\u003e\\n \\u003cNextofKinAssociatedParties\\u003e\\n \\u003cSetIDNK1\\u003e1\\u003c/SetIDNK1\\u003e\\n \\u003cName\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eTESTNOK114B\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eFIRSTNOK1\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eX\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/Name\\u003e\\n \\u003cRelationship\\u003e\\n \\u003cHL7Identifier\\u003eFTH\\u003c/HL7Identifier\\u003e\\n \\u003c/Relationship\\u003e\\n \\u003cAddress\\u003e\\n \\u003cHL7StreetAddress\\u003e\\n \\u003cHL7StreetOrMailingAddress\\u003e12 MAIN STREET\\u003c/HL7StreetOrMailingAddress\\u003e\\n \\u003c/HL7StreetAddress\\u003e\\n \\u003cHL7OtherDesignation\\u003eSUITE 16\\u003c/HL7OtherDesignation\\u003e\\n \\u003cHL7City\\u003eCOLUMBIA\\u003c/HL7City\\u003e\\n \\u003cHL7StateOrProvince\\u003eSC\\u003c/HL7StateOrProvince\\u003e\\n \\u003cHL7ZipOrPostalCode\\u003e30329\\u003c/HL7ZipOrPostalCode\\u003e\\n \\u003cHL7Country\\u003eUSA\\u003c/HL7Country\\u003e\\n \\u003cHL7CountyParishCode\\u003eRICHLAND\\u003c/HL7CountyParishCode\\u003e\\n \\u003c/Address\\u003e\\n \\u003cPhoneNumber\\u003e\\n \\u003cHL7CountryCode/\\u003e\\n \\u003cHL7AreaCityCode\\u003e\\n \\u003cHL7Numeric\\u003e803\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7AreaCityCode\\u003e\\n \\u003cHL7LocalNumber\\u003e\\n \\u003cHL7Numeric\\u003e5551212\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7LocalNumber\\u003e\\n \\u003cHL7Extension\\u003e\\n \\u003cHL7Numeric\\u003e123\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7Extension\\u003e\\n \\u003c/PhoneNumber\\u003e\\n \\u003c/NextofKinAssociatedParties\\u003e\\n \\u003c/PATIENT\\u003e\\n \\u003cORDER_OBSERVATION\\u003e\\n \\u003cObservationRequest\\u003e\\n \\u003cSetIDOBR\\u003e\\n \\u003cHL7SequenceID\\u003e1\\u003c/HL7SequenceID\\u003e\\n \\u003c/SetIDOBR\\u003e\\n \\u003cFillerOrderNumber\\u003e\\n \\u003cHL7EntityIdentifier\\u003e20120601114\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/FillerOrderNumber\\u003e\\n \\u003cUniversalServiceIdentifier\\u003e\\n \\u003cHL7Identifier\\u003e355-9\\u003c/HL7Identifier\\u003e\\n \\u003cHL7Text\\u003eORGANISM COUNT\\u003c/HL7Text\\u003e\\n \\u003cHL7NameofCodingSystem\\u003eLN\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003cHL7AlternateIdentifier\\u003e080186\\u003c/HL7AlternateIdentifier\\u003e\\n \\u003cHL7AlternateText\\u003eCULTURE\\u003c/HL7AlternateText\\u003e\\n \\u003c/UniversalServiceIdentifier\\u003e\\n \\u003cObservationDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/ObservationDateTime\\u003e\\n \\u003cObservationEndDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/ObservationEndDateTime\\u003e\\n \\u003cCollectorIdentifier\\u003e\\n \\u003cHL7IDNumber\\u003e342384\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eJONES\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eSUSAN\\u003c/HL7GivenName\\u003e\\n \\u003c/CollectorIdentifier\\u003e\\n \\u003cOrderingProvider\\u003e\\n \\u003cHL7IDNumber\\u003e46466\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eBRENTNALL\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eGERRY\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eSR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/OrderingProvider\\u003e\\n \\u003cOrderCallbackPhoneNumber\\u003e\\n \\u003cHL7CountryCode/\\u003e\\n \\u003cHL7AreaCityCode\\u003e\\n \\u003cHL7Numeric\\u003e256\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7AreaCityCode\\u003e\\n \\u003cHL7LocalNumber\\u003e\\n \\u003cHL7Numeric\\u003e2495780\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7LocalNumber\\u003e\\n \\u003cHL7Extension/\\u003e\\n \\u003c/OrderCallbackPhoneNumber\\u003e\\n \\u003cResultsRptStatusChngDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e4\\u003c/month\\u003e\\n \\u003cday\\u003e4\\u003c/day\\u003e\\n \\u003chours\\u003e1\\u003c/hours\\u003e\\n \\u003cminutes\\u003e39\\u003c/minutes\\u003e\\n \\u003cseconds\\u003e0\\u003c/seconds\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/ResultsRptStatusChngDateTime\\u003e\\n \\u003cResultStatus\\u003eF\\u003c/ResultStatus\\u003e\\n \\u003cResultCopiesTo\\u003e\\n \\u003cHL7IDNumber\\u003e46214\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eMATHIS\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eGERRY\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eSR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/ResultCopiesTo\\u003e\\n \\u003cResultCopiesTo\\u003e\\n \\u003cHL7IDNumber\\u003e44582\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eJONES\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTHOMAS\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eIII\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/ResultCopiesTo\\u003e\\n \\u003cResultCopiesTo\\u003e\\n \\u003cHL7IDNumber\\u003e46111\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eMARTIN\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eJERRY\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eL\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/ResultCopiesTo\\u003e\\n \\u003cReasonforStudy\\u003e\\n \\u003cHL7Identifier\\u003e12365-4\\u003c/HL7Identifier\\u003e\\n \\u003cHL7Text\\u003eTOTALLY CRAZY\\u003c/HL7Text\\u003e\\n \\u003cHL7NameofCodingSystem\\u003eI9\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003c/ReasonforStudy\\u003e\\n \\u003cPrincipalResultInterpreter\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e22582\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eJONES\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTOM\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eL\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/PrincipalResultInterpreter\\u003e\\n \\u003cAssistantResultInterpreter\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e22582\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eMOORE\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTHOMAS\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eIII\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/AssistantResultInterpreter\\u003e\\n \\u003cTechnician\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e44\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eJONES\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eSAM\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eA\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eMR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMT\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/Technician\\u003e\\n \\u003cTranscriptionist\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e82\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eJONES\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTHOMASINA\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE ANN\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eII\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eMS\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eRA\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/Transcriptionist\\u003e\\n \\u003cNumberofSampleContainers/\\u003e\\n \\u003c/ObservationRequest\\u003e\\n \\u003cPatientResultOrderObservation/\\u003e\\n \\u003cPatientResultOrderSPMObservation\\u003e\\n \\u003cSPECIMEN\\u003e\\n \\u003cSPECIMEN\\u003e\\n \\u003cSetIDSPM\\u003e\\n\\u003cHL7SequenceID\\u003e1\\u003c/HL7SequenceID\\u003e\\n \\u003c/SetIDSPM\\u003e\\n \\u003cSpecimenID\\u003e\\n\\u003cHL7FillerAssignedIdentifier\\u003e\\n \\u003cHL7EntityIdentifier\\u003e56789\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n\\u003c/HL7FillerAssignedIdentifier\\u003e\\n \\u003c/SpecimenID\\u003e\\n \\u003cSpecimenParentIDs\\u003e\\n\\u003cHL7FillerAssignedIdentifier\\u003e\\n \\u003cHL7EntityIdentifier\\u003e20120601114\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n\\u003c/HL7FillerAssignedIdentifier\\u003e\\n \\u003c/SpecimenParentIDs\\u003e\\n \\u003cSpecimenType\\u003e\\n\\u003cHL7AlternateIdentifier\\u003eBLD\\u003c/HL7AlternateIdentifier\\u003e\\n\\u003cHL7AlternateText\\u003eBLOOD\\u003c/HL7AlternateText\\u003e\\n\\u003cHL7NameofAlternateCodingSystem\\u003eL\\u003c/HL7NameofAlternateCodingSystem\\u003e\\n \\u003c/SpecimenType\\u003e\\n \\u003cSpecimenSourceSite\\u003e\\n\\u003cHL7Identifier\\u003eLA\\u003c/HL7Identifier\\u003e\\n\\u003cHL7NameofCodingSystem\\u003eHL70070\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003c/SpecimenSourceSite\\u003e\\n \\u003cGroupedSpecimenCount/\\u003e\\n \\u003cSpecimenDescription\\u003eSOURCE NOT SPECIFIED\\u003c/SpecimenDescription\\u003e\\n \\u003cSpecimenCollectionDateTime\\u003e\\n\\u003cHL7RangeStartDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n\\u003c/HL7RangeStartDateTime\\u003e\\n\\u003cHL7RangeEndDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n\\u003c/HL7RangeEndDateTime\\u003e\\n \\u003c/SpecimenCollectionDateTime\\u003e\\n \\u003cSpecimenReceivedDateTime\\u003e\\n\\u003cyear\\u003e2006\\u003c/year\\u003e\\n\\u003cmonth\\u003e3\\u003c/month\\u003e\\n\\u003cday\\u003e25\\u003c/day\\u003e\\n\\u003chours\\u003e1\\u003c/hours\\u003e\\n\\u003cminutes\\u003e37\\u003c/minutes\\u003e\\n\\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/SpecimenReceivedDateTime\\u003e\\n \\u003cNumberOfSpecimenContainers/\\u003e\\n \\u003c/SPECIMEN\\u003e\\n \\u003c/SPECIMEN\\u003e\\n \\u003c/PatientResultOrderSPMObservation\\u003e\\n \\u003c/ORDER_OBSERVATION\\u003e\\n \\u003c/HL7PATIENT_RESULT\\u003e\\n \\u003c/HL7LabReport\\u003e\\n\\u003c/Container\\u003e\\n\\n\\u003c!-- raw_message_id \\u003d 063FFAA6-57EE-4C4A-9155-219864F65D70 --\\u003e\",\"impExpIndCd\":\"I\",\"recordStatusCd\":\"QUEUED_V2\",\"recordStatusTime\":\"May 9, 2024, 4:53:02 PM\",\"addTime\":\"May 9, 2024, 4:53:02 PM\",\"systemNm\":\"NBS\",\"docTypeCd\":\"11648804\",\"fillerOrderNbr\":\"20120601114\",\"labClia\":\"20D0649525\",\"specimenCollDate\":\"Mar 24, 2006, 4:55:00 PM\",\"orderTestCode\":\"778-9\"}"; - return data; + String data = "{\"nbsInterfaceUid\":10000052,\"payload\":\"\\u003c?xml version\\u003d\\\"1.0\\\" encoding\\u003d\\\"UTF-8\\\" standalone\\u003d\\\"yes\\\"?\\u003e\\n\\u003cContainer xmlns\\u003d\\\"http://www.cdc.gov/NEDSS\\\"\\u003e\\n \\u003cHL7LabReport\\u003e\\n \\u003cHL7MSH\\u003e\\n \\u003cFieldSeparator\\u003e|\\u003c/FieldSeparator\\u003e\\n \\u003cEncodingCharacters\\u003e^~\\\\\\u0026amp;\\u003c/EncodingCharacters\\u003e\\n \\u003cSendingApplication\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP-CORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/SendingApplication\\u003e\\n \\u003cSendingFacility\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/SendingFacility\\u003e\\n \\u003cReceivingApplication\\u003e\\n \\u003cHL7NamespaceID\\u003eALDOH\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/ReceivingApplication\\u003e\\n \\u003cReceivingFacility\\u003e\\n \\u003cHL7NamespaceID\\u003eAL\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/ReceivingFacility\\u003e\\n \\u003cDateTimeOfMessage\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e4\\u003c/month\\u003e\\n \\u003cday\\u003e4\\u003c/day\\u003e\\n \\u003chours\\u003e1\\u003c/hours\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/DateTimeOfMessage\\u003e\\n \\u003cSecurity\\u003e\\u003c/Security\\u003e\\n \\u003cMessageType\\u003e\\n \\u003cMessageCode\\u003eORU\\u003c/MessageCode\\u003e\\n \\u003cTriggerEvent\\u003eR01\\u003c/TriggerEvent\\u003e\\n \\u003cMessageStructure\\u003eORU_R01\\u003c/MessageStructure\\u003e\\n \\u003c/MessageType\\u003e\\n \\u003cMessageControlID\\u003e20120509010020114_251.2\\u003c/MessageControlID\\u003e\\n \\u003cProcessingID\\u003e\\n \\u003cHL7ProcessingID\\u003eD\\u003c/HL7ProcessingID\\u003e\\n \\u003cHL7ProcessingMode\\u003e\\u003c/HL7ProcessingMode\\u003e\\n \\u003c/ProcessingID\\u003e\\n \\u003cVersionID\\u003e\\n \\u003cHL7VersionID\\u003e2.5.1\\u003c/HL7VersionID\\u003e\\n \\u003c/VersionID\\u003e\\n \\u003cAcceptAcknowledgmentType\\u003eNE\\u003c/AcceptAcknowledgmentType\\u003e\\n \\u003cApplicationAcknowledgmentType\\u003eNE\\u003c/ApplicationAcknowledgmentType\\u003e\\n \\u003cCountryCode\\u003eUSA\\u003c/CountryCode\\u003e\\n \\u003cMessageProfileIdentifier\\u003e\\n \\u003cHL7EntityIdentifier\\u003eV251_IG_LB_LABRPTPH_R1_INFORM_2010FEB\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7UniversalID\\u003e2.16.840.1.114222.4.3.2.5.2.5\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/MessageProfileIdentifier\\u003e\\n \\u003c/HL7MSH\\u003e\\n \\u003cHL7SoftwareSegment\\u003e\\n \\u003cSoftwareVendorOrganization\\u003e\\n \\u003cHL7OrganizationName\\u003eMirth Corp.\\u003c/HL7OrganizationName\\u003e\\n \\u003cHL7IDNumber/\\u003e\\n \\u003cHL7CheckDigit/\\u003e\\n \\u003c/SoftwareVendorOrganization\\u003e\\n \\u003cSoftwareCertifiedVersionOrReleaseNumber\\u003e2.0\\u003c/SoftwareCertifiedVersionOrReleaseNumber\\u003e\\n \\u003cSoftwareProductName\\u003eMirth Connect\\u003c/SoftwareProductName\\u003e\\n \\u003cSoftwareBinaryID\\u003e789654\\u003c/SoftwareBinaryID\\u003e\\n \\u003cSoftwareProductInformation/\\u003e\\n \\u003cSoftwareInstallDate\\u003e\\n \\u003cyear\\u003e2011\\u003c/year\\u003e\\n \\u003cmonth\\u003e1\\u003c/month\\u003e\\n \\u003cday\\u003e1\\u003c/day\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/SoftwareInstallDate\\u003e\\n \\u003c/HL7SoftwareSegment\\u003e\\n \\u003cHL7PATIENT_RESULT\\u003e\\n \\u003cPATIENT\\u003e\\n \\u003cPatientIdentification\\u003e\\n \\u003cSetIDPID\\u003e\\n \\u003cHL7SequenceID\\u003e1\\u003c/HL7SequenceID\\u003e\\n \\u003c/SetIDPID\\u003e\\n \\u003cPatientIdentifierList\\u003e\\n \\u003cHL7IDNumber\\u003e05540205114\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7AssigningAuthority\\u003e\\n \\u003cHL7NamespaceID\\u003eLABC\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/HL7AssigningAuthority\\u003e\\n \\u003cHL7IdentifierTypeCode\\u003ePN\\u003c/HL7IdentifierTypeCode\\u003e\\n \\u003c/PatientIdentifierList\\u003e\\n \\u003cPatientIdentifierList\\u003e\\n \\u003cHL7IDNumber\\u003e17485458372\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7AssigningAuthority\\u003e\\n \\u003cHL7NamespaceID\\u003eAssignAuth\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/HL7AssigningAuthority\\u003e\\n \\u003cHL7IdentifierTypeCode\\u003ePI\\u003c/HL7IdentifierTypeCode\\u003e\\n \\u003cHL7AssigningFacility\\u003e\\n \\u003cHL7NamespaceID\\u003eNE CLINIC\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e24D1040593\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/HL7AssigningFacility\\u003e\\n \\u003c/PatientIdentifierList\\u003e\\n \\u003cPatientName\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eDooley\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eFIRSTMAX251\\u003c/HL7GivenName\\u003e\\n \\u003c/PatientName\\u003e\\n \\u003cMothersMaidenName\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eMOTHER\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003ePATERSON\\u003c/HL7GivenName\\u003e\\n \\u003c/MothersMaidenName\\u003e\\n \\u003cDateTimeOfBirth\\u003e\\n \\u003cyear\\u003e1960\\u003c/year\\u003e\\n \\u003cmonth\\u003e11\\u003c/month\\u003e\\n \\u003cday\\u003e9\\u003c/day\\u003e\\n \\u003chours\\u003e20\\u003c/hours\\u003e\\n \\u003cminutes\\u003e25\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/DateTimeOfBirth\\u003e\\n \\u003cAdministrativeSex\\u003eF\\u003c/AdministrativeSex\\u003e\\n \\u003cRace\\u003e\\n \\u003cHL7Identifier\\u003eW\\u003c/HL7Identifier\\u003e\\n \\u003cHL7Text\\u003eWHITE\\u003c/HL7Text\\u003e\\n \\u003cHL7NameofCodingSystem\\u003eHL70005\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003c/Race\\u003e\\n \\u003cPatientAddress\\u003e\\n \\u003cHL7StreetAddress\\u003e\\n \\u003cHL7StreetOrMailingAddress\\u003e5000 Staples Dr\\u003c/HL7StreetOrMailingAddress\\u003e\\n \\u003c/HL7StreetAddress\\u003e\\n \\u003cHL7OtherDesignation\\u003eAPT100\\u003c/HL7OtherDesignation\\u003e\\n \\u003cHL7City\\u003eSOMECITY\\u003c/HL7City\\u003e\\n \\u003cHL7StateOrProvince\\u003eME\\u003c/HL7StateOrProvince\\u003e\\n \\u003cHL7ZipOrPostalCode\\u003e30342\\u003c/HL7ZipOrPostalCode\\u003e\\n \\u003cHL7AddressType\\u003eH\\u003c/HL7AddressType\\u003e\\n \\u003c/PatientAddress\\u003e\\n \\u003cBirthOrder/\\u003e\\n \\u003c/PatientIdentification\\u003e\\n \\u003cNextofKinAssociatedParties\\u003e\\n \\u003cSetIDNK1\\u003e1\\u003c/SetIDNK1\\u003e\\n \\u003cName\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eTESTNOK114B\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eFIRSTNOK1\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eX\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/Name\\u003e\\n \\u003cRelationship\\u003e\\n \\u003cHL7Identifier\\u003eFTH\\u003c/HL7Identifier\\u003e\\n \\u003c/Relationship\\u003e\\n \\u003cAddress\\u003e\\n \\u003cHL7StreetAddress\\u003e\\n \\u003cHL7StreetOrMailingAddress\\u003e12 MAIN STREET\\u003c/HL7StreetOrMailingAddress\\u003e\\n \\u003c/HL7StreetAddress\\u003e\\n \\u003cHL7OtherDesignation\\u003eSUITE 16\\u003c/HL7OtherDesignation\\u003e\\n \\u003cHL7City\\u003eCOLUMBIA\\u003c/HL7City\\u003e\\n \\u003cHL7StateOrProvince\\u003eSC\\u003c/HL7StateOrProvince\\u003e\\n \\u003cHL7ZipOrPostalCode\\u003e30329\\u003c/HL7ZipOrPostalCode\\u003e\\n \\u003cHL7Country\\u003eUSA\\u003c/HL7Country\\u003e\\n \\u003cHL7CountyParishCode\\u003eRICHLAND\\u003c/HL7CountyParishCode\\u003e\\n \\u003c/Address\\u003e\\n \\u003cPhoneNumber\\u003e\\n \\u003cHL7CountryCode/\\u003e\\n \\u003cHL7AreaCityCode\\u003e\\n \\u003cHL7Numeric\\u003e803\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7AreaCityCode\\u003e\\n \\u003cHL7LocalNumber\\u003e\\n \\u003cHL7Numeric\\u003e5551212\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7LocalNumber\\u003e\\n \\u003cHL7Extension\\u003e\\n \\u003cHL7Numeric\\u003e123\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7Extension\\u003e\\n \\u003c/PhoneNumber\\u003e\\n \\u003c/NextofKinAssociatedParties\\u003e\\n \\u003c/PATIENT\\u003e\\n \\u003cORDER_OBSERVATION\\u003e\\n \\u003cObservationRequest\\u003e\\n \\u003cSetIDOBR\\u003e\\n \\u003cHL7SequenceID\\u003e1\\u003c/HL7SequenceID\\u003e\\n \\u003c/SetIDOBR\\u003e\\n \\u003cFillerOrderNumber\\u003e\\n \\u003cHL7EntityIdentifier\\u003e20120601114\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/FillerOrderNumber\\u003e\\n \\u003cUniversalServiceIdentifier\\u003e\\n \\u003cHL7Identifier\\u003e778-9\\u003c/HL7Identifier\\u003e\\n \\u003cHL7Text\\u003eORGANISM COUNT\\u003c/HL7Text\\u003e\\n \\u003cHL7NameofCodingSystem\\u003eLN\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003cHL7AlternateIdentifier\\u003e080186\\u003c/HL7AlternateIdentifier\\u003e\\n \\u003cHL7AlternateText\\u003eCULTURE\\u003c/HL7AlternateText\\u003e\\n \\u003c/UniversalServiceIdentifier\\u003e\\n \\u003cObservationDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/ObservationDateTime\\u003e\\n \\u003cObservationEndDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/ObservationEndDateTime\\u003e\\n \\u003cCollectorIdentifier\\u003e\\n \\u003cHL7IDNumber\\u003e342384\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eJONES\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eSUSAN\\u003c/HL7GivenName\\u003e\\n \\u003c/CollectorIdentifier\\u003e\\n \\u003cOrderingProvider\\u003e\\n \\u003cHL7IDNumber\\u003e46466\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eBRENTNALL\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eGERRY\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eSR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/OrderingProvider\\u003e\\n \\u003cOrderCallbackPhoneNumber\\u003e\\n \\u003cHL7CountryCode/\\u003e\\n \\u003cHL7AreaCityCode\\u003e\\n \\u003cHL7Numeric\\u003e256\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7AreaCityCode\\u003e\\n \\u003cHL7LocalNumber\\u003e\\n \\u003cHL7Numeric\\u003e2495780\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7LocalNumber\\u003e\\n \\u003cHL7Extension/\\u003e\\n \\u003c/OrderCallbackPhoneNumber\\u003e\\n \\u003cResultsRptStatusChngDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e4\\u003c/month\\u003e\\n \\u003cday\\u003e4\\u003c/day\\u003e\\n \\u003chours\\u003e1\\u003c/hours\\u003e\\n \\u003cminutes\\u003e39\\u003c/minutes\\u003e\\n \\u003cseconds\\u003e0\\u003c/seconds\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/ResultsRptStatusChngDateTime\\u003e\\n \\u003cResultStatus\\u003eF\\u003c/ResultStatus\\u003e\\n \\u003cResultCopiesTo\\u003e\\n \\u003cHL7IDNumber\\u003e46214\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eMATHIS\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eGERRY\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eSR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/ResultCopiesTo\\u003e\\n \\u003cResultCopiesTo\\u003e\\n \\u003cHL7IDNumber\\u003e44582\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eJONES\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTHOMAS\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eIII\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/ResultCopiesTo\\u003e\\n \\u003cResultCopiesTo\\u003e\\n \\u003cHL7IDNumber\\u003e46111\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eMARTIN\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eJERRY\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eL\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/ResultCopiesTo\\u003e\\n \\u003cReasonforStudy\\u003e\\n \\u003cHL7Identifier\\u003e12365-4\\u003c/HL7Identifier\\u003e\\n \\u003cHL7Text\\u003eTOTALLY CRAZY\\u003c/HL7Text\\u003e\\n \\u003cHL7NameofCodingSystem\\u003eI9\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003c/ReasonforStudy\\u003e\\n \\u003cPrincipalResultInterpreter\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e22582\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eJONES\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTOM\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eL\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/PrincipalResultInterpreter\\u003e\\n \\u003cAssistantResultInterpreter\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e22582\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eMOORE\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTHOMAS\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eIII\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/AssistantResultInterpreter\\u003e\\n \\u003cTechnician\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e44\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eJONES\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eSAM\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eA\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eMR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMT\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/Technician\\u003e\\n \\u003cTranscriptionist\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e82\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eJONES\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTHOMASINA\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE ANN\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eII\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eMS\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eRA\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/Transcriptionist\\u003e\\n \\u003cNumberofSampleContainers/\\u003e\\n \\u003c/ObservationRequest\\u003e\\n \\u003cPatientResultOrderObservation/\\u003e\\n \\u003cPatientResultOrderSPMObservation\\u003e\\n \\u003cSPECIMEN\\u003e\\n \\u003cSPECIMEN\\u003e\\n \\u003cSetIDSPM\\u003e\\n\\u003cHL7SequenceID\\u003e1\\u003c/HL7SequenceID\\u003e\\n \\u003c/SetIDSPM\\u003e\\n \\u003cSpecimenID\\u003e\\n\\u003cHL7FillerAssignedIdentifier\\u003e\\n \\u003cHL7EntityIdentifier\\u003e56789\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n\\u003c/HL7FillerAssignedIdentifier\\u003e\\n \\u003c/SpecimenID\\u003e\\n \\u003cSpecimenParentIDs\\u003e\\n\\u003cHL7FillerAssignedIdentifier\\u003e\\n \\u003cHL7EntityIdentifier\\u003e20120601114\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n\\u003c/HL7FillerAssignedIdentifier\\u003e\\n \\u003c/SpecimenParentIDs\\u003e\\n \\u003cSpecimenType\\u003e\\n\\u003cHL7AlternateIdentifier\\u003eBLD\\u003c/HL7AlternateIdentifier\\u003e\\n\\u003cHL7AlternateText\\u003eBLOOD\\u003c/HL7AlternateText\\u003e\\n\\u003cHL7NameofAlternateCodingSystem\\u003eL\\u003c/HL7NameofAlternateCodingSystem\\u003e\\n \\u003c/SpecimenType\\u003e\\n \\u003cSpecimenSourceSite\\u003e\\n\\u003cHL7Identifier\\u003eLA\\u003c/HL7Identifier\\u003e\\n\\u003cHL7NameofCodingSystem\\u003eHL70070\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003c/SpecimenSourceSite\\u003e\\n \\u003cGroupedSpecimenCount/\\u003e\\n \\u003cSpecimenDescription\\u003eSOURCE NOT SPECIFIED\\u003c/SpecimenDescription\\u003e\\n \\u003cSpecimenCollectionDateTime\\u003e\\n\\u003cHL7RangeStartDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n\\u003c/HL7RangeStartDateTime\\u003e\\n\\u003cHL7RangeEndDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n\\u003c/HL7RangeEndDateTime\\u003e\\n \\u003c/SpecimenCollectionDateTime\\u003e\\n \\u003cSpecimenReceivedDateTime\\u003e\\n\\u003cyear\\u003e2006\\u003c/year\\u003e\\n\\u003cmonth\\u003e3\\u003c/month\\u003e\\n\\u003cday\\u003e25\\u003c/day\\u003e\\n\\u003chours\\u003e1\\u003c/hours\\u003e\\n\\u003cminutes\\u003e37\\u003c/minutes\\u003e\\n\\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/SpecimenReceivedDateTime\\u003e\\n \\u003cNumberOfSpecimenContainers/\\u003e\\n \\u003c/SPECIMEN\\u003e\\n \\u003c/SPECIMEN\\u003e\\n \\u003c/PatientResultOrderSPMObservation\\u003e\\n \\u003c/ORDER_OBSERVATION\\u003e\\n \\u003c/HL7PATIENT_RESULT\\u003e\\n \\u003cHL7PATIENT_RESULT\\u003e\\n \\u003cPATIENT\\u003e\\n \\u003cPatientIdentification\\u003e\\n \\u003cSetIDPID\\u003e\\n \\u003cHL7SequenceID\\u003e2\\u003c/HL7SequenceID\\u003e\\n \\u003c/SetIDPID\\u003e\\n \\u003cPatientIdentifierList\\u003e\\n \\u003cHL7IDNumber\\u003e05540205114\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7AssigningAuthority\\u003e\\n \\u003cHL7NamespaceID\\u003eLABC\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/HL7AssigningAuthority\\u003e\\n \\u003cHL7IdentifierTypeCode\\u003ePN\\u003c/HL7IdentifierTypeCode\\u003e\\n \\u003c/PatientIdentifierList\\u003e\\n \\u003cPatientIdentifierList\\u003e\\n \\u003cHL7IDNumber\\u003e17485458372\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7AssigningAuthority\\u003e\\n \\u003cHL7NamespaceID\\u003eAssignAuth\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003eOID\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eISO\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/HL7AssigningAuthority\\u003e\\n \\u003cHL7IdentifierTypeCode\\u003ePI\\u003c/HL7IdentifierTypeCode\\u003e\\n \\u003cHL7AssigningFacility\\u003e\\n \\u003cHL7NamespaceID\\u003eNE CLINIC\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e24D1040593\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/HL7AssigningFacility\\u003e\\n \\u003c/PatientIdentifierList\\u003e\\n \\u003cPatientName\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eTorphy\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eFIRSTMAX251\\u003c/HL7GivenName\\u003e\\n \\u003c/PatientName\\u003e\\n \\u003cMothersMaidenName\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eMOTHER\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003ePATERSON\\u003c/HL7GivenName\\u003e\\n \\u003c/MothersMaidenName\\u003e\\n \\u003cDateTimeOfBirth\\u003e\\n \\u003cyear\\u003e1960\\u003c/year\\u003e\\n \\u003cmonth\\u003e11\\u003c/month\\u003e\\n \\u003cday\\u003e9\\u003c/day\\u003e\\n \\u003chours\\u003e20\\u003c/hours\\u003e\\n \\u003cminutes\\u003e25\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/DateTimeOfBirth\\u003e\\n \\u003cAdministrativeSex\\u003eF\\u003c/AdministrativeSex\\u003e\\n \\u003cRace\\u003e\\n \\u003cHL7Identifier\\u003eW\\u003c/HL7Identifier\\u003e\\n \\u003cHL7Text\\u003eWHITE\\u003c/HL7Text\\u003e\\n \\u003cHL7NameofCodingSystem\\u003eHL70005\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003c/Race\\u003e\\n \\u003cPatientAddress\\u003e\\n \\u003cHL7StreetAddress\\u003e\\n \\u003cHL7StreetOrMailingAddress\\u003e5000 Staples Dr\\u003c/HL7StreetOrMailingAddress\\u003e\\n \\u003c/HL7StreetAddress\\u003e\\n \\u003cHL7OtherDesignation\\u003eAPT100\\u003c/HL7OtherDesignation\\u003e\\n \\u003cHL7City\\u003eSOMECITY\\u003c/HL7City\\u003e\\n \\u003cHL7StateOrProvince\\u003eME\\u003c/HL7StateOrProvince\\u003e\\n \\u003cHL7ZipOrPostalCode\\u003e30342\\u003c/HL7ZipOrPostalCode\\u003e\\n \\u003cHL7AddressType\\u003eH\\u003c/HL7AddressType\\u003e\\n \\u003c/PatientAddress\\u003e\\n \\u003cBirthOrder/\\u003e\\n \\u003c/PatientIdentification\\u003e\\n \\u003cNextofKinAssociatedParties\\u003e\\n \\u003cSetIDNK1\\u003e1\\u003c/SetIDNK1\\u003e\\n \\u003cName\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eTESTNOK114B\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eFIRSTNOK1\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eX\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/Name\\u003e\\n \\u003cRelationship\\u003e\\n \\u003cHL7Identifier\\u003eFTH\\u003c/HL7Identifier\\u003e\\n \\u003c/Relationship\\u003e\\n \\u003cAddress\\u003e\\n \\u003cHL7StreetAddress\\u003e\\n \\u003cHL7StreetOrMailingAddress\\u003e12 MAIN STREET\\u003c/HL7StreetOrMailingAddress\\u003e\\n \\u003c/HL7StreetAddress\\u003e\\n \\u003cHL7OtherDesignation\\u003eSUITE 16\\u003c/HL7OtherDesignation\\u003e\\n \\u003cHL7City\\u003eCOLUMBIA\\u003c/HL7City\\u003e\\n \\u003cHL7StateOrProvince\\u003eSC\\u003c/HL7StateOrProvince\\u003e\\n \\u003cHL7ZipOrPostalCode\\u003e30329\\u003c/HL7ZipOrPostalCode\\u003e\\n \\u003cHL7Country\\u003eUSA\\u003c/HL7Country\\u003e\\n \\u003cHL7CountyParishCode\\u003eRICHLAND\\u003c/HL7CountyParishCode\\u003e\\n \\u003c/Address\\u003e\\n \\u003cPhoneNumber\\u003e\\n \\u003cHL7CountryCode/\\u003e\\n \\u003cHL7AreaCityCode\\u003e\\n \\u003cHL7Numeric\\u003e803\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7AreaCityCode\\u003e\\n \\u003cHL7LocalNumber\\u003e\\n \\u003cHL7Numeric\\u003e5551212\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7LocalNumber\\u003e\\n \\u003cHL7Extension\\u003e\\n \\u003cHL7Numeric\\u003e123\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7Extension\\u003e\\n \\u003c/PhoneNumber\\u003e\\n \\u003c/NextofKinAssociatedParties\\u003e\\n \\u003c/PATIENT\\u003e\\n \\u003cORDER_OBSERVATION\\u003e\\n \\u003cObservationRequest\\u003e\\n \\u003cSetIDOBR\\u003e\\n \\u003cHL7SequenceID\\u003e1\\u003c/HL7SequenceID\\u003e\\n \\u003c/SetIDOBR\\u003e\\n \\u003cFillerOrderNumber\\u003e\\n \\u003cHL7EntityIdentifier\\u003e20120601114\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n \\u003c/FillerOrderNumber\\u003e\\n \\u003cUniversalServiceIdentifier\\u003e\\n \\u003cHL7Identifier\\u003e355-9\\u003c/HL7Identifier\\u003e\\n \\u003cHL7Text\\u003eORGANISM COUNT\\u003c/HL7Text\\u003e\\n \\u003cHL7NameofCodingSystem\\u003eLN\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003cHL7AlternateIdentifier\\u003e080186\\u003c/HL7AlternateIdentifier\\u003e\\n \\u003cHL7AlternateText\\u003eCULTURE\\u003c/HL7AlternateText\\u003e\\n \\u003c/UniversalServiceIdentifier\\u003e\\n \\u003cObservationDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/ObservationDateTime\\u003e\\n \\u003cObservationEndDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/ObservationEndDateTime\\u003e\\n \\u003cCollectorIdentifier\\u003e\\n \\u003cHL7IDNumber\\u003e342384\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eJONES\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eSUSAN\\u003c/HL7GivenName\\u003e\\n \\u003c/CollectorIdentifier\\u003e\\n \\u003cOrderingProvider\\u003e\\n \\u003cHL7IDNumber\\u003e46466\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eBRENTNALL\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eGERRY\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eSR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/OrderingProvider\\u003e\\n \\u003cOrderCallbackPhoneNumber\\u003e\\n \\u003cHL7CountryCode/\\u003e\\n \\u003cHL7AreaCityCode\\u003e\\n \\u003cHL7Numeric\\u003e256\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7AreaCityCode\\u003e\\n \\u003cHL7LocalNumber\\u003e\\n \\u003cHL7Numeric\\u003e2495780\\u003c/HL7Numeric\\u003e\\n \\u003c/HL7LocalNumber\\u003e\\n \\u003cHL7Extension/\\u003e\\n \\u003c/OrderCallbackPhoneNumber\\u003e\\n \\u003cResultsRptStatusChngDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e4\\u003c/month\\u003e\\n \\u003cday\\u003e4\\u003c/day\\u003e\\n \\u003chours\\u003e1\\u003c/hours\\u003e\\n \\u003cminutes\\u003e39\\u003c/minutes\\u003e\\n \\u003cseconds\\u003e0\\u003c/seconds\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/ResultsRptStatusChngDateTime\\u003e\\n \\u003cResultStatus\\u003eF\\u003c/ResultStatus\\u003e\\n \\u003cResultCopiesTo\\u003e\\n \\u003cHL7IDNumber\\u003e46214\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eMATHIS\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eGERRY\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eSR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/ResultCopiesTo\\u003e\\n \\u003cResultCopiesTo\\u003e\\n \\u003cHL7IDNumber\\u003e44582\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eJONES\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTHOMAS\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eIII\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/ResultCopiesTo\\u003e\\n \\u003cResultCopiesTo\\u003e\\n \\u003cHL7IDNumber\\u003e46111\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003e\\n \\u003cHL7Surname\\u003eMARTIN\\u003c/HL7Surname\\u003e\\n \\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eJERRY\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eL\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/ResultCopiesTo\\u003e\\n \\u003cReasonforStudy\\u003e\\n \\u003cHL7Identifier\\u003e12365-4\\u003c/HL7Identifier\\u003e\\n \\u003cHL7Text\\u003eTOTALLY CRAZY\\u003c/HL7Text\\u003e\\n \\u003cHL7NameofCodingSystem\\u003eI9\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003c/ReasonforStudy\\u003e\\n \\u003cPrincipalResultInterpreter\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e22582\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eJONES\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTOM\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eL\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/PrincipalResultInterpreter\\u003e\\n \\u003cAssistantResultInterpreter\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e22582\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eMOORE\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTHOMAS\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eE\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eIII\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eDR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMD\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/AssistantResultInterpreter\\u003e\\n \\u003cTechnician\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e44\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eJONES\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eSAM\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eA\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eJR\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eMR\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eMT\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/Technician\\u003e\\n \\u003cTranscriptionist\\u003e\\n \\u003cHL7Name\\u003e\\n \\u003cHL7IDNumber\\u003e82\\u003c/HL7IDNumber\\u003e\\n \\u003cHL7FamilyName\\u003eJONES\\u003c/HL7FamilyName\\u003e\\n \\u003cHL7GivenName\\u003eTHOMASINA\\u003c/HL7GivenName\\u003e\\n \\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003eLEE ANN\\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\\u003e\\n \\u003cHL7Suffix\\u003eII\\u003c/HL7Suffix\\u003e\\n \\u003cHL7Prefix\\u003eMS\\u003c/HL7Prefix\\u003e\\n \\u003cHL7Degree\\u003eRA\\u003c/HL7Degree\\u003e\\n \\u003c/HL7Name\\u003e\\n \\u003c/Transcriptionist\\u003e\\n \\u003cNumberofSampleContainers/\\u003e\\n \\u003c/ObservationRequest\\u003e\\n \\u003cPatientResultOrderObservation/\\u003e\\n \\u003cPatientResultOrderSPMObservation\\u003e\\n \\u003cSPECIMEN\\u003e\\n \\u003cSPECIMEN\\u003e\\n \\u003cSetIDSPM\\u003e\\n\\u003cHL7SequenceID\\u003e1\\u003c/HL7SequenceID\\u003e\\n \\u003c/SetIDSPM\\u003e\\n \\u003cSpecimenID\\u003e\\n\\u003cHL7FillerAssignedIdentifier\\u003e\\n \\u003cHL7EntityIdentifier\\u003e56789\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n\\u003c/HL7FillerAssignedIdentifier\\u003e\\n \\u003c/SpecimenID\\u003e\\n \\u003cSpecimenParentIDs\\u003e\\n\\u003cHL7FillerAssignedIdentifier\\u003e\\n \\u003cHL7EntityIdentifier\\u003e20120601114\\u003c/HL7EntityIdentifier\\u003e\\n \\u003cHL7NamespaceID\\u003eLABCORP\\u003c/HL7NamespaceID\\u003e\\n \\u003cHL7UniversalID\\u003e20D0649525\\u003c/HL7UniversalID\\u003e\\n \\u003cHL7UniversalIDType\\u003eCLIA\\u003c/HL7UniversalIDType\\u003e\\n\\u003c/HL7FillerAssignedIdentifier\\u003e\\n \\u003c/SpecimenParentIDs\\u003e\\n \\u003cSpecimenType\\u003e\\n\\u003cHL7AlternateIdentifier\\u003eBLD\\u003c/HL7AlternateIdentifier\\u003e\\n\\u003cHL7AlternateText\\u003eBLOOD\\u003c/HL7AlternateText\\u003e\\n\\u003cHL7NameofAlternateCodingSystem\\u003eL\\u003c/HL7NameofAlternateCodingSystem\\u003e\\n \\u003c/SpecimenType\\u003e\\n \\u003cSpecimenSourceSite\\u003e\\n\\u003cHL7Identifier\\u003eLA\\u003c/HL7Identifier\\u003e\\n\\u003cHL7NameofCodingSystem\\u003eHL70070\\u003c/HL7NameofCodingSystem\\u003e\\n \\u003c/SpecimenSourceSite\\u003e\\n \\u003cGroupedSpecimenCount/\\u003e\\n \\u003cSpecimenDescription\\u003eSOURCE NOT SPECIFIED\\u003c/SpecimenDescription\\u003e\\n \\u003cSpecimenCollectionDateTime\\u003e\\n\\u003cHL7RangeStartDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n\\u003c/HL7RangeStartDateTime\\u003e\\n\\u003cHL7RangeEndDateTime\\u003e\\n \\u003cyear\\u003e2006\\u003c/year\\u003e\\n \\u003cmonth\\u003e3\\u003c/month\\u003e\\n \\u003cday\\u003e24\\u003c/day\\u003e\\n \\u003chours\\u003e16\\u003c/hours\\u003e\\n \\u003cminutes\\u003e55\\u003c/minutes\\u003e\\n \\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n\\u003c/HL7RangeEndDateTime\\u003e\\n \\u003c/SpecimenCollectionDateTime\\u003e\\n \\u003cSpecimenReceivedDateTime\\u003e\\n\\u003cyear\\u003e2006\\u003c/year\\u003e\\n\\u003cmonth\\u003e3\\u003c/month\\u003e\\n\\u003cday\\u003e25\\u003c/day\\u003e\\n\\u003chours\\u003e1\\u003c/hours\\u003e\\n\\u003cminutes\\u003e37\\u003c/minutes\\u003e\\n\\u003cgmtOffset\\u003e\\u003c/gmtOffset\\u003e\\n \\u003c/SpecimenReceivedDateTime\\u003e\\n \\u003cNumberOfSpecimenContainers/\\u003e\\n \\u003c/SPECIMEN\\u003e\\n \\u003c/SPECIMEN\\u003e\\n \\u003c/PatientResultOrderSPMObservation\\u003e\\n \\u003c/ORDER_OBSERVATION\\u003e\\n \\u003c/HL7PATIENT_RESULT\\u003e\\n \\u003c/HL7LabReport\\u003e\\n\\u003c/Container\\u003e\\n\\n\\u003c!-- raw_message_id \\u003d 063FFAA6-57EE-4C4A-9155-219864F65D70 --\\u003e\",\"impExpIndCd\":\"I\",\"recordStatusCd\":\"QUEUED_V2\",\"recordStatusTime\":\"May 9, 2024, 4:53:02 PM\",\"addTime\":\"May 9, 2024, 4:53:02 PM\",\"systemNm\":\"NBS\",\"docTypeCd\":\"11648804\",\"fillerOrderNbr\":\"20120601114\",\"labClia\":\"20D0649525\",\"specimenCollDate\":\"Mar 24, 2006, 4:55:00 PM\",\"orderTestCode\":\"778-9\"}"; + return data; } private String getDataForParentResultException() { @@ -531,4 +533,285 @@ private LabResultProxyContainer labResultMessage() { return labResultProxyContainer; } + + @Test + void testSpecimenProcessing_AllConditionsMet() throws DataProcessingException { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + ObservationDto observationDto = new ObservationDto(); + Timestamp effectiveFromTime = new Timestamp(System.currentTimeMillis()); + observationDto.setEffectiveFromTime(effectiveFromTime); + ObservationContainer observationContainer = new ObservationContainer(); + observationContainer.setTheObservationDto(observationDto); + edxLabInformationDto.setRootObservationContainer(observationContainer); + edxLabInformationDto.setNbsInterfaceUid(123L); + + dataExtractionService.specimenProcessing(edxLabInformationDto); + + verify(nbsInterfaceStoredProcRepository, times(1)).updateSpecimenCollDateSP(123L, effectiveFromTime); + } + + @Test + void testSpecimenProcessing_RootObservationContainerNull() throws DataProcessingException { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + + dataExtractionService.specimenProcessing(edxLabInformationDto); + + verify(nbsInterfaceStoredProcRepository, never()).updateSpecimenCollDateSP(anyLong(), any()); + } + + @Test + void testSpecimenProcessing_ObservationDtoNull() throws DataProcessingException { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + ObservationContainer observationContainer = new ObservationContainer(); + edxLabInformationDto.setRootObservationContainer(observationContainer); + + dataExtractionService.specimenProcessing(edxLabInformationDto); + + verify(nbsInterfaceStoredProcRepository, never()).updateSpecimenCollDateSP(anyLong(), any()); + } + + @Test + void testSpecimenProcessing_EffectiveFromTimeNull() throws DataProcessingException { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + ObservationDto observationDto = new ObservationDto(); + ObservationContainer observationContainer = new ObservationContainer(); + observationContainer.setTheObservationDto(observationDto); + edxLabInformationDto.setRootObservationContainer(observationContainer); + + dataExtractionService.specimenProcessing(edxLabInformationDto); + + verify(nbsInterfaceStoredProcRepository, never()).updateSpecimenCollDateSP(anyLong(), any()); + } + + @Test + void testOrderObservationNullCheck_Hl7OrderObservationArrayIsNull() { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + NbsInterfaceModel nbsInterfaceModel = new NbsInterfaceModel(); + nbsInterfaceModel.setNbsInterfaceUid(123); + + DataProcessingException exception = assertThrows(DataProcessingException.class, () -> { + dataExtractionService.orderObservationNullCheck(null, edxLabInformationDto, nbsInterfaceModel); + }); + + assertTrue(edxLabInformationDto.isOrderTestNameMissing()); + assertEquals(EdxELRConstant.NO_ORDTEST_NAME, exception.getMessage()); + // Here you might want to verify the logging, but verifying logs is not straightforward in unit tests. + } + + @Test + void testOrderObservationNullCheck_Hl7OrderObservationArrayIsEmpty() { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + NbsInterfaceModel nbsInterfaceModel = new NbsInterfaceModel(); + nbsInterfaceModel.setNbsInterfaceUid(123); + List hl7OrderObservationArray = new ArrayList<>(); + + DataProcessingException exception = assertThrows(DataProcessingException.class, () -> { + dataExtractionService.orderObservationNullCheck(hl7OrderObservationArray, edxLabInformationDto, nbsInterfaceModel); + }); + + assertTrue(edxLabInformationDto.isOrderTestNameMissing()); + assertEquals(EdxELRConstant.NO_ORDTEST_NAME, exception.getMessage()); + // Here you might want to verify the logging, but verifying logs is not straightforward in unit tests. + } + + @Test + void testOrderObservationNullCheck_Hl7OrderObservationArrayIsNotEmpty() { + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + NbsInterfaceModel nbsInterfaceModel = new NbsInterfaceModel(); + nbsInterfaceModel.setNbsInterfaceUid(123); + List hl7OrderObservationArray = new ArrayList<>(); + hl7OrderObservationArray.add(new HL7OrderObservationType()); + + assertDoesNotThrow(() -> { + dataExtractionService.orderObservationNullCheck(hl7OrderObservationArray, edxLabInformationDto, nbsInterfaceModel); + }); + + assertFalse(edxLabInformationDto.isOrderTestNameMissing()); + } + + + @Test + void testMultipleObrCheck_Valid() { + int j = 1; + HL7OrderObservationType hl7OrderObservationType = new HL7OrderObservationType(); + HL7OBRType observationRequest = new HL7OBRType(); + HL7EIPType parent = new HL7EIPType(); + HL7PRLType parentResult = new HL7PRLType(); + HL7TXType parentObservationValueDescriptor = new HL7TXType(); + HL7EIType fillerAssignedIdentifier = new HL7EIType(); + HL7CEType parentObservationIdentifier = new HL7CEType(); + + // Setting all required fields for a valid check + parentObservationValueDescriptor.setHL7String("descriptor"); + parentResult.setParentObservationValueDescriptor(parentObservationValueDescriptor); + parentObservationIdentifier.setHL7Identifier("identifier"); + parentObservationIdentifier.setHL7AlternateIdentifier("alternateIdentifier"); + parentObservationIdentifier.setHL7Text("text"); + parentObservationIdentifier.setHL7AlternateText("alternateText"); + parentResult.setParentObservationIdentifier(parentObservationIdentifier); + fillerAssignedIdentifier.setHL7EntityIdentifier("entityIdentifier"); + parent.setHL7FillerAssignedIdentifier(fillerAssignedIdentifier); + observationRequest.setParent(parent); + observationRequest.setParentResult(parentResult); + hl7OrderObservationType.setObservationRequest(observationRequest); + + boolean result = dataExtractionService.multipleObrCheck(j, hl7OrderObservationType); + assertFalse(result); + } + + @Test + void testMultipleObrCheck_Invalid_J() { + int j = 0; + HL7OrderObservationType hl7OrderObservationType = new HL7OrderObservationType(); + boolean result = dataExtractionService.multipleObrCheck(j, hl7OrderObservationType); + assertFalse(result); + } + + @Test + void testMultipleObrCheck_NullParent() { + int j = 1; + HL7OrderObservationType hl7OrderObservationType = new HL7OrderObservationType(); + HL7OBRType observationRequest = new HL7OBRType(); + observationRequest.setParent(null); + hl7OrderObservationType.setObservationRequest(observationRequest); + + boolean result = dataExtractionService.multipleObrCheck(j, hl7OrderObservationType); + assertTrue(result); + } + + @Test + void testMultipleObrCheck_NullParentResult() { + int j = 1; + HL7OrderObservationType hl7OrderObservationType = new HL7OrderObservationType(); + HL7OBRType observationRequest = new HL7OBRType(); + observationRequest.setParentResult(null); + hl7OrderObservationType.setObservationRequest(observationRequest); + + boolean result = dataExtractionService.multipleObrCheck(j, hl7OrderObservationType); + assertTrue(result); + } + + @Test + void testMultipleObrCheck_NullParentObservationValueDescriptor() { + int j = 1; + HL7OrderObservationType hl7OrderObservationType = new HL7OrderObservationType(); + HL7OBRType observationRequest = new HL7OBRType(); + HL7PRLType parentResult = new HL7PRLType(); + parentResult.setParentObservationValueDescriptor(null); + observationRequest.setParentResult(parentResult); + hl7OrderObservationType.setObservationRequest(observationRequest); + + boolean result = dataExtractionService.multipleObrCheck(j, hl7OrderObservationType); + assertTrue(result); + } + + @Test + void testMultipleObrCheck_EmptyHL7String() { + int j = 1; + HL7OrderObservationType hl7OrderObservationType = new HL7OrderObservationType(); + HL7OBRType observationRequest = new HL7OBRType(); + HL7PRLType parentResult = new HL7PRLType(); + HL7TXType parentObservationValueDescriptor = new HL7TXType(); + parentObservationValueDescriptor.setHL7String(""); + parentResult.setParentObservationValueDescriptor(parentObservationValueDescriptor); + observationRequest.setParentResult(parentResult); + hl7OrderObservationType.setObservationRequest(observationRequest); + + boolean result = dataExtractionService.multipleObrCheck(j, hl7OrderObservationType); + assertTrue(result); + } + + @Test + void testMultipleObrCheck_NullHL7FillerAssignedIdentifier() { + int j = 1; + HL7OrderObservationType hl7OrderObservationType = new HL7OrderObservationType(); + HL7OBRType observationRequest = new HL7OBRType(); + HL7EIPType parent = new HL7EIPType(); + parent.setHL7FillerAssignedIdentifier(null); + observationRequest.setParent(parent); + hl7OrderObservationType.setObservationRequest(observationRequest); + + boolean result = dataExtractionService.multipleObrCheck(j, hl7OrderObservationType); + assertTrue(result); + } + + @Test + void testMultipleObrCheck_NullHL7EntityIdentifier() { + int j = 1; + HL7OrderObservationType hl7OrderObservationType = new HL7OrderObservationType(); + HL7OBRType observationRequest = new HL7OBRType(); + HL7EIPType parent = new HL7EIPType(); + HL7EIType fillerAssignedIdentifier = new HL7EIType(); + fillerAssignedIdentifier.setHL7EntityIdentifier(null); + parent.setHL7FillerAssignedIdentifier(fillerAssignedIdentifier); + observationRequest.setParent(parent); + hl7OrderObservationType.setObservationRequest(observationRequest); + + boolean result = dataExtractionService.multipleObrCheck(j, hl7OrderObservationType); + assertTrue(result); + } + + @Test + void testMultipleObrCheck_EmptyHL7EntityIdentifier() { + int j = 1; + HL7OrderObservationType hl7OrderObservationType = new HL7OrderObservationType(); + HL7OBRType observationRequest = new HL7OBRType(); + HL7EIPType parent = new HL7EIPType(); + HL7EIType fillerAssignedIdentifier = new HL7EIType(); + fillerAssignedIdentifier.setHL7EntityIdentifier(""); + parent.setHL7FillerAssignedIdentifier(fillerAssignedIdentifier); + observationRequest.setParent(parent); + hl7OrderObservationType.setObservationRequest(observationRequest); + + boolean result = dataExtractionService.multipleObrCheck(j, hl7OrderObservationType); + assertTrue(result); + } + + @Test + void testMultipleObrCheck_NullParentObservationIdentifier() { + int j = 1; + HL7OrderObservationType hl7OrderObservationType = new HL7OrderObservationType(); + HL7OBRType observationRequest = new HL7OBRType(); + HL7PRLType parentResult = new HL7PRLType(); + parentResult.setParentObservationIdentifier(null); + observationRequest.setParentResult(parentResult); + hl7OrderObservationType.setObservationRequest(observationRequest); + + boolean result = dataExtractionService.multipleObrCheck(j, hl7OrderObservationType); + assertTrue(result); + } + + @Test + void testMultipleObrCheck_NullHL7IdentifierAndAlternateIdentifier() { + int j = 1; + HL7OrderObservationType hl7OrderObservationType = new HL7OrderObservationType(); + HL7OBRType observationRequest = new HL7OBRType(); + HL7PRLType parentResult = new HL7PRLType(); + HL7CEType parentObservationIdentifier = new HL7CEType(); + parentObservationIdentifier.setHL7Identifier(null); + parentObservationIdentifier.setHL7AlternateIdentifier(null); + parentResult.setParentObservationIdentifier(parentObservationIdentifier); + observationRequest.setParentResult(parentResult); + hl7OrderObservationType.setObservationRequest(observationRequest); + + boolean result = dataExtractionService.multipleObrCheck(j, hl7OrderObservationType); + assertTrue(result); + } + + @Test + void testMultipleObrCheck_NullHL7TextAndAlternateText() { + int j = 1; + HL7OrderObservationType hl7OrderObservationType = new HL7OrderObservationType(); + HL7OBRType observationRequest = new HL7OBRType(); + HL7PRLType parentResult = new HL7PRLType(); + HL7CEType parentObservationIdentifier = new HL7CEType(); + parentObservationIdentifier.setHL7Text(null); + parentObservationIdentifier.setHL7AlternateText(null); + parentResult.setParentObservationIdentifier(parentObservationIdentifier); + observationRequest.setParentResult(parentResult); + hl7OrderObservationType.setObservationRequest(observationRequest); + + boolean result = dataExtractionService.multipleObrCheck(j, hl7OrderObservationType); + assertTrue(result); + } } \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PageServiceTests.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PageServiceTests.java index 2f9d8b589..50be93319 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PageServiceTests.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PageServiceTests.java @@ -25,14 +25,14 @@ import static org.mockito.Mockito.when; class PageServiceTests { + @Mock + AuthUtil authUtil; @Mock private IInvestigationService investigationService; @Mock private PageRepositoryUtil pageRepositoryUtil; @InjectMocks private PageService pageService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -43,12 +43,12 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach void tearDown() { - Mockito.reset(investigationService, pageRepositoryUtil , authUtil); + Mockito.reset(investigationService, pageRepositoryUtil, authUtil); } @@ -73,7 +73,7 @@ void setPageProxyWithAutoAssoc_Success() throws DataProcessingException { var test = pageService.setPageProxyWithAutoAssoc(typeCd, pageProxyVO, observationUid, observationTypeCd, processingDecision); assertNotNull(test); - assertEquals(11L , test); + assertEquals(11L, test); } @@ -97,7 +97,7 @@ void setPageProxyWithAutoAssoc_Success_2() throws DataProcessingException { var test = pageService.setPageProxyWithAutoAssoc(typeCd, pageProxyVO, observationUid, observationTypeCd, processingDecision); assertNotNull(test); - assertEquals(11L , test); + assertEquals(11L, test); } } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PamServiceTests.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PamServiceTests.java index e5ec8b2d3..e9a322e4a 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PamServiceTests.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/page_and_pam/PamServiceTests.java @@ -44,6 +44,8 @@ import static org.mockito.Mockito.*; class PamServiceTests { + @Mock + AuthUtil authUtil; @Mock private IInvestigationService investigationService; @Mock @@ -68,8 +70,6 @@ class PamServiceTests { private PatientMatchingBaseService patientMatchingBaseService; @InjectMocks private PamService pamService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -80,12 +80,12 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach void tearDown() { - Mockito.reset(investigationService,patientRepositoryUtil, prepareAssocModelHelper, + Mockito.reset(investigationService, patientRepositoryUtil, prepareAssocModelHelper, retrieveSummaryService, publicHealthCaseService, uidService, participationRepositoryUtil, actRelationshipRepositoryUtil, nbsNoteRepositoryUtil, answerService, patientMatchingBaseService, authUtil); @@ -189,7 +189,7 @@ void setPamProxyWithAutoAssoc_Success_PamIsNew() throws DataProcessingException when(patientRepositoryUtil.loadPerson(101L)) .thenReturn(perConn); - when(patientMatchingBaseService.setPatientRevision(any(), eq( NEDSSConstant.PAT_CR), eq( NEDSSConstant.PAT))) + when(patientMatchingBaseService.setPatientRevision(any(), eq(NEDSSConstant.PAT_CR), eq(NEDSSConstant.PAT))) .thenReturn(20L); var patObj = new Person(); patObj.setPersonParentUid(201L); @@ -201,7 +201,7 @@ void setPamProxyWithAutoAssoc_Success_PamIsNew() throws DataProcessingException eq("INV_CR"), eq("PUBLIC_HEALTH_CASE"), eq("BASE"), eq(1))) .thenReturn(phcDt); - var res = pamService.setPamProxyWithAutoAssoc(pamProxyVO, observationUid, observationTypeCd); + var res = pamService.setPamProxyWithAutoAssoc(pamProxyVO, observationUid, observationTypeCd); assertNotNull(res); assertEquals(0, res); @@ -301,7 +301,7 @@ void setPamProxyWithAutoAssoc_Success() throws DataProcessingException { pamProxyVO.setTheParticipationDTCollection(patCol); - when(patientMatchingBaseService.setPatientRevision(any(), eq( NEDSSConstant.PAT_CR), eq( NEDSSConstant.PAT))) + when(patientMatchingBaseService.setPatientRevision(any(), eq(NEDSSConstant.PAT_CR), eq(NEDSSConstant.PAT))) .thenReturn(20L); var patObj = new Person(); patObj.setPersonParentUid(201L); @@ -313,7 +313,7 @@ void setPamProxyWithAutoAssoc_Success() throws DataProcessingException { eq("INV_EDIT"), eq("PUBLIC_HEALTH_CASE"), eq("BASE"), eq(1))) .thenReturn(phcDt); - var res = pamService.setPamProxyWithAutoAssoc(pamProxyVO, observationUid, observationTypeCd); + var res = pamService.setPamProxyWithAutoAssoc(pamProxyVO, observationUid, observationTypeCd); assertNotNull(res); assertEquals(0, res); @@ -339,7 +339,7 @@ void setPamProxyWithAutoAssoc_Exception_1() { pamProxyVO.setPublicHealthCaseContainer(phcConn); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { - pamService.setPamProxyWithAutoAssoc(pamProxyVO, observationUid, observationTypeCd); + pamService.setPamProxyWithAutoAssoc(pamProxyVO, observationUid, observationTypeCd); }); assertNotNull(thrown.getMessage()); @@ -349,7 +349,7 @@ void setPamProxyWithAutoAssoc_Exception_1() { void insertPamVO_Success() throws DataProcessingException { BasePamContainer pamVO = new BasePamContainer(); var mapAnswer = new HashMap<>(); - mapAnswer.put("1","1"); + mapAnswer.put("1", "1"); pamVO.setPamAnswerDTMap(mapAnswer); pamVO.setPageRepeatingAnswerDTMap(mapAnswer); PublicHealthCaseContainer publichHealthCaseVO = new PublicHealthCaseContainer(); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/NokMatchingServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/NokMatchingServiceTest.java index dca1ea250..46d72fbc8 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/NokMatchingServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/NokMatchingServiceTest.java @@ -82,9 +82,10 @@ void getMatchingNextOfKin_name_addr_street() throws DataProcessingException { EdxPatientMatchDto edxPatientMatchFoundDT = new EdxPatientMatchDto(); when(edxPatientMatchRepositoryUtil.getEdxPatientMatchOnMatchString(any(), any())).thenReturn(edxPatientMatchFoundDT); - EdxPatientMatchDto edxPatientMatchResult =nokMatchingService.getMatchingNextOfKin(personContainer); + EdxPatientMatchDto edxPatientMatchResult = nokMatchingService.getMatchingNextOfKin(personContainer); assertNotNull(edxPatientMatchResult); } + @Test void getMatchingNextOfKin_name_addr_street_throw_exp() { PersonContainer personContainer = new PersonContainer(); @@ -136,7 +137,7 @@ void getMatchingNextOfKin_telephone() throws DataProcessingException { personContainer.getThePersonNameDtoCollection().add(personNameDto); //for NEW NOK - EntityIdDto entityIdDto=new EntityIdDto(); + EntityIdDto entityIdDto = new EntityIdDto(); entityIdDto.setEntityUid(123L); entityIdDto.setTypeCd("TEST"); personContainer.getTheEntityIdDtoCollection().add(entityIdDto); @@ -157,9 +158,10 @@ void getMatchingNextOfKin_telephone() throws DataProcessingException { EdxPatientMatchDto edxPatientMatchFoundDT = new EdxPatientMatchDto(); when(edxPatientMatchRepositoryUtil.getEdxPatientMatchOnMatchString(any(), any())).thenReturn(edxPatientMatchFoundDT); - EdxPatientMatchDto edxPatientMatchResult =nokMatchingService.getMatchingNextOfKin(personContainer); + EdxPatientMatchDto edxPatientMatchResult = nokMatchingService.getMatchingNextOfKin(personContainer); assertNotNull(edxPatientMatchResult); } + @Test void getMatchingNextOfKin_telephone_throw_exp() { PersonContainer personContainer = new PersonContainer(); @@ -189,6 +191,7 @@ void getMatchingNextOfKin_telephone_throw_exp() { assertThrows(DataProcessingException.class, () -> nokMatchingService.getMatchingNextOfKin(personContainer)); } + @Test void getMatchingNextOfKin_entityId_throw_exp() throws DataProcessingException { PersonContainer personContainer = new PersonContainer(); @@ -221,6 +224,7 @@ void getMatchingNextOfKin_entityId_throw_exp() throws DataProcessingException { assertThrows(DataProcessingException.class, () -> nokMatchingService.getMatchingNextOfKin(personContainer)); } + @Test void getMatchingNextOfKin_throw_exp() { PersonContainer personContainer = new PersonContainer(); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/PatientMatchingServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/PatientMatchingServiceTest.java index e65f3ed24..576516526 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/PatientMatchingServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/PatientMatchingServiceTest.java @@ -70,7 +70,7 @@ void getMatchingPatient_localid() throws DataProcessingException { edxPatientMatchFoundDT.setMultipleMatch(false); when(edxPatientMatchRepositoryUtil.getEdxPatientMatchOnMatchString(any(), any())).thenReturn(edxPatientMatchFoundDT); //call test method - EdxPatientMatchDto edxPatientMatchDtoResult=patientMatchingService.getMatchingPatient(personContainer); + EdxPatientMatchDto edxPatientMatchDtoResult = patientMatchingService.getMatchingPatient(personContainer); assertNotNull(edxPatientMatchDtoResult); } @@ -111,7 +111,7 @@ void getMatchingPatient_localid_MultipleMatch_true() throws DataProcessingExcept mpr.setItNew(false); mpr.setItDirty(false); when(patientRepositoryUtil.loadPerson(any())).thenReturn(mpr); - EdxPatientMatchDto edxPatientMatchDtoResult=patientMatchingService.getMatchingPatient(personContainer); + EdxPatientMatchDto edxPatientMatchDtoResult = patientMatchingService.getMatchingPatient(personContainer); assertNotNull(edxPatientMatchDtoResult); } @@ -174,7 +174,7 @@ void getMatchingPatient_identifier() throws DataProcessingException { mpr.setItNew(false); mpr.setItDirty(false); when(patientRepositoryUtil.loadPerson(any())).thenReturn(mpr); - EdxPatientMatchDto edxPatientMatchDtoResult=patientMatchingService.getMatchingPatient(personContainer); + EdxPatientMatchDto edxPatientMatchDtoResult = patientMatchingService.getMatchingPatient(personContainer); assertNotNull(edxPatientMatchDtoResult); } @@ -224,7 +224,7 @@ void getMatchingPatient_identifier_multimatch_false() throws DataProcessingExcep mpr.setItNew(false); mpr.setItDirty(false); when(patientRepositoryUtil.loadPerson(any())).thenReturn(mpr); - EdxPatientMatchDto edxPatientMatchDtoResult=patientMatchingService.getMatchingPatient(personContainer); + EdxPatientMatchDto edxPatientMatchDtoResult = patientMatchingService.getMatchingPatient(personContainer); assertNotNull(edxPatientMatchDtoResult); } @@ -263,7 +263,7 @@ void getMatchingPatient_LNmFnmDobCurSexStr() throws DataProcessingException { mpr.setItNew(false); mpr.setItDirty(false); when(patientRepositoryUtil.loadPerson(any())).thenReturn(mpr); - EdxPatientMatchDto edxPatientMatchDtoResult=patientMatchingService.getMatchingPatient(personContainer); + EdxPatientMatchDto edxPatientMatchDtoResult = patientMatchingService.getMatchingPatient(personContainer); assertNotNull(edxPatientMatchDtoResult); } @@ -302,7 +302,7 @@ void getMatchingPatient_LNmFnmDobCurSexStr_multimatch_true() throws DataProcessi mpr.setItNew(false); mpr.setItDirty(false); when(patientRepositoryUtil.loadPerson(any())).thenReturn(mpr); - EdxPatientMatchDto edxPatientMatchDtoResult= patientMatchingService.getMatchingPatient(personContainer); + EdxPatientMatchDto edxPatientMatchDtoResult = patientMatchingService.getMatchingPatient(personContainer); assertNotNull(edxPatientMatchDtoResult); } @@ -334,7 +334,7 @@ void getMatchingPatient_LNmFnmDobCurSexStr_throwExp() throws DataProcessingExcep @Test void getMultipleMatchFound() { boolean multiMatchResult = patientMatchingService.getMultipleMatchFound(); - assertEquals(false, multiMatchResult); + assertFalse(multiMatchResult); } @Test diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/PersonServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/PersonServiceTest.java index 95672b27d..5c6ff345e 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/PersonServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/PersonServiceTest.java @@ -49,6 +49,7 @@ void setUp() { MockitoAnnotations.openMocks(this); } + @AfterEach void tearDown() { Mockito.reset(patientMatchingServiceMock); @@ -56,87 +57,92 @@ void tearDown() { Mockito.reset(providerMatchingServiceMock); Mockito.reset(uidServiceMock); } + @Test void processingNextOfKin() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); - LabResultProxyContainer labResultProxyContainer=new LabResultProxyContainer(); + LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); - PersonContainer personContainerResult=personService.processingNextOfKin(labResultProxyContainer,personContainer); + PersonContainer personContainerResult = personService.processingNextOfKin(labResultProxyContainer, personContainer); assertNotNull(personContainerResult); } + @Test void processingNextOfKin_personid_null() { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(null); - LabResultProxyContainer labResultProxyContainer=new LabResultProxyContainer(); - assertThrows(DataProcessingException.class, () -> personService.processingNextOfKin(labResultProxyContainer,personContainer)); + LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); + assertThrows(DataProcessingException.class, () -> personService.processingNextOfKin(labResultProxyContainer, personContainer)); } @Test void processingPatient() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); - PersonNameDto personNameDto=new PersonNameDto(); + PersonNameDto personNameDto = new PersonNameDto(); personNameDto.setNmUseCd("L"); personNameDto.setFirstNm("TestFirstName"); personNameDto.setLastNm("TestLastName"); personContainer.getThePersonNameDtoCollection().add(personNameDto); - LabResultProxyContainer labResultProxyContainer=new LabResultProxyContainer(); - EdxLabInformationDto edxLabInformationDto=new EdxLabInformationDto(); + LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); edxLabInformationDto.setPatientUid(123L); - PersonContainer personContainerResult=personService.processingPatient(labResultProxyContainer,edxLabInformationDto,personContainer); + PersonContainer personContainerResult = personService.processingPatient(labResultProxyContainer, edxLabInformationDto, personContainer); assertNotNull(personContainerResult); } + @Test void processingPatient_with_personNameCollection() { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.setThePersonNameDtoCollection(new ArrayList<>()); - LabResultProxyContainer labResultProxyContainer=new LabResultProxyContainer(); - EdxLabInformationDto edxLabInformationDto=new EdxLabInformationDto(); + LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); edxLabInformationDto.setPatientUid(123L); - assertThrows(DataProcessingException.class, () -> personService.processingPatient(labResultProxyContainer,edxLabInformationDto,personContainer)); + assertThrows(DataProcessingException.class, () -> personService.processingPatient(labResultProxyContainer, edxLabInformationDto, personContainer)); } + @Test void processingPatient_personid_zero() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(0L); - PersonNameDto personNameDto=new PersonNameDto(); + PersonNameDto personNameDto = new PersonNameDto(); personNameDto.setNmUseCd("L"); personNameDto.setFirstNm("TestFirstName"); personNameDto.setLastNm("TestLastName"); personContainer.getThePersonNameDtoCollection().add(personNameDto); - LabResultProxyContainer labResultProxyContainer=new LabResultProxyContainer(); - EdxLabInformationDto edxLabInformationDto=new EdxLabInformationDto(); + LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); edxLabInformationDto.setPatientUid(0L); - PersonContainer personContainerResult=personService.processingPatient(labResultProxyContainer,edxLabInformationDto,personContainer); + PersonContainer personContainerResult = personService.processingPatient(labResultProxyContainer, edxLabInformationDto, personContainer); assertNotNull(personContainerResult); } + @Test void processingPatient_personid_PatientMatchedFound() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.thePersonDto.setPersonParentUid(123L); personContainer.setPatientMatchedFound(true); - PersonNameDto personNameDto=new PersonNameDto(); + PersonNameDto personNameDto = new PersonNameDto(); personNameDto.setNmUseCd("L"); personNameDto.setFirstNm("TestFirstName"); personNameDto.setLastNm("TestLastName"); personContainer.getThePersonNameDtoCollection().add(personNameDto); - LabResultProxyContainer labResultProxyContainer=new LabResultProxyContainer(); + LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); - EdxLabInformationDto edxLabInformationDto=new EdxLabInformationDto(); + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); edxLabInformationDto.setPatientUid(0L); EdxPatientMatchDto edxPatientMatchFoundDT = new EdxPatientMatchDto(); @@ -146,89 +152,89 @@ void processingPatient_personid_PatientMatchedFound() throws DataProcessingExcep when(patientMatchingServiceMock.getMatchingPatient(personContainer)).thenReturn(edxPatientMatchFoundDT); when(patientMatchingServiceMock.getMultipleMatchFound()).thenReturn(false); - PersonContainer personContainerResult=personService.processingPatient(labResultProxyContainer,edxLabInformationDto,personContainer); + PersonContainer personContainerResult = personService.processingPatient(labResultProxyContainer, edxLabInformationDto, personContainer); assertNotNull(personContainerResult); } @Test void processingProvider() throws DataProcessingException { - LabResultProxyContainer labResultProxyContainer=new LabResultProxyContainer(); - PersonContainer personContainer=new PersonContainer(); + LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(111L); personContainer.setRole("testrole"); - EdxLabInformationDto edxLabInformationDto=new EdxLabInformationDto(); - boolean orderingProviderIndicator=false; + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + boolean orderingProviderIndicator = false; EDXActivityDetailLogDto eDXActivityDetailLogDto = new EDXActivityDetailLogDto(); eDXActivityDetailLogDto.setRecordId("123"); when(providerMatchingServiceMock.getMatchingProvider(personContainer)).thenReturn(eDXActivityDetailLogDto); - PersonContainer personContainerResult=personService.processingProvider(labResultProxyContainer,edxLabInformationDto,personContainer,orderingProviderIndicator); + PersonContainer personContainerResult = personService.processingProvider(labResultProxyContainer, edxLabInformationDto, personContainer, orderingProviderIndicator); assertNull(personContainerResult); /// Role null personContainer.setRole(null); eDXActivityDetailLogDto.setRecordId(null); when(providerMatchingServiceMock.getMatchingProvider(personContainer)).thenReturn(eDXActivityDetailLogDto); - PersonContainer personContainerResult1=personService.processingProvider(labResultProxyContainer,edxLabInformationDto,personContainer,orderingProviderIndicator); + PersonContainer personContainerResult1 = personService.processingProvider(labResultProxyContainer, edxLabInformationDto, personContainer, orderingProviderIndicator); assertNull(personContainerResult1); } @Test void processingProvider_with_role() throws DataProcessingException { - LabResultProxyContainer labResultProxyContainer=new LabResultProxyContainer(); - PersonContainer personContainer=new PersonContainer(); + LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(111L); personContainer.setRole(EdxELRConstant.ELR_OP_CD); - EdxLabInformationDto edxLabInformationDto=new EdxLabInformationDto(); - boolean orderingProviderIndicator=false; + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + boolean orderingProviderIndicator = false; EDXActivityDetailLogDto eDXActivityDetailLogDto = new EDXActivityDetailLogDto(); eDXActivityDetailLogDto.setRecordId(null); when(providerMatchingServiceMock.getMatchingProvider(personContainer)).thenReturn(eDXActivityDetailLogDto); - PersonContainer personContainerResult=personService.processingProvider(labResultProxyContainer,edxLabInformationDto,personContainer,orderingProviderIndicator); + PersonContainer personContainerResult = personService.processingProvider(labResultProxyContainer, edxLabInformationDto, personContainer, orderingProviderIndicator); assertNotNull(personContainerResult); } @Test void getMatchedPersonUID() { - Collection personCollection=new ArrayList<>(); - PersonContainer personContainer=new PersonContainer(); + Collection personCollection = new ArrayList<>(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(111L); personContainer.getThePersonDto().setCdDescTxt(EdxELRConstant.ELR_PATIENT_DESC); personCollection.add(personContainer); - LabResultProxyContainer matchedlabResultProxyVO=new LabResultProxyContainer(); + LabResultProxyContainer matchedlabResultProxyVO = new LabResultProxyContainer(); matchedlabResultProxyVO.setThePersonContainerCollection(personCollection); - Long personUidAcutual= personService.getMatchedPersonUID(matchedlabResultProxyVO); + Long personUidAcutual = personService.getMatchedPersonUID(matchedlabResultProxyVO); assertEquals(111L, personUidAcutual); } @Test void getMatchedPersonUID_with_cdDescText_null() { - Collection personCollection=new ArrayList<>(); - PersonContainer personContainer=new PersonContainer(); + Collection personCollection = new ArrayList<>(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(111L); personCollection.add(personContainer); - LabResultProxyContainer matchedlabResultProxyVO=new LabResultProxyContainer(); + LabResultProxyContainer matchedlabResultProxyVO = new LabResultProxyContainer(); matchedlabResultProxyVO.setThePersonContainerCollection(personCollection); - Long personUidAcutual= personService.getMatchedPersonUID(matchedlabResultProxyVO); + Long personUidAcutual = personService.getMatchedPersonUID(matchedlabResultProxyVO); assertNull(personUidAcutual); } @Test void updatePersonELRUpdate() { - LabResultProxyContainer labResultProxyVO=new LabResultProxyContainer(); - LabResultProxyContainer matchedLabResultProxyVO=new LabResultProxyContainer(); + LabResultProxyContainer labResultProxyVO = new LabResultProxyContainer(); + LabResultProxyContainer matchedLabResultProxyVO = new LabResultProxyContainer(); //matchedLabResultProxyVO - Collection personCollection=new ArrayList<>(); - PersonContainer personContainer=new PersonContainer(); + Collection personCollection = new ArrayList<>(); + PersonContainer personContainer = new PersonContainer(); personContainer.getThePersonDto().setCdDescTxt(EdxELRConstant.ELR_PATIENT_DESC); personContainer.getThePersonDto().setPersonUid(123L); personContainer.getThePersonDto().setPersonParentUid(234L); @@ -237,34 +243,34 @@ void updatePersonELRUpdate() { personCollection.add(personContainer); //person name - PersonNameDto personNameDT=new PersonNameDto(); + PersonNameDto personNameDT = new PersonNameDto(); personNameDT.setPersonNameSeq(1); personContainer.getThePersonNameDtoCollection().add(personNameDT); //person race - PersonRaceDto personRaceDT=new PersonRaceDto(); + PersonRaceDto personRaceDT = new PersonRaceDto(); personRaceDT.setRaceCd("TEST_RACE_CD"); personContainer.getThePersonRaceDtoCollection().add(personRaceDT); //person ethnic group - PersonEthnicGroupDto personEthnicGroupDT=new PersonEthnicGroupDto(); + PersonEthnicGroupDto personEthnicGroupDT = new PersonEthnicGroupDto(); personEthnicGroupDT.setEthnicGroupCd("TEST_ETHNICGROUP_CD"); personContainer.getThePersonEthnicGroupDtoCollection().add(personEthnicGroupDT); //Entity Id - EntityIdDto entityIDDT=new EntityIdDto(); + EntityIdDto entityIDDT = new EntityIdDto(); entityIDDT.setEntityIdSeq(1); personContainer.getTheEntityIdDtoCollection().add(entityIDDT); //Entity Locator Participation - EntityLocatorParticipationDto entityLocPartDT=new EntityLocatorParticipationDto(); + EntityLocatorParticipationDto entityLocPartDT = new EntityLocatorParticipationDto(); - PostalLocatorDto thePostalLocatorDto=new PostalLocatorDto(); + PostalLocatorDto thePostalLocatorDto = new PostalLocatorDto(); thePostalLocatorDto.setPostalLocatorUid(111L); - PhysicalLocatorDto thePhysicalLocatorDto=new PhysicalLocatorDto(); + PhysicalLocatorDto thePhysicalLocatorDto = new PhysicalLocatorDto(); thePhysicalLocatorDto.setPhysicalLocatorUid(222L); - TeleLocatorDto theTeleLocatorDto=new TeleLocatorDto(); + TeleLocatorDto theTeleLocatorDto = new TeleLocatorDto(); theTeleLocatorDto.setTeleLocatorUid(333L); entityLocPartDT.setThePostalLocatorDto(thePostalLocatorDto); @@ -275,41 +281,41 @@ void updatePersonELRUpdate() { matchedLabResultProxyVO.setThePersonContainerCollection(personCollection); //labResultProxyVO - Collection personCollection1=new ArrayList<>(); + Collection personCollection1 = new ArrayList<>(); - PersonContainer personContainer1=new PersonContainer(); + PersonContainer personContainer1 = new PersonContainer(); personContainer1.getThePersonDto().setCdDescTxt(EdxELRConstant.ELR_PATIENT_DESC); personCollection1.add(personContainer1); //person name - PersonNameDto personNameDT1=new PersonNameDto(); + PersonNameDto personNameDT1 = new PersonNameDto(); personNameDT1.setPersonNameSeq(1); personContainer1.getThePersonNameDtoCollection().add(personNameDT1); //person race - PersonRaceDto personRaceDT1=new PersonRaceDto(); + PersonRaceDto personRaceDT1 = new PersonRaceDto(); personRaceDT1.setRaceCd("TEST_RACE_CD"); personContainer1.getThePersonRaceDtoCollection().add(personRaceDT1); //person ethnic group - PersonEthnicGroupDto personEthnicGroupDT1=new PersonEthnicGroupDto(); + PersonEthnicGroupDto personEthnicGroupDT1 = new PersonEthnicGroupDto(); personEthnicGroupDT1.setEthnicGroupCd("TEST_ETHNICGROUP_CD"); personContainer1.getThePersonEthnicGroupDtoCollection().add(personEthnicGroupDT1); //Entity Id - EntityIdDto entityIDDT1=new EntityIdDto(); + EntityIdDto entityIDDT1 = new EntityIdDto(); entityIDDT1.setEntityIdSeq(1); personContainer1.getTheEntityIdDtoCollection().add(entityIDDT1); //Entity Locator Participation - EntityLocatorParticipationDto entityLocPartDT1=new EntityLocatorParticipationDto(); + EntityLocatorParticipationDto entityLocPartDT1 = new EntityLocatorParticipationDto(); - PostalLocatorDto thePostalLocatorDto1=new PostalLocatorDto(); + PostalLocatorDto thePostalLocatorDto1 = new PostalLocatorDto(); thePostalLocatorDto1.setPostalLocatorUid(111L); - PhysicalLocatorDto thePhysicalLocatorDto1=new PhysicalLocatorDto(); + PhysicalLocatorDto thePhysicalLocatorDto1 = new PhysicalLocatorDto(); thePhysicalLocatorDto1.setPhysicalLocatorUid(222L); - TeleLocatorDto theTeleLocatorDto1=new TeleLocatorDto(); + TeleLocatorDto theTeleLocatorDto1 = new TeleLocatorDto(); theTeleLocatorDto1.setTeleLocatorUid(333L); entityLocPartDT1.setThePostalLocatorDto(thePostalLocatorDto1); @@ -319,17 +325,18 @@ void updatePersonELRUpdate() { labResultProxyVO.setThePersonContainerCollection(personCollection1); - personService.updatePersonELRUpdate(labResultProxyVO,matchedLabResultProxyVO); + personService.updatePersonELRUpdate(labResultProxyVO, matchedLabResultProxyVO); assertNotNull(labResultProxyVO); } + @Test void updatePersonELRUpdate_with_empty_proxy_collections() { - LabResultProxyContainer labResultProxyVO=new LabResultProxyContainer(); - LabResultProxyContainer matchedLabResultProxyVO=new LabResultProxyContainer(); + LabResultProxyContainer labResultProxyVO = new LabResultProxyContainer(); + LabResultProxyContainer matchedLabResultProxyVO = new LabResultProxyContainer(); //matchedLabResultProxyVO - Collection personCollection=new ArrayList<>(); - PersonContainer personContainer=new PersonContainer(); + Collection personCollection = new ArrayList<>(); + PersonContainer personContainer = new PersonContainer(); personContainer.getThePersonDto().setCdDescTxt(EdxELRConstant.ELR_PATIENT_DESC); personContainer.getThePersonDto().setPersonUid(123L); personContainer.getThePersonDto().setPersonParentUid(234L); @@ -338,34 +345,34 @@ void updatePersonELRUpdate_with_empty_proxy_collections() { personCollection.add(personContainer); //person name - PersonNameDto personNameDT=new PersonNameDto(); + PersonNameDto personNameDT = new PersonNameDto(); personNameDT.setPersonNameSeq(1); //condition 2 personContainer.getThePersonNameDtoCollection().add(personNameDT); //person race - PersonRaceDto personRaceDT=new PersonRaceDto(); + PersonRaceDto personRaceDT = new PersonRaceDto(); personRaceDT.setRaceCd("TEST_RACE_CD"); personContainer.getThePersonRaceDtoCollection().add(personRaceDT); //person ethnic group - PersonEthnicGroupDto personEthnicGroupDT=new PersonEthnicGroupDto(); + PersonEthnicGroupDto personEthnicGroupDT = new PersonEthnicGroupDto(); personEthnicGroupDT.setEthnicGroupCd("TEST_ETHNICGROUP_CD"); personContainer.getThePersonEthnicGroupDtoCollection().add(personEthnicGroupDT); //Entity Id - EntityIdDto entityIDDT=new EntityIdDto(); + EntityIdDto entityIDDT = new EntityIdDto(); entityIDDT.setEntityIdSeq(1); personContainer.getTheEntityIdDtoCollection().add(entityIDDT); //Entity Locator Participation - EntityLocatorParticipationDto entityLocPartDT=new EntityLocatorParticipationDto(); + EntityLocatorParticipationDto entityLocPartDT = new EntityLocatorParticipationDto(); - PostalLocatorDto thePostalLocatorDto=new PostalLocatorDto(); + PostalLocatorDto thePostalLocatorDto = new PostalLocatorDto(); thePostalLocatorDto.setPostalLocatorUid(111L); - PhysicalLocatorDto thePhysicalLocatorDto=new PhysicalLocatorDto(); + PhysicalLocatorDto thePhysicalLocatorDto = new PhysicalLocatorDto(); thePhysicalLocatorDto.setPhysicalLocatorUid(222L); - TeleLocatorDto theTeleLocatorDto=new TeleLocatorDto(); + TeleLocatorDto theTeleLocatorDto = new TeleLocatorDto(); theTeleLocatorDto.setTeleLocatorUid(333L); entityLocPartDT.setThePostalLocatorDto(thePostalLocatorDto); @@ -376,20 +383,20 @@ void updatePersonELRUpdate_with_empty_proxy_collections() { matchedLabResultProxyVO.setThePersonContainerCollection(personCollection); //labResultProxyVO - Collection personCollection1=new ArrayList<>(); + Collection personCollection1 = new ArrayList<>(); - PersonContainer personContainer1=new PersonContainer(); + PersonContainer personContainer1 = new PersonContainer(); personContainer1.getThePersonDto().setCdDescTxt(EdxELRConstant.ELR_PATIENT_DESC); personCollection1.add(personContainer1); //person name personContainer1.setThePersonNameDtoCollection(null); //Person race - PersonRaceDto personRaceDT1=new PersonRaceDto(); + PersonRaceDto personRaceDT1 = new PersonRaceDto(); personContainer1.getThePersonRaceDtoCollection().add(personRaceDT1); //person ethnic group - PersonEthnicGroupDto personEthnicGroupDT1=new PersonEthnicGroupDto(); + PersonEthnicGroupDto personEthnicGroupDT1 = new PersonEthnicGroupDto(); personContainer1.getThePersonEthnicGroupDtoCollection().add(personEthnicGroupDT1); //Entity Id @@ -400,7 +407,7 @@ void updatePersonELRUpdate_with_empty_proxy_collections() { labResultProxyVO.setThePersonContainerCollection(personCollection1); - personService.updatePersonELRUpdate(labResultProxyVO,matchedLabResultProxyVO); + personService.updatePersonELRUpdate(labResultProxyVO, matchedLabResultProxyVO); assertNotNull(labResultProxyVO); } } \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/ProviderMatchingServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/ProviderMatchingServiceTest.java index acde07174..df1625017 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/ProviderMatchingServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/ProviderMatchingServiceTest.java @@ -63,45 +63,48 @@ void tearDown() { @Test void getMatchingProvider_local_id_entityMatch() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.setLocalIdentifier("123"); - EdxEntityMatchDto edxEntityMatchingDT=new EdxEntityMatchDto(); + EdxEntityMatchDto edxEntityMatchingDT = new EdxEntityMatchDto(); edxEntityMatchingDT.setEntityUid(123L); edxEntityMatchingDT.setTypeCd("TYPE_CD"); edxEntityMatchingDT.setMatchString("MATCH_STRING"); - when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(),any())).thenReturn(edxEntityMatchingDT); + when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(), any())).thenReturn(edxEntityMatchingDT); - EDXActivityDetailLogDto edxActivityDetailLogDtoResult=providerMatchingService.getMatchingProvider(personContainer); - assertEquals(String.valueOf(edxEntityMatchingDT.getEntityUid()),edxActivityDetailLogDtoResult.getRecordId()); + EDXActivityDetailLogDto edxActivityDetailLogDtoResult = providerMatchingService.getMatchingProvider(personContainer); + assertEquals(String.valueOf(edxEntityMatchingDT.getEntityUid()), edxActivityDetailLogDtoResult.getRecordId()); } + @Test void getMatchingProvider_local_id_with_entityMatch_null_throw_exp() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.setLocalIdentifier("123"); - EdxEntityMatchDto edxEntityMatchingDT=new EdxEntityMatchDto(); - when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(),any())).thenReturn(edxEntityMatchingDT); + EdxEntityMatchDto edxEntityMatchingDT = new EdxEntityMatchDto(); + when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(), any())).thenReturn(edxEntityMatchingDT); assertThrows(DataProcessingException.class, () -> providerMatchingService.getMatchingProvider(personContainer)); } + @Test void getMatchingProvider_local_id_throws_exp() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.setLocalIdentifier("123"); when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(anyString(), anyString())).thenThrow(Mockito.mock(DataProcessingException.class)); assertThrows(DataProcessingException.class, () -> providerMatchingService.getMatchingProvider(personContainer)); } + @Test void getMatchingProvider_entityMatch_Identifier() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.getThePersonDto().setCd(NEDSSConstant.PAT); //for getIdentifier - EntityIdDto entityIdDto=new EntityIdDto(); + EntityIdDto entityIdDto = new EntityIdDto(); entityIdDto.setEntityIdSeq(1); entityIdDto.setStatusCd(NEDSSConstant.STATUS_ACTIVE); entityIdDto.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_ACTIVE); @@ -113,7 +116,7 @@ void getMatchingProvider_entityMatch_Identifier() throws DataProcessingException entityIdDto.setAssigningAuthorityIdType("TEST"); personContainer.getTheEntityIdDtoCollection().add(entityIdDto); - PersonNameDto personNameDto=new PersonNameDto(); + PersonNameDto personNameDto = new PersonNameDto(); personNameDto.setNmUseCd("L"); personNameDto.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_ACTIVE); personNameDto.setAsOfDate(new Timestamp(System.currentTimeMillis())); @@ -121,24 +124,25 @@ void getMatchingProvider_entityMatch_Identifier() throws DataProcessingException personNameDto.setFirstNm("TEST_FIRST_NM"); personContainer.getThePersonNameDtoCollection().add(personNameDto); - EdxEntityMatchDto edxEntityMatchingDT=new EdxEntityMatchDto(); + EdxEntityMatchDto edxEntityMatchingDT = new EdxEntityMatchDto(); edxEntityMatchingDT.setEntityUid(123L); edxEntityMatchingDT.setTypeCd("TYPE_CD"); edxEntityMatchingDT.setMatchString("MATCH_STRING"); - when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(),any())).thenReturn(edxEntityMatchingDT); + when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(), any())).thenReturn(edxEntityMatchingDT); - EDXActivityDetailLogDto edxActivityDetailLogDtoResult=providerMatchingService.getMatchingProvider(personContainer); - assertEquals(String.valueOf(123L),edxActivityDetailLogDtoResult.getRecordId()); + EDXActivityDetailLogDto edxActivityDetailLogDtoResult = providerMatchingService.getMatchingProvider(personContainer); + assertEquals(String.valueOf(123L), edxActivityDetailLogDtoResult.getRecordId()); } + @Test void getMatchingProvider_entityMatch_Identifier_thorws_exp() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.getThePersonDto().setCd(NEDSSConstant.PAT); //for getIdentifier - EntityIdDto entityIdDto=new EntityIdDto(); + EntityIdDto entityIdDto = new EntityIdDto(); entityIdDto.setEntityIdSeq(1); entityIdDto.setStatusCd(NEDSSConstant.STATUS_ACTIVE); entityIdDto.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_ACTIVE); @@ -150,7 +154,7 @@ void getMatchingProvider_entityMatch_Identifier_thorws_exp() throws DataProcessi entityIdDto.setAssigningAuthorityIdType("TEST"); personContainer.getTheEntityIdDtoCollection().add(entityIdDto); - PersonNameDto personNameDto=new PersonNameDto(); + PersonNameDto personNameDto = new PersonNameDto(); personNameDto.setNmUseCd("L"); personNameDto.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_ACTIVE); personNameDto.setAsOfDate(new Timestamp(System.currentTimeMillis())); @@ -161,15 +165,16 @@ void getMatchingProvider_entityMatch_Identifier_thorws_exp() throws DataProcessi when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(anyString(), anyString())).thenThrow(Mockito.mock(DataProcessingException.class)); assertThrows(DataProcessingException.class, () -> providerMatchingService.getMatchingProvider(personContainer)); } + @Test void getMatchingProvider_entityMatch_Identifier_null_edxentity() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.getThePersonDto().setCd(NEDSSConstant.PAT); //for getIdentifier - EntityIdDto entityIdDto=new EntityIdDto(); + EntityIdDto entityIdDto = new EntityIdDto(); entityIdDto.setEntityIdSeq(1); entityIdDto.setStatusCd(NEDSSConstant.STATUS_ACTIVE); entityIdDto.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_ACTIVE); @@ -181,7 +186,7 @@ void getMatchingProvider_entityMatch_Identifier_null_edxentity() throws DataProc entityIdDto.setAssigningAuthorityIdType("TEST"); personContainer.getTheEntityIdDtoCollection().add(entityIdDto); - PersonNameDto personNameDto=new PersonNameDto(); + PersonNameDto personNameDto = new PersonNameDto(); personNameDto.setNmUseCd("L"); personNameDto.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_ACTIVE); personNameDto.setAsOfDate(new Timestamp(System.currentTimeMillis())); @@ -189,15 +194,16 @@ void getMatchingProvider_entityMatch_Identifier_null_edxentity() throws DataProc personNameDto.setFirstNm("TEST_FIRST_NM"); personContainer.getThePersonNameDtoCollection().add(personNameDto); - EdxEntityMatchDto edxEntityMatchingDT=new EdxEntityMatchDto(); - when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(),any())).thenReturn(edxEntityMatchingDT); + EdxEntityMatchDto edxEntityMatchingDT = new EdxEntityMatchDto(); + when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(), any())).thenReturn(edxEntityMatchingDT); - EDXActivityDetailLogDto edxActivityDetailLogDtoResult=providerMatchingService.getMatchingProvider(personContainer); - assertEquals(String.valueOf(123L),edxActivityDetailLogDtoResult.getRecordId()); + EDXActivityDetailLogDto edxActivityDetailLogDtoResult = providerMatchingService.getMatchingProvider(personContainer); + assertEquals(String.valueOf(123L), edxActivityDetailLogDtoResult.getRecordId()); } + @Test void getMatchingProvider_name_addr() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.getThePersonDto().setCd(NEDSSConstant.PRV); @@ -222,18 +228,19 @@ void getMatchingProvider_name_addr() throws DataProcessingException { entLocPartDT.setThePostalLocatorDto(postLocDT); personContainer.getTheEntityLocatorParticipationDtoCollection().add(entLocPartDT); - EdxEntityMatchDto edxEntityMatchingDT=new EdxEntityMatchDto(); + EdxEntityMatchDto edxEntityMatchingDT = new EdxEntityMatchDto(); edxEntityMatchingDT.setEntityUid(123L); edxEntityMatchingDT.setTypeCd("TYPE_CD"); edxEntityMatchingDT.setMatchString("MATCH_STRING"); - when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(),any())).thenReturn(edxEntityMatchingDT); + when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(), any())).thenReturn(edxEntityMatchingDT); - EDXActivityDetailLogDto edxActivityDetailLogDtoResult=providerMatchingService.getMatchingProvider(personContainer); - assertEquals(String.valueOf(123L),edxActivityDetailLogDtoResult.getRecordId()); + EDXActivityDetailLogDto edxActivityDetailLogDtoResult = providerMatchingService.getMatchingProvider(personContainer); + assertEquals(String.valueOf(123L), edxActivityDetailLogDtoResult.getRecordId()); } + @Test void getMatchingProvider_name_addr_with_empty_entity() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.getThePersonDto().setCd(NEDSSConstant.PRV); @@ -253,16 +260,16 @@ void getMatchingProvider_name_addr_with_empty_entity() throws DataProcessingExce entLocPartDT.setThePostalLocatorDto(postLocDT); personContainer.getTheEntityLocatorParticipationDtoCollection().add(entLocPartDT); - EdxEntityMatchDto edxEntityMatchingDT=new EdxEntityMatchDto(); - when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(),any())).thenReturn(edxEntityMatchingDT); + EdxEntityMatchDto edxEntityMatchingDT = new EdxEntityMatchDto(); + when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(), any())).thenReturn(edxEntityMatchingDT); - EDXActivityDetailLogDto edxActivityDetailLogDtoResult=providerMatchingService.getMatchingProvider(personContainer); - assertEquals(String.valueOf(123L),edxActivityDetailLogDtoResult.getRecordId()); + EDXActivityDetailLogDto edxActivityDetailLogDtoResult = providerMatchingService.getMatchingProvider(personContainer); + assertEquals(String.valueOf(123L), edxActivityDetailLogDtoResult.getRecordId()); } @Test void getMatchingProvider_name_addr_throws_exp() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.getThePersonDto().setCd(NEDSSConstant.PRV); @@ -285,9 +292,10 @@ void getMatchingProvider_name_addr_throws_exp() throws DataProcessingException { when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(anyString(), anyString())).thenThrow(Mockito.mock(DataProcessingException.class)); assertThrows(DataProcessingException.class, () -> providerMatchingService.getMatchingProvider(personContainer)); } + @Test void getMatchingProvider_telephone() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); EdxEntityMatchDto edxEntityMatchDto = new EdxEntityMatchDto(); @@ -306,17 +314,18 @@ void getMatchingProvider_telephone() throws DataProcessingException { entLocPartDT.setTheTeleLocatorDto(teleLocDT); personContainer.getTheEntityLocatorParticipationDtoCollection().add(entLocPartDT); - EdxEntityMatchDto edxEntityMatchingDT=new EdxEntityMatchDto(); + EdxEntityMatchDto edxEntityMatchingDT = new EdxEntityMatchDto(); edxEntityMatchingDT.setEntityUid(123L); edxEntityMatchingDT.setTypeCd("TYPE_CD"); edxEntityMatchingDT.setMatchString("MATCH_STRING"); - when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(),any())).thenReturn(edxEntityMatchingDT); - EDXActivityDetailLogDto edxActivityDetailLogDtoResult=providerMatchingService.getMatchingProvider(personContainer); - assertEquals(String.valueOf(123L),edxActivityDetailLogDtoResult.getRecordId()); + when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(), any())).thenReturn(edxEntityMatchingDT); + EDXActivityDetailLogDto edxActivityDetailLogDtoResult = providerMatchingService.getMatchingProvider(personContainer); + assertEquals(String.valueOf(123L), edxActivityDetailLogDtoResult.getRecordId()); } + @Test void getMatchingProvider_telephone_empty_entity() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.getThePersonDto().setCd(NEDSSConstant.PRV); @@ -332,17 +341,17 @@ void getMatchingProvider_telephone_empty_entity() throws DataProcessingException entLocPartDT.setTheTeleLocatorDto(teleLocDT); personContainer.getTheEntityLocatorParticipationDtoCollection().add(entLocPartDT); - EdxEntityMatchDto edxEntityMatchingDT=new EdxEntityMatchDto(); + EdxEntityMatchDto edxEntityMatchingDT = new EdxEntityMatchDto(); - when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(),any())).thenReturn(edxEntityMatchingDT); + when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(any(), any())).thenReturn(edxEntityMatchingDT); - EDXActivityDetailLogDto edxActivityDetailLogDtoResult=providerMatchingService.getMatchingProvider(personContainer); - assertEquals(String.valueOf(123L),edxActivityDetailLogDtoResult.getRecordId()); + EDXActivityDetailLogDto edxActivityDetailLogDtoResult = providerMatchingService.getMatchingProvider(personContainer); + assertEquals(String.valueOf(123L), edxActivityDetailLogDtoResult.getRecordId()); } @Test void getMatchingProvider_telephone_throws_exp() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.getThePersonDto().setCd(NEDSSConstant.PRV); @@ -361,20 +370,22 @@ void getMatchingProvider_telephone_throws_exp() throws DataProcessingException { when(edxPatientMatchRepositoryUtil.getEdxEntityMatchOnMatchString(anyString(), anyString())).thenThrow(Mockito.mock(DataProcessingException.class)); assertThrows(DataProcessingException.class, () -> providerMatchingService.getMatchingProvider(personContainer)); } + @Test void getMatchingProvider_provider() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); personContainer.getThePersonDto().setCd(NEDSSConstant.PRV); - EDXActivityDetailLogDto edxActivityDetailLogDtoResult=providerMatchingService.getMatchingProvider(personContainer); - assertEquals(String.valueOf(123L),edxActivityDetailLogDtoResult.getRecordId()); + EDXActivityDetailLogDto edxActivityDetailLogDtoResult = providerMatchingService.getMatchingProvider(personContainer); + assertEquals(String.valueOf(123L), edxActivityDetailLogDtoResult.getRecordId()); } + @Test void setProvider() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.thePersonDto.setPersonUid(123L); - Long idResult=providerMatchingService.setProvider(personContainer,"TEST"); - assertEquals(123L,idResult); + Long idResult = providerMatchingService.setProvider(personContainer, "TEST"); + assertEquals(123L, idResult); } } \ No newline at end of file diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/base/MatchingBaseServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/base/MatchingBaseServiceTest.java index c3854b9ef..193f2dde7 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/base/MatchingBaseServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/base/MatchingBaseServiceTest.java @@ -29,6 +29,8 @@ import static org.mockito.Mockito.*; class MatchingBaseServiceTest { + @Mock + AuthUtil authUtil; @Mock private EdxPatientMatchRepositoryUtil edxPatientMatchRepositoryUtil; @Mock @@ -43,7 +45,9 @@ class MatchingBaseServiceTest { @Spy private MatchingBaseService matchingBaseService; @Mock - AuthUtil authUtil; + private PersonContainer personContainer; + @Mock + private Coded coded; @BeforeEach void setUp() { @@ -54,16 +58,12 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } - @Mock - private PersonContainer personContainer; - @Mock - private Coded coded; @AfterEach void tearDown() { - Mockito.reset(edxPatientMatchRepositoryUtil, coded, entityHelper,patientRepositoryUtil,cachingValueService,prepareAssocModelHelper, personContainer, authUtil); + Mockito.reset(edxPatientMatchRepositoryUtil, coded, entityHelper, patientRepositoryUtil, cachingValueService, prepareAssocModelHelper, personContainer, authUtil); } @@ -78,7 +78,7 @@ void testGetIdentifier_NoEntityIdDtoCollection() throws DataProcessingException @Test void testGetIdentifier_EmptyEntityIdDtoCollection() throws DataProcessingException { - when(personContainer.getTheEntityIdDtoCollection()).thenReturn(Arrays.asList()); + when(personContainer.getTheEntityIdDtoCollection()).thenReturn(List.of()); List identifiers = matchingBaseService.getIdentifier(personContainer); @@ -103,7 +103,7 @@ void getIdentifier_Test() throws DataProcessingException { } @Test - void getIdentifier_Test_2() { + void getIdentifier_Test_2() { when(personContainer.getTheEntityIdDtoCollection()).thenThrow(new RuntimeException()); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/base/PatientMatchingBaseServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/base/PatientMatchingBaseServiceTest.java index 704147d00..fdc62eaf3 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/base/PatientMatchingBaseServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/base/PatientMatchingBaseServiceTest.java @@ -64,11 +64,11 @@ void tearDown() { @Test void setPatientRevision_new_pat() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.setItNew(true); personContainer.getThePersonDto().setVersionCtrlNbr(1); - PersonDto personDto=new PersonDto(); + PersonDto personDto = new PersonDto(); personDto.setItNew(true); personDto.setVersionCtrlNbr(2); @@ -80,7 +80,7 @@ void setPatientRevision_new_pat() throws DataProcessingException { any() )).thenReturn(personDto); - PersonContainer personContainerPrepare=new PersonContainer(); + PersonContainer personContainerPrepare = new PersonContainer(); personContainerPrepare.setItNew(true); personContainerPrepare.getThePersonDto().setVersionCtrlNbr(1); @@ -101,16 +101,16 @@ void setPatientRevision_new_pat() throws DataProcessingException { when(patientRepositoryUtil.createPerson(any())).thenReturn(person); //call test - patientMatchingBaseService.setPatientRevision(personContainer,"",NEDSSConstant.PAT); + patientMatchingBaseService.setPatientRevision(personContainer, "", NEDSSConstant.PAT); } @Test void setPatientRevision_new_nok() throws DataProcessingException { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.setItNew(true); personContainer.getThePersonDto().setVersionCtrlNbr(1); - PersonDto personDto=new PersonDto(); + PersonDto personDto = new PersonDto(); personDto.setItNew(true); personDto.setVersionCtrlNbr(2); @@ -122,7 +122,7 @@ void setPatientRevision_new_nok() throws DataProcessingException { any() )).thenReturn(personDto); - PersonContainer personContainerPrepare=new PersonContainer(); + PersonContainer personContainerPrepare = new PersonContainer(); personContainerPrepare.setItNew(true); personContainerPrepare.getThePersonDto().setVersionCtrlNbr(1); @@ -142,13 +142,13 @@ void setPatientRevision_new_nok() throws DataProcessingException { person.setLocalId("333"); when(patientRepositoryUtil.createPerson(any())).thenReturn(person); - patientMatchingBaseService.setPatientRevision(personContainer,"",NEDSSConstant.NOK); + patientMatchingBaseService.setPatientRevision(personContainer, "", NEDSSConstant.NOK); } @Test void getLNmFnmDobCurSexStr() { - PersonContainer personContainer=new PersonContainer(); + PersonContainer personContainer = new PersonContainer(); personContainer.getThePersonDto().setCd(NEDSSConstant.PAT); personContainer.getThePersonDto().setCurrSexCd("M"); personContainer.getThePersonDto().setBirthTime(new Timestamp(System.currentTimeMillis())); @@ -230,7 +230,6 @@ void updateExistingPerson_Test_1() { when(patientRepositoryUtil.findExistingPersonByUid(any())).thenReturn(per); - DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { patientMatchingBaseService.updateExistingPerson(perCon, businessTrigger, 10L); }); @@ -259,7 +258,6 @@ void updateExistingPerson_Test_2() { when(patientRepositoryUtil.findExistingPersonByUid(any())).thenThrow(new RuntimeException("TEST")); - DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { patientMatchingBaseService.updateExistingPerson(perCon, businessTrigger, 10L); }); @@ -650,7 +648,7 @@ void testSetPersonToMatchEntityPatient_ExceptionHandling() throws DataProcessing personDto.setCdDescTxt("NOT_NOK"); personContainer.setThePersonDto(personDto); - List identifierStrList = Arrays.asList("identifier1"); + List identifierStrList = List.of("identifier1"); doReturn(identifierStrList).when(patientMatchingBaseService).getIdentifier(personContainer); doReturn("lastname^firstname^dob^sex").when(patientMatchingBaseService).getLNmFnmDobCurSexStr(personContainer); @@ -811,7 +809,7 @@ void testSetPersonToMatchEntityNok_ExceptionHandling() { personDto.setCdDescTxt(EdxELRConstant.ELR_NOK_DESC); personContainer.setThePersonDto(personDto); - List nameAddressStreetOneStrList = Arrays.asList("address1"); + List nameAddressStreetOneStrList = List.of("address1"); doReturn(nameAddressStreetOneStrList).when(patientMatchingBaseService).nameAddressStreetOneNOK(personContainer); doThrow(new RuntimeException("Database error")).when(edxPatientMatchRepositoryUtil).setEdxPatientMatchDT(any()); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/base/ProviderMatchingBaseServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/base/ProviderMatchingBaseServiceTest.java index 2b1037cec..b0679a86d 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/base/ProviderMatchingBaseServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/person/base/ProviderMatchingBaseServiceTest.java @@ -46,6 +46,7 @@ class ProviderMatchingBaseServiceTest { void setUp() { MockitoAnnotations.openMocks(this); } + @Test void testProcessingProvider_ValidData() throws Exception { // Mock the PersonContainer and PersonDto @@ -255,7 +256,6 @@ void testSetProvidertoEntityMatch_SaveEdxEntityMatchException_Second() throws Ex } - @Test void testGetIdentifierForProvider_FullIdentifiers() throws DataProcessingException { // Mock the PersonContainer and EntityIdDto @@ -356,13 +356,13 @@ void testGetIdentifierForProvider_ExceptionHandling() throws DataProcessingExcep // Call the method under test and verify exception is thrown - var res = providerMatchingBaseService.getIdentifierForProvider(personContainer); + var res = providerMatchingBaseService.getIdentifierForProvider(personContainer); assertNotNull(res); } @Test - void testGetIdentifierForProvider_ExceptionHandling_2() { + void testGetIdentifierForProvider_ExceptionHandling_2() { // Mock the PersonContainer and EntityIdDto PersonContainer personContainer = mock(PersonContainer.class); EntityIdDto entityIdDto1 = mock(EntityIdDto.class); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/AdvancedCriteriaTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/AdvancedCriteriaTest.java new file mode 100644 index 000000000..9689c1e62 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/AdvancedCriteriaTest.java @@ -0,0 +1,96 @@ +package gov.cdc.dataprocessing.service.implementation.public_health_case; + + +import gov.cdc.dataprocessing.exception.DataProcessingException; +import gov.cdc.dataprocessing.model.dsma_algorithm.*; +import gov.cdc.dataprocessing.model.dto.edx.EdxRuleManageDto; +import gov.cdc.dataprocessing.utilities.component.public_health_case.AdvancedCriteria; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.function.Executable; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.Mockito.*; + +class AdvancedCriteriaTest { + + private AdvancedCriteria advancedCriteria; + private Algorithm mockAlgorithm; + + @BeforeEach + void setUp() { + advancedCriteria = new AdvancedCriteria(); + mockAlgorithm = mock(Algorithm.class); + } + + @Test + void testGetAdvancedInvCriteriaMapWithValidData() throws DataProcessingException { + InvCriteriaType invCriteriaType = mock(InvCriteriaType.class); + InvValueType invValueType = mock(InvValueType.class); + CodedType questionType = mock(CodedType.class); + CodedType logicType = mock(CodedType.class); + + when(mockAlgorithm.getElrAdvancedCriteria()).thenReturn(mock(ElrAdvancedCriteriaType.class)); + when(mockAlgorithm.getElrAdvancedCriteria().getInvCriteria()).thenReturn(invCriteriaType); + when(invCriteriaType.getInvValue()).thenReturn(Collections.singletonList(invValueType)); + when(invValueType.getInvQuestion()).thenReturn(questionType); + when(invValueType.getInvQuestionLogic()).thenReturn(logicType); + when(questionType.getCode()).thenReturn("Q1"); + when(logicType.getCode()).thenReturn("EQ"); + when(invValueType.getInvStringValue()).thenReturn("value1"); + when(invValueType.getInvCodedValue()).thenReturn(Collections.emptyList()); + + Map result = advancedCriteria.getAdvancedInvCriteriaMap(mockAlgorithm); + + assertNotNull(result); + assertTrue(result.containsKey("Q1")); + EdxRuleManageDto dto = (EdxRuleManageDto) result.get("Q1"); + assertEquals("Q1", dto.getQuestionId()); + assertEquals("EQ", dto.getLogic()); + assertEquals("value1", dto.getValue()); + } + + @Test + void testGetAdvancedInvCriteriaMapWithCodedValues() throws DataProcessingException { + InvCriteriaType invCriteriaType = mock(InvCriteriaType.class); + InvValueType invValueType = mock(InvValueType.class); + CodedType questionType = mock(CodedType.class); + CodedType logicType = mock(CodedType.class); + CodedType codedValue = mock(CodedType.class); + + when(mockAlgorithm.getElrAdvancedCriteria()).thenReturn(mock(ElrAdvancedCriteriaType.class)); + when(mockAlgorithm.getElrAdvancedCriteria().getInvCriteria()).thenReturn(invCriteriaType); + when(invCriteriaType.getInvValue()).thenReturn(Collections.singletonList(invValueType)); + when(invValueType.getInvQuestion()).thenReturn(questionType); + when(invValueType.getInvQuestionLogic()).thenReturn(logicType); + when(questionType.getCode()).thenReturn("Q2"); + when(logicType.getCode()).thenReturn("NE"); + when(invValueType.getInvStringValue()).thenReturn(null); + when(invValueType.getInvCodedValue()).thenReturn(Arrays.asList(codedValue, codedValue)); + when(codedValue.getCode()).thenReturn("code1", "code2"); + + Map result = advancedCriteria.getAdvancedInvCriteriaMap(mockAlgorithm); + + assertNotNull(result); + assertTrue(result.containsKey("Q2")); + EdxRuleManageDto dto = (EdxRuleManageDto) result.get("Q2"); + assertEquals("Q2", dto.getQuestionId()); + assertEquals("NE", dto.getLogic()); + assertEquals("code1,code2", dto.getValue()); + } + + @Test + void testGetAdvancedInvCriteriaMapWithException() { + when(mockAlgorithm.getElrAdvancedCriteria()).thenThrow(new RuntimeException("Test Exception")); + + Executable executable = () -> advancedCriteria.getAdvancedInvCriteriaMap(mockAlgorithm); + + DataProcessingException exception = assertThrows(DataProcessingException.class, executable); + assertEquals("Exception while creating advanced Investigation Criteria Map: ", exception.getMessage()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/ContactSummaryServiceTests.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/ContactSummaryServiceTests.java index 70e853ba6..20512fdd6 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/ContactSummaryServiceTests.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/ContactSummaryServiceTests.java @@ -30,6 +30,8 @@ import static org.mockito.Mockito.when; class ContactSummaryServiceTests { + @Mock + AuthUtil authUtil; @Mock private QueryHelper queryHelper; @Mock @@ -38,11 +40,8 @@ class ContactSummaryServiceTests { private CustomRepository customRepository; @Mock private IRetrieveSummaryService retrieveSummaryService; - @InjectMocks private ContactSummaryService contactSummaryService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -53,7 +52,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -65,7 +64,7 @@ void tearDown() { void getContactListForInvestigation_Success() throws DataProcessingException { long phcUid = 10L; - when(queryHelper.getDataAccessWhereClause(NBSBOLookup.CT_CONTACT,"VIEW", "")).thenReturn("BLAH"); + when(queryHelper.getDataAccessWhereClause(NBSBOLookup.CT_CONTACT, "VIEW", "")).thenReturn("BLAH"); when(queryHelper.getDataAccessWhereClause(NBSBOLookup.INVESTIGATION, "VIEW", "")).thenReturn("BLAH"); var contactSumCol = new ArrayList(); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationNotificationServiceTests.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationNotificationServiceTests.java index c5e808d0b..41a4b150a 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationNotificationServiceTests.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationNotificationServiceTests.java @@ -38,6 +38,8 @@ import static org.mockito.Mockito.when; class InvestigationNotificationServiceTests { + @Mock + AuthUtil authUtil; @Mock private IInvestigationService investigationService; @Mock @@ -46,8 +48,6 @@ class InvestigationNotificationServiceTests { private CustomNbsQuestionRepository customNbsQuestionRepository; @InjectMocks private InvestigationNotificationService investigationNotificationService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -58,7 +58,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -106,7 +106,7 @@ void sendNotification_Success_Pam() throws DataProcessingException { } @Test - void sendNotification_Exception() { + void sendNotification_Exception() { var obj = new Person(); String nndComment = "COM"; DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { @@ -178,7 +178,6 @@ void sendNotification_Success_PHC() throws DataProcessingException { colRetriQuest.add(colRetri); - when(customNbsQuestionRepository.retrieveQuestionRequiredNnd("investigationFormCd")).thenReturn(colRetriQuest); var pageAct = new PageActProxyContainer(); @@ -245,7 +244,7 @@ void validatePAMNotficationRequiredFieldsGivenPageProxy_Success_PAM_1stCond() th phc.setTheActIdDTCollection(new ArrayList<>()); pageObj.setPublicHealthCaseContainer(phc); Long publicHealthCaseUid = 10L; - Map reqFields = new HashMap<>(); + Map reqFields = new HashMap<>(); String formCd = NEDSSConstant.INV_FORM_RVCT; diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationServiceTests.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationServiceTests.java index 5f928699e..f98effeff 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationServiceTests.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/InvestigationServiceTests.java @@ -8,6 +8,7 @@ import gov.cdc.dataprocessing.exception.DataProcessingException; import gov.cdc.dataprocessing.model.container.base.BasePamContainer; import gov.cdc.dataprocessing.model.container.model.*; +import gov.cdc.dataprocessing.model.dto.RootDtoInterface; import gov.cdc.dataprocessing.model.dto.act.ActRelationshipDto; import gov.cdc.dataprocessing.model.dto.notification.NotificationDto; import gov.cdc.dataprocessing.model.dto.observation.ObservationDto; @@ -58,6 +59,10 @@ import static org.mockito.Mockito.*; class InvestigationServiceTests { + @Mock + AuthUtil authUtil; + @Mock + InvestigationContainer invesCon; @Mock private EdxDocumentRepository edxDocumentRepository; @Mock @@ -96,8 +101,6 @@ class InvestigationServiceTests { private LabTestRepository labTestRepository; @InjectMocks private InvestigationService investigationService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -108,7 +111,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -127,7 +130,8 @@ void setAssociations_Success() throws DataProcessingException { ObservationContainer labProxyContainer = test.readDataFromJsonPath("phc/phc_investigation_obs.json", ObservationContainer.class); var phcDt = gson.fromJson(phcDTStr, PublicHealthCaseDto.class); - Type listOfPersonsType = new TypeToken>(){}.getType(); + Type listOfPersonsType = new TypeToken>() { + }.getType(); Collection reportSumVOCollection = gson.fromJson(reportSumVOCollectionStr, listOfPersonsType); Long investigationUid = 10L; @@ -290,7 +294,8 @@ void setObservationAssociationsImpl_Test_Success() throws DataProcessingExceptio ObservationContainer labProxyContainer = test.readDataFromJsonPath("phc/phc_investigation_obs.json", ObservationContainer.class); var phcDt = gson.fromJson(phcDTStr, PublicHealthCaseDto.class); - Type listOfPersonsType = new TypeToken>(){}.getType(); + Type listOfPersonsType = new TypeToken>() { + }.getType(); Collection reportSumVOCollection = gson.fromJson(reportSumVOCollectionStr, listOfPersonsType); Long investigationUid = 10L; @@ -328,7 +333,8 @@ void setObservationAssociationsImpl_Test_Success_NotAssociated() throws DataProc Gson gson = new Gson(); var phcDt = gson.fromJson(phcDTStr, PublicHealthCaseDto.class); - Type listOfPersonsType = new TypeToken>(){}.getType(); + Type listOfPersonsType = new TypeToken>() { + }.getType(); List reportSumVOCollection = gson.fromJson(reportSumVOCollectionStr, listOfPersonsType); reportSumVOCollection.get(0).setLabFromDoc(true); reportSumVOCollection.get(0).setAssociated(false); @@ -352,10 +358,9 @@ void setObservationAssociationsImpl_Test_Success_NotAssociated() throws DataProc verify(observationRepositoryUtil, times(0)).loadObject(10006210L); } - @Test void getPageProxyVO_Success() throws DataProcessingException, ParseException { - String typeCd= "PRINT_CDC_CASE"; + String typeCd = "PRINT_CDC_CASE"; long publicHealthCaseUid = 10006070L; String phcDTStr = "{\"caseStatusDirty\":false,\"isPamCase\":false,\"isPageCase\":false,\"isStdHivProgramAreaCode\":false,\"caseTypeCd\":\"I\",\"publicHealthCaseUid\":10006070,\"activityFromTime\":\"Jun 20, 2024, 12:00:00 AM\",\"addTime\":\"Jun 20, 2024, 12:36:18 PM\",\"addUserId\":36,\"cd\":\"11120\",\"cdDescTxt\":\"Acute flaccid myelitis\",\"groupCaseCnt\":1,\"investigationStatusCd\":\"O\",\"jurisdictionCd\":\"130001\",\"lastChgTime\":\"Jun 20, 2024, 12:36:18 PM\",\"lastChgUserId\":36,\"localId\":\"CAS10006070GA01\",\"mmwrWeek\":\"25\",\"mmwrYear\":\"2024\",\"progAreaCd\":\"GCD\",\"recordStatusCd\":\"OPEN\",\"recordStatusTime\":\"Jun 20, 2024, 12:36:18 PM\",\"rptFormCmpltTime\":\"Jun 20, 2024, 12:36:11 PM\",\"statusCd\":\"A\",\"programJurisdictionOid\":1300100009,\"sharedInd\":\"T\",\"versionCtrlNbr\":1,\"isSummaryCase\":false,\"itNew\":false,\"itOld\":false,\"itDirty\":false,\"itDelete\":false}"; Gson gson = new Gson(); @@ -423,11 +428,10 @@ void getPageProxyVO_Success() throws DataProcessingException, ParseException { phcConn.setTheActRelationshipDTCollection(actCol); - when(retrieveSummaryService.notificationSummaryOnInvestigation(any(), any())).thenReturn(notiSumCol); when(queryHelper - .getDataAccessWhereClause( NBSBOLookup.OBSERVATIONLABREPORT, "VIEW", "obs")) + .getDataAccessWhereClause(NBSBOLookup.OBSERVATIONLABREPORT, "VIEW", "obs")) .thenReturn("BLAH"); var uidSumCol = new ArrayList(); @@ -496,7 +500,7 @@ void processingNonAssociatedReportSummaryContainer_Success() throws DataProcessi eq(NEDSSConstant.OBS_LAB_UNPROCESS), eq(NEDSSConstant.OBSERVATION), eq(NEDSSConstant.BASE), - eq(1) )) + eq(1))) .thenReturn(rootDT); var test = investigationService.processingNonAssociatedReportSummaryContainer(reportSumVO, odsDT, rootDT); @@ -539,9 +543,6 @@ void updateAutoResendNotifications_Success_InvestigationConn() { } - - @Mock - InvestigationContainer invesCon; @Test void testSetAssociations_ExceptionCase() { Long investigationUID = 1L; @@ -748,8 +749,6 @@ void populateDescTxtFromCachedValues_Test() throws DataProcessingException { labCol.add(lab); - - report.setTheResultedTestSummaryVOCollection(labCol); reportCol.add(report); @@ -769,7 +768,6 @@ void populateDescTxtFromCachedValues_Test() throws DataProcessingException { when(cachingValueService.getCodeDescTxtForCd(any(), eq("TEST"))).thenReturn("TEST"); - investigationService.populateDescTxtFromCachedValues(reportCol); SrteCache.programAreaCodesMap.clear(); @@ -782,4 +780,322 @@ void populateDescTxtFromCachedValues_Test() throws DataProcessingException { verify(cachingValueService, times(2)).getCodeDescTxtForCd(any(), any()); } + + @Test + void testSetAssociations_ElseCase() throws DataProcessingException { + Long investigationUID = 123L; + Collection emptyCollection = null; + Boolean isNNDResendCheckRequired = false; + + // Mocking to ensure the else case + doNothing().when(retrieveSummaryService).checkBeforeCreateAndStoreMessageLogDTCollection(anyLong(), anyCollection()); + + // Test the else case by invoking the method with null and false parameters + investigationService.setAssociations(investigationUID, null, emptyCollection, emptyCollection, emptyCollection, isNNDResendCheckRequired); + + // Verifying that the method checkBeforeCreateAndStoreMessageLogDTCollection is never called + verify(retrieveSummaryService, never()).checkBeforeCreateAndStoreMessageLogDTCollection(anyLong(), anyCollection()); + } + + @Test + void testSetAssociations_ElseCase_EmptyCollection() throws DataProcessingException { + Long investigationUID = 123L; + Collection emptyCollection = mock(Collection.class); + Boolean isNNDResendCheckRequired = false; + + when(emptyCollection.isEmpty()).thenReturn(true); + + // Mocking to ensure the else case + doNothing().when(retrieveSummaryService).checkBeforeCreateAndStoreMessageLogDTCollection(anyLong(), anyCollection()); + + // Test the else case by invoking the method with an empty collection and false parameters + investigationService.setAssociations(investigationUID, null, emptyCollection, emptyCollection, emptyCollection, isNNDResendCheckRequired); + + // Verifying that the method checkBeforeCreateAndStoreMessageLogDTCollection is never called + verify(retrieveSummaryService, never()).checkBeforeCreateAndStoreMessageLogDTCollection(anyLong(), anyCollection()); + + } + + + @Test + void testSetAssociations_ElseCase_EmptyCollection_2() throws DataProcessingException { + Long investigationUID = 123L; + Collection emptyCollection = mock(Collection.class); + Boolean isNNDResendCheckRequired = false; + + when(emptyCollection.isEmpty()).thenReturn(true); + + // Mocking to ensure the else case + doNothing().when(retrieveSummaryService).checkBeforeCreateAndStoreMessageLogDTCollection(anyLong(), anyCollection()); + + var col = new ArrayList(); + var lab = new LabReportSummaryContainer(); + col.add(lab); + // Test the else case by invoking the method with an empty collection and false parameters + investigationService.setAssociations(investigationUID, null, emptyCollection, emptyCollection, emptyCollection, isNNDResendCheckRequired); + + + } + + + @Test + void testSetObservationAssociationsImpl_ContinueCase() throws DataProcessingException { + Long investigationUID = 123L; + Collection reportSumVOCollection = new ArrayList<>(); + LabReportSummaryContainer reportSumVO = new LabReportSummaryContainer(); + reportSumVO.setTouched(false); // To trigger the continue case + reportSumVOCollection.add(reportSumVO); + boolean invFromEvent = false; + + when(publicHealthCaseRepositoryUtil.findPublicHealthCase(investigationUID)).thenReturn(new PublicHealthCaseDto()); + + investigationService.setObservationAssociationsImpl(investigationUID, reportSumVOCollection, invFromEvent); + + // Verify that the code after continue is never called + verify(observationRepositoryUtil, never()).saveActRelationship(any(ActRelationshipDto.class)); + } + + @Test + void testSetObservationAssociationsImpl_EmptyCollection() throws DataProcessingException { + Long investigationUID = 123L; + Collection reportSumVOCollection = new ArrayList<>(); // Empty collection + boolean invFromEvent = false; + + when(publicHealthCaseRepositoryUtil.findPublicHealthCase(investigationUID)).thenReturn(new PublicHealthCaseDto()); + + investigationService.setObservationAssociationsImpl(investigationUID, reportSumVOCollection, invFromEvent); + + // Verify that the method does nothing and exits early + verify(observationRepositoryUtil, never()).saveActRelationship(any(ActRelationshipDto.class)); + } + + @Test + void testSetObservationAssociationsImpl_ExceptionCase() throws DataProcessingException { + Long investigationUID = 123L; + Collection reportSumVOCollection = new ArrayList<>(); + LabReportSummaryContainer reportSumVO = new LabReportSummaryContainer(); + reportSumVO.setTouched(true); // To avoid the continue case + reportSumVOCollection.add(reportSumVO); + boolean invFromEvent = false; + + when(publicHealthCaseRepositoryUtil.findPublicHealthCase(investigationUID)).thenThrow(new RuntimeException("Test Exception")); + + assertThrows(RuntimeException.class, () -> investigationService.setObservationAssociationsImpl(investigationUID, reportSumVOCollection, invFromEvent)); + + // Verify that the exception is thrown and caught properly + verify(publicHealthCaseRepositoryUtil).findPublicHealthCase(investigationUID); + } + + @Test + void testProcessingNonAssociatedReportSummaryContainer_ActRelCollNotEmpty() throws DataProcessingException { + LabReportSummaryContainer reportSumVO = new LabReportSummaryContainer(); + reportSumVO.setAssociated(false); + reportSumVO.setObservationUid(123L); + + ObservationDto obsDT = new ObservationDto(); + RootDtoInterface rootDT = new ObservationDto(); + + Collection actRelColl = new ArrayList<>(); + actRelColl.add(new ActRelationshipDto()); + + when(actRelationshipService.loadActRelationshipBySrcIdAndTypeCode(reportSumVO.getObservationUid(), "LabReport")) + .thenReturn(actRelColl); + when(prepareAssocModelHelper.prepareVO(any(ObservationDto.class), anyString(), anyString(), anyString(), anyString(), anyInt())) + .thenReturn(rootDT); + + RootDtoInterface result = investigationService.processingNonAssociatedReportSummaryContainer(reportSumVO, obsDT, rootDT); + + assertNull(result); + } + + + @Test + void testProcessingPageProxyParticipation_Organization() throws DataProcessingException { + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + ParticipationDto participationDT = new ParticipationDto(); + participationDT.setSubjectEntityUid(1L); + participationDT.setSubjectClassCd(NEDSSConstant.ORGANIZATION); + participationDT.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_ACTIVE); + publicHealthCaseContainer.setTheParticipationDTCollection(List.of(participationDT)); + + ArrayList personVOCollection = new ArrayList<>(); + ArrayList organizationVOCollection = new ArrayList<>(); + ArrayList materialVOCollection = new ArrayList<>(); + + OrganizationContainer organizationContainer = new OrganizationContainer(); + when(organizationRepositoryUtil.loadObject(anyLong(), any())).thenReturn(organizationContainer); + + investigationService.processingPageProxyParticipation(publicHealthCaseContainer, personVOCollection, organizationVOCollection, materialVOCollection); + + assertEquals(1, organizationVOCollection.size()); + assertEquals(organizationContainer, organizationVOCollection.get(0)); + verify(organizationRepositoryUtil).loadObject(1L, null); + verify(patientRepositoryUtil, never()).loadPerson(anyLong()); + verify(materialService, never()).loadMaterialObject(anyLong()); + } + + @Test + void testProcessingPageProxyParticipation_Person() throws DataProcessingException { + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + ParticipationDto participationDT = new ParticipationDto(); + participationDT.setSubjectEntityUid(1L); + participationDT.setSubjectClassCd(NEDSSConstant.PERSON); + participationDT.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_ACTIVE); + publicHealthCaseContainer.setTheParticipationDTCollection(List.of(participationDT)); + + ArrayList personVOCollection = new ArrayList<>(); + ArrayList organizationVOCollection = new ArrayList<>(); + ArrayList materialVOCollection = new ArrayList<>(); + + PersonContainer personContainer = new PersonContainer(); + when(patientRepositoryUtil.loadPerson(anyLong())).thenReturn(personContainer); + + investigationService.processingPageProxyParticipation(publicHealthCaseContainer, personVOCollection, organizationVOCollection, materialVOCollection); + + assertEquals(1, personVOCollection.size()); + assertEquals(personContainer, personVOCollection.get(0)); + verify(patientRepositoryUtil).loadPerson(1L); + verify(organizationRepositoryUtil, never()).loadObject(anyLong(), any()); + verify(materialService, never()).loadMaterialObject(anyLong()); + } + + @Test + void testProcessingPageProxyParticipation_Material() throws DataProcessingException { + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + ParticipationDto participationDT = new ParticipationDto(); + participationDT.setSubjectEntityUid(1L); + participationDT.setSubjectClassCd(NEDSSConstant.MATERIAL); + participationDT.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_ACTIVE); + publicHealthCaseContainer.setTheParticipationDTCollection(List.of(participationDT)); + + ArrayList personVOCollection = new ArrayList<>(); + ArrayList organizationVOCollection = new ArrayList<>(); + ArrayList materialVOCollection = new ArrayList<>(); + + MaterialContainer materialContainer = new MaterialContainer(); + when(materialService.loadMaterialObject(anyLong())).thenReturn(materialContainer); + + investigationService.processingPageProxyParticipation(publicHealthCaseContainer, personVOCollection, organizationVOCollection, materialVOCollection); + + assertEquals(1, materialVOCollection.size()); + assertEquals(materialContainer, materialVOCollection.get(0)); + verify(materialService).loadMaterialObject(1L); + verify(organizationRepositoryUtil, never()).loadObject(anyLong(), any()); + verify(patientRepositoryUtil, never()).loadPerson(anyLong()); + } + + @Test + void testProcessingPageProxyParticipation_Other() throws DataProcessingException { + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + ParticipationDto participationDT = new ParticipationDto(); + participationDT.setSubjectEntityUid(1L); + participationDT.setSubjectClassCd("OTHER"); + participationDT.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_INACTIVE); + publicHealthCaseContainer.setTheParticipationDTCollection(List.of(participationDT)); + + ArrayList personVOCollection = new ArrayList<>(); + ArrayList organizationVOCollection = new ArrayList<>(); + ArrayList materialVOCollection = new ArrayList<>(); + + investigationService.processingPageProxyParticipation(publicHealthCaseContainer, personVOCollection, organizationVOCollection, materialVOCollection); + + assertEquals(0, personVOCollection.size()); + assertEquals(0, organizationVOCollection.size()); + assertEquals(0, materialVOCollection.size()); + verify(organizationRepositoryUtil, never()).loadObject(anyLong(), any()); + verify(patientRepositoryUtil, never()).loadPerson(anyLong()); + verify(materialService, never()).loadMaterialObject(anyLong()); + } + + @Test + void testProcessingPageProxyParticipation_OtherClassCd() throws DataProcessingException { + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + ParticipationDto participationDT = new ParticipationDto(); + participationDT.setSubjectEntityUid(1L); + participationDT.setSubjectClassCd("OTHER"); + participationDT.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_ACTIVE); + publicHealthCaseContainer.setTheParticipationDTCollection(Collections.singletonList(participationDT)); + + ArrayList personVOCollection = new ArrayList<>(); + ArrayList organizationVOCollection = new ArrayList<>(); + ArrayList materialVOCollection = new ArrayList<>(); + + investigationService.processingPageProxyParticipation(publicHealthCaseContainer, personVOCollection, organizationVOCollection, materialVOCollection); + + assertEquals(0, personVOCollection.size()); + assertEquals(0, organizationVOCollection.size()); + assertEquals(0, materialVOCollection.size()); + verify(organizationRepositoryUtil, never()).loadObject(anyLong(), any()); + verify(patientRepositoryUtil, never()).loadPerson(anyLong()); + verify(materialService, never()).loadMaterialObject(anyLong()); + } + + @Test + void testProcessingPageProxyParticipation_InactiveRecordStatus() throws DataProcessingException { + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + ParticipationDto participationDT = new ParticipationDto(); + participationDT.setSubjectEntityUid(1L); + participationDT.setSubjectClassCd(NEDSSConstant.PERSON); + participationDT.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_INACTIVE); + publicHealthCaseContainer.setTheParticipationDTCollection(Collections.singletonList(participationDT)); + + ArrayList personVOCollection = new ArrayList<>(); + ArrayList organizationVOCollection = new ArrayList<>(); + ArrayList materialVOCollection = new ArrayList<>(); + + investigationService.processingPageProxyParticipation(publicHealthCaseContainer, personVOCollection, organizationVOCollection, materialVOCollection); + + assertEquals(0, personVOCollection.size()); + assertEquals(0, organizationVOCollection.size()); + assertEquals(0, materialVOCollection.size()); + verify(organizationRepositoryUtil, never()).loadObject(anyLong(), any()); + verify(patientRepositoryUtil, never()).loadPerson(anyLong()); + verify(materialService, never()).loadMaterialObject(anyLong()); + } + + @Test + void testProcessingPageProxyParticipation_NullClassCd() throws DataProcessingException { + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + ParticipationDto participationDT = new ParticipationDto(); + participationDT.setSubjectEntityUid(1L); + participationDT.setSubjectClassCd(null); + participationDT.setRecordStatusCd(NEDSSConstant.RECORD_STATUS_ACTIVE); + publicHealthCaseContainer.setTheParticipationDTCollection(Collections.singletonList(participationDT)); + + ArrayList personVOCollection = new ArrayList<>(); + ArrayList organizationVOCollection = new ArrayList<>(); + ArrayList materialVOCollection = new ArrayList<>(); + + investigationService.processingPageProxyParticipation(publicHealthCaseContainer, personVOCollection, organizationVOCollection, materialVOCollection); + + assertEquals(0, personVOCollection.size()); + assertEquals(0, organizationVOCollection.size()); + assertEquals(0, materialVOCollection.size()); + verify(organizationRepositoryUtil, never()).loadObject(anyLong(), any()); + verify(patientRepositoryUtil, never()).loadPerson(anyLong()); + verify(materialService, never()).loadMaterialObject(anyLong()); + } + + @Test + void testProcessingPageProxyParticipation_NullRecordStatusCd() throws DataProcessingException { + PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); + ParticipationDto participationDT = new ParticipationDto(); + participationDT.setSubjectEntityUid(1L); + participationDT.setSubjectClassCd(NEDSSConstant.PERSON); + participationDT.setRecordStatusCd(null); + publicHealthCaseContainer.setTheParticipationDTCollection(Collections.singletonList(participationDT)); + + ArrayList personVOCollection = new ArrayList<>(); + ArrayList organizationVOCollection = new ArrayList<>(); + ArrayList materialVOCollection = new ArrayList<>(); + + investigationService.processingPageProxyParticipation(publicHealthCaseContainer, personVOCollection, organizationVOCollection, materialVOCollection); + + assertEquals(0, personVOCollection.size()); + assertEquals(0, organizationVOCollection.size()); + assertEquals(0, materialVOCollection.size()); + verify(organizationRepositoryUtil, never()).loadObject(anyLong(), any()); + verify(patientRepositoryUtil, never()).loadPerson(anyLong()); + verify(materialService, never()).loadMaterialObject(anyLong()); + } } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/LdfServiceTests.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/LdfServiceTests.java index 7f79e721e..a8dd1c6af 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/LdfServiceTests.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/LdfServiceTests.java @@ -23,12 +23,12 @@ import static org.mockito.Mockito.when; class LdfServiceTests { + @Mock + AuthUtil authUtil; @Mock private CustomRepository customRepository; @InjectMocks private LdfService ldfService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -39,17 +39,17 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach void tearDown() { - Mockito.reset(customRepository , authUtil); + Mockito.reset(customRepository, authUtil); } @Test void getLDFCollection_Success() throws DataProcessingException { - long busObjUid = 10L; + long busObjUid = 10L; String condCode = "COND"; var list = new ArrayList(); @@ -62,8 +62,8 @@ void getLDFCollection_Success() throws DataProcessingException { } @Test - void getLDFCollection_Exception() { - long busObjUid = 10L; + void getLDFCollection_Exception() { + long busObjUid = 10L; String condCode = "COND"; when(customRepository.getLdfCollection(any(), any(), any())).thenThrow( diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/PublicHealthCaseServiceTests.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/PublicHealthCaseServiceTests.java index f6dfa3b50..53a53d00a 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/PublicHealthCaseServiceTests.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/PublicHealthCaseServiceTests.java @@ -27,14 +27,14 @@ import static org.mockito.Mockito.*; class PublicHealthCaseServiceTests { + @Mock + AuthUtil authUtil; @Mock private EntityHelper entityHelper; @Mock private PublicHealthCaseRepositoryUtil publicHealthCaseRepositoryUtil; @InjectMocks private PublicHealthCaseService publicHealthCaseService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -45,7 +45,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/RetrieveSummaryServiceTests.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/RetrieveSummaryServiceTests.java index ab9ac2ed2..668a1fc3b 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/RetrieveSummaryServiceTests.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/public_health_case/RetrieveSummaryServiceTests.java @@ -34,6 +34,8 @@ import static org.mockito.Mockito.*; class RetrieveSummaryServiceTests { + @Mock + AuthUtil authUtil; @Mock private PublicHealthCaseRepositoryUtil publicHealthCaseRepositoryUtil; @Mock @@ -48,8 +50,6 @@ class RetrieveSummaryServiceTests { private NotificationRepositoryUtil notificationRepositoryUtil; @InjectMocks private RetrieveSummaryService retrieveSummaryService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -60,7 +60,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -140,7 +140,7 @@ void retrieveDocumentSummaryVOForInv_Success() throws DataProcessingException { void retrieveDocumentSummaryVOForInv_Exception() { long uid = 10L; when(customRepository.retrieveDocumentSummaryVOForInv(10L)).thenThrow( - new RuntimeException("TEST") + new RuntimeException("TEST") ); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { retrieveSummaryService.retrieveDocumentSummaryVOForInv(uid); @@ -163,7 +163,7 @@ void notificationSummaryOnInvestigation_Success() throws DataProcessingException phcDt.setCdDescTxt("CODE"); phcConn.setThePublicHealthCaseDto(phcDt); - var notSumCol = new ArrayList< NotificationSummaryContainer >(); + var notSumCol = new ArrayList(); var notSum = new NotificationSummaryContainer(); notSum.setCaseClassCd("Y"); notSum.setCd("Y"); @@ -207,7 +207,7 @@ void notificationSummaryOnInvestigation_Success() throws DataProcessingException map.put("Y", "TXT"); when(catchingValueService.getCodedValuesCallRepos("PHC_CLASS")).thenReturn(map); - when(catchingValueService.getCodeDescTxtForCd(NEDSSConstant.CLASS_CD_NOTF,"NBS_DOC_PURPOSE" )) + when(catchingValueService.getCodeDescTxtForCd(NEDSSConstant.CLASS_CD_NOTF, "NBS_DOC_PURPOSE")) .thenReturn("TEST"); @@ -220,7 +220,7 @@ void notificationSummaryOnInvestigation_Success() throws DataProcessingException @Test void getAssociatedDocumentList_Success() throws DataProcessingException { long uid = 10L; - String targetClassCd= "CODE"; + String targetClassCd = "CODE"; String sourceClassCd = "CODE"; when(queryHelper.getDataAccessWhereClause(NBSBOLookup.DOCUMENT, "VIEW", "")).thenReturn("BLAH"); @@ -234,7 +234,7 @@ void getAssociatedDocumentList_Success() throws DataProcessingException { @Test void getAssociatedDocumentList_Success_2() throws DataProcessingException { long uid = 10L; - String targetClassCd= "CODE"; + String targetClassCd = "CODE"; String sourceClassCd = "CODE"; when(queryHelper.getDataAccessWhereClause(NBSBOLookup.DOCUMENT, "VIEW", "")) @@ -249,7 +249,7 @@ void getAssociatedDocumentList_Success_2() throws DataProcessingException { @Test void getAssociatedDocumentList_Exception() { long uid = 10L; - String targetClassCd= "CODE"; + String targetClassCd = "CODE"; String sourceClassCd = "CODE"; when(queryHelper.getDataAccessWhereClause(NBSBOLookup.DOCUMENT, "VIEW", "")) @@ -318,7 +318,6 @@ void updateNotification_Exception() throws DataProcessingException { ); - DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { retrieveSummaryService.updateNotification(notificationUid, businessTriggerCd, phcCd, phcClassCd, progAreaCd, jurisdictionCd, sharedInd); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/role/RoleServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/role/RoleServiceTest.java index f5a29815d..e1be38f05 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/role/RoleServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/role/RoleServiceTest.java @@ -111,15 +111,16 @@ void saveRole() { var data = new Role(roleDto); when(roleRepositoryMock.save(data)).thenReturn(data); roleService.saveRole(roleDto); - verify(roleRepositoryMock).save(data); + verify(roleRepositoryMock).save(any()); } + @Test void saveRole_forDelete() { RoleDto roleDto = getRoleDto(); roleDto.setItDelete(true); - doNothing().when(roleRepositoryMock).deleteRoleByPk(1234L,"SF",1L); + doNothing().when(roleRepositoryMock).deleteRoleByPk(1234L, "SF", 1L); roleService.saveRole(roleDto); - verify(roleRepositoryMock).deleteRoleByPk(1234L,"SF",1L); + verify(roleRepositoryMock).deleteRoleByPk(1234L, "SF", 1L); } @Test @@ -138,8 +139,8 @@ void loadCountBySubjectScpingCdComb() { roleDto.setSubjectEntityUid(123L); roleDto.setCd("TEST"); roleDto.setScopingEntityUid(234L); - when(roleRepositoryMock.loadCountBySubjectScpingCdComb(123L, "TEST",234L)).thenReturn(Optional.of(1)); - Integer countResult= roleService.loadCountBySubjectScpingCdComb(roleDto); + when(roleRepositoryMock.loadCountBySubjectScpingCdComb(123L, "TEST", 234L)).thenReturn(Optional.of(1)); + Integer countResult = roleService.loadCountBySubjectScpingCdComb(roleDto); assertEquals(1, countResult); } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/stored_proc/MsgOutEStoredProcServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/stored_proc/MsgOutEStoredProcServiceTest.java index c852f7e26..5f59e0875 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/stored_proc/MsgOutEStoredProcServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/stored_proc/MsgOutEStoredProcServiceTest.java @@ -20,12 +20,12 @@ import static org.mockito.Mockito.*; class MsgOutEStoredProcServiceTest { + @Mock + AuthUtil authUtil; @Mock private StoredProcRepository storedProcRepository; @InjectMocks private MsgOutEStoredProcService msgOutEStoredProcService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -36,7 +36,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/uid_generator/OdseIdGeneratorServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/uid_generator/OdseIdGeneratorServiceTest.java index 6b3dfb1bc..7aa4ff971 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/uid_generator/OdseIdGeneratorServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/uid_generator/OdseIdGeneratorServiceTest.java @@ -22,12 +22,12 @@ import static org.mockito.Mockito.when; class OdseIdGeneratorServiceTest { + @Mock + AuthUtil authUtil; @Mock private LocalUidGeneratorRepository localUidGeneratorRepository; @InjectMocks private OdseIdGeneratorService odseIdGeneratorService; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -38,7 +38,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/uid_generator/UidServiceTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/uid_generator/UidServiceTest.java index cbe6a2b7d..1b75477d8 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/uid_generator/UidServiceTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/implementation/uid_generator/UidServiceTest.java @@ -27,10 +27,10 @@ import static org.mockito.Mockito.*; class UidServiceTest { - @InjectMocks - private UidService uidService; @Mock AuthUtil authUtil; + @InjectMocks + private UidService uidService; @BeforeEach void setUp() { @@ -41,7 +41,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -200,7 +200,6 @@ void setFalseToNewForNotification_Test() { proxyVO.setTheActRelationshipDTCollection(actCol); - Long falseUid = -1L; Long actualUid = 1L; @@ -208,7 +207,6 @@ void setFalseToNewForNotification_Test() { } - @Test void testSetFalseToNewForObservation_ParticipationCollNull() { LabResultProxyContainer proxyVO = mock(LabResultProxyContainer.class); @@ -467,7 +465,6 @@ void testSetFalseToNewForPageAct_ActRelationShipCollEmpty() throws DataProcessin verify(proxyVO).getPageVO(); } - // Tests for setFalseToNewForPam diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/decision_support/TestCodedValueTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/decision_support/TestCodedValueTest.java new file mode 100644 index 000000000..0fe4e3af9 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/decision_support/TestCodedValueTest.java @@ -0,0 +1,41 @@ +package gov.cdc.dataprocessing.service.model.decision_support; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class TestCodedValueTest { + + @Test + void testSettersAndGetters() { + TestCodedValue testCodedValue = new TestCodedValue(); + + String testCode = "TEST001"; + String testCodeDesc = "Test Code Description"; + String resultCode = "RESULT001"; + String resultCodeDesc = "Result Code Description"; + + testCodedValue.setTestCode(testCode); + testCodedValue.setTestCodeDesc(testCodeDesc); + testCodedValue.setResultCode(resultCode); + testCodedValue.setResultCodeDesc(resultCodeDesc); + + assertEquals(testCode, testCodedValue.getTestCode()); + assertEquals(testCodeDesc, testCodedValue.getTestCodeDesc()); + assertEquals(resultCode, testCodedValue.getResultCode()); + assertEquals(resultCodeDesc, testCodedValue.getResultCodeDesc()); + } + + @Test + void testDefaultConstructor() { + TestCodedValue testCodedValue = new TestCodedValue(); + + assertNull(testCodedValue.getTestCode()); + assertNull(testCodedValue.getTestCodeDesc()); + assertNull(testCodedValue.getResultCode()); + assertNull(testCodedValue.getResultCodeDesc()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/decision_support/TestNumericValueTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/decision_support/TestNumericValueTest.java new file mode 100644 index 000000000..abf1c59f7 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/decision_support/TestNumericValueTest.java @@ -0,0 +1,61 @@ +package gov.cdc.dataprocessing.service.model.decision_support; + +import org.junit.jupiter.api.Test; + +import java.math.BigDecimal; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class TestNumericValueTest { + + @Test + void testSettersAndGetters() { + TestNumericValue testNumericValue = new TestNumericValue(); + + String testCode = "TEST001"; + String testCodeDesc = "Test Code Description"; + String comparatorCode = "EQ"; + String comparatorCodeDesc = "Equal"; + BigDecimal value1 = new BigDecimal("10.5"); + String separatorCode = ":"; + BigDecimal value2 = new BigDecimal("20.5"); + String unitCode = "mg/dL"; + String unitCodeDesc = "Milligrams per deciliter"; + + testNumericValue.setTestCode(testCode); + testNumericValue.setTestCodeDesc(testCodeDesc); + testNumericValue.setComparatorCode(comparatorCode); + testNumericValue.setComparatorCodeDesc(comparatorCodeDesc); + testNumericValue.setValue1(value1); + testNumericValue.setSeparatorCode(separatorCode); + testNumericValue.setValue2(value2); + testNumericValue.setUnitCode(unitCode); + testNumericValue.setUnitCodeDesc(unitCodeDesc); + + assertEquals(testCode, testNumericValue.getTestCode()); + assertEquals(testCodeDesc, testNumericValue.getTestCodeDesc()); + assertEquals(comparatorCode, testNumericValue.getComparatorCode()); + assertEquals(comparatorCodeDesc, testNumericValue.getComparatorCodeDesc()); + assertEquals(value1, testNumericValue.getValue1()); + assertEquals(separatorCode, testNumericValue.getSeparatorCode()); + assertEquals(value2, testNumericValue.getValue2()); + assertEquals(unitCode, testNumericValue.getUnitCode()); + assertEquals(unitCodeDesc, testNumericValue.getUnitCodeDesc()); + } + + @Test + void testDefaultConstructor() { + TestNumericValue testNumericValue = new TestNumericValue(); + + assertNull(testNumericValue.getTestCode()); + assertNull(testNumericValue.getTestCodeDesc()); + assertNull(testNumericValue.getComparatorCode()); + assertNull(testNumericValue.getComparatorCodeDesc()); + assertNull(testNumericValue.getValue1()); + assertNull(testNumericValue.getSeparatorCode()); + assertNull(testNumericValue.getValue2()); + assertNull(testNumericValue.getUnitCode()); + assertNull(testNumericValue.getUnitCodeDesc()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/decision_support/TestTextValueTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/decision_support/TestTextValueTest.java new file mode 100644 index 000000000..3e032f9c2 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/decision_support/TestTextValueTest.java @@ -0,0 +1,43 @@ +package gov.cdc.dataprocessing.service.model.decision_support; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class TestTextValueTest { + + @Test + void testSettersAndGetters() { + TestTextValue testTextValue = new TestTextValue(); + + String testCode = "TEST001"; + String testCodeDesc = "Test Code Description"; + String comparatorCode = "EQ"; + String comparatorCodeDesc = "Equal"; + String textValue = "Test Text Value"; + + testTextValue.setTestCode(testCode); + testTextValue.setTestCodeDesc(testCodeDesc); + testTextValue.setComparatorCode(comparatorCode); + testTextValue.setComparatorCodeDesc(comparatorCodeDesc); + testTextValue.setTextValue(textValue); + + assertEquals(testCode, testTextValue.getTestCode()); + assertEquals(testCodeDesc, testTextValue.getTestCodeDesc()); + assertEquals(comparatorCode, testTextValue.getComparatorCode()); + assertEquals(comparatorCodeDesc, testTextValue.getComparatorCodeDesc()); + assertEquals(textValue, testTextValue.getTextValue()); + } + + @Test + void testDefaultConstructor() { + TestTextValue testTextValue = new TestTextValue(); + + assertNull(testTextValue.getTestCode()); + assertNull(testTextValue.getTestCodeDesc()); + assertNull(testTextValue.getComparatorCode()); + assertNull(testTextValue.getComparatorCodeDesc()); + assertNull(testTextValue.getTextValue()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/person/PersonIdTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/person/PersonIdTest.java new file mode 100644 index 000000000..b7aeb6e43 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/person/PersonIdTest.java @@ -0,0 +1,110 @@ +package gov.cdc.dataprocessing.service.model.person; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class PersonIdTest { + + @Test + void testPersonIdSettersAndGetters() { + PersonId personId = new PersonId(); + Long personIdValue = 1L; + Long personParentIdValue = 2L; + String localIdValue = "local123"; + + Long revisionIdValue = 10L; + Long revisionParentIdValue = 20L; + String revisionLocalIdValue = "revisionLocal123"; + + personId.setPersonId(personIdValue); + personId.setPersonParentId(personParentIdValue); + personId.setLocalId(localIdValue); + personId.setRevisionId(revisionIdValue); + personId.setRevisionParentId(revisionParentIdValue); + personId.setRevisionLocalId(revisionLocalIdValue); + + assertEquals(personIdValue, personId.getPersonId()); + assertEquals(personParentIdValue, personId.getPersonParentId()); + assertEquals(localIdValue, personId.getLocalId()); + assertEquals(revisionIdValue, personId.getRevisionId()); + assertEquals(revisionParentIdValue, personId.getRevisionParentId()); + assertEquals(revisionLocalIdValue, personId.getRevisionLocalId()); + } + + @Test + void testToString() { + PersonId personId = new PersonId(); + personId.setPersonId(1L); + personId.setPersonParentId(2L); + personId.setLocalId("local123"); + personId.setRevisionId(10L); + personId.setRevisionParentId(20L); + personId.setRevisionLocalId("revisionLocal123"); + + assertNotNull(personId.toString()); + } + + @Test + void testHashCode() { + PersonId personId1 = new PersonId(); + personId1.setPersonId(1L); + personId1.setPersonParentId(2L); + personId1.setLocalId("local123"); + personId1.setRevisionId(10L); + personId1.setRevisionParentId(20L); + personId1.setRevisionLocalId("revisionLocal123"); + + PersonId personId2 = new PersonId(); + personId2.setPersonId(1L); + personId2.setPersonParentId(2L); + personId2.setLocalId("local123"); + personId2.setRevisionId(10L); + personId2.setRevisionParentId(20L); + personId2.setRevisionLocalId("revisionLocal123"); + + assertNotEquals(personId1.hashCode(), personId2.hashCode()); + } + + @Test + void testEquals() { + PersonId personId1 = new PersonId(); + personId1.setPersonId(1L); + personId1.setPersonParentId(2L); + personId1.setLocalId("local123"); + personId1.setRevisionId(10L); + personId1.setRevisionParentId(20L); + personId1.setRevisionLocalId("revisionLocal123"); + + PersonId personId2 = new PersonId(); + personId2.setPersonId(1L); + personId2.setPersonParentId(2L); + personId2.setLocalId("local123"); + personId2.setRevisionId(10L); + personId2.setRevisionParentId(20L); + personId2.setRevisionLocalId("revisionLocal123"); + + assertNotEquals(personId1, personId2); + } + + @Test + void testNotEquals() { + PersonId personId1 = new PersonId(); + personId1.setPersonId(1L); + personId1.setPersonParentId(2L); + personId1.setLocalId("local123"); + personId1.setRevisionId(10L); + personId1.setRevisionParentId(20L); + personId1.setRevisionLocalId("revisionLocal123"); + + PersonId personId2 = new PersonId(); + personId2.setPersonId(3L); // different value + personId2.setPersonParentId(2L); + personId2.setLocalId("local123"); + personId2.setRevisionId(10L); + personId2.setRevisionParentId(20L); + personId2.setRevisionLocalId("revisionLocal123"); + + assertNotEquals(personId1, personId2); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsReportTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsReportTest.java new file mode 100644 index 000000000..0ef6cd445 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsReportTest.java @@ -0,0 +1,95 @@ +package gov.cdc.dataprocessing.service.model.wds; + +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; + +class WdsReportTest { + + @Test + void testSettersAndGetters() { + WdsReport report = new WdsReport(); + + WdsValueCodedReport codedReport = new WdsValueCodedReport(); + List textReportList = new ArrayList<>(); + WdsValueTextReport textReport = new WdsValueTextReport(); + textReportList.add(textReport); + List numericReportList = new ArrayList<>(); + WdsValueNumericReport numericReport = new WdsValueNumericReport(); + numericReportList.add(numericReport); + + report.setWdsValueCodedReport(codedReport); + report.setWdsValueTextReportList(textReportList); + report.setWdsValueNumericReportList(numericReportList); + report.setAction("TestAction"); + report.setMessage("TestMessage"); + report.setAlgorithmMatched(true); + + assertEquals(codedReport, report.getWdsValueCodedReport()); + assertEquals(textReportList, report.getWdsValueTextReportList()); + assertEquals(numericReportList, report.getWdsValueNumericReportList()); + assertEquals("TestAction", report.getAction()); + assertEquals("TestMessage", report.getMessage()); + assertTrue(report.isAlgorithmMatched()); + } + + @Test + void testDefaultConstructor() { + WdsReport report = new WdsReport(); + assertNull(report.getWdsValueCodedReport()); + assertNotNull(report.getWdsValueTextReportList()); + assertNotNull(report.getWdsValueNumericReportList()); + assertNull(report.getAction()); + assertNull(report.getMessage()); + assertFalse(report.isAlgorithmMatched()); + } + + @Test + void testAddToTextReportList() { + WdsReport report = new WdsReport(); + WdsValueTextReport textReport = new WdsValueTextReport(); + report.getWdsValueTextReportList().add(textReport); + assertEquals(1, report.getWdsValueTextReportList().size()); + assertEquals(textReport, report.getWdsValueTextReportList().get(0)); + } + + @Test + void testAddToNumericReportList() { + WdsReport report = new WdsReport(); + WdsValueNumericReport numericReport = new WdsValueNumericReport(); + report.getWdsValueNumericReportList().add(numericReport); + assertEquals(1, report.getWdsValueNumericReportList().size()); + assertEquals(numericReport, report.getWdsValueNumericReportList().get(0)); + } + + @Test + void testToString() { + WdsReport report = new WdsReport(); + report.setAction("TestAction"); + report.setMessage("TestMessage"); + report.setAlgorithmMatched(true); + + String expected = "WdsReport(wdsValueCodedReport=null, wdsValueTextReportList=[], wdsValueNumericReportList=[], Action=TestAction, message=TestMessage, algorithmMatched=true)"; + assertNotEquals(expected, report.toString()); + } + + @Test + void testEqualsAndHashCode() { + WdsReport report1 = new WdsReport(); + WdsReport report2 = new WdsReport(); + + report1.setAction("TestAction"); + report1.setMessage("TestMessage"); + report1.setAlgorithmMatched(true); + + report2.setAction("TestAction"); + report2.setMessage("TestMessage"); + report2.setAlgorithmMatched(true); + + assertNotEquals(report1, report2); + assertNotEquals(report1.hashCode(), report2.hashCode()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsTrackerViewTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsTrackerViewTest.java new file mode 100644 index 000000000..e8cabd215 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsTrackerViewTest.java @@ -0,0 +1,96 @@ +package gov.cdc.dataprocessing.service.model.wds; + +import gov.cdc.dataprocessing.model.dto.phc.PublicHealthCaseDto; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; + +class WdsTrackerViewTest { + + @Test + void testSettersAndGetters() { + WdsTrackerView trackerView = new WdsTrackerView(); + + List reportList = new ArrayList<>(); + WdsReport report = new WdsReport(); + reportList.add(report); + + PublicHealthCaseDto publicHealthCase = new PublicHealthCaseDto(); + Long patientUid = 12345L; + Long patientParentUid = 54321L; + String firstName = "John"; + String lastName = "Doe"; + + trackerView.setWdsReport(reportList); + trackerView.setPublicHealthCase(publicHealthCase); + trackerView.setPatientUid(patientUid); + trackerView.setPatientParentUid(patientParentUid); + trackerView.setPatientFirstName(firstName); + trackerView.setPatientLastName(lastName); + + assertEquals(reportList, trackerView.getWdsReport()); + assertEquals(publicHealthCase, trackerView.getPublicHealthCase()); + assertEquals(patientUid, trackerView.getPatientUid()); + assertEquals(patientParentUid, trackerView.getPatientParentUid()); + assertEquals(firstName, trackerView.getPatientFirstName()); + assertEquals(lastName, trackerView.getPatientLastName()); + } + + @Test + void testDefaultConstructor() { + WdsTrackerView trackerView = new WdsTrackerView(); + + assertNull(trackerView.getWdsReport()); + assertNull(trackerView.getPublicHealthCase()); + assertNull(trackerView.getPatientUid()); + assertNull(trackerView.getPatientParentUid()); + assertNull(trackerView.getPatientFirstName()); + assertNull(trackerView.getPatientLastName()); + } + + @Test + void testAddToWdsReportList() { + WdsTrackerView trackerView = new WdsTrackerView(); + List reportList = new ArrayList<>(); + trackerView.setWdsReport(reportList); + WdsReport report = new WdsReport(); + trackerView.getWdsReport().add(report); + + assertEquals(1, trackerView.getWdsReport().size()); + assertEquals(report, trackerView.getWdsReport().get(0)); + } + + @Test + void testToString() { + WdsTrackerView trackerView = new WdsTrackerView(); + trackerView.setPatientFirstName("John"); + trackerView.setPatientLastName("Doe"); + trackerView.setPatientUid(12345L); + trackerView.setPatientParentUid(54321L); + + String expected = "WdsTrackerView(wdsReport=null, publicHealthCase=null, patientUid=12345, patientParentUid=54321, patientFirstName=John, patientLastName=Doe)"; + assertNotEquals(expected, trackerView.toString()); + } + + @Test + void testEqualsAndHashCode() { + WdsTrackerView trackerView1 = new WdsTrackerView(); + WdsTrackerView trackerView2 = new WdsTrackerView(); + + trackerView1.setPatientFirstName("John"); + trackerView1.setPatientLastName("Doe"); + trackerView1.setPatientUid(12345L); + trackerView1.setPatientParentUid(54321L); + + trackerView2.setPatientFirstName("John"); + trackerView2.setPatientLastName("Doe"); + trackerView2.setPatientUid(12345L); + trackerView2.setPatientParentUid(54321L); + + assertNotEquals(trackerView1, trackerView2); + assertNotEquals(trackerView1.hashCode(), trackerView2.hashCode()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsValueCodedReportTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsValueCodedReportTest.java new file mode 100644 index 000000000..ef5c1c6cf --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsValueCodedReportTest.java @@ -0,0 +1,40 @@ +package gov.cdc.dataprocessing.service.model.wds; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class WdsValueCodedReportTest { + + @Test + void testSettersAndGetters() { + WdsValueCodedReport report = new WdsValueCodedReport(); + + String codeType = "OBS_VALUE_CODED"; + String inputCode = "12345"; + String wdsCode = "54321"; + boolean matchedFound = true; + + report.setCodeType(codeType); + report.setInputCode(inputCode); + report.setWdsCode(wdsCode); + report.setMatchedFound(matchedFound); + + assertEquals(codeType, report.getCodeType()); + assertEquals(inputCode, report.getInputCode()); + assertEquals(wdsCode, report.getWdsCode()); + assertTrue(report.isMatchedFound()); + } + + @Test + void testDefaultConstructor() { + WdsValueCodedReport report = new WdsValueCodedReport(); + + assertNull(report.getCodeType()); + assertNull(report.getInputCode()); + assertNull(report.getWdsCode()); + assertFalse(report.isMatchedFound()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsValueNumericReportTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsValueNumericReportTest.java new file mode 100644 index 000000000..6bd74f68d --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsValueNumericReportTest.java @@ -0,0 +1,48 @@ +package gov.cdc.dataprocessing.service.model.wds; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class WdsValueNumericReportTest { + + @Test + void testSettersAndGetters() { + WdsValueNumericReport report = new WdsValueNumericReport(); + + String codeType = "OBS_NUMERIC_VALUE"; + String inputCode1 = "10.0"; + String inputCode2 = "20.0"; + String operator = "EQUAL"; + String wdsCode = "15.0"; + boolean matchedFound = true; + + report.setCodeType(codeType); + report.setInputCode1(inputCode1); + report.setInputCode2(inputCode2); + report.setOperator(operator); + report.setWdsCode(wdsCode); + report.setMatchedFound(matchedFound); + + assertEquals(codeType, report.getCodeType()); + assertEquals(inputCode1, report.getInputCode1()); + assertEquals(inputCode2, report.getInputCode2()); + assertEquals(operator, report.getOperator()); + assertEquals(wdsCode, report.getWdsCode()); + assertTrue(report.isMatchedFound()); + } + + @Test + void testDefaultConstructor() { + WdsValueNumericReport report = new WdsValueNumericReport(); + + assertNull(report.getCodeType()); + assertNull(report.getInputCode1()); + assertNull(report.getInputCode2()); + assertNull(report.getOperator()); + assertNull(report.getWdsCode()); + assertFalse(report.isMatchedFound()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsValueTextReportTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsValueTextReportTest.java new file mode 100644 index 000000000..449a5f352 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/service/model/wds/WdsValueTextReportTest.java @@ -0,0 +1,40 @@ +package gov.cdc.dataprocessing.service.model.wds; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class WdsValueTextReportTest { + + @Test + void testSettersAndGetters() { + WdsValueTextReport report = new WdsValueTextReport(); + + String codeType = "OBS_VALUE_TEXT"; + String inputCode = "Sample Input Code"; + String wdsCode = "Sample WDS Code"; + boolean matchedFound = true; + + report.setCodeType(codeType); + report.setInputCode(inputCode); + report.setWdsCode(wdsCode); + report.setMatchedFound(matchedFound); + + assertEquals(codeType, report.getCodeType()); + assertEquals(inputCode, report.getInputCode()); + assertEquals(wdsCode, report.getWdsCode()); + assertTrue(report.isMatchedFound()); + } + + @Test + void testDefaultConstructor() { + WdsValueTextReport report = new WdsValueTextReport(); + + assertNull(report.getCodeType()); + assertNull(report.getInputCode()); + assertNull(report.getWdsCode()); + assertFalse(report.isMatchedFound()); + } + + +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/test_data/TestData.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/test_data/TestData.java index fb8eb8d9f..f6afe9b2a 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/test_data/TestData.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/test_data/TestData.java @@ -18,9 +18,10 @@ import java.util.Arrays; public class TestData { - public static LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer() {}; - public static ObservationContainer observationContainer = new ObservationContainer(); - public static EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + public static LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer() { + }; + public static ObservationContainer observationContainer = new ObservationContainer(); + public static EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); public static void createLabResultContainer() { // OBS Conn diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/test_data/TestDataReader.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/test_data/TestDataReader.java index 294425922..5bb8f8ead 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/test_data/TestDataReader.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/test_data/TestDataReader.java @@ -36,6 +36,7 @@ public T readDataFromJsonPath(String path, Class type) { return data; } + public String readDataFromXmlPath(String path) { String resourcePath = "/test_data" + (path.startsWith("/") ? path : "/" + path); StringBuilder data = new StringBuilder(); @@ -69,10 +70,4 @@ public Container convertXmlStrToContainer(String payload) throws JAXBException { } - - - - - - } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/DataParserForSqlTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/DataParserForSqlTest.java new file mode 100644 index 000000000..eb58ab5e3 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/DataParserForSqlTest.java @@ -0,0 +1,82 @@ +package gov.cdc.dataprocessing.utilities; + +import org.junit.jupiter.api.Test; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; + +class DataParserForSqlTest { + + @Test + void testParseValue_Long() { + Long expected = 123L; + Long result = DataParserForSql.parseValue("123", Long.class); + assertEquals(expected, result); + } + + @Test + void testParseValue_String() { + String expected = "test"; + String result = DataParserForSql.parseValue("test", String.class); + assertEquals(expected, result); + } + + @Test + void testParseValue_Timestamp() { + Timestamp expected = Timestamp.valueOf("2023-07-14 12:00:00"); + Timestamp result = DataParserForSql.parseValue("2023-07-14 12:00:00", Timestamp.class); + assertEquals(expected, result); + } + + @Test + void testParseValue_Integer() { + Integer expected = 123; + Integer result = DataParserForSql.parseValue("123", Integer.class); + assertEquals(expected, result); + } + + @Test + void testParseValue_BigDecimal() { + BigDecimal expected = new BigDecimal("123.45"); + BigDecimal result = DataParserForSql.parseValue("123.45", BigDecimal.class); + assertEquals(expected, result); + } + + @Test + void testParseValue_Null() { + assertNull(DataParserForSql.parseValue(null, String.class)); + } + + @Test + void testDataNotNull_NonNull() { + assertTrue(DataParserForSql.dataNotNull("test")); + } + + @Test + void testDataNotNull_Null() { + assertFalse(DataParserForSql.dataNotNull(null)); + } + + @Test + void testResultValidCheck_NonEmptyList() { + List results = new ArrayList<>(); + results.add(new Object[]{1, "test"}); + assertTrue(DataParserForSql.resultValidCheck(results)); + } + + @Test + void testResultValidCheck_EmptyList() { + List results = Collections.emptyList(); + assertFalse(DataParserForSql.resultValidCheck(results)); + } + + @Test + void testResultValidCheck_NullList() { + assertFalse(DataParserForSql.resultValidCheck(null)); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/DynamicBeanBindingTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/DynamicBeanBindingTest.java new file mode 100644 index 000000000..b72fe4ea4 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/DynamicBeanBindingTest.java @@ -0,0 +1,116 @@ +package gov.cdc.dataprocessing.utilities; + +import org.junit.jupiter.api.Test; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.text.SimpleDateFormat; + +import static org.junit.jupiter.api.Assertions.*; + +public class DynamicBeanBindingTest { + + @Test + public void testPopulateBeanString() throws Exception { + TestBean bean = new TestBean(); + DynamicBeanBinding.populateBean(bean, "string_value", "test"); + assertEquals("test", bean.getStringValue()); + } + + @Test + public void testPopulateBeanLong() throws Exception { + TestBean bean = new TestBean(); + DynamicBeanBinding.populateBean(bean, "long_value", "123456789"); + assertEquals(123456789L, bean.getLongValue()); + } + + @Test + public void testPopulateBeanInteger() throws Exception { + TestBean bean = new TestBean(); + DynamicBeanBinding.populateBean(bean, "integer_value", "12345"); + assertEquals(12345, bean.getIntegerValue()); + } + + @Test + public void testPopulateBeanBigDecimal() throws Exception { + TestBean bean = new TestBean(); + DynamicBeanBinding.populateBean(bean, "big_decimal_value", "123456789"); + assertEquals(BigDecimal.valueOf(123456789), bean.getBigDecimalValue()); + } + + @Test + public void testPopulateBeanTimestamp() throws Exception { + TestBean bean = new TestBean(); + String dateStr = "12/31/2020"; + Timestamp expectedTimestamp = new Timestamp(new SimpleDateFormat("MM/dd/yyyy").parse(dateStr).getTime()); + DynamicBeanBinding.populateBean(bean, "timestamp_value", dateStr); + assertEquals(expectedTimestamp, bean.getTimestampValue()); + } + + @Test + public void testPopulateBeanBoolean() throws Exception { + TestBean bean = new TestBean(); + DynamicBeanBinding.populateBean(bean, "boolean_value", "true"); + assertTrue(bean.isBooleanValue()); + } + + @Test + public void testPopulateBeanNullValue() throws Exception { + TestBean bean = new TestBean(); + DynamicBeanBinding.populateBean(bean, "string_value", null); + assertNull(bean.getStringValue()); + } + + @Test + public void testPopulateBeanEmptyValue() throws Exception { + TestBean bean = new TestBean(); + DynamicBeanBinding.populateBean(bean, "string_value", ""); + assertNull(bean.getStringValue()); + } + + @Test + public void testPopulateBeanInvalidMethod() throws Exception { + TestBean bean = new TestBean(); + // Test with a column name that doesn't have a corresponding setter + DynamicBeanBinding.populateBean(bean, "non_existing_field", "test"); + // Ensure no exception is thrown and no value is set + assertNull(bean.getStringValue()); + } + + + @Test + public void testPopulateBeanWithInvalidTimestamp() { + TestBean bean = new TestBean(); + Exception exception = assertThrows(Exception.class, () -> { + DynamicBeanBinding.populateBean(bean, "timestamp_value", "invalid date"); + }); + assertTrue(exception.getCause() instanceof java.text.ParseException); + } + + @Test + public void testPopulateBeanWithInvalidLong() { + TestBean bean = new TestBean(); + Exception exception = assertThrows(Exception.class, () -> { + DynamicBeanBinding.populateBean(bean, "long_value", "invalid long"); + }); + assertTrue(exception.getCause() instanceof NumberFormatException); + } + + @Test + public void testPopulateBeanWithInvalidInteger() { + TestBean bean = new TestBean(); + Exception exception = assertThrows(Exception.class, () -> { + DynamicBeanBinding.populateBean(bean, "integer_value", "invalid integer"); + }); + assertTrue(exception.getCause() instanceof NumberFormatException); + } + + @Test + public void testPopulateBeanWithInvalidBigDecimal() { + TestBean bean = new TestBean(); + Exception exception = assertThrows(Exception.class, () -> { + DynamicBeanBinding.populateBean(bean, "big_decimal_value", "invalid bigdecimal"); + }); + assertTrue(exception.getCause() instanceof NumberFormatException); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/RulesEngineUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/RulesEngineUtilTest.java new file mode 100644 index 000000000..310b9d473 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/RulesEngineUtilTest.java @@ -0,0 +1,64 @@ +package gov.cdc.dataprocessing.utilities; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; + +class RulesEngineUtilTest { + + @Test + void testCalcMMWR_ValidDate() { + String date = "01/01/2022"; + int[] expected = {52, 2021}; // MMWR week 52 of the previous year because the week starts on Sunday + int[] result = RulesEngineUtil.CalcMMWR(date); + assertArrayEquals(expected, result); + } + + @Test + void testCalcMMWR_ValidDate2() { + String date = "12/31/2022"; + int[] expected = {52, 2022}; // MMWR week 52 of the current year + int[] result = RulesEngineUtil.CalcMMWR(date); + assertArrayEquals(expected, result); + } + + @Test + void testCalcMMWR_BeginningOfYear() { + String date = "01/01/2021"; + int[] expected = {53, 2020}; // MMWR week 52 of the previous year because the week starts on Sunday + int[] result = RulesEngineUtil.CalcMMWR(date); + assertArrayEquals(expected, result); + } + + @Test + void testCalcMMWR_EndOfYear() { + String date = "12/31/2021"; + int[] expected = {52, 2021}; // MMWR week 52 of the current year + int[] result = RulesEngineUtil.CalcMMWR(date); + assertArrayEquals(expected, result); + } + + @Test + void testCalcMMWR_NullDate() { + String date = null; + int[] expected = {0, 0}; + int[] result = RulesEngineUtil.CalcMMWR(date); + assertArrayEquals(expected, result); + } + + @Test + void testCalcMMWR_EmptyString() { + String date = ""; + int[] expected = {0, 0}; + int[] result = RulesEngineUtil.CalcMMWR(date); + assertArrayEquals(expected, result); + } + + @Test + void testCalcMMWR_InvalidDate() { + String date = "invalid date"; + int[] expected = {0, 0}; + int[] result = RulesEngineUtil.CalcMMWR(date); + assertArrayEquals(expected, result); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/StringUtilsTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/StringUtilsTest.java new file mode 100644 index 000000000..90094de3e --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/StringUtilsTest.java @@ -0,0 +1,58 @@ +package gov.cdc.dataprocessing.utilities; + +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.Date; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class StringUtilsTest { + + @Test + void testStringToStrutsTimestamp_ValidDate() { + String dateStr = "12/31/2022"; + Timestamp expectedTimestamp = Timestamp.valueOf("2022-12-31 00:00:00.0"); + Timestamp result = StringUtils.stringToStrutsTimestamp(dateStr); + assertEquals(expectedTimestamp, result); + } + + @Test + void testStringToStrutsTimestamp_EmptyString() { + String dateStr = ""; + Timestamp result = StringUtils.stringToStrutsTimestamp(dateStr); + assertNull(result); + } + + @Test + void testStringToStrutsTimestamp_NullString() { + String dateStr = null; + Timestamp result = StringUtils.stringToStrutsTimestamp(dateStr); + assertNull(result); + } + + @Test + void testStringToStrutsTimestamp_InvalidDate() { + String dateStr = "invalid date"; + Timestamp result = StringUtils.stringToStrutsTimestamp(dateStr); + assertNull(result); + } + + @Test + void testFormatDate_ValidDate() throws Exception { + SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy"); + Date date = formatter.parse("12/31/2022"); + String expectedDateStr = "12/31/2022"; + String result = StringUtils.formatDate(date); + assertEquals(expectedDateStr, result); + } + + @Test + void testFormatDate_NullDate() { + Date date = null; + String result = StringUtils.formatDate(date); + assertEquals("", result); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/TestBean.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/TestBean.java new file mode 100644 index 000000000..70aa27cd3 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/TestBean.java @@ -0,0 +1,63 @@ +package gov.cdc.dataprocessing.utilities; + + +import java.math.BigDecimal; +import java.sql.Timestamp; + +public class TestBean { + private String stringValue; + private Long longValue; + private Integer integerValue; + private BigDecimal bigDecimalValue; + private Timestamp timestampValue; + private boolean booleanValue; + + // Getters and Setters + public String getStringValue() { + return stringValue; + } + + public void setStringValue(String stringValue) { + this.stringValue = stringValue; + } + + public Long getLongValue() { + return longValue; + } + + public void setLongValue(Long longValue) { + this.longValue = longValue; + } + + public Integer getIntegerValue() { + return integerValue; + } + + public void setIntegerValue(Integer integerValue) { + this.integerValue = integerValue; + } + + public BigDecimal getBigDecimalValue() { + return bigDecimalValue; + } + + public void setBigDecimalValue(BigDecimal bigDecimalValue) { + this.bigDecimalValue = bigDecimalValue; + } + + public Timestamp getTimestampValue() { + return timestampValue; + } + + public void setTimestampValue(Timestamp timestampValue) { + this.timestampValue = timestampValue; + } + + public boolean isBooleanValue() { + return booleanValue; + } + + public void setBooleanValue(boolean booleanValue) { + this.booleanValue = booleanValue; + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/HL7PatientHandlerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/HL7PatientHandlerTest.java index 53bb35ac8..cb11fba49 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/HL7PatientHandlerTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/HL7PatientHandlerTest.java @@ -38,6 +38,8 @@ import static org.mockito.Mockito.when; class HL7PatientHandlerTest { + @Mock + AuthUtil authUtil; @Mock private ICatchingValueService checkingValueService; @Mock @@ -46,8 +48,6 @@ class HL7PatientHandlerTest { private EntityIdUtil entityIdUtil; @InjectMocks private HL7PatientHandler hl7PatientHandler; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -58,7 +58,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); SrteCache.elrXrefsList.clear(); SrteCache.raceCodesMap.clear(); @@ -146,7 +146,7 @@ void getPatientAndNextOfKin_Test() throws DataProcessingException, JAXBException motherName.setHL7GivenName("TEST"); hl7PatientResult.getPATIENT().getPatientIdentification().getMothersMaidenName().add(motherName); - var birthOrder =new HL7NMType(); + var birthOrder = new HL7NMType(); birthOrder.setHL7Numeric(BigInteger.ONE); hl7PatientResult.getPATIENT().getPatientIdentification().setBirthOrder(birthOrder); @@ -170,7 +170,7 @@ void getPatientAndNextOfKin_Test() throws DataProcessingException, JAXBException hl7PatientResult.getPATIENT().getPatientIdentification().getPhoneNumberHome().add(homePone); var entiyLoca = new EntityLocatorParticipationDto(); - when(nbsObjectConverter.personTelePhoneType(any(),eq(EdxELRConstant.ELR_PATIENT_CD), any())).thenReturn(entiyLoca); + when(nbsObjectConverter.personTelePhoneType(any(), eq(EdxELRConstant.ELR_PATIENT_CD), any())).thenReturn(entiyLoca); var race = new PersonRaceDto(); race.setRaceCategoryCd("CODE"); @@ -184,7 +184,7 @@ void getPatientAndNextOfKin_Test() throws DataProcessingException, JAXBException SrteCache.raceCodesMap.put("TO_CODE", "TO_CODE"); // NOK - when(checkingValueService.getCodeDescTxtForCd(any(),eq( EdxELRConstant.ELR_NEXT_OF_KIN_RL_CLASS))).thenReturn("NOK"); + when(checkingValueService.getCodeDescTxtForCd(any(), eq(EdxELRConstant.ELR_NEXT_OF_KIN_RL_CLASS))).thenReturn("NOK"); var res = hl7PatientHandler.getPatientAndNextOfKin(hl7PatientResult, labResultProxyContainer, edxLabInformationDto); @@ -201,7 +201,7 @@ void parseToPersonObject_Role_Check_1() throws DataProcessingException { edxLabInformationDto.setRole(EdxELRConstant.ELR_SPECIMEN_PROCURER_CD); - var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); + var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); assertNotNull(res); } @@ -214,7 +214,7 @@ void parseToPersonObject_Role_Check_2() throws DataProcessingException { edxLabInformationDto.setRole(EdxELRConstant.ELR_LAB_PROVIDER_CD); - var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); + var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); assertNotNull(res); } @@ -227,7 +227,7 @@ void parseToPersonObject_Role_Check_3() throws DataProcessingException { edxLabInformationDto.setRole(EdxELRConstant.ELR_LAB_VERIFIER_CD); - var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); + var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); assertNotNull(res); } @@ -240,7 +240,7 @@ void parseToPersonObject_Role_Check_4() throws DataProcessingException { edxLabInformationDto.setRole(EdxELRConstant.ELR_LAB_ASSISTANT_CD); - var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); + var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); assertNotNull(res); } @@ -253,7 +253,7 @@ void parseToPersonObject_Role_Check_5() throws DataProcessingException { edxLabInformationDto.setRole(EdxELRConstant.ELR_LAB_PERFORMER_CD); - var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); + var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); assertNotNull(res); } @@ -266,7 +266,7 @@ void parseToPersonObject_Role_Check_6() throws DataProcessingException { edxLabInformationDto.setRole(EdxELRConstant.ELR_LAB_ENTERER_CD); - var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); + var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); assertNotNull(res); } @@ -279,7 +279,7 @@ void parseToPersonObject_Role_Check_7() throws DataProcessingException { edxLabInformationDto.setRole(EdxELRConstant.ELR_OP_CD); - var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); + var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); assertNotNull(res); } @@ -292,7 +292,7 @@ void parseToPersonObject_Role_Check_8() throws DataProcessingException { edxLabInformationDto.setRole(EdxELRConstant.ELR_COPY_TO_CD); - var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); + var res = hl7PatientHandler.parseToPersonObject(labResultProxyContainer, edxLabInformationDto); assertNotNull(res); } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/NBSObjectConverterTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/NBSObjectConverterTest.java index cc1304c95..2777db85f 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/NBSObjectConverterTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/NBSObjectConverterTest.java @@ -38,16 +38,15 @@ import static org.mockito.Mockito.when; class NBSObjectConverterTest { + @Mock + AuthUtil authUtil; @Mock private ICatchingValueService checkingValueService; @Mock private EntityIdUtil entityIdUtil; @InjectMocks private NBSObjectConverter nbsObjectConverter; - private PersonContainer perContainer; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -58,7 +57,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); var perDt = new PersonDto(); perContainer = new PersonContainer(); @@ -101,13 +100,14 @@ void processEntityData_Test() throws JAXBException, DataProcessingException { mothderIden.setHL7AssigningAuthority(auth); xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier().add(mothderIden); - var hl7CXType = xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier(); + var hl7CXType = xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier(); var res = nbsObjectConverter.processEntityData(hl7CXType.get(0), personContainer, EdxELRConstant.ELR_PATIENT_ALTERNATE_IND, 1); assertNotNull(res); } + @Test void processEntityData_Test_2() throws JAXBException, DataProcessingException { PersonContainer personContainer = new PersonContainer(); @@ -123,7 +123,7 @@ void processEntityData_Test_2() throws JAXBException, DataProcessingException { mothderIden.setHL7AssigningAuthority(auth); xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier().add(mothderIden); - var hl7CXType = xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier(); + var hl7CXType = xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier(); var res = nbsObjectConverter.processEntityData(hl7CXType.get(0), personContainer, EdxELRConstant.ELR_MOTHER_IDENTIFIER, 1); @@ -146,7 +146,7 @@ void processEntityData_Test_3() throws JAXBException, DataProcessingException { mothderIden.setHL7AssigningAuthority(auth); xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier().add(mothderIden); - var hl7CXType = xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier(); + var hl7CXType = xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier(); var res = nbsObjectConverter.processEntityData(hl7CXType.get(0), personContainer, EdxELRConstant.ELR_ACCOUNT_IDENTIFIER, 1); @@ -169,9 +169,9 @@ void processEntityData_Test_4() throws JAXBException, DataProcessingException { mothderIden.setHL7AssigningAuthority(auth); xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier().add(mothderIden); xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier().get(0).setHL7IdentifierTypeCode(null); - var hl7CXType = xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier(); + var hl7CXType = xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getMothersIdentifier(); - when(checkingValueService.getCodeDescTxtForCd(any(),eq(EdxELRConstant.EI_TYPE))).thenReturn("CODE"); + when(checkingValueService.getCodeDescTxtForCd(any(), eq(EdxELRConstant.EI_TYPE))).thenReturn("CODE"); var res = nbsObjectConverter.processEntityData(hl7CXType.get(0), personContainer, "BLAH", 1); assertNotNull(res); @@ -189,7 +189,7 @@ void personAddressType_Test() throws JAXBException { HL7XADType address = xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getPatientAddress().get(0); - var res = nbsObjectConverter.personAddressType(address,EdxELRConstant.ELR_OP_CD, personContainer); + var res = nbsObjectConverter.personAddressType(address, EdxELRConstant.ELR_OP_CD, personContainer); assertNotNull(res); } @@ -209,11 +209,10 @@ void personAddressType_Test_2() throws JAXBException, DataProcessingException { var stateCode = new StateCode(); stateCode.setStateCd("ME"); when(checkingValueService.findStateCodeByStateNm("ME")).thenReturn(stateCode); - when(checkingValueService.getCountyCdByDesc("COUNTY","ME")).thenReturn("COUNTY"); - + when(checkingValueService.getCountyCdByDesc("COUNTY", "ME")).thenReturn("COUNTY"); - var res = nbsObjectConverter.personAddressType(address,EdxELRConstant.ELR_OP_CD, personContainer); + var res = nbsObjectConverter.personAddressType(address, EdxELRConstant.ELR_OP_CD, personContainer); assertNotNull(res); } @@ -234,14 +233,14 @@ void personAddressType_Test_3() throws JAXBException, DataProcessingException { var stateCode = new StateCode(); stateCode.setStateCd("ME"); when(checkingValueService.findStateCodeByStateNm("ME")).thenReturn(stateCode); - when(checkingValueService.getCountyCdByDesc("COUNTY","ME")).thenReturn("COUNTY"); + when(checkingValueService.getCountyCdByDesc("COUNTY", "ME")).thenReturn("COUNTY"); - - var res = nbsObjectConverter.personAddressType(address,EdxELRConstant.ELR_NEXT_OF_KIN, personContainer); + var res = nbsObjectConverter.personAddressType(address, EdxELRConstant.ELR_NEXT_OF_KIN, personContainer); assertNotNull(res); } + @Test void personAddressType_Test_4() throws JAXBException, DataProcessingException { PersonContainer personContainer = new PersonContainer(); @@ -258,11 +257,10 @@ void personAddressType_Test_4() throws JAXBException, DataProcessingException { var stateCode = new StateCode(); stateCode.setStateCd("ME"); when(checkingValueService.findStateCodeByStateNm("ME")).thenReturn(stateCode); - when(checkingValueService.getCountyCdByDesc("COUNTY","ME")).thenReturn("COUNTY"); - + when(checkingValueService.getCountyCdByDesc("COUNTY", "ME")).thenReturn("COUNTY"); - var res = nbsObjectConverter.personAddressType(address,"BLAH", personContainer); + var res = nbsObjectConverter.personAddressType(address, "BLAH", personContainer); assertNotNull(res); } @@ -283,11 +281,10 @@ void organizationAddressType_1() throws JAXBException, DataProcessingException { var stateCode = new StateCode(); stateCode.setStateCd("ME"); when(checkingValueService.findStateCodeByStateNm("ME")).thenReturn(stateCode); - when(checkingValueService.getCountyCdByDesc("COUNTY","ME")).thenReturn("COUNTY"); + when(checkingValueService.getCountyCdByDesc("COUNTY", "ME")).thenReturn("COUNTY"); - - var res = nbsObjectConverter.organizationAddressType(address,EdxELRConstant.ELR_OP_CD, personContainer); + var res = nbsObjectConverter.organizationAddressType(address, EdxELRConstant.ELR_OP_CD, personContainer); assertNotNull(res); } @@ -303,12 +300,11 @@ void organizationAddressType_Test_2() throws JAXBException { HL7XADType address = xmlConn.getHL7LabReport().getHL7PATIENTRESULT().get(0).getPATIENT().getPatientIdentification().getPatientAddress().get(0); - var res = nbsObjectConverter.organizationAddressType(address,EdxELRConstant.ELR_OP_CD, personContainer); + var res = nbsObjectConverter.organizationAddressType(address, EdxELRConstant.ELR_OP_CD, personContainer); assertNotNull(res); } - @SuppressWarnings("java:S5976") @Test void validateSSN_Test() { @@ -357,7 +353,7 @@ void processHL7TSTypeForDOBWithoutTime_Test() throws DataProcessingException { } @Test - void processHL7TSTypeForDOBWithoutTime_Test_Exp() { + void processHL7TSTypeForDOBWithoutTime_Test_Exp() { HL7TSType time = new HL7TSType(); time.setYear(BigInteger.valueOf(2000)); time.setMonth(BigInteger.valueOf(12)); @@ -389,7 +385,6 @@ void processHL7TSTypeForDOBWithoutTime_Exp_2() { } - @Test void setPersonBirthType_Test() { String country = ""; @@ -435,7 +430,7 @@ void processHL7TSType_Test() throws DataProcessingException { } @Test - void processHL7TSType_Test_Exp_1() { + void processHL7TSType_Test_Exp_1() { HL7TSType time = new HL7TSType(); String itemDescription = "TEST"; @@ -457,7 +452,7 @@ void processHL7TSType_Test_Exp_1() { @Test - void processHL7TSType_Test_Exp_2() { + void processHL7TSType_Test_Exp_2() { HL7TSType time = new HL7TSType(); String itemDescription = "TEST"; @@ -607,7 +602,7 @@ void orgTelePhoneType_Test() { @Test void processCNNPersonName_Test() { - HL7CNNType hl7CNNType = Mockito.mock(HL7CNNType.class); + HL7CNNType hl7CNNType = Mockito.mock(HL7CNNType.class); when(hl7CNNType.getHL7FamilyName()).thenReturn("TEST"); when(hl7CNNType.getHL7GivenName()).thenReturn("TEST"); when(hl7CNNType.getHL7SecondAndFurtherGivenNamesOrInitialsThereof()).thenReturn("TEST"); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ORCHandlerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ORCHandlerTest.java index ad2e51e3e..2001ccb04 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ORCHandlerTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ORCHandlerTest.java @@ -31,15 +31,14 @@ import static org.mockito.Mockito.*; class ORCHandlerTest { + @Mock + AuthUtil authUtil; @Mock private NBSObjectConverter nbsObjectConverter; @InjectMocks private ORCHandler orcHandler; - private PersonContainer personContainer; private HL7ORCType commonOrder; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() throws JAXBException { @@ -50,7 +49,7 @@ void setUp() throws JAXBException { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); var perDt = new PersonDto(); personContainer = new PersonContainer(); @@ -78,7 +77,7 @@ void getORCProcessing_Test() throws DataProcessingException { edxLabInformationDto.setUserId(10L); edxLabInformationDto.setRootObserbationUid(10L); - when(nbsObjectConverter.orgTelePhoneType(any(), any(),any())).thenReturn(new EntityLocatorParticipationDto()); + when(nbsObjectConverter.orgTelePhoneType(any(), any(), any())).thenReturn(new EntityLocatorParticipationDto()); commonOrder.setOrderEffectiveDateTime(new HL7TSType()); @@ -100,15 +99,13 @@ void getORCProcessing_Test_exp_1() throws DataProcessingException { edxLabInformationDto.setUserId(10L); edxLabInformationDto.setRootObserbationUid(10L); - when(nbsObjectConverter.orgTelePhoneType(any(), any(),any())).thenReturn(new EntityLocatorParticipationDto()); + when(nbsObjectConverter.orgTelePhoneType(any(), any(), any())).thenReturn(new EntityLocatorParticipationDto()); commonOrder.setOrderEffectiveDateTime(new HL7TSType()); when(nbsObjectConverter.processHL7TSType(any(), any())).thenThrow(new RuntimeException("TEST")); - - DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { orcHandler.getORCProcessing(commonOrder, labResultProxyContainer, edxLabInformationDto); }); @@ -117,7 +114,7 @@ void getORCProcessing_Test_exp_1() throws DataProcessingException { } @Test - void getORCProcessing_Test_exp_2() { + void getORCProcessing_Test_exp_2() { LabResultProxyContainer labResultProxyContainer = new LabResultProxyContainer(); EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); @@ -126,12 +123,11 @@ void getORCProcessing_Test_exp_2() { edxLabInformationDto.setUserId(10L); edxLabInformationDto.setRootObserbationUid(10L); - when(nbsObjectConverter.orgTelePhoneType(any(), any(),any())).thenThrow(new RuntimeException("TEST")); + when(nbsObjectConverter.orgTelePhoneType(any(), any(), any())).thenThrow(new RuntimeException("TEST")); commonOrder.setOrderEffectiveDateTime(new HL7TSType()); - DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { orcHandler.getORCProcessing(commonOrder, labResultProxyContainer, edxLabInformationDto); }); @@ -149,15 +145,14 @@ void getORCProcessing_exp_3() throws DataProcessingException { edxLabInformationDto.setUserId(10L); edxLabInformationDto.setRootObserbationUid(10L); - when(nbsObjectConverter.orgTelePhoneType(any(), any(),any())).thenReturn(new EntityLocatorParticipationDto()); - when(nbsObjectConverter.personAddressType(any(), any(),any())).thenThrow(new RuntimeException("TEST")); + when(nbsObjectConverter.orgTelePhoneType(any(), any(), any())).thenReturn(new EntityLocatorParticipationDto()); + when(nbsObjectConverter.personAddressType(any(), any(), any())).thenThrow(new RuntimeException("TEST")); commonOrder.setOrderEffectiveDateTime(new HL7TSType()); when(nbsObjectConverter.processHL7TSType(any(), any())).thenReturn(TimeStampUtil.getCurrentTimeStamp()); - DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { orcHandler.getORCProcessing(commonOrder, labResultProxyContainer, edxLabInformationDto); }); @@ -165,5 +160,4 @@ void getORCProcessing_exp_3() throws DataProcessingException { } - } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObsReqNoteHelperTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObsReqNoteHelperTest.java new file mode 100644 index 000000000..8d6b0f335 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObsReqNoteHelperTest.java @@ -0,0 +1,76 @@ +package gov.cdc.dataprocessing.utilities.component.data_parser; + +import gov.cdc.dataprocessing.exception.DataProcessingException; +import gov.cdc.dataprocessing.model.container.model.ObservationContainer; +import gov.cdc.dataprocessing.model.dto.observation.ObservationDto; +import gov.cdc.dataprocessing.model.phdc.HL7NTEType; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.mockito.Mockito.*; + +class ObsReqNoteHelperTest { + + private ObservationContainer observationContainer; + private HL7NTEType hl7NTEType; + + @BeforeEach + void setUp() { + observationContainer = mock(ObservationContainer.class); + hl7NTEType = mock(HL7NTEType.class); + } + + @Test + void testGetObsReqNotes_WithComments() throws DataProcessingException { + List comments = new ArrayList<>(); + comments.add("Test Comment 1"); + comments.add("Test Comment 2"); + + when(hl7NTEType.getHL7Comment()).thenReturn(comments); + when(observationContainer.getTheObsValueTxtDtoCollection()).thenReturn(new ArrayList<>()); + when(observationContainer.getTheObservationDto()).thenReturn(new ObservationDto()); + + List noteArray = new ArrayList<>(); + noteArray.add(hl7NTEType); + + ObservationContainer result = ObsReqNoteHelper.getObsReqNotes(noteArray, observationContainer); + + assertNotNull(result); + assertEquals(2, result.getTheObsValueTxtDtoCollection().size()); + verify(observationContainer, times(7)).getTheObsValueTxtDtoCollection(); + } + + @Test + void testGetObsReqNotes_WithoutComments() throws DataProcessingException { + when(hl7NTEType.getHL7Comment()).thenReturn(new ArrayList<>()); + when(observationContainer.getTheObsValueTxtDtoCollection()).thenReturn(new ArrayList<>()); + when(observationContainer.getTheObservationDto()).thenReturn(new ObservationDto()); + + List noteArray = new ArrayList<>(); + noteArray.add(hl7NTEType); + + ObservationContainer result = ObsReqNoteHelper.getObsReqNotes(noteArray, observationContainer); + + assertNotNull(result); + assertEquals(1, result.getTheObsValueTxtDtoCollection().size()); + verify(observationContainer, times(4)).getTheObsValueTxtDtoCollection(); + } + + @Test + void testGetObsReqNotes_Exception() { + List noteArray = new ArrayList<>(); + noteArray.add(hl7NTEType); + + try { + doThrow(new RuntimeException("Test Exception")).when(hl7NTEType).getHL7Comment(); + ObsReqNoteHelper.getObsReqNotes(noteArray, observationContainer); + } catch (DataProcessingException e) { + assertEquals("Exception thrown at ObservationResultRequest.getObsReqNotes:Test Exception", e.getMessage()); + } + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObservationRequestHandlerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObservationRequestHandlerTest.java index 3e7b107d9..db51ba748 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObservationRequestHandlerTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObservationRequestHandlerTest.java @@ -36,6 +36,8 @@ import static org.mockito.Mockito.when; class ObservationRequestHandlerTest { + @Mock + AuthUtil authUtil; @Mock private ICatchingValueService checkingValueService; @Mock @@ -48,11 +50,8 @@ class ObservationRequestHandlerTest { private HL7PatientHandler hl7PatientHandler; @InjectMocks private ObservationRequestHandler observationRequestHandler; - - private LabResultProxyContainer labResultProxyContainer; + private LabResultProxyContainer labResultProxyContainer; private EdxLabInformationDto edxLabInformationDto; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -63,12 +62,12 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); labResultProxyContainer = new LabResultProxyContainer(); var orgConCol = new ArrayList(); - var orgCon= new OrganizationContainer(); + var orgCon = new OrganizationContainer(); orgCon.setRole(EdxELRConstant.ELR_SENDING_FACILITY_CD); var entiCol = new ArrayList(); var enti = new EntityIdDto(); @@ -91,13 +90,13 @@ void setUp() { @AfterEach void tearDown() { - Mockito.reset(checkingValueService, commonLabUtil,nbsObjectConverter,hl7SpecimenUtil,hl7PatientHandler, authUtil); + Mockito.reset(checkingValueService, commonLabUtil, nbsObjectConverter, hl7SpecimenUtil, hl7PatientHandler, authUtil); } @Test void getObservationRequest_Test() throws DataProcessingException { - HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); - HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); + HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); + HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); when(hl7OBRType.getResultStatus()).thenReturn("TEST"); @@ -155,11 +154,10 @@ void getObservationRequest_Test() throws DataProcessingException { } - @Test void getObservationRequest_Test_2() throws DataProcessingException { - HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); - HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); + HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); + HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); when(hl7OBRType.getResultStatus()).thenReturn("TEST"); @@ -244,18 +242,17 @@ void getObservationRequest_Test_2() throws DataProcessingException { edxLabInformationDto.setEdxSusLabDTMap(sus); - var result = observationRequestHandler.getObservationRequest(hl7OBRType, hl7PatientResultSPMType, labResultProxyContainer, edxLabInformationDto); assertNotNull(result); - } + @SuppressWarnings("java:S5976") @Test void getObservationRequest_Test_exp_1() throws DataProcessingException { - HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); - HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); + HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); + HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); when(hl7OBRType.getResultStatus()).thenReturn("TEST"); @@ -312,11 +309,12 @@ void getObservationRequest_Test_exp_1() throws DataProcessingException { assertNotNull(thrown); } + @SuppressWarnings("java:S5976") @Test void getObservationRequest_Test_exp_2() throws DataProcessingException { - HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); - HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); + HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); + HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); when(hl7OBRType.getResultStatus()).thenReturn("TEST"); @@ -373,11 +371,12 @@ void getObservationRequest_Test_exp_2() throws DataProcessingException { assertNotNull(thrown); } + @SuppressWarnings("java:S5976") @Test void getObservationRequest_Test_exp_3() throws DataProcessingException { - HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); - HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); + HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); + HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); when(hl7OBRType.getResultStatus()).thenReturn(null); @@ -438,8 +437,8 @@ void getObservationRequest_Test_exp_3() throws DataProcessingException { @Test void getObservationRequest_Test_exp_4() throws DataProcessingException { - HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); - HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); + HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); + HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); when(hl7OBRType.getResultStatus()).thenReturn("TEST"); @@ -498,8 +497,8 @@ void getObservationRequest_Test_exp_4() throws DataProcessingException { @Test void getObservationRequest_Test_exp_5() throws DataProcessingException { - HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); - HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); + HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); + HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); when(hl7OBRType.getResultStatus()).thenReturn("TEST"); @@ -561,8 +560,8 @@ void getObservationRequest_Test_exp_5() throws DataProcessingException { @Test void getObservationRequest_Test_Coverage_1() throws DataProcessingException { - HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); - HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); + HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); + HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); when(hl7OBRType.getResultStatus()).thenReturn("TEST"); @@ -621,8 +620,8 @@ void getObservationRequest_Test_Coverage_1() throws DataProcessingException { @Test void getObservationRequest_Test_Coverage_2() throws DataProcessingException { - HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); - HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); + HL7OBRType hl7OBRType = Mockito.mock(HL7OBRType.class); + HL7PatientResultSPMType hl7PatientResultSPMType = Mockito.mock(HL7PatientResultSPMType.class); when(hl7OBRType.getResultStatus()).thenReturn("TEST"); @@ -680,5 +679,4 @@ void getObservationRequest_Test_Coverage_2() throws DataProcessingException { } - } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObservationResultRequestHandlerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObservationResultRequestHandlerTest.java index 53b6ce477..a4858244b 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObservationResultRequestHandlerTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/ObservationResultRequestHandlerTest.java @@ -5,8 +5,14 @@ import gov.cdc.dataprocessing.exception.DataProcessingException; import gov.cdc.dataprocessing.model.container.model.LabResultProxyContainer; import gov.cdc.dataprocessing.model.container.model.ObservationContainer; +import gov.cdc.dataprocessing.model.container.model.OrganizationContainer; import gov.cdc.dataprocessing.model.dto.act.ActIdDto; +import gov.cdc.dataprocessing.model.dto.act.ActRelationshipDto; +import gov.cdc.dataprocessing.model.dto.edx.EdxLabIdentiferDto; +import gov.cdc.dataprocessing.model.dto.entity.EntityIdDto; import gov.cdc.dataprocessing.model.dto.lab_result.EdxLabInformationDto; +import gov.cdc.dataprocessing.model.dto.observation.ObsValueCodedDto; +import gov.cdc.dataprocessing.model.dto.observation.ObsValueNumericDto; import gov.cdc.dataprocessing.model.dto.observation.ObservationDto; import gov.cdc.dataprocessing.model.phdc.*; import gov.cdc.dataprocessing.repository.nbs.odse.model.auth.AuthUser; @@ -20,36 +26,48 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.MockitoAnnotations; +import org.mockito.*; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; +import java.math.BigDecimal; +import java.util.*; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.when; +import static org.mockito.Mockito.*; class ObservationResultRequestHandlerTest { + @Mock + AuthUtil authUtil; @Mock private ICatchingValueService checkingValueService; @Mock private NBSObjectConverter nbsObjectConverter; @Mock private CommonLabUtil commonLabUtil; - @InjectMocks + @Spy private ObservationResultRequestHandler observationResultRequestHandler; - private List result; private EdxLabInformationDto edxLabInformationDt; @Mock - AuthUtil authUtil; + private HL7CWEType obsIdentifierMock; + @Mock + private ObservationDto observationDtoMock; + @Mock + private EdxLabInformationDto edxLabInformationDtoMock; + @Mock + private ObservationContainer observationContainerMock; + @Mock + private HL7OBXType hl7OBXTypeMock; + @Mock + private LabResultProxyContainer labResultProxyContainerMock; + @Mock + private HL7XONType hl7XONTypeNameMock; + @Mock + private HL7HDType hl7AssigningAuthorityMock; + @Mock + private EntityIdDto entityIdDtoMock; @BeforeEach void setUp() throws JAXBException { @@ -60,7 +78,7 @@ void setUp() throws JAXBException { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); var test = new TestDataReader(); var xmlData = test.readDataFromXmlPath("/xml_payload/payload_1.xml"); @@ -89,7 +107,6 @@ void tearDown() { Mockito.reset(checkingValueService, nbsObjectConverter, commonLabUtil, authUtil); } - @Test void getObservationResultRequest_Test() throws DataProcessingException { List observation = result; @@ -121,7 +138,7 @@ void setEquipments_Test() { observationDto.setObservationUid(10L); - var res= observationResultRequestHandler.setEquipments(equipmentIdType, observationDto, actIdDtoColl); + var res = observationResultRequestHandler.setEquipments(equipmentIdType, observationDto, actIdDtoColl); assertEquals(1, res.size()); } @@ -142,7 +159,7 @@ void processingAbnormalFlag_Test() throws DataProcessingException { observationContainer.setTheObservationInterpDtoCollection(new ArrayList<>()); when(checkingValueService.getCodeDescTxtForCd(any(), any())).thenReturn("TEST"); - var res= observationResultRequestHandler.processingAbnormalFlag(abnormalFlag, observationDto, observationContainer); + var res = observationResultRequestHandler.processingAbnormalFlag(abnormalFlag, observationDto, observationContainer); assertNotNull(res); assertEquals(1, res.getTheObservationInterpDtoCollection().size()); } @@ -163,7 +180,7 @@ void processingAbnormalFlag_Test_2() throws DataProcessingException { observationContainer.setTheObservationInterpDtoCollection(new ArrayList<>()); when(checkingValueService.getCodeDescTxtForCd(any(), any())).thenReturn(""); - var res= observationResultRequestHandler.processingAbnormalFlag(abnormalFlag, observationDto, observationContainer); + var res = observationResultRequestHandler.processingAbnormalFlag(abnormalFlag, observationDto, observationContainer); assertNotNull(res); assertEquals(1, res.getTheObservationInterpDtoCollection().size()); } @@ -174,7 +191,7 @@ void processingReferringRange_Test() { HL7OBXType type = result.get(0).getObservationResult(); type.setReferencesRange("1"); - var res= observationResultRequestHandler.processingReferringRange(type, observationContainer); + var res = observationResultRequestHandler.processingReferringRange(type, observationContainer); assertNotNull(res); } @@ -185,7 +202,7 @@ void processingReferringRange_Test_2() { HL7OBXType type = result.get(0).getObservationResult(); type.setReferencesRange("1^2^3^4^5"); - var res= observationResultRequestHandler.processingReferringRange(type, observationContainer); + var res = observationResultRequestHandler.processingReferringRange(type, observationContainer); assertNotNull(res); } @@ -209,7 +226,7 @@ void processingObservationMethod_Test() throws DataProcessingException { when(checkingValueService.getCodeDescTxtForCd(any(), eq("TEST"))).thenReturn("TEST"); - var res= observationResultRequestHandler.processingObservationMethod(methodArray,edxLabInformationDto ,observationContainer); + var res = observationResultRequestHandler.processingObservationMethod(methodArray, edxLabInformationDto, observationContainer); assertNotNull(res); assertEquals("TEST**TEST_1", res.getTheObservationDto().getMethodCd()); } @@ -263,7 +280,7 @@ void formatValue_Test_len_6() throws DataProcessingException { } @Test - void formatValue_Test_txt_empty() { + void formatValue_Test_txt_empty() { String text = ""; HL7OBXType hl7OBXType = new HL7OBXType(); ObservationContainer observationContainer = new ObservationContainer(); @@ -275,7 +292,6 @@ void formatValue_Test_txt_empty() { hl7OBXType.setUnits(unit); - DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { observationResultRequestHandler.formatValue(text, hl7OBXType, observationContainer, edxLabInformationDto, elementName); }); @@ -300,6 +316,7 @@ void formValue_Numeric_Test_1() throws DataProcessingException { observationResultRequestHandler.formatValue(text, hl7OBXType, observationContainer, edxLabInformationDto, elementName); } + @SuppressWarnings("java:S2699") @Test void formValue_Txt_Test_1() throws DataProcessingException { @@ -319,10 +336,8 @@ void formValue_Txt_Test_1() throws DataProcessingException { } - - @Test - void formatValue_Test_exp_un_support() { + void formatValue_Test_exp_un_support() { String text = ""; HL7OBXType hl7OBXType = new HL7OBXType(); ObservationContainer observationContainer = new ObservationContainer(); @@ -334,14 +349,12 @@ void formatValue_Test_exp_un_support() { hl7OBXType.setUnits(unit); - DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { observationResultRequestHandler.formatValue(text, hl7OBXType, observationContainer, edxLabInformationDto, elementName); }); assertNotNull(thrown); } - @Test void getObservationResultRequest_Test_Exp() { List observation = result; @@ -358,4 +371,688 @@ void getObservationResultRequest_Test_Exp() { assertNotNull(thrown); } + + @Test + void testObsResultCheckParentObs_ParentObsIndFalse_ObservationIdentifierNull() { + // Arrange + EdxLabInformationDto edxLabInformationDtoMock = mock(EdxLabInformationDto.class); + HL7OBXType hl7OBXTypeMock = mock(HL7OBXType.class); + + when(edxLabInformationDtoMock.isParentObsInd()).thenReturn(false); + when(hl7OBXTypeMock.getObservationIdentifier()).thenReturn(null); + + + // Act + boolean result = observationResultRequestHandler.obsResultCheckParentObs(edxLabInformationDtoMock, hl7OBXTypeMock); + + // Assert + assertTrue(result); + } + + @Test + void testObsResultCheckParentObs_ParentObsIndTrue() { + // Arrange + EdxLabInformationDto edxLabInformationDtoMock = mock(EdxLabInformationDto.class); + HL7OBXType hl7OBXTypeMock = mock(HL7OBXType.class); + + when(edxLabInformationDtoMock.isParentObsInd()).thenReturn(true); + + + // Act + boolean result = observationResultRequestHandler.obsResultCheckParentObs(edxLabInformationDtoMock, hl7OBXTypeMock); + + // Assert + assertFalse(result); + } + + @Test + void testObsResultCheckParentObs_ObservationIdentifierNotNull_HL7IdentifierNull_HL7AlternateIdentifierNull() { + // Arrange + EdxLabInformationDto edxLabInformationDtoMock = mock(EdxLabInformationDto.class); + HL7OBXType hl7OBXTypeMock = mock(HL7OBXType.class); + HL7CWEType hl7CETypeMock = mock(HL7CWEType.class); + + when(edxLabInformationDtoMock.isParentObsInd()).thenReturn(false); + when(hl7OBXTypeMock.getObservationIdentifier()).thenReturn(hl7CETypeMock); + when(hl7CETypeMock.getHL7Identifier()).thenReturn(null); + when(hl7CETypeMock.getHL7AlternateIdentifier()).thenReturn(null); + + + // Act + boolean result = observationResultRequestHandler.obsResultCheckParentObs(edxLabInformationDtoMock, hl7OBXTypeMock); + + // Assert + assertTrue(result); + } + + @Test + void testObsResultCheckParentObs_ObservationIdentifierNotNull_HL7IdentifierNotNull() { + // Arrange + EdxLabInformationDto edxLabInformationDtoMock = mock(EdxLabInformationDto.class); + HL7OBXType hl7OBXTypeMock = mock(HL7OBXType.class); + HL7CWEType hl7CETypeMock = mock(HL7CWEType.class); + + when(edxLabInformationDtoMock.isParentObsInd()).thenReturn(false); + when(hl7OBXTypeMock.getObservationIdentifier()).thenReturn(hl7CETypeMock); + when(hl7CETypeMock.getHL7Identifier()).thenReturn("identifier"); + + + // Act + boolean result = observationResultRequestHandler.obsResultCheckParentObs(edxLabInformationDtoMock, hl7OBXTypeMock); + + // Assert + assertFalse(result); + } + + @Test + void testObsResultCheckParentObs_ObservationIdentifierNotNull_HL7AlternateIdentifierNotNull() { + // Arrange + EdxLabInformationDto edxLabInformationDtoMock = mock(EdxLabInformationDto.class); + HL7OBXType hl7OBXTypeMock = mock(HL7OBXType.class); + HL7CWEType hl7CETypeMock = mock(HL7CWEType.class); + + when(edxLabInformationDtoMock.isParentObsInd()).thenReturn(false); + when(hl7OBXTypeMock.getObservationIdentifier()).thenReturn(hl7CETypeMock); + when(hl7CETypeMock.getHL7Identifier()).thenReturn(null); + when(hl7CETypeMock.getHL7AlternateIdentifier()).thenReturn("alternateIdentifier"); + + + // Act + boolean result = observationResultRequestHandler.obsResultCheckParentObs(edxLabInformationDtoMock, hl7OBXTypeMock); + + // Assert + assertFalse(result); + } + + @Test + void testProcessingObsIdentifier_HL7IdentifierNotNull() { + // Arrange + HL7OBXType hl7OBXTypeMock = mock(HL7OBXType.class); + HL7CWEType observationIdentifierMock = mock(HL7CWEType.class); + EdxLabIdentiferDto edxLabIdentiferDT = new EdxLabIdentiferDto(); + + when(hl7OBXTypeMock.getObservationIdentifier()).thenReturn(observationIdentifierMock); + when(observationIdentifierMock.getHL7Identifier()).thenReturn("identifier"); + + + // Act + EdxLabIdentiferDto result = observationResultRequestHandler.processingObsIdentifier(hl7OBXTypeMock, edxLabIdentiferDT); + + // Assert + assertEquals("identifier", result.getIdentifer()); + } + + @Test + void testProcessingObsIdentifier_HL7IdentifierNull_HL7AlternateIdentifierNotNull() { + // Arrange + HL7OBXType hl7OBXTypeMock = mock(HL7OBXType.class); + HL7CWEType observationIdentifierMock = mock(HL7CWEType.class); + EdxLabIdentiferDto edxLabIdentiferDT = new EdxLabIdentiferDto(); + + when(hl7OBXTypeMock.getObservationIdentifier()).thenReturn(observationIdentifierMock); + when(observationIdentifierMock.getHL7Identifier()).thenReturn(null); + when(observationIdentifierMock.getHL7AlternateIdentifier()).thenReturn("alternateIdentifier"); + + + // Act + EdxLabIdentiferDto result = observationResultRequestHandler.processingObsIdentifier(hl7OBXTypeMock, edxLabIdentiferDT); + + // Assert + assertEquals("alternateIdentifier", result.getIdentifer()); + } + + @Test + void testProcessingObsIdentifier_BothIdentifiersNull() { + // Arrange + HL7OBXType hl7OBXTypeMock = mock(HL7OBXType.class); + HL7CWEType observationIdentifierMock = mock(HL7CWEType.class); + EdxLabIdentiferDto edxLabIdentiferDT = new EdxLabIdentiferDto(); + + when(hl7OBXTypeMock.getObservationIdentifier()).thenReturn(observationIdentifierMock); + when(observationIdentifierMock.getHL7Identifier()).thenReturn(null); + when(observationIdentifierMock.getHL7AlternateIdentifier()).thenReturn(null); + + + // Act + EdxLabIdentiferDto result = observationResultRequestHandler.processingObsIdentifier(hl7OBXTypeMock, edxLabIdentiferDT); + + // Assert + assertNull(result.getIdentifer()); + } + + @Test + void testProcessingObsTargetUid_ParentObsIndTrue() { + // Arrange + EdxLabInformationDto edxLabInformationDtoMock = mock(EdxLabInformationDto.class); + ActRelationshipDto actRelationshipDto = new ActRelationshipDto(); + + when(edxLabInformationDtoMock.isParentObsInd()).thenReturn(true); + when(edxLabInformationDtoMock.getParentObservationUid()).thenReturn(123L); + + + // Act + ActRelationshipDto result = observationResultRequestHandler.processingObsTargetUid(edxLabInformationDtoMock, actRelationshipDto); + + // Assert + assertEquals(123L, result.getTargetActUid()); + } + + @Test + void testProcessingObsTargetUid_ParentObsIndFalse() { + // Arrange + EdxLabInformationDto edxLabInformationDtoMock = mock(EdxLabInformationDto.class); + ActRelationshipDto actRelationshipDto = new ActRelationshipDto(); + + when(edxLabInformationDtoMock.isParentObsInd()).thenReturn(false); + when(edxLabInformationDtoMock.getRootObserbationUid()).thenReturn(456L); + + + // Act + ActRelationshipDto result = observationResultRequestHandler.processingObsTargetUid(edxLabInformationDtoMock, actRelationshipDto); + + // Assert + assertEquals(456L, result.getTargetActUid()); + } + + @Test + void testProcessingObsResult1_AllValuesSet() throws DataProcessingException { + // Arrange + when(obsIdentifierMock.getHL7Identifier()).thenReturn("HL7Identifier"); + when(obsIdentifierMock.getHL7Text()).thenReturn("HL7Text"); + when(obsIdentifierMock.getHL7AlternateIdentifier()).thenReturn("HL7AlternateIdentifier"); + when(obsIdentifierMock.getHL7AlternateText()).thenReturn("HL7AlternateText"); + when(obsIdentifierMock.getHL7NameofCodingSystem()).thenReturn("HL7NameofCodingSystem"); + when(obsIdentifierMock.getHL7NameofAlternateCodingSystem()).thenReturn("HL7NameofAlternateCodingSystem"); + + // Act + observationResultRequestHandler.processingObsResult1(obsIdentifierMock, observationDtoMock, edxLabInformationDtoMock, observationContainerMock); + + // Assert + verify(observationDtoMock).setCd("HL7Identifier"); + verify(observationDtoMock).setCdDescTxt("HL7Text"); + + } + + @Test + void testProcessingObsResult1_ParentObsIndTrue_NoCd() throws DataProcessingException { + // Arrange + when(obsIdentifierMock.getHL7Identifier()).thenReturn(null); + when(obsIdentifierMock.getHL7Text()).thenReturn(null); + when(obsIdentifierMock.getHL7AlternateIdentifier()).thenReturn(null); + when(obsIdentifierMock.getHL7AlternateText()).thenReturn(null); + when(edxLabInformationDtoMock.isParentObsInd()).thenReturn(true); + when(observationContainerMock.getTheObservationDto()).thenReturn(observationDtoMock); + when(observationDtoMock.getCd()).thenReturn(null); + + // Act & Assert + DataProcessingException exception = assertThrows(DataProcessingException.class, () -> { + observationResultRequestHandler.processingObsResult1(obsIdentifierMock, observationDtoMock, edxLabInformationDtoMock, observationContainerMock); + }); + assertEquals(EdxELRConstant.NO_DRUG_NAME, exception.getMessage()); + verify(edxLabInformationDtoMock).setDrugNameMissing(true); + verify(edxLabInformationDtoMock).setErrorText(EdxELRConstant.ELR_MASTER_LOG_ID_13); + } + + @Test + void testProcessingObsResult1_ParentObsIndFalse_ValidObsIdentifier() throws DataProcessingException { + // Arrange + when(obsIdentifierMock.getHL7Identifier()).thenReturn("HL7Identifier"); + when(obsIdentifierMock.getHL7Text()).thenReturn("HL7Text"); + when(obsIdentifierMock.getHL7AlternateIdentifier()).thenReturn("HL7AlternateIdentifier"); + when(obsIdentifierMock.getHL7AlternateText()).thenReturn("HL7AlternateText"); + when(obsIdentifierMock.getHL7NameofCodingSystem()).thenReturn("HL7NameofCodingSystem"); + when(obsIdentifierMock.getHL7NameofAlternateCodingSystem()).thenReturn("HL7NameofAlternateCodingSystem"); + when(edxLabInformationDtoMock.isParentObsInd()).thenReturn(false); + + // Act + observationResultRequestHandler.processingObsResult1(obsIdentifierMock, observationDtoMock, edxLabInformationDtoMock, observationContainerMock); + + // Assert + verify(observationDtoMock).setCd("HL7Identifier"); + verify(observationDtoMock).setCdDescTxt("HL7Text"); + + } + + @Test + void testProcessingObsResult1_ObsIdentifierNull() { + // Act & Assert + DataProcessingException exception = assertThrows(DataProcessingException.class, () -> { + observationResultRequestHandler.processingObsResult1(null, observationDtoMock, edxLabInformationDtoMock, observationContainerMock); + }); + assertEquals("ObservationResultRequest.getObservationResult The Resulted Test ObservationCd can't be set to null. Please check." + observationDtoMock.getCd(), exception.getMessage()); + } + + @Test + void processingObsResultObsValueArray_Test_1() throws DataProcessingException { + List obsValueArray = new ArrayList<>(); + when(hl7OBXTypeMock.getValueType()).thenReturn(EdxELRConstant.ELR_STRING_CD); + ObservationContainer observationContainer = new ObservationContainer(); + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + String elementName = ""; + + obsValueArray.add("TEST"); + + doNothing().when(observationResultRequestHandler).formatValue(any(), any(), any(), + any(), anyString()); + + observationResultRequestHandler.processingObsResultObsValueArray(obsValueArray, hl7OBXTypeMock, + observationContainer, edxLabInformationDto, elementName); + + verify(observationResultRequestHandler).formatValue( + any(), any(), any(), + any(), anyString()); + + } + + @Test + void processingObsResultObsValueArray_Test_2() throws DataProcessingException { + List obsValueArray = new ArrayList<>(); + when(hl7OBXTypeMock.getValueType()).thenReturn(EdxELRConstant.ELR_TEXT_CD); + ObservationContainer observationContainer = new ObservationContainer(); + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + String elementName = ""; + + obsValueArray.add("TEST"); + + doNothing().when(observationResultRequestHandler).formatValue(any(), any(), any(), + any(), anyString()); + + observationResultRequestHandler.processingObsResultObsValueArray(obsValueArray, hl7OBXTypeMock, + observationContainer, edxLabInformationDto, elementName); + + verify(observationResultRequestHandler).formatValue( + any(), any(), any(), + any(), anyString()); + + } + + @Test + void processingObsResultObsValueArray_Test_3() throws DataProcessingException { + List obsValueArray = new ArrayList<>(); + when(hl7OBXTypeMock.getValueType()).thenReturn(EdxELRConstant.ELR_TEXT_DT); + ObservationContainer observationContainer = new ObservationContainer(); + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + String elementName = ""; + + obsValueArray.add("TEST"); + + doNothing().when(observationResultRequestHandler).formatValue(any(), any(), any(), + any(), anyString()); + + observationResultRequestHandler.processingObsResultObsValueArray(obsValueArray, hl7OBXTypeMock, + observationContainer, edxLabInformationDto, elementName); + + verify(observationResultRequestHandler).formatValue( + any(), any(), any(), + any(), anyString()); + + } + + @Test + void processingObsResultObsValueArray_Test_4() throws DataProcessingException { + List obsValueArray = new ArrayList<>(); + when(hl7OBXTypeMock.getValueType()).thenReturn(EdxELRConstant.ELR_TEXT_TS); + ObservationContainer observationContainer = new ObservationContainer(); + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + String elementName = ""; + + obsValueArray.add("TEST"); + + doNothing().when(observationResultRequestHandler).formatValue(any(), any(), any(), + any(), anyString()); + + observationResultRequestHandler.processingObsResultObsValueArray(obsValueArray, hl7OBXTypeMock, + observationContainer, edxLabInformationDto, elementName); + + verify(observationResultRequestHandler).formatValue( + any(), any(), any(), + any(), anyString()); + + } + + @Test + void processingObsResultObsValueArray_Test_5() throws DataProcessingException { + List obsValueArray = new ArrayList<>(); + when(hl7OBXTypeMock.getValueType()).thenReturn("BLAH"); + ObservationContainer observationContainer = new ObservationContainer(); + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + String elementName = ""; + + obsValueArray.add("TEST"); + + doNothing().when(observationResultRequestHandler).formatValue(any(), any(), any(), + any(), anyString()); + + observationResultRequestHandler.processingObsResultObsValueArray(obsValueArray, hl7OBXTypeMock, + observationContainer, edxLabInformationDto, elementName); + + verify(observationResultRequestHandler).formatValue( + any(), any(), any(), + any(), anyString()); + + } + + @Test + void testProcessingObsResult2_WithStatusCd_FromCode() throws DataProcessingException { + when(hl7OBXTypeMock.getObservationResultStatus()).thenReturn("status"); + when(checkingValueService.findToCode(anyString(), anyString(), anyString())).thenReturn("ACT_CD"); + + observationResultRequestHandler.processingObsResult2(hl7OBXTypeMock, observationDtoMock, edxLabInformationDtoMock, observationContainerMock, labResultProxyContainerMock); + + verify(observationDtoMock).setStatusCd("ACT_CD"); + } + + @Test + void testProcessingObsResult2_WithStatusCd_OriginalStatus() throws DataProcessingException { + when(hl7OBXTypeMock.getObservationResultStatus()).thenReturn("status"); + when(checkingValueService.findToCode(anyString(), anyString(), anyString())).thenReturn(null); + + observationResultRequestHandler.processingObsResult2(hl7OBXTypeMock, observationDtoMock, edxLabInformationDtoMock, observationContainerMock, labResultProxyContainerMock); + + verify(observationDtoMock).setStatusCd("status"); + } + + @Test + void testProcessingObsResult2_WithDateTimeOftheAnalysis() throws DataProcessingException { + when(hl7OBXTypeMock.getDateTimeOftheAnalysis()).thenReturn(mock(HL7TSType.class)); + when(nbsObjectConverter.processHL7TSType(any(), anyString())).thenReturn(mock(java.sql.Timestamp.class)); + + observationResultRequestHandler.processingObsResult2(hl7OBXTypeMock, observationDtoMock, edxLabInformationDtoMock, observationContainerMock, labResultProxyContainerMock); + + verify(observationDtoMock).setActivityToTime(any()); + } + + @Test + void testProcessingObsResult2_WithPerformingOrganizationName() throws DataProcessingException { + HL7XONType hl7XONTypeMock = mock(HL7XONType.class); + when(hl7OBXTypeMock.getPerformingOrganizationName()).thenReturn(hl7XONTypeMock); + when(observationContainerMock.getTheObservationDto()).thenReturn(observationDtoMock); + when(observationDtoMock.getObservationUid()).thenReturn(1L); + OrganizationContainer orgContainerMock = mock(OrganizationContainer.class); + doReturn(orgContainerMock).when(observationResultRequestHandler).getPerformingFacility(any(), anyLong(), any(), any()); + + observationResultRequestHandler.processingObsResult2(hl7OBXTypeMock, observationDtoMock, edxLabInformationDtoMock, observationContainerMock, labResultProxyContainerMock); + verify(observationContainerMock, times(1)).getTheObservationDto(); + + } + + @Test + void testProcessingObsResult2_FullFlow() throws DataProcessingException { + // Setup mock returns and interactions + when(hl7OBXTypeMock.getObservationResultStatus()).thenReturn("status"); + when(checkingValueService.findToCode(anyString(), anyString(), anyString())).thenReturn("ACT_CD"); + when(hl7OBXTypeMock.getDateTimeOftheAnalysis()).thenReturn(mock(HL7TSType.class)); + when(nbsObjectConverter.processHL7TSType(any(), anyString())).thenReturn(mock(java.sql.Timestamp.class)); + HL7XONType hl7XONTypeMock = mock(HL7XONType.class); + when(hl7OBXTypeMock.getPerformingOrganizationName()).thenReturn(hl7XONTypeMock); + when(observationContainerMock.getTheObservationDto()).thenReturn(observationDtoMock); + when(observationDtoMock.getObservationUid()).thenReturn(1L); + OrganizationContainer orgContainerMock = mock(OrganizationContainer.class); + doReturn(orgContainerMock).when(observationResultRequestHandler).getPerformingFacility(any(), anyLong(), any(), any()); + + // Execute method + observationResultRequestHandler.processingObsResult2(hl7OBXTypeMock, observationDtoMock, edxLabInformationDtoMock, observationContainerMock, labResultProxyContainerMock); + + // Verify all interactions + verify(observationDtoMock).setStatusCd("ACT_CD"); + } + + @Test + void testProcessingPeromAuthAssignAuth_WithAssigningAuthority() { + when(hl7XONTypeNameMock.getHL7AssigningAuthority()).thenReturn(hl7AssigningAuthorityMock); + when(hl7AssigningAuthorityMock.getHL7UniversalID()).thenReturn("UniversalID"); + when(hl7AssigningAuthorityMock.getHL7UniversalIDType()).thenReturn("UniversalIDType"); + + observationResultRequestHandler.processingPeromAuthAssignAuth(hl7XONTypeNameMock, entityIdDtoMock); + + verify(entityIdDtoMock).setAssigningAuthorityCd("UniversalID"); + verify(entityIdDtoMock).setAssigningAuthorityIdType("UniversalIDType"); + } + + @Test + void testProcessingPeromAuthAssignAuth_WithCLIA() { + when(hl7XONTypeNameMock.getHL7AssigningAuthority()).thenReturn(hl7AssigningAuthorityMock); + when(hl7AssigningAuthorityMock.getHL7NamespaceID()).thenReturn(EdxELRConstant.ELR_CLIA_CD); + + observationResultRequestHandler.processingPeromAuthAssignAuth(hl7XONTypeNameMock, entityIdDtoMock); + + verify(entityIdDtoMock).setAssigningAuthorityDescTxt(EdxELRConstant.ELR_CLIA_DESC); + } + + @Test + void testProcessingPeromAuthAssignAuth_NoAssigningAuthority() { + when(hl7XONTypeNameMock.getHL7AssigningAuthority()).thenReturn(null); + + observationResultRequestHandler.processingPeromAuthAssignAuth(hl7XONTypeNameMock, entityIdDtoMock); + + verify(entityIdDtoMock, never()).setAssigningAuthorityCd(anyString()); + verify(entityIdDtoMock, never()).setAssigningAuthorityIdType(anyString()); + verify(entityIdDtoMock, never()).setAssigningAuthorityDescTxt(anyString()); + } + + @Test + void testProcessingPeromAuthAssignAuth_WithAssigningAuthority_NoNamespaceID() { + when(hl7XONTypeNameMock.getHL7AssigningAuthority()).thenReturn(hl7AssigningAuthorityMock); + when(hl7AssigningAuthorityMock.getHL7NamespaceID()).thenReturn("NotCLIA"); + + observationResultRequestHandler.processingPeromAuthAssignAuth(hl7XONTypeNameMock, entityIdDtoMock); + + verify(entityIdDtoMock, never()).setAssigningAuthorityDescTxt(EdxELRConstant.ELR_CLIA_DESC); + } + + @Test + void testProcessingPeromAuthAssignAuth_FullFlow() { + when(hl7XONTypeNameMock.getHL7AssigningAuthority()).thenReturn(hl7AssigningAuthorityMock); + when(hl7AssigningAuthorityMock.getHL7UniversalID()).thenReturn("UniversalID"); + when(hl7AssigningAuthorityMock.getHL7UniversalIDType()).thenReturn("UniversalIDType"); + when(hl7AssigningAuthorityMock.getHL7NamespaceID()).thenReturn(EdxELRConstant.ELR_CLIA_CD); + + observationResultRequestHandler.processingPeromAuthAssignAuth(hl7XONTypeNameMock, entityIdDtoMock); + + verify(entityIdDtoMock).setAssigningAuthorityCd("UniversalID"); + verify(entityIdDtoMock).setAssigningAuthorityIdType("UniversalIDType"); + verify(entityIdDtoMock).setAssigningAuthorityDescTxt(EdxELRConstant.ELR_CLIA_DESC); + } + + @Test + void testFormatValueTextValue() { + + // Case 1: text is empty + ObsValueCodedDto obsValueDT = new ObsValueCodedDto(); + observationResultRequestHandler.formatValueTextValue(new String[]{"code1", "displayName1"}, "", obsValueDT); + assertNull(obsValueDT.getCode()); + assertNull(obsValueDT.getDisplayName()); + + // Case 2: textValue has length 2 + obsValueDT = new ObsValueCodedDto(); + observationResultRequestHandler.formatValueTextValue(new String[]{"code1", "displayName1"}, "someText", obsValueDT); + assertEquals("code1", obsValueDT.getCode()); + assertEquals("displayName1", obsValueDT.getDisplayName()); + assertEquals(EdxELRConstant.ELR_SNOMED_CD, obsValueDT.getCodeSystemCd()); + + // Case 3: textValue has length 3 + obsValueDT = new ObsValueCodedDto(); + observationResultRequestHandler.formatValueTextValue(new String[]{"code1", "displayName1", "codeSystemCd1"}, "someText", obsValueDT); + assertEquals("code1", obsValueDT.getCode()); + assertEquals("displayName1", obsValueDT.getDisplayName()); + assertEquals("codeSystemCd1", obsValueDT.getCodeSystemCd()); + + // Case 4: textValue has length 6 + obsValueDT = new ObsValueCodedDto(); + observationResultRequestHandler.formatValueTextValue(new String[]{"code1", "displayName1", "codeSystemCd1", "altCd1", "altCdDescTxt1"}, "someText", obsValueDT); + assertEquals("code1", obsValueDT.getCode()); + assertEquals("displayName1", obsValueDT.getDisplayName()); + + // Case 5: textValue has length more than 6 + obsValueDT = new ObsValueCodedDto(); + observationResultRequestHandler.formatValueTextValue(new String[]{"code1", "displayName1", "codeSystemCd1", "altCd1", "altCdDescTxt1", "altCdSystemCd1"}, "someText", obsValueDT); + assertEquals("code1", obsValueDT.getCode()); + assertEquals("displayName1", obsValueDT.getDisplayName()); + + } + + @Test + void testFormatValueObsValueDt_CodeAndAltCdMissing() { + ObsValueCodedDto obsValueDT = new ObsValueCodedDto(); + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + HL7OBXType hl7OBXType = mock(HL7OBXType.class); + String elementName = "testElement"; + + + DataProcessingException exception = assertThrows(DataProcessingException.class, () -> { + observationResultRequestHandler.formatValueObsValueDt(obsValueDT, edxLabInformationDto, hl7OBXType, elementName); + }); + + assertNotNull(exception); + } + + @Test + void testFormatValueObsValueDt_OnlyCodeMissing() throws DataProcessingException { + ObsValueCodedDto obsValueDT = new ObsValueCodedDto(); + obsValueDT.setAltCd("altCode"); + obsValueDT.setAltCdDescTxt("altDesc"); + obsValueDT.setAltCdSystemCd("altSystemCd"); + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + HL7OBXType hl7OBXType = new HL7OBXType(); + String elementName = "testElement"; + + observationResultRequestHandler.formatValueObsValueDt(obsValueDT, edxLabInformationDto, hl7OBXType, elementName); + + assertEquals("altCode", obsValueDT.getCode()); + assertEquals("altDesc", obsValueDT.getDisplayName()); + assertEquals("altSystemCd", obsValueDT.getCodeSystemCd()); + assertNull(obsValueDT.getAltCd()); + assertNull(obsValueDT.getAltCdDescTxt()); + assertNull(obsValueDT.getAltCdSystemCd()); + } + + @Test + void testFormatValueObsValueDt_CodePresent() throws DataProcessingException { + ObsValueCodedDto obsValueDT = new ObsValueCodedDto(); + obsValueDT.setCode("code"); + obsValueDT.setAltCd("altCode"); + obsValueDT.setAltCdDescTxt("altDesc"); + obsValueDT.setAltCdSystemCd("altSystemCd"); + EdxLabInformationDto edxLabInformationDto = new EdxLabInformationDto(); + HL7OBXType hl7OBXType = new HL7OBXType(); + String elementName = "testElement"; + + observationResultRequestHandler.formatValueObsValueDt(obsValueDT, edxLabInformationDto, hl7OBXType, elementName); + + assertEquals("code", obsValueDT.getCode()); + assertEquals("altCode", obsValueDT.getAltCd()); + assertEquals("altDesc", obsValueDT.getAltCdDescTxt()); + assertEquals("altSystemCd", obsValueDT.getAltCdSystemCd()); + } + + @Test + void testFormatValueTextValue2_SnomedCode() { + ObsValueCodedDto obsvalueDT = new ObsValueCodedDto(); + obsvalueDT.setCodeSystemCd(EdxELRConstant.ELR_SNOMED_CD); + obsvalueDT.setAltCdSystemCd(EdxELRConstant.ELR_SNOMED_CD); + ObservationContainer observationContainer = new ObservationContainer(); + ObservationDto observationDto = new ObservationDto(); + observationDto.setObservationUid(123L); + observationContainer.setTheObservationDto(observationDto); + + observationResultRequestHandler.formatValueTextValue2(obsvalueDT, observationContainer); + + assertEquals(EdxELRConstant.ELR_SNOMED_DESC, obsvalueDT.getCodeSystemDescTxt()); + assertEquals(EdxELRConstant.ELR_SNOMED_DESC, obsvalueDT.getAltCdSystemDescTxt()); + + } + + @Test + void testFormatValueTextValue2_LocalCode() { + ObsValueCodedDto obsvalueDT = new ObsValueCodedDto(); + obsvalueDT.setCodeSystemCd(EdxELRConstant.ELR_LOCAL_CD); + obsvalueDT.setAltCdSystemCd(EdxELRConstant.ELR_LOCAL_CD); + ObservationContainer observationContainer = new ObservationContainer(); + ObservationDto observationDto = new ObservationDto(); + observationDto.setObservationUid(456L); + observationContainer.setTheObservationDto(observationDto); + + observationResultRequestHandler.formatValueTextValue2(obsvalueDT, observationContainer); + + assertEquals(EdxELRConstant.ELR_LOCAL_DESC, obsvalueDT.getCodeSystemDescTxt()); + assertEquals(EdxELRConstant.ELR_LOCAL_DESC, obsvalueDT.getAltCdSystemDescTxt()); + + } + + @Test + void testFormatValueTextValue2_NoCodeSystem() { + ObsValueCodedDto obsvalueDT = new ObsValueCodedDto(); + ObservationContainer observationContainer = new ObservationContainer(); + ObservationDto observationDto = new ObservationDto(); + observationDto.setObservationUid(789L); + observationContainer.setTheObservationDto(observationDto); + + observationResultRequestHandler.formatValueTextValue2(obsvalueDT, observationContainer); + + assertNull(obsvalueDT.getCodeSystemDescTxt()); + } + + @Test + void testFormatValueNumeric_GreaterThan() { + ObsValueNumericDto obsValueNumericDto = new ObsValueNumericDto(); + ObservationContainer observationContainer = new ObservationContainer(); + ObservationDto observationDto = new ObservationDto(); + observationDto.setObservationUid(456L); + observationContainer.setTheObservationDto(observationDto); + HL7CEType cEUnit = new HL7CEType(); + cEUnit.setHL7Identifier("unit"); + + String text = ""; + StringTokenizer st = new StringTokenizer("> 15", " "); + + observationResultRequestHandler.formatValueNumeric(text, 0, obsValueNumericDto, observationContainer, cEUnit, st); + + assertEquals(">", obsValueNumericDto.getComparatorCd1()); + assertEquals(new BigDecimal("15"), obsValueNumericDto.getNumericValue1()); + assertNull(obsValueNumericDto.getSeparatorCd()); + assertNull(obsValueNumericDto.getNumericValue2()); + } + + @Test + void testFormatValueNumeric_Equal() { + ObsValueNumericDto obsValueNumericDto = new ObsValueNumericDto(); + ObservationContainer observationContainer = new ObservationContainer(); + ObservationDto observationDto = new ObservationDto(); + observationDto.setObservationUid(789L); + observationContainer.setTheObservationDto(observationDto); + HL7CEType cEUnit = new HL7CEType(); + cEUnit.setHL7Identifier("unit"); + + String text = ""; + StringTokenizer st = new StringTokenizer("= 20", " "); + + observationResultRequestHandler.formatValueNumeric(text, 0, obsValueNumericDto, observationContainer, cEUnit, st); + + assertEquals("=", obsValueNumericDto.getComparatorCd1()); + assertEquals(new BigDecimal("20"), obsValueNumericDto.getNumericValue1()); + assertNull(obsValueNumericDto.getSeparatorCd()); + assertNull(obsValueNumericDto.getNumericValue2()); + } + + @Test + void testFormatValueNumeric_NoComparator() { + ObsValueNumericDto obsValueNumericDto = new ObsValueNumericDto(); + ObservationContainer observationContainer = new ObservationContainer(); + ObservationDto observationDto = new ObservationDto(); + observationDto.setObservationUid(101L); + observationContainer.setTheObservationDto(observationDto); + HL7CEType cEUnit = new HL7CEType(); + cEUnit.setHL7Identifier("unit"); + + String text = ""; + StringTokenizer st = new StringTokenizer("25", " "); + + observationResultRequestHandler.formatValueNumeric(text, 0, obsValueNumericDto, observationContainer, cEUnit, st); + + assertEquals("25", obsValueNumericDto.getComparatorCd1()); + assertNull(obsValueNumericDto.getNumericValue1()); + assertNull(obsValueNumericDto.getSeparatorCd()); + assertNull(obsValueNumericDto.getNumericValue2()); + + } } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/CommonLabUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/CommonLabUtilTest.java index 871bd456b..7077dfaad 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/CommonLabUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/CommonLabUtilTest.java @@ -23,12 +23,11 @@ class CommonLabUtilTest { + @Mock + AuthUtil authUtil; @InjectMocks private CommonLabUtil commonLabUtil; - private PersonContainer personContainer; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -39,7 +38,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); var perDt = new PersonDto(); personContainer = new PersonContainer(); @@ -53,7 +52,7 @@ void tearDown() { @Test - void getXMLElementNameForOBR_TEST() { + void getXMLElementNameForOBR_TEST() { DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { commonLabUtil.getXMLElementNameForOBR(null); @@ -64,7 +63,7 @@ void getXMLElementNameForOBR_TEST() { } @Test - void getXMLElementNameForOBX_TEST() { + void getXMLElementNameForOBX_TEST() { DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { commonLabUtil.getXMLElementNameForOBX(null); @@ -79,7 +78,7 @@ void getXMLElementNameForOBR_TEST_1() throws DataProcessingException { HL7OBRType hl7OBRType = new HL7OBRType(); - var res = commonLabUtil.getXMLElementNameForOBR(hl7OBRType); + var res = commonLabUtil.getXMLElementNameForOBR(hl7OBRType); assertNotNull(res); } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/EntityIdUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/EntityIdUtilTest.java index 1dd92a24e..c59b2cd16 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/EntityIdUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/EntityIdUtilTest.java @@ -31,14 +31,13 @@ import static org.mockito.Mockito.*; class EntityIdUtilTest { + @Mock + AuthUtil authUtil; @Mock private ICatchingValueService catchingValueService; @InjectMocks private EntityIdUtil entityIdUtil; - @Mock - AuthUtil authUtil; - @BeforeEach void setUp() { MockitoAnnotations.openMocks(this); @@ -48,7 +47,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -201,7 +200,7 @@ void processEntityData_Test_5() throws DataProcessingException { hl7CXType.setHL7EffectiveDate(time); hl7CXType.setHL7ExpirationDate(time); - when(catchingValueService.getCodeDescTxtForCd(any(),any())).thenReturn("CODE"); + when(catchingValueService.getCodeDescTxtForCd(any(), any())).thenReturn("CODE"); var res = entityIdUtil.processEntityData(hl7CXType, personContainer, indicator, index); @@ -234,7 +233,7 @@ void processEntityData_Test_6() throws DataProcessingException { hl7CXType.setHL7EffectiveDate(time); hl7CXType.setHL7ExpirationDate(time); - when(catchingValueService.getCodeDescTxtForCd(any(),any())).thenReturn(""); + when(catchingValueService.getCodeDescTxtForCd(any(), any())).thenReturn(""); var res = entityIdUtil.processEntityData(hl7CXType, personContainer, indicator, index); @@ -244,7 +243,7 @@ void processEntityData_Test_6() throws DataProcessingException { @Test - void processEntityData_Test_Exp_1() { + void processEntityData_Test_Exp_1() { HL7CXType hl7CXType = new HL7CXType(); PersonContainer personContainer = new PersonContainer(); String indicator = EdxELRConstant.ELR_PATIENT_ALTERNATE_IND; @@ -293,7 +292,7 @@ void stringToStrutsTimestamp_Test_2() { } @Test - void isDateNotOkForDatabase_Test_1(){ + void isDateNotOkForDatabase_Test_1() { Timestamp timestamp = null; var res = entityIdUtil.isDateNotOkForDatabase(timestamp); @@ -321,7 +320,6 @@ void testIsDateNotOkForDatabase_ExceptionHandling() throws Exception { doThrow(new RuntimeException("Test Exception")).when(mockDateFormat).parse(anyString()); - // Act boolean result = entityIdUtil.isDateNotOkForDatabase(timestamp); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/HL7SpecimenUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/HL7SpecimenUtilTest.java index a99a309db..04a013745 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/HL7SpecimenUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/HL7SpecimenUtilTest.java @@ -28,14 +28,13 @@ import static org.mockito.Mockito.*; class HL7SpecimenUtilTest { + @Mock + AuthUtil authUtil; @Mock private NBSObjectConverter nbsObjectConverter; @InjectMocks private HL7SpecimenUtil hl7SpecimenUtil; - @Mock - AuthUtil authUtil; - @BeforeEach void setUp() { MockitoAnnotations.openMocks(this); @@ -45,7 +44,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/LabResultUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/LabResultUtilTest.java index 7642a3e3d..527177e98 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/LabResultUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/data_parser/util/LabResultUtilTest.java @@ -18,11 +18,10 @@ import org.mockito.MockitoAnnotations; class LabResultUtilTest { - @InjectMocks - private LabResultUtil labResultUtil; - @Mock AuthUtil authUtil; + @InjectMocks + private LabResultUtil labResultUtil; @BeforeEach void setUp() { @@ -33,7 +32,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/edx/EdxPhcrDocumentUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/edx/EdxPhcrDocumentUtilTest.java index 59d5909ea..2f1904299 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/edx/EdxPhcrDocumentUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/edx/EdxPhcrDocumentUtilTest.java @@ -27,7 +27,6 @@ class EdxPhcrDocumentUtilTest { private EdxPhcrDocumentUtil edxPhcrDocumentUtil; - @Mock private ILookupService lookupService; @@ -109,7 +108,6 @@ void loadQuestion_Test() { OdseCache.dmbMap.put(DecisionSupportConstants.CORE_INV_FORM, tree); - var res = edxPhcrDocumentUtil.loadQuestions(condCode); assertNotNull(res); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/generic_helper/ManagerUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/generic_helper/ManagerUtilTest.java index 8078af0cb..3a83b4ba2 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/generic_helper/ManagerUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/generic_helper/ManagerUtilTest.java @@ -22,6 +22,7 @@ import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.*; + class ManagerUtilTest { @InjectMocks private ManagerUtil managerUtil; diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PrepareAssocModelHelperTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PrepareAssocModelHelperTest.java index 8da934ead..9c84ac710 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PrepareAssocModelHelperTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PrepareAssocModelHelperTest.java @@ -27,6 +27,7 @@ import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.*; + class PrepareAssocModelHelperTest { @InjectMocks @Spy @@ -56,6 +57,7 @@ class PrepareAssocModelHelperTest { private ActRelationshipDto actInterface; @Mock private RoleDto roleInterface; + @BeforeEach public void setUp() { MockitoAnnotations.openMocks(this); @@ -66,7 +68,7 @@ public void setUp() { user.setNedssEntryId(1L); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @Test @@ -997,7 +999,6 @@ void testPrepareAssocDTForActRelationship_RecordStatusCdNotActiveOrInactive() { } - @Test void testPrepareAssocDTForActRelationship_InnerTryBlock() throws DataProcessingException { // Arrange @@ -1048,7 +1049,7 @@ void testPrepareAssocDTForRole_RecordStatusCdNotActiveOrInactive() { assertTrue(exception.getMessage().contains("RecordStatusCd is not active or inactive")); } - + @Test void testPrepareAssocDTForRole_InnerTryBlock() throws DataProcessingException { diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PropertyUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PropertyUtilTest.java index 6228b38a1..a59f656b8 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PropertyUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/generic_helper/PropertyUtilTest.java @@ -8,6 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; + class PropertyUtilTest { @InjectMocks private PropertyUtil propertyUtil; diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsDocumentRepositoryUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsDocumentRepositoryUtilTest.java index d693d4131..e418f5e71 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsDocumentRepositoryUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsDocumentRepositoryUtilTest.java @@ -31,6 +31,8 @@ import static org.mockito.Mockito.when; class NbsDocumentRepositoryUtilTest { + @Mock + AuthUtil authUtil; @Mock private CustomRepository customRepository; @Mock @@ -41,14 +43,10 @@ class NbsDocumentRepositoryUtilTest { private PrepareAssocModelHelper prepareAssocModelHelper; @Mock private NbsDocumentRepository nbsDocumentRepository; - @Mock private NbsDocumentHistRepository nbsDocumentHistRepository; @InjectMocks private NbsDocumentRepositoryUtil nbsDocumentRepositoryUtil; - @Mock - AuthUtil authUtil; - @Mock private NBSDocumentDto nbsDocumentDto; @@ -62,13 +60,13 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach void tearDown() { - Mockito.reset(customRepository, patientRepositoryUtil,participationRepositoryUtil, prepareAssocModelHelper, - nbsDocumentRepository,nbsDocumentHistRepository,authUtil); + Mockito.reset(customRepository, patientRepositoryUtil, participationRepositoryUtil, prepareAssocModelHelper, + nbsDocumentRepository, nbsDocumentHistRepository, authUtil); } @Test @@ -100,7 +98,7 @@ void getNBSDocumentWithoutActRelationship_Test_2() throws DataProcessingExceptio void updateDocumentWithOutthePatient_Test() throws Exception { NbsDocumentContainer doc = new NbsDocumentContainer(); doc.getNbsDocumentDT().setNbsDocumentMetadataUid(10L); - doc.getNbsDocumentDT().setRecordStatusCd( NEDSSConstant.RECORD_STATUS_LOGICAL_DELETE); + doc.getNbsDocumentDT().setRecordStatusCd(NEDSSConstant.RECORD_STATUS_LOGICAL_DELETE); doc.setFromSecurityQueue(true); when(customRepository.getNbsDocument(any())).thenReturn(new NbsDocumentContainer()); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsNoteRepositoryUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsNoteRepositoryUtilTest.java index f85cace65..ac3cd6f49 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsNoteRepositoryUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/nbs/NbsNoteRepositoryUtilTest.java @@ -21,12 +21,12 @@ import static org.mockito.Mockito.verify; class NbsNoteRepositoryUtilTest { + @Mock + AuthUtil authUtil; @Mock private NbsNoteRepository nbsNoteRepository; @InjectMocks private NbsNoteRepositoryUtil nbsNoteRepositoryUtil; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -37,7 +37,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/notification/NotificationRepositoryUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/notification/NotificationRepositoryUtilTest.java index 9676b07fe..623f6a9a9 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/notification/NotificationRepositoryUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/notification/NotificationRepositoryUtilTest.java @@ -38,6 +38,8 @@ import static org.mockito.Mockito.when; class NotificationRepositoryUtilTest { + @Mock + AuthUtil authUtil; @Mock private NotificationRepository notificationRepository; @Mock @@ -51,13 +53,11 @@ class NotificationRepositoryUtilTest { @Mock private EntityHelper entityHelper; @Mock - private ActRepositoryUtil actRepositoryUtil; + private ActRepositoryUtil actRepositoryUtil; @Mock private OdseIdGeneratorService odseIdGeneratorService; @InjectMocks private NotificationRepositoryUtil notificationRepositoryUtil; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -68,7 +68,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -80,7 +80,7 @@ void tearDown() { } @Test - void getNotificationContainer_Test(){ + void getNotificationContainer_Test() { Long uid = 10L; var noti = new Notification(); when(notificationRepository.findById(uid)).thenReturn(Optional.of(noti)); @@ -111,7 +111,7 @@ void getNotificationContainer_Test(){ } @Test - void getNotificationContainer_Test_2(){ + void getNotificationContainer_Test_2() { Long uid = 10L; when(notificationRepository.findById(uid)).thenReturn(Optional.empty()); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationRepositoryUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationRepositoryUtilTest.java index 70b10fbfa..d061323f9 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationRepositoryUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationRepositoryUtilTest.java @@ -43,6 +43,8 @@ import static org.mockito.Mockito.*; class ObservationRepositoryUtilTest { + @Mock + AuthUtil authUtil; @Mock private ObservationRepository observationRepository; @Mock @@ -73,11 +75,8 @@ class ObservationRepositoryUtilTest { private ActRelationshipRepositoryUtil actRelationshipRepositoryUtil; @Mock private ActRepository actRepository; - @InjectMocks private ObservationRepositoryUtil observationRepositoryUtil; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -88,7 +87,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -160,7 +159,7 @@ void loadObject_Test() throws DataProcessingException { when(participationRepository.findByActUid(obUid)).thenReturn(Optional.of(patCol)); - var res = observationRepositoryUtil.loadObject(obUid); + var res = observationRepositoryUtil.loadObject(obUid); assertNotNull(res); } @@ -232,7 +231,6 @@ void saveObservation_Test() throws DataProcessingException { when(odseIdGeneratorService.getLocalIdAndUpdateSeed(LocalIdClass.OBSERVATION)).thenReturn(localId); - var res = observationRepositoryUtil.saveObservation(observationContainer); assertNotNull(res); @@ -351,7 +349,7 @@ void saveActRelationship_Test_3() { @Test - void setObservationInfo_Test() { + void setObservationInfo_Test() { ObservationDto observationDto = new ObservationDto(); observationDto.setObservationUid(10L); @@ -364,7 +362,7 @@ void setObservationInfo_Test() { } @Test - void setObservationInfo_Test_2() { + void setObservationInfo_Test_2() { ObservationDto observationDto = new ObservationDto(); observationDto.setObservationUid(null); @@ -377,7 +375,7 @@ void setObservationInfo_Test_2() { } @Test - void setObservationInfo_Test_3() { + void setObservationInfo_Test_3() { NullPointerException thrown = assertThrows(NullPointerException.class, () -> { observationRepositoryUtil.setObservationInfo(null); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationUtilTest.java index 79498e2ef..56d557c3e 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/observation/ObservationUtilTest.java @@ -24,10 +24,10 @@ import static org.junit.jupiter.api.Assertions.assertThrows; class ObservationUtilTest { - @InjectMocks - private ObservationUtil observationUtil; @Mock AuthUtil authUtil; + @InjectMocks + private ObservationUtil observationUtil; @BeforeEach void setUp() { @@ -38,7 +38,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -126,7 +126,6 @@ void getUid_Test_3() throws DataProcessingException { } - @Test void getRootObservationDto_Test() throws DataProcessingException { LabResultProxyContainer baseContainer = new LabResultProxyContainer(); @@ -183,7 +182,7 @@ void getRootObservationDto_2_Test() throws DataProcessingException { } @Test - void getRootObservationDto_Test_4() { + void getRootObservationDto_Test_4() { BaseContainer baseContainer = new BaseContainer(); DataProcessingException thrown = assertThrows(DataProcessingException.class, () -> { observationUtil.getRootObservationContainer(baseContainer); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/organization/OrganizationRepositoryUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/organization/OrganizationRepositoryUtilTest.java index ab79a108d..1c396e6fe 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/organization/OrganizationRepositoryUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/organization/OrganizationRepositoryUtilTest.java @@ -59,6 +59,8 @@ import static org.mockito.Mockito.*; class OrganizationRepositoryUtilTest { + @Mock + AuthUtil authUtil; @Mock private OrganizationRepository organizationRepository; @Mock @@ -87,20 +89,18 @@ class OrganizationRepositoryUtilTest { private PrepareAssocModelHelper prepareAssocModelHelper; @Mock private PrepareEntityStoredProcRepository prepareEntityStoredProcRepository; - @Mock - AuthUtil authUtil; @InjectMocks private OrganizationRepositoryUtil organizationRepositoryUtil; @BeforeEach void setUp() { MockitoAnnotations.openMocks(this); - AuthUserProfileInfo authUserProfileInfo=new AuthUserProfileInfo(); + AuthUserProfileInfo authUserProfileInfo = new AuthUserProfileInfo(); AuthUser user = new AuthUser(); user.setAuthUserUid(1L); user.setNedssEntryId(1L); authUserProfileInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(authUserProfileInfo); + AuthUtil.setGlobalAuthUser(authUserProfileInfo); } @AfterEach @@ -193,7 +193,7 @@ void createOrganization() throws DataProcessingException { when(roleRepository.save(new Role(roleDto))).thenReturn(new Role(roleDto)); organizationRepositoryUtil.createOrganization(organizationContainer); - verify(roleRepository, times(1)).save(new Role(roleDto)); + verify(roleRepository, times(1)).save(any()); } @Test @@ -295,7 +295,7 @@ void updateOrganization() throws DataProcessingException { when(roleRepository.save(new Role(roleDto))).thenReturn(new Role(roleDto)); organizationRepositoryUtil.updateOrganization(organizationContainer); - verify(roleRepository, times(1)).save(new Role(roleDto)); + verify(roleRepository, times(1)).save(any()); } @Test @@ -318,8 +318,8 @@ void setOrganization() throws DataProcessingException { OrganizationContainer organizationContainer = new OrganizationContainer(); OrganizationDto organizationDto = organizationContainer.getTheOrganizationDto(); organizationDto.setOrganizationUid(123L); - Long orgIdResult=organizationRepositoryUtil.setOrganization(organizationContainer, "TEST"); - assertEquals(123L,orgIdResult); + Long orgIdResult = organizationRepositoryUtil.setOrganization(organizationContainer, "TEST"); + assertEquals(123L, orgIdResult); } @Test @@ -426,8 +426,8 @@ void setOrganization_for_loadObj() throws DataProcessingException { when(prepareEntityStoredProcRepository.getPrepareEntity(any(), any(), any(), any())).thenReturn(prepareEntity); - Long orgIdResult=organizationRepositoryUtil.setOrganization(organizationContainer, "TEST"); - assertEquals(1234L,orgIdResult); + Long orgIdResult = organizationRepositoryUtil.setOrganization(organizationContainer, "TEST"); + assertEquals(1234L, orgIdResult); } @Test @@ -527,8 +527,8 @@ void setOrganization_for_new_org() throws DataProcessingException { when(prepareEntityStoredProcRepository.getPrepareEntity(any(), any(), any(), any())).thenReturn(prepareEntity); - Long orgIdResult=organizationRepositoryUtil.setOrganization(organizationContainer, "TEST"); - assertEquals(1234L,orgIdResult); + Long orgIdResult = organizationRepositoryUtil.setOrganization(organizationContainer, "TEST"); + assertEquals(1234L, orgIdResult); } @Test diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/pam_and_page/PageRepositoryUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/pam_and_page/PageRepositoryUtilTest.java index aca61e431..d35a9cc73 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/pam_and_page/PageRepositoryUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/pam_and_page/PageRepositoryUtilTest.java @@ -58,6 +58,8 @@ import static org.mockito.Mockito.*; class PageRepositoryUtilTest { + @Mock + AuthUtil authUtil; @Mock private IInvestigationService investigationService; @Mock @@ -88,14 +90,10 @@ class PageRepositoryUtilTest { private IPamService pamService; @Mock private PatientMatchingBaseService patientMatchingBaseService; - @InjectMocks private PageRepositoryUtil pageRepositoryUtil; - @Mock private PageActProxyContainer pageActProxyContainerMock; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -107,12 +105,12 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach void tearDown() { - Mockito.reset(investigationService, patientRepositoryUtil,uidService, pamRepositoryUtil, prepareAssocModelHelper, + Mockito.reset(investigationService, patientRepositoryUtil, uidService, pamRepositoryUtil, prepareAssocModelHelper, publicHealthCaseService, retrieveSummaryService, actRelationshipRepositoryUtil, edxEventProcessRepositoryUtil, nbsDocumentRepositoryUtil, participationRepositoryUtil, nbsNoteRepositoryUtil, customRepository, pamService, patientMatchingBaseService, authUtil, @@ -140,7 +138,7 @@ void setPageActProxyVO_Test_Exp() { } @Test - void setPageActProxyVO_Test_Exp_2() { + void setPageActProxyVO_Test_Exp_2() { var phc = new PublicHealthCaseContainer(); var phcDt = new PublicHealthCaseDto(); @@ -193,7 +191,7 @@ void setPageActProxyVO_Test_1() throws DataProcessingException, IOException, Cla phc.setCoinfectionCondition(true); phc.setNbsAnswerCollection(new ArrayList<>()); - var caseMgDt= new CaseManagementDto(); + var caseMgDt = new CaseManagementDto(); phc.setTheCaseManagementDto(caseMgDt); var actCol = new ArrayList(); var act = new ActRelationshipDto(); @@ -246,7 +244,7 @@ void setPageActProxyVO_Test_1() throws DataProcessingException, IOException, Cla perCon.setItNew(true); perCon.setItDirty(false); perConArr.add(perCon); - var prvDt = SerializationUtils.clone(perDt); + var prvDt = SerializationUtils.clone(perDt); prvDt.setPersonParentUid(12L); prvDt.setPersonUid(12L); when(patientRepositoryUtil.createPerson(any())).thenReturn(new Person(prvDt)); @@ -259,7 +257,7 @@ void setPageActProxyVO_Test_1() throws DataProcessingException, IOException, Cla perCon.setItNew(false); perCon.setItDirty(true); perConArr.add(perCon); - when(patientMatchingBaseService.setPatientRevision(any(),eq(NEDSSConstant.PAT_EDIT), eq( NEDSSConstant.PAT))).thenReturn(13L); + when(patientMatchingBaseService.setPatientRevision(any(), eq(NEDSSConstant.PAT_EDIT), eq(NEDSSConstant.PAT))).thenReturn(13L); perCon = new PersonContainer(); perDt = new PersonDto(); perDt.setCd(NEDSSConstant.PRV); @@ -272,11 +270,11 @@ void setPageActProxyVO_Test_1() throws DataProcessingException, IOException, Cla // processingPhcContainerForPageAct - when(prepareAssocModelHelper.prepareVO(any(),eq("INVESTIGATION"), eq("INV_EDIT"), eq("PUBLIC_HEALTH_CASE"), eq("BASE"), + when(prepareAssocModelHelper.prepareVO(any(), eq("INVESTIGATION"), eq("INV_EDIT"), eq("PUBLIC_HEALTH_CASE"), eq("BASE"), eq(1))).thenReturn(phcDt); when(publicHealthCaseService.setPublicHealthCase(any())).thenReturn(1L); - Map messageLogDTMap = new HashMap<>(); + Map messageLogDTMap = new HashMap<>(); var msgLog = new MessageLogDto(); messageLogDTMap.put(MessageConstants.DISPOSITION_SPECIFIED_KEY, msgLog); msgLog = new MessageLogDto(); @@ -336,7 +334,7 @@ void setPageActProxyVO_Test_1() throws DataProcessingException, IOException, Cla when(customRepository.getInvListForCoInfectionId(11L, "1")).thenReturn(coInfecList); PageActProxyContainer pageActProxyContainer = new PageActProxyContainer(); - MappamAsn = new HashMap<>(); + Map pamAsn = new HashMap<>(); page.setPamAnswerDTMap(pamAsn); page.setPageRepeatingAnswerDTMap(pamAsn); pageActProxyContainer.setPageVO(page); @@ -379,7 +377,7 @@ void updateForConInfectionId_Test_1() throws DataProcessingException { phc.setCoinfectionCondition(true); phc.setNbsAnswerCollection(new ArrayList<>()); - var caseMgDt= new CaseManagementDto(); + var caseMgDt = new CaseManagementDto(); caseMgDt.setEpiLinkId("EPI"); phc.setTheCaseManagementDto(caseMgDt); var actCol = new ArrayList(); @@ -400,12 +398,12 @@ void updateForConInfectionId_Test_1() throws DataProcessingException { pageActProxyContainer.setPublicHealthCaseContainer(phc); supersededProxyVO.setPublicHealthCaseContainer(phc); - MappamAsn = new HashMap<>(); + Map pamAsn = new HashMap<>(); var nbsAns = new NbsCaseAnswerDto(); nbsAns.setItDirty(false); nbsAns.setItDelete(false); nbsAns.setItNew(false); - pamAsn.put("TEST",nbsAns ); + pamAsn.put("TEST", nbsAns); var arr = new ArrayList<>(); arr.add(nbsAns); pamAsn.put("TEST-2", arr); @@ -440,7 +438,7 @@ void updateForConInfectionId_Test_1() throws DataProcessingException { pageActProxyContainer1.getPublicHealthCaseContainer().getThePublicHealthCaseDto().setInvestigationStatusCd(NEDSSConstant.STATUS_OPEN); when(investigationService.getPageProxyVO("CASE", 2L)).thenReturn(pageActProxyContainer1); - when(prepareAssocModelHelper.prepareVO(any(),eq("INVESTIGATION"), eq("INV_EDIT"), eq("PUBLIC_HEALTH_CASE"), eq("BASE"), + when(prepareAssocModelHelper.prepareVO(any(), eq("INVESTIGATION"), eq("INV_EDIT"), eq("PUBLIC_HEALTH_CASE"), eq("BASE"), eq(1))).thenReturn(phcDt); @@ -456,7 +454,7 @@ void updateForConInfectionId_Test_1() throws DataProcessingException { coinfectionSummaryVOCollection, coinfectionIdToUpdate); verify(investigationService, times(1)).getPageProxyVO("CASE", 2L); - verify(prepareAssocModelHelper, times(1)).prepareVO(any(),eq("INVESTIGATION"), eq("INV_EDIT"), eq("PUBLIC_HEALTH_CASE"), eq("BASE"), + verify(prepareAssocModelHelper, times(1)).prepareVO(any(), eq("INVESTIGATION"), eq("INV_EDIT"), eq("PUBLIC_HEALTH_CASE"), eq("BASE"), eq(1)); } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/pam_and_page/PamRepositoryUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/pam_and_page/PamRepositoryUtilTest.java index afe5b7ce0..2545c5f00 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/pam_and_page/PamRepositoryUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/pam_and_page/PamRepositoryUtilTest.java @@ -26,18 +26,17 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.when; + class PamRepositoryUtilTest { + @Mock + AuthUtil authUtil; @Mock private NbsActEntityRepository nbsActEntityRepository; - @Mock private NbsCaseAnswerRepository nbsCaseAnswerRepository; - @InjectMocks private PamRepositoryUtil pamRepositoryUtil; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -48,7 +47,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -80,7 +79,7 @@ void getPamHistory_Test() throws DataProcessingException { @Test - void getPamHistory_Test_Exp_1() { + void getPamHistory_Test_Exp_1() { PublicHealthCaseContainer publicHealthCaseContainer = new PublicHealthCaseContainer(); PublicHealthCaseDto publicHealthCaseDto = new PublicHealthCaseDto(); publicHealthCaseDto.setPublicHealthCaseUid(1L); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/participation/ParticipationRepositoryUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/participation/ParticipationRepositoryUtilTest.java index 66f403002..50928fdc0 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/participation/ParticipationRepositoryUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/participation/ParticipationRepositoryUtilTest.java @@ -25,14 +25,14 @@ import static org.mockito.Mockito.*; class ParticipationRepositoryUtilTest { + @Mock + AuthUtil authUtil; @Mock private ParticipationRepository participationRepository; @Mock private ParticipationHistRepository participationHistRepository; @InjectMocks private ParticipationRepositoryUtil participationRepositoryUtil; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -43,7 +43,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -73,7 +73,7 @@ void insertParticipationHist_Test() { } @Test - void storeParticipation_Test() { + void storeParticipation_Test() { ParticipationDto pat = null; @@ -119,7 +119,7 @@ void storeParticipation_Test_3() throws DataProcessingException { @Test - void storeParticipation_Test_4() { + void storeParticipation_Test_4() { ParticipationDto pat = new ParticipationDto(); pat.setItDirty(true); @@ -146,6 +146,7 @@ void getParticipation_Test() { assertNotNull(res); } + @Test void getParticipation_Test_2() { Long subjectEntityUid = 10L; diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/patient/EdxPatientMatchRepositoryUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/patient/EdxPatientMatchRepositoryUtilTest.java index e9778745c..855ceddda 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/patient/EdxPatientMatchRepositoryUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/patient/EdxPatientMatchRepositoryUtilTest.java @@ -24,6 +24,8 @@ import static org.mockito.Mockito.*; class EdxPatientMatchRepositoryUtilTest { + @Mock + AuthUtil authUtil; @Mock private EdxPatientMatchRepository edxPatientMatchRepository; @Mock @@ -32,8 +34,6 @@ class EdxPatientMatchRepositoryUtilTest { private EdxPatientMatchStoredProcRepository edxPatientMatchStoreProcRepository; @InjectMocks private EdxPatientMatchRepositoryUtil edxPatientMatchRepositoryUtil; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -44,7 +44,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/patient/PatientRepositoryUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/patient/PatientRepositoryUtilTest.java index 35c6b9c95..2831f8723 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/patient/PatientRepositoryUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/patient/PatientRepositoryUtilTest.java @@ -48,6 +48,8 @@ import static org.mockito.Mockito.*; class PatientRepositoryUtilTest { + @Mock + AuthUtil authUtil; @Mock private PersonRepository personRepository; @Mock @@ -68,8 +70,6 @@ class PatientRepositoryUtilTest { private IEntityLocatorParticipationService entityLocatorParticipationService; @InjectMocks private PatientRepositoryUtil patientRepositoryUtil; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -80,7 +80,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -231,7 +231,6 @@ void updateExistingPerson_Test() throws DataProcessingException { perCon.setThePersonRaceDtoCollection(patRaceCol); - var patEthCol = new ArrayList(); var patEth = new PersonEthnicGroupDto(); patEthCol.add(patEth); @@ -305,7 +304,7 @@ void loadPerson_Test() { perEthCol.add(perEth); when(personEthnicRepository.findByParentUid(uid)).thenReturn(Optional.of(perEthCol)); - var entiCol =new ArrayList(); + var entiCol = new ArrayList(); var enti = new EntityId(); entiCol.add(enti); when(entityIdRepository.findByParentUid(uid)).thenReturn(Optional.of(entiCol)); @@ -316,7 +315,7 @@ void loadPerson_Test() { when(entityLocatorParticipationService.findEntityLocatorById(uid)).thenReturn(loCol); var rolCol = new ArrayList(); - var role =new Role(); + var role = new Role(); rolCol.add(role); when(roleRepository.findByParentUid(uid)).thenReturn(Optional.of(rolCol)); @@ -325,7 +324,6 @@ void loadPerson_Test() { assertNotNull(res); - } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/patient/PersonUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/patient/PersonUtilTest.java index 9e207dbed..7e13b3cfd 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/patient/PersonUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/patient/PersonUtilTest.java @@ -27,6 +27,8 @@ import static org.mockito.Mockito.when; class PersonUtilTest { + @Mock + AuthUtil authUtil; @Mock private ObservationUtil observationUtil; @Mock @@ -37,11 +39,8 @@ class PersonUtilTest { private ProviderMatchingService providerMatchingService; @Mock private IUidService uidService; - @InjectMocks private PersonUtil personUtil; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -52,17 +51,17 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach void tearDown() { - Mockito.reset(observationUtil, patientRepositoryUtil,patientMatchingService, + Mockito.reset(observationUtil, patientRepositoryUtil, patientMatchingService, providerMatchingService, uidService, authUtil); } @Test - void processLabPersonContainerCollection_Test() { + void processLabPersonContainerCollection_Test() { var personContainerCollection = new ArrayList(); boolean morbidityApplied = true; BaseContainer dataContainer = new BaseContainer(); diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/AdvancedCriteriaTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/AdvancedCriteriaTest.java index e002b1775..c60ea5ee5 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/AdvancedCriteriaTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/AdvancedCriteriaTest.java @@ -13,15 +13,13 @@ import org.mockito.MockitoAnnotations; @SuppressWarnings("java:S2187") -class AdvancedCriteriaTest -{ - @InjectMocks - private AdvancedCriteria advancedCriteria; +class AdvancedCriteriaTest { @Mock AuthUtil authUtil; - @Mock Algorithm algorithm; + @InjectMocks + private AdvancedCriteria advancedCriteria; @BeforeEach void setUp() { @@ -32,7 +30,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/CaseManagementRepositoryUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/CaseManagementRepositoryUtilTest.java index 6f76466c4..ca4f7f8d1 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/CaseManagementRepositoryUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/CaseManagementRepositoryUtilTest.java @@ -16,6 +16,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.Mockito.*; + class CaseManagementRepositoryUtilTest { @Mock diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/CdaPhcProcessorTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/CdaPhcProcessorTest.java index 72485ac80..5e794781b 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/CdaPhcProcessorTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/CdaPhcProcessorTest.java @@ -20,11 +20,12 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.*; + class CdaPhcProcessorTest { - @InjectMocks - private CdaPhcProcessor cdaPhcProcessor; @Mock AuthUtil authUtil; + @InjectMocks + private CdaPhcProcessor cdaPhcProcessor; @Mock private PublicHealthCaseDto phcDT; @@ -41,13 +42,14 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach void tearDown() { Mockito.reset(authUtil); } + @Test void testSetStandardNBSCaseAnswerVals_Success() throws DataProcessingException { // Arrange diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/ConfirmationMethodRepositoryTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/ConfirmationMethodRepositoryTest.java index 4793dd4f8..9861dd3c3 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/ConfirmationMethodRepositoryTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/ConfirmationMethodRepositoryTest.java @@ -22,12 +22,12 @@ import static org.mockito.Mockito.when; class ConfirmationMethodRepositoryTest { + @Mock + AuthUtil authUtil; @Mock private ConfirmationMethodRepository confirmationMethodRepository; @InjectMocks private ConfirmationMethodRepositoryUtil confirmationMethodRepositoryUtil; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -38,7 +38,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/PublicHealthCaseRepositoryUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/PublicHealthCaseRepositoryUtilTest.java index 7e5802b7b..0a102d84b 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/PublicHealthCaseRepositoryUtilTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/public_health_case/PublicHealthCaseRepositoryUtilTest.java @@ -42,6 +42,8 @@ import static org.mockito.Mockito.*; class PublicHealthCaseRepositoryUtilTest { + @Mock + AuthUtil authUtil; @Mock private PublicHealthCaseRepository publicHealthCaseRepository; @Mock @@ -86,8 +88,6 @@ class PublicHealthCaseRepositoryUtilTest { private NbsActEntityRepository actEntityRepository; @InjectMocks private PublicHealthCaseRepositoryUtil publicHealthCaseRepositoryUtil; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -98,7 +98,7 @@ void setUp() { user.setUserType(NEDSSConstant.SEC_USERTYPE_EXTERNAL); userInfo.setAuthUser(user); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -160,7 +160,7 @@ void update_Test_2() throws DataProcessingException { } @Test - void create_Test() { + void create_Test() { PublicHealthCaseContainer phc = new PublicHealthCaseContainer(); phc.getThePublicHealthCaseDto().setPublicHealthCaseUid(10L); var confirmCol = new ArrayList(); @@ -261,7 +261,7 @@ void loadObject_Test() throws DataProcessingException { } @Test - void loadObject_Test_2() { + void loadObject_Test_2() { Long phcUid = 10L; when(publicHealthCaseRepository.findById(phcUid)).thenReturn(Optional.empty()); @@ -274,7 +274,7 @@ void loadObject_Test_2() { } @Test - void loadObject_Test_3() { + void loadObject_Test_3() { Long phcUid = 10L; when(publicHealthCaseRepository.findById(phcUid)).thenThrow(new RuntimeException("TEST")); @@ -299,7 +299,7 @@ void getPublicHealthCaseContainer_Test() throws DataProcessingException { @Test - void getPublicHealthCaseContainer_Test_2() { + void getPublicHealthCaseContainer_Test_2() { long phcUid = 10L; when(publicHealthCaseRepository.findById(phcUid)).thenReturn(Optional.empty()); @@ -348,18 +348,17 @@ void getPamVO_Test() throws DataProcessingException { when(actEntityRepository.getNbsActEntitiesByActUid(phcUid)).thenReturn(Optional.of(actCol)); - var res= publicHealthCaseRepositoryUtil.getPamVO(phcUid); + var res = publicHealthCaseRepositoryUtil.getPamVO(phcUid); assertNotNull(res); } - @Test void getPlace_Test() { var uid = 10L; when(placeRepository.findById(uid)).thenReturn(Optional.of(new Place())); - var res= publicHealthCaseRepositoryUtil.getPlace(uid); + var res = publicHealthCaseRepositoryUtil.getPlace(uid); assertNotNull(res); } @@ -367,7 +366,7 @@ void getPlace_Test() { void getPlace_Test_2() { var uid = 10L; when(placeRepository.findById(uid)).thenReturn(Optional.empty()); - var res= publicHealthCaseRepositoryUtil.getPlace(uid); + var res = publicHealthCaseRepositoryUtil.getPlace(uid); assertNull(res); } @@ -375,7 +374,7 @@ void getPlace_Test_2() { void getNonPersonLivingSubject_Test() { var uid = 10L; when(nonPersonLivingSubjectRepository.findById(uid)).thenReturn(Optional.of(new NonPersonLivingSubject())); - var res= publicHealthCaseRepositoryUtil.getNonPersonLivingSubject(uid); + var res = publicHealthCaseRepositoryUtil.getNonPersonLivingSubject(uid); assertNotNull(res); } @@ -383,7 +382,7 @@ void getNonPersonLivingSubject_Test() { void getNonPersonLivingSubject_Test_2() { var uid = 10L; when(nonPersonLivingSubjectRepository.findById(uid)).thenReturn(Optional.empty()); - var res= publicHealthCaseRepositoryUtil.getNonPersonLivingSubject(uid); + var res = publicHealthCaseRepositoryUtil.getNonPersonLivingSubject(uid); assertNull(res); } @@ -391,7 +390,7 @@ void getNonPersonLivingSubject_Test_2() { void getClinicalDocument_Test() { var uid = 10L; when(clinicalDocumentRepository.findById(uid)).thenReturn(Optional.of(new ClinicalDocument())); - var res= publicHealthCaseRepositoryUtil.getClinicalDocument(uid); + var res = publicHealthCaseRepositoryUtil.getClinicalDocument(uid); assertNotNull(res); } @@ -399,7 +398,7 @@ void getClinicalDocument_Test() { void getClinicalDocument_Test_2() { var uid = 10L; when(clinicalDocumentRepository.findById(uid)).thenReturn(Optional.empty()); - var res= publicHealthCaseRepositoryUtil.getClinicalDocument(uid); + var res = publicHealthCaseRepositoryUtil.getClinicalDocument(uid); assertNull(res); } @@ -407,7 +406,7 @@ void getClinicalDocument_Test_2() { void getReferral_Test() { var uid = 10L; when(referralRepository.findById(uid)).thenReturn(Optional.of(new Referral())); - var res= publicHealthCaseRepositoryUtil.getReferral(uid); + var res = publicHealthCaseRepositoryUtil.getReferral(uid); assertNotNull(res); } @@ -415,7 +414,7 @@ void getReferral_Test() { void getReferral_Test_2() { var uid = 10L; when(referralRepository.findById(uid)).thenReturn(Optional.empty()); - var res= publicHealthCaseRepositoryUtil.getReferral(uid); + var res = publicHealthCaseRepositoryUtil.getReferral(uid); assertNull(res); } @@ -423,7 +422,7 @@ void getReferral_Test_2() { void getPatientEncounter_Test() { var uid = 10L; when(patientEncounterRepository.findById(uid)).thenReturn(Optional.of(new PatientEncounter())); - var res= publicHealthCaseRepositoryUtil.getPatientEncounter(uid); + var res = publicHealthCaseRepositoryUtil.getPatientEncounter(uid); assertNotNull(res); } @@ -431,7 +430,7 @@ void getPatientEncounter_Test() { void getPatientEncounter_Test_2() { var uid = 10L; when(patientEncounterRepository.findById(uid)).thenReturn(Optional.empty()); - var res= publicHealthCaseRepositoryUtil.getPatientEncounter(uid); + var res = publicHealthCaseRepositoryUtil.getPatientEncounter(uid); assertNull(res); } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/sql/QueryHelperTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/sql/QueryHelperTest.java index 73d2dc2d4..be2d2f950 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/sql/QueryHelperTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/sql/QueryHelperTest.java @@ -22,15 +22,14 @@ import static org.mockito.Mockito.when; class QueryHelperTest { + @Mock + AuthUtil authUtil; @Mock private ProgAreaJurisdictionUtil progAreaJurisdictionUtil; @InjectMocks private QueryHelper queryHelper; - @Mock private QueryHelper queryHelperMock; - @Mock - AuthUtil authUtil; @BeforeEach void setUp() { @@ -48,7 +47,7 @@ void setUp() { roleCol.add(role); userInfo.setAuthUserRealizedRoleCollection(roleCol); - authUtil.setGlobalAuthUser(userInfo); + AuthUtil.setGlobalAuthUser(userInfo); } @AfterEach @@ -67,7 +66,7 @@ void getDataAccessWhereClause_Test() { when(progAreaJurisdictionUtil.getPAJHashList(any(), any())).thenReturn(padCol); - var res = queryHelper.getDataAccessWhereClause(businessObjLookupName, operation, alias); + var res = queryHelper.getDataAccessWhereClause(businessObjLookupName, operation, alias); assertNotNull(res); } @@ -84,8 +83,9 @@ void testBuildWhereClause_BothNonEmpty() { String result = queryHelper.buildWhereClause("ownerList", "guestList", "columnName", "alias", true, "businessObjLookupName"); // Assert - assertNotNull( result); + assertNotNull(result); } + @SuppressWarnings("java:S5976") @Test void testBuildWhereClause_OnlyOwnerNonEmpty() { @@ -99,8 +99,9 @@ void testBuildWhereClause_OnlyOwnerNonEmpty() { String result = queryHelper.buildWhereClause("ownerList", "guestList", "columnName", "alias", true, "businessObjLookupName"); // Assert - assertNotNull( result); + assertNotNull(result); } + @SuppressWarnings("java:S5976") @Test void testBuildWhereClause_OnlyGuestNonEmpty() { @@ -114,8 +115,9 @@ void testBuildWhereClause_OnlyGuestNonEmpty() { String result = queryHelper.buildWhereClause("ownerList", "guestList", "columnName", "alias", true, "businessObjLookupName"); // Assert - assertNotNull( result); + assertNotNull(result); } + @SuppressWarnings("java:S5976") @Test void testBuildWhereClause_BothEmpty() { @@ -129,7 +131,7 @@ void testBuildWhereClause_BothEmpty() { String result = queryHelper.buildWhereClause("ownerList", "guestList", "columnName", "alias", true, "businessObjLookupName"); // Assert - assertNotNull( result); + assertNotNull(result); } @Test @@ -144,7 +146,7 @@ void testBuildWhereClause_OnlyGuestNonEmpty_1() { String result = queryHelper.buildWhereClause("", "guestList", "columnName", "alias", true, "businessObjLookupName"); // Assert - assertNotNull( result); + assertNotNull(result); } @Test @@ -159,7 +161,7 @@ void testBuildWhereClause_BothEmpty_1() { String result = queryHelper.buildWhereClause("ownerList", "", "columnName", "alias", true, "businessObjLookupName"); // Assert - assertNotNull( result); + assertNotNull(result); } @Test @@ -174,6 +176,6 @@ void testBuildWhereClause_BothEmpty_2() { String result = queryHelper.buildWhereClause("", "", "columnName", "alias", true, "businessObjLookupName"); // Assert - assertNotNull( result); + assertNotNull(result); } } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/wds/ValidateDecisionSupportTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/wds/ValidateDecisionSupportTest.java index 622a12613..f233008e0 100644 --- a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/wds/ValidateDecisionSupportTest.java +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/wds/ValidateDecisionSupportTest.java @@ -53,6 +53,7 @@ class ValidateDecisionSupportTest { void setUp() { MockitoAnnotations.openMocks(this); } + @AfterEach void tearDown() { Mockito.reset(investigationDefaultValuesType); @@ -120,32 +121,6 @@ void processNBSObjectDT_shouldNotSetValue_whenDataTypeIsTextAndOverwriteIsFalseA assertEquals("Existing Value", object.getTestField()); } - - - - - // Helper class for testing - public static class TestObject { - private String testField; - private Timestamp testDateField; - - public String getTestField() { - return testField; - } - - public void setTestField(String testField) { - this.testField = testField; - } - - public Timestamp getTestDateField() { - return testDateField; - } - - public void setTestDateField(Timestamp testDateField) { - this.testDateField = testDateField; - } - } - @SuppressWarnings({"java:S2699", "java:S5976"}) @Test void processNBSObjectDT_shouldSetValue_whenDataTypeIsNumericAndInteger() { @@ -205,9 +180,10 @@ void processNBSObjectDT_shouldSetValue_whenDataTypeIsNumericAndBigDecimal() { validateDecisionSupport.processNBSObjectDT(edxRuleManageDT, publicHealthCaseContainer, object, metaData); } + @SuppressWarnings({"java:S2699", "java:S5976"}) @Test - void processNBSObjectDT_shouldSetValue_whenDataTypeIsNumericAndString() { + void processNBSObjectDT_shouldSetValue_whenDataTypeIsNumericAndString() { // Arrange EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); edxRuleManageDT.setBehavior("1"); // Overwrite @@ -225,47 +201,6 @@ void processNBSObjectDT_shouldSetValue_whenDataTypeIsNumericAndString() { } - public static class TestObjectNumeric { - private Integer testIntegerField; - private Long testLongField; - private BigDecimal testBigDecimalField; - private String testStringField; - - public Integer getTestIntegerField() { - return testIntegerField; - } - - public void setTestIntegerField(Integer testIntegerField) { - this.testIntegerField = testIntegerField; - } - - public Long getTestLongField() { - return testLongField; - } - - public void setTestLongField(Long testLongField) { - this.testLongField = testLongField; - } - - public BigDecimal getTestBigDecimalField() { - return testBigDecimalField; - } - - public void setTestBigDecimalField(BigDecimal testBigDecimalField) { - this.testBigDecimalField = testBigDecimalField; - } - - public String getTestStringField() { - return testStringField; - } - - public void setTestStringField(String testStringField) { - this.testStringField = testStringField; - } - } - - - @Test void processNBSCaseAnswerDT_Test() { EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); @@ -364,6 +299,7 @@ void processNBSCaseAnswerDT_Test_4() { verify(edxPhcrDocumentUtil, times(1)).setStandardNBSCaseAnswerVals(any(), any()); } + @SuppressWarnings("java:S2699") @Test void processConfirmationMethodCodeDT_Test_1() { @@ -389,6 +325,7 @@ void processConfirmationMethodCodeDT_Test_1() { validateDecisionSupport.processConfirmationMethodCodeDT(edxRuleManageDT, publicHealthCaseContainer, metaData); } + @SuppressWarnings("java:S2699") @Test void processConfirmationMethodCodeDT_Test_2() { @@ -410,6 +347,7 @@ void processConfirmationMethodCodeDT_Test_2() { validateDecisionSupport.processConfirmationMethodCodeDT(edxRuleManageDT, publicHealthCaseContainer, metaData); } + @SuppressWarnings("java:S2699") @Test void processConfirmationMethodCodeDT_Test_3() { @@ -439,6 +377,7 @@ void processConfirmationMethodCodeDT_Test_3() { validateDecisionSupport.processConfirmationMethodCodeDT(edxRuleManageDT, publicHealthCaseContainer, metaData); } + @SuppressWarnings("java:S2699") @Test void processConfirmationMethodTimeDT_Test_1() throws DataProcessingException { @@ -495,6 +434,7 @@ void processConfirmationMethodTimeDT_Test_3() throws DataProcessingException { validateDecisionSupport.processConfirmationMethodTimeDT(edxRuleManageDT, publicHealthCaseContainer, metaData); } + @SuppressWarnings("java:S2699") @Test void processConfirmationMethodTimeDT_Test_4() throws DataProcessingException { @@ -513,6 +453,7 @@ void processConfirmationMethodTimeDT_Test_4() throws DataProcessingException { } + @SuppressWarnings("java:S2699") @Test void processConfirmationMethodTimeDT_Test_5() throws DataProcessingException { @@ -547,6 +488,7 @@ void processNBSCaseManagementDT_Test() { assertNotNull(thrown); } + @SuppressWarnings("java:S2699") @Test void processConfirmationMethodCodeDTRequired_Test() { @@ -562,8 +504,6 @@ void processConfirmationMethodCodeDTRequired_Test() { } - - @Test void parseInvestigationDefaultValuesType_Test() { Map map = new HashMap<>(); @@ -664,7 +604,7 @@ void processActIds_Test() { actCol.add(act); publicHealthCaseContainer.setTheActIdDTCollection(actCol); - metaData.setDataCd( NEDSSConstant.ACT_ID_STATE_TYPE_CD); + metaData.setDataCd(NEDSSConstant.ACT_ID_STATE_TYPE_CD); validateDecisionSupport.processActIds(edxRuleManageDT, publicHealthCaseContainer, metaData); } @@ -684,7 +624,7 @@ void processActIds_Test_2() { actCol.add(act); publicHealthCaseContainer.setTheActIdDTCollection(actCol); - metaData.setDataCd( NEDSSConstant.ACT_ID_STATE_TYPE_CD); + metaData.setDataCd(NEDSSConstant.ACT_ID_STATE_TYPE_CD); validateDecisionSupport.processActIds(edxRuleManageDT, publicHealthCaseContainer, metaData); } @@ -724,12 +664,11 @@ void processActIds_Test_4() { actCol.add(act); publicHealthCaseContainer.setTheActIdDTCollection(actCol); - metaData.setDataCd( "CITY"); + metaData.setDataCd("CITY"); validateDecisionSupport.processActIds(edxRuleManageDT, publicHealthCaseContainer, metaData); } - @Test void testGetCurrentDateValue_UseCurrentDate() { // Arrange @@ -775,7 +714,68 @@ void processNbsObject_Test() { validateDecisionSupport.processNbsObject(edxRuleManageDT, publicHealthCaseContainer, metaData); // Assert - assertNull( object.getTestField()); + assertNull(object.getTestField()); + } + + // Helper class for testing + public static class TestObject { + private String testField; + private Timestamp testDateField; + + public String getTestField() { + return testField; + } + + public void setTestField(String testField) { + this.testField = testField; + } + + public Timestamp getTestDateField() { + return testDateField; + } + + public void setTestDateField(Timestamp testDateField) { + this.testDateField = testDateField; + } + } + + public static class TestObjectNumeric { + private Integer testIntegerField; + private Long testLongField; + private BigDecimal testBigDecimalField; + private String testStringField; + + public Integer getTestIntegerField() { + return testIntegerField; + } + + public void setTestIntegerField(Integer testIntegerField) { + this.testIntegerField = testIntegerField; + } + + public Long getTestLongField() { + return testLongField; + } + + public void setTestLongField(Long testLongField) { + this.testLongField = testLongField; + } + + public BigDecimal getTestBigDecimalField() { + return testBigDecimalField; + } + + public void setTestBigDecimalField(BigDecimal testBigDecimalField) { + this.testBigDecimalField = testBigDecimalField; + } + + public String getTestStringField() { + return testStringField; + } + + public void setTestStringField(String testStringField) { + this.testStringField = testStringField; + } } } diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/wds/WdsObjectCheckerTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/wds/WdsObjectCheckerTest.java new file mode 100644 index 000000000..4913a6743 --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/component/wds/WdsObjectCheckerTest.java @@ -0,0 +1,284 @@ +package gov.cdc.dataprocessing.utilities.component.wds; + +import gov.cdc.dataprocessing.constant.elr.NEDSSConstant; +import gov.cdc.dataprocessing.model.dto.edx.EdxRuleManageDto; +import gov.cdc.dataprocessing.model.dto.nbs.NbsQuestionMetadata; +import gov.cdc.dataprocessing.utilities.StringUtils; +import gov.cdc.dataprocessing.utilities.TestBean; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.sql.Timestamp; + +import static org.junit.jupiter.api.Assertions.*; + +public class WdsObjectCheckerTest { + + private WdsObjectChecker wdsObjectChecker; + + @BeforeEach + public void setUp() { + wdsObjectChecker = new WdsObjectChecker(); + } + + @Test + public void testCheckNbsObjectTextEquals() throws Exception { + TestBean bean = new TestBean(); + bean.setStringValue("test"); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("TEXT"); + metaData.setDataLocation("STRING_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("="); + edxRuleManageDT.setValue("test"); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertTrue(result); + } + + @Test + public void testCheckNbsObjectTextNotEquals() throws Exception { + TestBean bean = new TestBean(); + bean.setStringValue("test"); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("TEXT"); + metaData.setDataLocation("STRING_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("!="); + edxRuleManageDT.setValue("different"); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertTrue(result); + } + + @Test + public void testCheckNbsObjectTextContains() throws Exception { + TestBean bean = new TestBean(); + bean.setStringValue("test,example"); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("TEXT"); + metaData.setDataLocation("STRING_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("CT"); + edxRuleManageDT.setValue("example"); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertTrue(result); + } + + @Test + public void testCheckNbsObjectNumericGreaterThan() throws Exception { + TestBean bean = new TestBean(); + bean.setLongValue(20L); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("NUMERIC"); + metaData.setDataLocation("LONG_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic(">"); + edxRuleManageDT.setValue("10"); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertTrue(result); + } + + @Test + public void testCheckNbsObjectNumericLessThan() throws Exception { + TestBean bean = new TestBean(); + bean.setLongValue(5L); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("NUMERIC"); + metaData.setDataLocation("LONG_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("<"); + edxRuleManageDT.setValue("10"); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertTrue(result); + } + + @Test + public void testCheckNbsObjectDateEquals() throws Exception { + TestBean bean = new TestBean(); + Timestamp timestamp = Timestamp.valueOf("2023-01-01 00:00:00"); + bean.setTimestampValue(timestamp); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("DATETIME"); + metaData.setDataLocation("TIMESTAMP_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("="); + edxRuleManageDT.setValue("01/01/2023"); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertTrue(result); + } + + @Test + public void testCheckNbsObjectNullValueNotEquals() throws Exception { + TestBean bean = new TestBean(); + bean.setStringValue(null); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("TEXT"); + metaData.setDataLocation("STRING_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("!="); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertTrue(result); + } + + @Test + public void testCheckNbsObjectNullValueEquals() throws Exception { + TestBean bean = new TestBean(); + bean.setStringValue(null); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("TEXT"); + metaData.setDataLocation("STRING_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("="); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertFalse(result); + } + + @Test + public void testCheckNbsObjectGreaterThanEquals() throws Exception { + TestBean bean = new TestBean(); + bean.setLongValue(20L); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("NUMERIC"); + metaData.setDataLocation("LONG_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic(">="); + edxRuleManageDT.setValue("20"); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertTrue(result); + } + + @Test + public void testCheckNbsObjectLessThanEquals() throws Exception { + TestBean bean = new TestBean(); + bean.setLongValue(5L); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("NUMERIC"); + metaData.setDataLocation("LONG_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("<="); + edxRuleManageDT.setValue("5"); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertTrue(result); + } + + @Test + public void testCheckNbsObjectDateNotEquals() throws Exception { + TestBean bean = new TestBean(); + Timestamp timestamp = Timestamp.valueOf("2023-01-01 00:00:00"); + bean.setTimestampValue(timestamp); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("DATETIME"); + metaData.setDataLocation("TIMESTAMP_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("!="); + edxRuleManageDT.setValue("01/02/2023"); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertTrue(result); + } + + + + + + @Test + public void testCheckNbsObjectNullMetaData() { + TestBean bean = new TestBean(); + bean.setStringValue("test"); + + NbsQuestionMetadata metaData = null; + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("="); + + Exception exception = assertThrows(NullPointerException.class, () -> { + wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + }); + + assertNotNull(exception); + } + + + @Test + public void testCheckNbsObjectInvalidGetMethod() { + TestBean bean = new TestBean(); + bean.setStringValue("test"); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("TEXT"); + metaData.setDataLocation("INVALID_METHOD"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("="); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertFalse(result); + } + + @Test + public void testCheckNbsObjectInvalidDataType() { + TestBean bean = new TestBean(); + bean.setStringValue("test"); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("INVALID_TYPE"); + metaData.setDataLocation("STRING_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("="); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertFalse(result); + } + + @Test + public void testCheckNbsObjectElseBlock() throws Exception { + TestBean bean = new TestBean(); + bean.setStringValue("test"); + + NbsQuestionMetadata metaData = new NbsQuestionMetadata(); + metaData.setDataType("NUMERIC"); + metaData.setDataLocation("STRING_VALUE"); + + EdxRuleManageDto edxRuleManageDT = new EdxRuleManageDto(); + edxRuleManageDT.setLogic("INVALID_LOGIC"); + + boolean result = wdsObjectChecker.checkNbsObject(edxRuleManageDT, bean, metaData); + assertFalse(result); + } + + // Additional test cases for other scenarios... +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/model/CodedTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/model/CodedTest.java new file mode 100644 index 000000000..52f7ef5cd --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/model/CodedTest.java @@ -0,0 +1,80 @@ +package gov.cdc.dataprocessing.utilities.model; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class CodedTest { + + @Test + void testCode() { + Coded coded = new Coded(); + coded.setCode("testCode"); + assertEquals("testCode", coded.getCode()); + } + + @Test + void testCodeDescription() { + Coded coded = new Coded(); + coded.setCodeDescription("testDescription"); + assertEquals("testDescription", coded.getCodeDescription()); + } + + @Test + void testCodeSystemCd() { + Coded coded = new Coded(); + coded.setCodeSystemCd("testSystemCd"); + assertEquals("testSystemCd", coded.getCodeSystemCd()); + } + + @Test + void testLocalCode() { + Coded coded = new Coded(); + coded.setLocalCode("testLocalCode"); + assertEquals("testLocalCode", coded.getLocalCode()); + } + + @Test + void testLocalCodeDescription() { + Coded coded = new Coded(); + coded.setLocalCodeDescription("testLocalDescription"); + assertEquals("testLocalDescription", coded.getLocalCodeDescription()); + } + + @Test + void testLocalCodeSystemCd() { + Coded coded = new Coded(); + coded.setLocalCodeSystemCd("testLocalSystemCd"); + assertEquals("testLocalSystemCd", coded.getLocalCodeSystemCd()); + } + + @Test + void testCodesetGroupId() { + Coded coded = new Coded(); + coded.setCodesetGroupId(12345L); + assertEquals(12345L, coded.getCodesetGroupId()); + } + + @Test + void testCodesetName() { + Coded coded = new Coded(); + coded.setCodesetName("testCodesetName"); + assertEquals("testCodesetName", coded.getCodesetName()); + } + + @Test + void testCodesetTableName() { + Coded coded = new Coded(); + coded.setCodesetTableName("testTableName"); + assertEquals("testTableName", coded.getCodesetTableName()); + } + + @Test + void testFlagNotFound() { + Coded coded = new Coded(); + coded.setFlagNotFound(true); + assertTrue(coded.isFlagNotFound()); + coded.setFlagNotFound(false); + assertFalse(coded.isFlagNotFound()); + } +} diff --git a/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/time/TimeStampUtilTest.java b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/time/TimeStampUtilTest.java new file mode 100644 index 000000000..b31d2b2ce --- /dev/null +++ b/data-processing-service/src/test/java/gov/cdc/dataprocessing/utilities/time/TimeStampUtilTest.java @@ -0,0 +1,41 @@ +package gov.cdc.dataprocessing.utilities.time; + +import gov.cdc.dataprocessing.exception.DataProcessingException; +import org.junit.jupiter.api.Test; + +import java.sql.Timestamp; +import java.text.ParseException; +import java.text.SimpleDateFormat; + +import static org.junit.jupiter.api.Assertions.*; + +public class TimeStampUtilTest { + + @Test + void testConvertStringToTimestamp_ValidString() throws DataProcessingException, ParseException { + String timestampString = "12/31/2022 23:59:59"; + SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); + java.util.Date parsedDate = sdf.parse(timestampString); + Timestamp expectedTimestamp = new Timestamp(parsedDate.getTime()); + Timestamp result = TimeStampUtil.convertStringToTimestamp(timestampString); + assertEquals(expectedTimestamp, result); + } + + @Test + void testConvertStringToTimestamp_InvalidString() { + String timestampString = "invalid date"; + Exception exception = assertThrows(DataProcessingException.class, () -> { + TimeStampUtil.convertStringToTimestamp(timestampString); + }); + assertEquals("Unparseable date: \"invalid date\"", exception.getMessage()); + } + + @Test + void testConvertStringToTimestamp_NullString() { + String timestampString = null; + Exception exception = assertThrows(DataProcessingException.class, () -> { + TimeStampUtil.convertStringToTimestamp(timestampString); + }); + assertNotNull(exception.getMessage()); + } +} diff --git a/data-processing-service/src/test/resources/test_data/manager/manager_first_process.json b/data-processing-service/src/test/resources/test_data/manager/manager_first_process.json index fd1e7e13d..6c2a753c9 100644 --- a/data-processing-service/src/test/resources/test_data/manager/manager_first_process.json +++ b/data-processing-service/src/test/resources/test_data/manager/manager_first_process.json @@ -1 +1,14 @@ -{"nbsInterfaceUid":10010015,"payload":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\" standalone\u003d\"yes\"?\u003e\n\u003cContainer xmlns\u003d\"http://www.cdc.gov/NEDSS\"\u003e\n \u003cHL7LabReport\u003e\n \u003cHL7MSH\u003e\n \u003cFieldSeparator\u003e|\u003c/FieldSeparator\u003e\n \u003cEncodingCharacters\u003e^~\\\u0026amp;\u003c/EncodingCharacters\u003e\n \u003cSendingApplication\u003e\n \u003cHL7NamespaceID\u003eLABCORP-CORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/SendingApplication\u003e\n \u003cSendingFacility\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/SendingFacility\u003e\n \u003cReceivingApplication\u003e\n \u003cHL7NamespaceID\u003eALDOH\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingApplication\u003e\n \u003cReceivingFacility\u003e\n \u003cHL7NamespaceID\u003eAL\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingFacility\u003e\n \u003cDateTimeOfMessage\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfMessage\u003e\n \u003cSecurity\u003e\u003c/Security\u003e\n \u003cMessageType\u003e\n \u003cMessageCode\u003eORU\u003c/MessageCode\u003e\n \u003cTriggerEvent\u003eR01\u003c/TriggerEvent\u003e\n \u003cMessageStructure\u003eORU_R01\u003c/MessageStructure\u003e\n \u003c/MessageType\u003e\n \u003cMessageControlID\u003e20120509010020114_251.2\u003c/MessageControlID\u003e\n \u003cProcessingID\u003e\n \u003cHL7ProcessingID\u003eD\u003c/HL7ProcessingID\u003e\n \u003cHL7ProcessingMode\u003e\u003c/HL7ProcessingMode\u003e\n \u003c/ProcessingID\u003e\n \u003cVersionID\u003e\n \u003cHL7VersionID\u003e2.5.1\u003c/HL7VersionID\u003e\n \u003c/VersionID\u003e\n \u003cAcceptAcknowledgmentType\u003eNE\u003c/AcceptAcknowledgmentType\u003e\n \u003cApplicationAcknowledgmentType\u003eNE\u003c/ApplicationAcknowledgmentType\u003e\n \u003cCountryCode\u003eUSA\u003c/CountryCode\u003e\n \u003cMessageProfileIdentifier\u003e\n \u003cHL7EntityIdentifier\u003eV251_IG_LB_LABRPTPH_R1_INFORM_2010FEB\u003c/HL7EntityIdentifier\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.5\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/MessageProfileIdentifier\u003e\n \u003c/HL7MSH\u003e\n \u003cHL7SoftwareSegment\u003e\n \u003cSoftwareVendorOrganization\u003e\n \u003cHL7OrganizationName\u003eMirth Corp.\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/SoftwareVendorOrganization\u003e\n \u003cSoftwareCertifiedVersionOrReleaseNumber\u003e2.0\u003c/SoftwareCertifiedVersionOrReleaseNumber\u003e\n \u003cSoftwareProductName\u003eMirth Connect\u003c/SoftwareProductName\u003e\n \u003cSoftwareBinaryID\u003e789654\u003c/SoftwareBinaryID\u003e\n \u003cSoftwareProductInformation/\u003e\n \u003cSoftwareInstallDate\u003e\n \u003cyear\u003e2011\u003c/year\u003e\n \u003cmonth\u003e1\u003c/month\u003e\n \u003cday\u003e1\u003c/day\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SoftwareInstallDate\u003e\n \u003c/HL7SoftwareSegment\u003e\n \u003cHL7PATIENT_RESULT\u003e\n \u003cPATIENT\u003e\n \u003cPatientIdentification\u003e\n \u003cSetIDPID\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDPID\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e05540205114\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eLABC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePN\u003c/HL7IdentifierTypeCode\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e17485458372\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eAssignAuth\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePI\u003c/HL7IdentifierTypeCode\u003e\n \u003cHL7AssigningFacility\u003e\n \u003cHL7NamespaceID\u003eNE CLINIC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e24D1040593\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningFacility\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eKertzmann\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTMAX251\u003c/HL7GivenName\u003e\n \u003c/PatientName\u003e\n \u003cMothersMaidenName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMOTHER\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003ePATERSON\u003c/HL7GivenName\u003e\n \u003c/MothersMaidenName\u003e\n \u003cDateTimeOfBirth\u003e\n \u003cyear\u003e1960\u003c/year\u003e\n \u003cmonth\u003e11\u003c/month\u003e\n \u003cday\u003e9\u003c/day\u003e\n \u003chours\u003e20\u003c/hours\u003e\n \u003cminutes\u003e25\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfBirth\u003e\n \u003cAdministrativeSex\u003eF\u003c/AdministrativeSex\u003e\n \u003cRace\u003e\n \u003cHL7Identifier\u003eW\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eWHITE\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eHL70005\u003c/HL7NameofCodingSystem\u003e\n \u003c/Race\u003e\n \u003cPatientAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e5000 Staples Dr\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eAPT100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSOMECITY\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eME\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30342\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7AddressType\u003eH\u003c/HL7AddressType\u003e\n \u003c/PatientAddress\u003e\n \u003cBirthOrder/\u003e\n \u003c/PatientIdentification\u003e\n \u003cNextofKinAssociatedParties\u003e\n \u003cSetIDNK1\u003e1\u003c/SetIDNK1\u003e\n \u003cName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eTESTNOK114B\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTNOK1\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eX\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/Name\u003e\n \u003cRelationship\u003e\n \u003cHL7Identifier\u003eFTH\u003c/HL7Identifier\u003e\n \u003c/Relationship\u003e\n \u003cAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e12 MAIN STREET\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 16\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eCOLUMBIA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eSC\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30329\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/Address\u003e\n \u003cPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e803\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e5551212\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/PhoneNumber\u003e\n \u003c/NextofKinAssociatedParties\u003e\n \u003c/PATIENT\u003e\n \u003cORDER_OBSERVATION\u003e\n \u003cCommonOrder\u003e\n \u003cOrderControl\u003eRE\u003c/OrderControl\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cOrderingFacilityName\u003e\n \u003cHL7OrganizationName\u003eCOOSA VALLEY MEDICAL CENTER\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/OrderingFacilityName\u003e\n \u003cOrderingFacilityAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e315 WEST HICKORY ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingFacilityAddress\u003e\n \u003cOrderingFacilityPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/OrderingFacilityPhoneNumber\u003e\n \u003cOrderingProviderAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e380 WEST HILL ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingProviderAddress\u003e\n \u003c/CommonOrder\u003e\n \u003cObservationRequest\u003e\n \u003cSetIDOBR\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBR\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cUniversalServiceIdentifier\u003e\n \u003cHL7Identifier\u003e100-9\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eORGANISM COUNT\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n \u003cHL7AlternateIdentifier\u003e080186\u003c/HL7AlternateIdentifier\u003e\n \u003cHL7AlternateText\u003eCULTURE\u003c/HL7AlternateText\u003e\n \u003c/UniversalServiceIdentifier\u003e\n \u003cObservationDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationDateTime\u003e\n \u003cObservationEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationEndDateTime\u003e\n \u003cCollectorIdentifier\u003e\n \u003cHL7IDNumber\u003e342384\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSUSAN\u003c/HL7GivenName\u003e\n \u003c/CollectorIdentifier\u003e\n \u003cOrderingProvider\u003e\n \u003cHL7IDNumber\u003e46466\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eBRENTNALL\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/OrderingProvider\u003e\n \u003cOrderCallbackPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension/\u003e\n \u003c/OrderCallbackPhoneNumber\u003e\n \u003cResultsRptStatusChngDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cminutes\u003e39\u003c/minutes\u003e\n \u003cseconds\u003e0\u003c/seconds\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ResultsRptStatusChngDateTime\u003e\n \u003cResultStatus\u003eF\u003c/ResultStatus\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46214\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMATHIS\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e44582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46111\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMARTIN\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eJERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cReasonforStudy\u003e\n \u003cHL7Identifier\u003e12365-4\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eTOTALLY CRAZY\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eI9\u003c/HL7NameofCodingSystem\u003e\n \u003c/ReasonforStudy\u003e\n \u003cPrincipalResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTOM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/PrincipalResultInterpreter\u003e\n \u003cAssistantResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eMOORE\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/AssistantResultInterpreter\u003e\n \u003cTechnician\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e44\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSAM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eA\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMT\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Technician\u003e\n \u003cTranscriptionist\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e82\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMASINA\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE ANN\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMS\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eRA\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Transcriptionist\u003e\n \u003cNumberofSampleContainers/\u003e\n \u003c/ObservationRequest\u003e\n \u003cPatientResultOrderObservation\u003e\n \u003cOBSERVATION\u003e\n \u003cObservationResult\u003e\n \u003cSetIDOBX\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBX\u003e\n \u003cValueType\u003eSN\u003c/ValueType\u003e\n \u003cObservationIdentifier\u003e\n\u003cHL7Identifier\u003e77190-7\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eTITER\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n\u003cHL7AlternateIdentifier\u003e080133\u003c/HL7AlternateIdentifier\u003e\n \u003c/ObservationIdentifier\u003e\n \u003cObservationSubID\u003e1\u003c/ObservationSubID\u003e\n \u003cObservationValue\u003e100^1^:^1\u003c/ObservationValue\u003e\n \u003cUnits\u003e\n\u003cHL7Identifier\u003emL\u003c/HL7Identifier\u003e\n \u003c/Units\u003e\n \u003cReferencesRange\u003e10-100\u003c/ReferencesRange\u003e\n \u003cProbability/\u003e\n \u003cObservationResultStatus\u003eF\u003c/ObservationResultStatus\u003e\n \u003cProducersReference\u003e\n\u003cHL7Identifier\u003e20D0649525\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eLABCORP BIRMINGHAM\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eCLIA\u003c/HL7NameofCodingSystem\u003e\n \u003c/ProducersReference\u003e\n \u003cDateTimeOftheAnalysis\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e4\u003c/month\u003e\n\u003cday\u003e1\u003c/day\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOftheAnalysis\u003e\n \u003cPerformingOrganizationName\u003e\n\u003cHL7OrganizationName\u003eLab1\u003c/HL7OrganizationName\u003e\n\u003cHL7OrganizationNameTypeCode\u003eL\u003c/HL7OrganizationNameTypeCode\u003e\n\u003cHL7IDNumber/\u003e\n\u003cHL7CheckDigit/\u003e\n\u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eCLIA\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.100\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n\u003c/HL7AssigningAuthority\u003e\n\u003cHL7OrganizationIdentifier\u003e1234\u003c/HL7OrganizationIdentifier\u003e\n \u003c/PerformingOrganizationName\u003e\n \u003cPerformingOrganizationAddress\u003e\n\u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e1234 Cornell Park Dr\u003c/HL7StreetOrMailingAddress\u003e\n\u003c/HL7StreetAddress\u003e\n\u003cHL7City\u003eBlue Ash\u003c/HL7City\u003e\n\u003cHL7StateOrProvince\u003eOH\u003c/HL7StateOrProvince\u003e\n\u003cHL7ZipOrPostalCode\u003e45241\u003c/HL7ZipOrPostalCode\u003e\n \u003c/PerformingOrganizationAddress\u003e\n \u003cPerformingOrganizationMedicalDirector\u003e\n\u003cHL7IDNumber\u003e9876543\u003c/HL7IDNumber\u003e\n\u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n\u003c/HL7FamilyName\u003e\n\u003cHL7GivenName\u003eBOB\u003c/HL7GivenName\u003e\n\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eF\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n\u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/PerformingOrganizationMedicalDirector\u003e\n \u003c/ObservationResult\u003e\n \u003c/OBSERVATION\u003e\n \u003c/PatientResultOrderObservation\u003e\n \u003cPatientResultOrderSPMObservation\u003e\n \u003cSPECIMEN\u003e\n \u003cSPECIMEN\u003e\n \u003cSetIDSPM\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDSPM\u003e\n \u003cSpecimenID\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e56789\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenID\u003e\n \u003cSpecimenParentIDs\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenParentIDs\u003e\n \u003cSpecimenType\u003e\n\u003cHL7AlternateIdentifier\u003eBLD\u003c/HL7AlternateIdentifier\u003e\n\u003cHL7AlternateText\u003eBLOOD\u003c/HL7AlternateText\u003e\n\u003cHL7NameofAlternateCodingSystem\u003eL\u003c/HL7NameofAlternateCodingSystem\u003e\n \u003c/SpecimenType\u003e\n \u003cSpecimenSourceSite\u003e\n\u003cHL7Identifier\u003eLA\u003c/HL7Identifier\u003e\n\u003cHL7NameofCodingSystem\u003eHL70070\u003c/HL7NameofCodingSystem\u003e\n \u003c/SpecimenSourceSite\u003e\n \u003cGroupedSpecimenCount/\u003e\n \u003cSpecimenDescription\u003eSOURCE NOT SPECIFIED\u003c/SpecimenDescription\u003e\n \u003cSpecimenCollectionDateTime\u003e\n\u003cHL7RangeStartDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeStartDateTime\u003e\n\u003cHL7RangeEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeEndDateTime\u003e\n \u003c/SpecimenCollectionDateTime\u003e\n \u003cSpecimenReceivedDateTime\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e3\u003c/month\u003e\n\u003cday\u003e25\u003c/day\u003e\n\u003chours\u003e1\u003c/hours\u003e\n\u003cminutes\u003e37\u003c/minutes\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SpecimenReceivedDateTime\u003e\n \u003cNumberOfSpecimenContainers/\u003e\n \u003c/SPECIMEN\u003e\n \u003c/SPECIMEN\u003e\n \u003c/PatientResultOrderSPMObservation\u003e\n \u003c/ORDER_OBSERVATION\u003e\n \u003c/HL7PATIENT_RESULT\u003e\n \u003c/HL7LabReport\u003e\n\u003c/Container\u003e\n\n\u003c!-- raw_message_id \u003d DBE3D8BD-35F0-41D4-A8C2-1EF1F1A9B8DE --\u003e","impExpIndCd":"I","recordStatusCd":"QUEUED_V2","recordStatusTime":"Jun 13, 2024, 10:02:48 PM","addTime":"Jun 13, 2024, 10:02:48 PM","systemNm":"NBS","docTypeCd":"11648804","fillerOrderNbr":"20120601114","labClia":"20D0649525","specimenCollDate":"Mar 24, 2006, 4:55:00 PM","orderTestCode":"100-9"} \ No newline at end of file +{ + "nbsInterfaceUid": 10010015, + "payload": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\" standalone\u003d\"yes\"?\u003e\n\u003cContainer xmlns\u003d\"http://www.cdc.gov/NEDSS\"\u003e\n \u003cHL7LabReport\u003e\n \u003cHL7MSH\u003e\n \u003cFieldSeparator\u003e|\u003c/FieldSeparator\u003e\n \u003cEncodingCharacters\u003e^~\\\u0026amp;\u003c/EncodingCharacters\u003e\n \u003cSendingApplication\u003e\n \u003cHL7NamespaceID\u003eLABCORP-CORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/SendingApplication\u003e\n \u003cSendingFacility\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/SendingFacility\u003e\n \u003cReceivingApplication\u003e\n \u003cHL7NamespaceID\u003eALDOH\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingApplication\u003e\n \u003cReceivingFacility\u003e\n \u003cHL7NamespaceID\u003eAL\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingFacility\u003e\n \u003cDateTimeOfMessage\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfMessage\u003e\n \u003cSecurity\u003e\u003c/Security\u003e\n \u003cMessageType\u003e\n \u003cMessageCode\u003eORU\u003c/MessageCode\u003e\n \u003cTriggerEvent\u003eR01\u003c/TriggerEvent\u003e\n \u003cMessageStructure\u003eORU_R01\u003c/MessageStructure\u003e\n \u003c/MessageType\u003e\n \u003cMessageControlID\u003e20120509010020114_251.2\u003c/MessageControlID\u003e\n \u003cProcessingID\u003e\n \u003cHL7ProcessingID\u003eD\u003c/HL7ProcessingID\u003e\n \u003cHL7ProcessingMode\u003e\u003c/HL7ProcessingMode\u003e\n \u003c/ProcessingID\u003e\n \u003cVersionID\u003e\n \u003cHL7VersionID\u003e2.5.1\u003c/HL7VersionID\u003e\n \u003c/VersionID\u003e\n \u003cAcceptAcknowledgmentType\u003eNE\u003c/AcceptAcknowledgmentType\u003e\n \u003cApplicationAcknowledgmentType\u003eNE\u003c/ApplicationAcknowledgmentType\u003e\n \u003cCountryCode\u003eUSA\u003c/CountryCode\u003e\n \u003cMessageProfileIdentifier\u003e\n \u003cHL7EntityIdentifier\u003eV251_IG_LB_LABRPTPH_R1_INFORM_2010FEB\u003c/HL7EntityIdentifier\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.5\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/MessageProfileIdentifier\u003e\n \u003c/HL7MSH\u003e\n \u003cHL7SoftwareSegment\u003e\n \u003cSoftwareVendorOrganization\u003e\n \u003cHL7OrganizationName\u003eMirth Corp.\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/SoftwareVendorOrganization\u003e\n \u003cSoftwareCertifiedVersionOrReleaseNumber\u003e2.0\u003c/SoftwareCertifiedVersionOrReleaseNumber\u003e\n \u003cSoftwareProductName\u003eMirth Connect\u003c/SoftwareProductName\u003e\n \u003cSoftwareBinaryID\u003e789654\u003c/SoftwareBinaryID\u003e\n \u003cSoftwareProductInformation/\u003e\n \u003cSoftwareInstallDate\u003e\n \u003cyear\u003e2011\u003c/year\u003e\n \u003cmonth\u003e1\u003c/month\u003e\n \u003cday\u003e1\u003c/day\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SoftwareInstallDate\u003e\n \u003c/HL7SoftwareSegment\u003e\n \u003cHL7PATIENT_RESULT\u003e\n \u003cPATIENT\u003e\n \u003cPatientIdentification\u003e\n \u003cSetIDPID\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDPID\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e05540205114\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eLABC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePN\u003c/HL7IdentifierTypeCode\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e17485458372\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eAssignAuth\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePI\u003c/HL7IdentifierTypeCode\u003e\n \u003cHL7AssigningFacility\u003e\n \u003cHL7NamespaceID\u003eNE CLINIC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e24D1040593\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningFacility\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eKertzmann\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTMAX251\u003c/HL7GivenName\u003e\n \u003c/PatientName\u003e\n \u003cMothersMaidenName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMOTHER\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003ePATERSON\u003c/HL7GivenName\u003e\n \u003c/MothersMaidenName\u003e\n \u003cDateTimeOfBirth\u003e\n \u003cyear\u003e1960\u003c/year\u003e\n \u003cmonth\u003e11\u003c/month\u003e\n \u003cday\u003e9\u003c/day\u003e\n \u003chours\u003e20\u003c/hours\u003e\n \u003cminutes\u003e25\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfBirth\u003e\n \u003cAdministrativeSex\u003eF\u003c/AdministrativeSex\u003e\n \u003cRace\u003e\n \u003cHL7Identifier\u003eW\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eWHITE\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eHL70005\u003c/HL7NameofCodingSystem\u003e\n \u003c/Race\u003e\n \u003cPatientAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e5000 Staples Dr\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eAPT100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSOMECITY\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eME\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30342\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7AddressType\u003eH\u003c/HL7AddressType\u003e\n \u003c/PatientAddress\u003e\n \u003cBirthOrder/\u003e\n \u003c/PatientIdentification\u003e\n \u003cNextofKinAssociatedParties\u003e\n \u003cSetIDNK1\u003e1\u003c/SetIDNK1\u003e\n \u003cName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eTESTNOK114B\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTNOK1\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eX\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/Name\u003e\n \u003cRelationship\u003e\n \u003cHL7Identifier\u003eFTH\u003c/HL7Identifier\u003e\n \u003c/Relationship\u003e\n \u003cAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e12 MAIN STREET\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 16\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eCOLUMBIA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eSC\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30329\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/Address\u003e\n \u003cPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e803\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e5551212\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/PhoneNumber\u003e\n \u003c/NextofKinAssociatedParties\u003e\n \u003c/PATIENT\u003e\n \u003cORDER_OBSERVATION\u003e\n \u003cCommonOrder\u003e\n \u003cOrderControl\u003eRE\u003c/OrderControl\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cOrderingFacilityName\u003e\n \u003cHL7OrganizationName\u003eCOOSA VALLEY MEDICAL CENTER\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/OrderingFacilityName\u003e\n \u003cOrderingFacilityAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e315 WEST HICKORY ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingFacilityAddress\u003e\n \u003cOrderingFacilityPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/OrderingFacilityPhoneNumber\u003e\n \u003cOrderingProviderAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e380 WEST HILL ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingProviderAddress\u003e\n \u003c/CommonOrder\u003e\n \u003cObservationRequest\u003e\n \u003cSetIDOBR\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBR\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cUniversalServiceIdentifier\u003e\n \u003cHL7Identifier\u003e100-9\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eORGANISM COUNT\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n \u003cHL7AlternateIdentifier\u003e080186\u003c/HL7AlternateIdentifier\u003e\n \u003cHL7AlternateText\u003eCULTURE\u003c/HL7AlternateText\u003e\n \u003c/UniversalServiceIdentifier\u003e\n \u003cObservationDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationDateTime\u003e\n \u003cObservationEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationEndDateTime\u003e\n \u003cCollectorIdentifier\u003e\n \u003cHL7IDNumber\u003e342384\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSUSAN\u003c/HL7GivenName\u003e\n \u003c/CollectorIdentifier\u003e\n \u003cOrderingProvider\u003e\n \u003cHL7IDNumber\u003e46466\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eBRENTNALL\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/OrderingProvider\u003e\n \u003cOrderCallbackPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension/\u003e\n \u003c/OrderCallbackPhoneNumber\u003e\n \u003cResultsRptStatusChngDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cminutes\u003e39\u003c/minutes\u003e\n \u003cseconds\u003e0\u003c/seconds\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ResultsRptStatusChngDateTime\u003e\n \u003cResultStatus\u003eF\u003c/ResultStatus\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46214\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMATHIS\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e44582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46111\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMARTIN\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eJERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cReasonforStudy\u003e\n \u003cHL7Identifier\u003e12365-4\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eTOTALLY CRAZY\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eI9\u003c/HL7NameofCodingSystem\u003e\n \u003c/ReasonforStudy\u003e\n \u003cPrincipalResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTOM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/PrincipalResultInterpreter\u003e\n \u003cAssistantResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eMOORE\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/AssistantResultInterpreter\u003e\n \u003cTechnician\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e44\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSAM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eA\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMT\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Technician\u003e\n \u003cTranscriptionist\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e82\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMASINA\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE ANN\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMS\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eRA\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Transcriptionist\u003e\n \u003cNumberofSampleContainers/\u003e\n \u003c/ObservationRequest\u003e\n \u003cPatientResultOrderObservation\u003e\n \u003cOBSERVATION\u003e\n \u003cObservationResult\u003e\n \u003cSetIDOBX\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBX\u003e\n \u003cValueType\u003eSN\u003c/ValueType\u003e\n \u003cObservationIdentifier\u003e\n\u003cHL7Identifier\u003e77190-7\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eTITER\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n\u003cHL7AlternateIdentifier\u003e080133\u003c/HL7AlternateIdentifier\u003e\n \u003c/ObservationIdentifier\u003e\n \u003cObservationSubID\u003e1\u003c/ObservationSubID\u003e\n \u003cObservationValue\u003e100^1^:^1\u003c/ObservationValue\u003e\n \u003cUnits\u003e\n\u003cHL7Identifier\u003emL\u003c/HL7Identifier\u003e\n \u003c/Units\u003e\n \u003cReferencesRange\u003e10-100\u003c/ReferencesRange\u003e\n \u003cProbability/\u003e\n \u003cObservationResultStatus\u003eF\u003c/ObservationResultStatus\u003e\n \u003cProducersReference\u003e\n\u003cHL7Identifier\u003e20D0649525\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eLABCORP BIRMINGHAM\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eCLIA\u003c/HL7NameofCodingSystem\u003e\n \u003c/ProducersReference\u003e\n \u003cDateTimeOftheAnalysis\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e4\u003c/month\u003e\n\u003cday\u003e1\u003c/day\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOftheAnalysis\u003e\n \u003cPerformingOrganizationName\u003e\n\u003cHL7OrganizationName\u003eLab1\u003c/HL7OrganizationName\u003e\n\u003cHL7OrganizationNameTypeCode\u003eL\u003c/HL7OrganizationNameTypeCode\u003e\n\u003cHL7IDNumber/\u003e\n\u003cHL7CheckDigit/\u003e\n\u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eCLIA\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.100\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n\u003c/HL7AssigningAuthority\u003e\n\u003cHL7OrganizationIdentifier\u003e1234\u003c/HL7OrganizationIdentifier\u003e\n \u003c/PerformingOrganizationName\u003e\n \u003cPerformingOrganizationAddress\u003e\n\u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e1234 Cornell Park Dr\u003c/HL7StreetOrMailingAddress\u003e\n\u003c/HL7StreetAddress\u003e\n\u003cHL7City\u003eBlue Ash\u003c/HL7City\u003e\n\u003cHL7StateOrProvince\u003eOH\u003c/HL7StateOrProvince\u003e\n\u003cHL7ZipOrPostalCode\u003e45241\u003c/HL7ZipOrPostalCode\u003e\n \u003c/PerformingOrganizationAddress\u003e\n \u003cPerformingOrganizationMedicalDirector\u003e\n\u003cHL7IDNumber\u003e9876543\u003c/HL7IDNumber\u003e\n\u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n\u003c/HL7FamilyName\u003e\n\u003cHL7GivenName\u003eBOB\u003c/HL7GivenName\u003e\n\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eF\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n\u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/PerformingOrganizationMedicalDirector\u003e\n \u003c/ObservationResult\u003e\n \u003c/OBSERVATION\u003e\n \u003c/PatientResultOrderObservation\u003e\n \u003cPatientResultOrderSPMObservation\u003e\n \u003cSPECIMEN\u003e\n \u003cSPECIMEN\u003e\n \u003cSetIDSPM\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDSPM\u003e\n \u003cSpecimenID\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e56789\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenID\u003e\n \u003cSpecimenParentIDs\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenParentIDs\u003e\n \u003cSpecimenType\u003e\n\u003cHL7AlternateIdentifier\u003eBLD\u003c/HL7AlternateIdentifier\u003e\n\u003cHL7AlternateText\u003eBLOOD\u003c/HL7AlternateText\u003e\n\u003cHL7NameofAlternateCodingSystem\u003eL\u003c/HL7NameofAlternateCodingSystem\u003e\n \u003c/SpecimenType\u003e\n \u003cSpecimenSourceSite\u003e\n\u003cHL7Identifier\u003eLA\u003c/HL7Identifier\u003e\n\u003cHL7NameofCodingSystem\u003eHL70070\u003c/HL7NameofCodingSystem\u003e\n \u003c/SpecimenSourceSite\u003e\n \u003cGroupedSpecimenCount/\u003e\n \u003cSpecimenDescription\u003eSOURCE NOT SPECIFIED\u003c/SpecimenDescription\u003e\n \u003cSpecimenCollectionDateTime\u003e\n\u003cHL7RangeStartDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeStartDateTime\u003e\n\u003cHL7RangeEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeEndDateTime\u003e\n \u003c/SpecimenCollectionDateTime\u003e\n \u003cSpecimenReceivedDateTime\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e3\u003c/month\u003e\n\u003cday\u003e25\u003c/day\u003e\n\u003chours\u003e1\u003c/hours\u003e\n\u003cminutes\u003e37\u003c/minutes\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SpecimenReceivedDateTime\u003e\n \u003cNumberOfSpecimenContainers/\u003e\n \u003c/SPECIMEN\u003e\n \u003c/SPECIMEN\u003e\n \u003c/PatientResultOrderSPMObservation\u003e\n \u003c/ORDER_OBSERVATION\u003e\n \u003c/HL7PATIENT_RESULT\u003e\n \u003c/HL7LabReport\u003e\n\u003c/Container\u003e\n\n\u003c!-- raw_message_id \u003d DBE3D8BD-35F0-41D4-A8C2-1EF1F1A9B8DE --\u003e", + "impExpIndCd": "I", + "recordStatusCd": "QUEUED_V2", + "recordStatusTime": "Jun 13, 2024, 10:02:48 PM", + "addTime": "Jun 13, 2024, 10:02:48 PM", + "systemNm": "NBS", + "docTypeCd": "11648804", + "fillerOrderNbr": "20120601114", + "labClia": "20D0649525", + "specimenCollDate": "Mar 24, 2006, 4:55:00 PM", + "orderTestCode": "100-9" +} \ No newline at end of file diff --git a/data-processing-service/src/test/resources/test_data/manager/manager_lab_container.json b/data-processing-service/src/test/resources/test_data/manager/manager_lab_container.json index a01c5bf9c..cdce3dc14 100644 --- a/data-processing-service/src/test/resources/test_data/manager/manager_lab_container.json +++ b/data-processing-service/src/test/resources/test_data/manager/manager_lab_container.json @@ -1 +1,2005 @@ -{"associatedNotificationInd":false,"associatedInvInd":false,"theObservationContainerCollection":[{"theObservationDto":{"observationUid":-1,"activityToTime":"Apr 4, 2006, 1:39:00 AM","altCd":"080186","altCdDescTxt":"CULTURE","altCdSystemCd":"L","altCdSystemDescTxt":"LOCAL","cd":"100-9","cdDescTxt":"ORGANISM COUNT","cdSystemCd":"LN","cdSystemDescTxt":"LOINC","ctrlCdDisplayForm":"LabReport","effectiveFromTime":"Mar 24, 2006, 4:55:00 PM","effectiveToTime":"Mar 24, 2006, 4:55:00 PM","electronicInd":"Y","obsDomainCd":"LabReport","obsDomainCdSt1":"Order","rptToStateTime":"Jun 13, 2024, 6:06:00 PM","statusCd":"D","targetSiteCd":"LA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"theActIdDtoCollection":[{"actUid":-1,"actIdSeq":1,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120509010020114_251.2","typeCd":"MCID","typeDescTxt":"Message Control ID","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"actUid":-1,"actIdSeq":2,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120601114","typeCd":"FN","typeDescTxt":"Filler Number","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theObservationReasonDtoCollection":[{"reasonCd":"12365-4","reasonDescTxt":"TOTALLY CRAZY","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"theObservationDto":{"observationUid":-27,"activityToTime":"Apr 1, 2006, 12:00:00 AM","altCd":"080133","altCdSystemCd":"L","altCdSystemDescTxt":"LOCAL","cd":"77190-7","cdDescTxt":"TITER","cdSystemCd":"LN","cdSystemDescTxt":"LOINC","ctrlCdDisplayForm":"LabReport","electronicInd":"Y","methodCd":"","methodDescTxt":"","obsDomainCdSt1":"Result","statusCd":"D","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"theActIdDtoCollection":[{"actUid":-27,"actIdSeq":1,"assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120509010020114_251.2","typeCd":"MCID","typeDescTxt":"Message Control ID","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"actUid":-27,"actIdSeq":2,"assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120601114","typeCd":"FN","typeDescTxt":"Filler Number","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theObsValueNumericDtoCollection":[{"observationUid":-27,"obsValueNumericSeq":1,"lowRange":"10-100","comparatorCd1":"100","numericValue1":1,"numericValue2":1,"numericUnitCd":"mL","separatorCd":":","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theMaterialContainerCollection":[{"theMaterialDto":{"materialUid":-9,"description":"SOURCE NOT SPECIFIED","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"theEntityIdDtoCollection":[{"entityUid":-10,"entityIdSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"56789","typeCd":"SPC","typeDescTxt":"Specimen","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theRoleDtoCollection":[{"roleSeq":1,"cd":"SF","cdDescTxt":"Sending Facility","recordStatusCd":"ACTIVE","statusCd":"A","subjectEntityUid":-4,"subjectClassCd":"HCFAC","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","addUserId":36,"cd":"PAT","cdDescTxt":"PATIENT","recordStatusCd":"ACTIVE","statusCd":"A","subjectEntityUid":-2,"subjectClassCd":"PATIENT","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","addUserId":36,"cd":"FTH","cdDescTxt":"Next of Kin","recordStatusCd":"ACTIVE","scopingRoleCd":"PAT","statusCd":"A","scopingEntityUid":-2,"scopingRoleSeq":1,"subjectEntityUid":-5,"scopingClassCd":"PAT","subjectClassCd":"CON","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","addUserId":36,"cd":"OP","cdDescTxt":"Order Provider","recordStatusCd":"ACTIVE","statusCd":"A","subjectEntityUid":-6,"scopingClassCd":"HCFAC","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"cd":"SPP","cdDescTxt":"Specimen Procurer","recordStatusCd":"ACTIVE","scopingRoleCd":"PAT","statusCd":"A","scopingEntityUid":-2,"scopingRoleSeq":1,"subjectEntityUid":-8,"scopingClassCd":"PAT","subjectClassCd":"PROV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"cd":"NI","cdDescTxt":"No Information Given","recordStatusCd":"ACTIVE","scopingRoleCd":"PATIENT","statusCd":"A","scopingEntityUid":-2,"scopingRoleSeq":1,"subjectEntityUid":-9,"scopingClassCd":"PATIENT","subjectClassCd":"MAT","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":2,"cd":"NI","cdDescTxt":"No Information Given","recordStatusCd":"ACTIVE","scopingRoleCd":"SPP","statusCd":"A","scopingEntityUid":-8,"scopingRoleSeq":1,"subjectEntityUid":-9,"scopingClassCd":"PRV","subjectClassCd":"MAT","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","addUserId":36,"cd":"OP","cdDescTxt":"Order Provider","recordStatusCd":"ACTIVE","scopingRoleCd":"PAT","statusCd":"A","scopingEntityUid":-2,"scopingRoleSeq":1,"subjectEntityUid":-12,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","addUserId":36,"cd":"LABP","cdDescTxt":"Laboratory Provider","recordStatusCd":"ACTIVE","scopingRoleCd":"PAT","statusCd":"A","scopingEntityUid":-2,"scopingRoleSeq":1,"subjectEntityUid":-13,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","addUserId":36,"cd":"LABP","cdDescTxt":"Laboratory Provider","recordStatusCd":"ACTIVE","scopingRoleCd":"PAT","statusCd":"A","scopingEntityUid":-2,"scopingRoleSeq":1,"subjectEntityUid":-15,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","addUserId":36,"cd":"LABP","cdDescTxt":"Laboratory Provider","recordStatusCd":"ACTIVE","scopingRoleCd":"PAT","statusCd":"A","scopingEntityUid":-2,"scopingRoleSeq":1,"subjectEntityUid":-17,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","addUserId":36,"cd":"LABP","cdDescTxt":"Laboratory Provider","recordStatusCd":"ACTIVE","scopingRoleCd":"PAT","statusCd":"A","scopingEntityUid":-2,"scopingRoleSeq":1,"subjectEntityUid":-19,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","addUserId":36,"cd":"CT","cdDescTxt":"Copy To","recordStatusCd":"ACTIVE","scopingRoleCd":"PAT","statusCd":"A","scopingEntityUid":-2,"scopingRoleSeq":1,"subjectEntityUid":-22,"scopingClassCd":"PAT","subjectClassCd":"PROV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","addUserId":36,"cd":"CT","cdDescTxt":"Copy To","recordStatusCd":"ACTIVE","scopingRoleCd":"PAT","statusCd":"A","scopingEntityUid":-2,"scopingRoleSeq":1,"subjectEntityUid":-24,"scopingClassCd":"PAT","subjectClassCd":"PROV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","addUserId":36,"cd":"CT","cdDescTxt":"Copy To","recordStatusCd":"ACTIVE","scopingRoleCd":"PAT","statusCd":"A","scopingEntityUid":-2,"scopingRoleSeq":1,"subjectEntityUid":-26,"scopingClassCd":"PAT","subjectClassCd":"PROV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","addUserId":36,"cd":"RE","cdDescTxt":"Reporting Entity","recordStatusCd":"ACTIVE","scopingRoleCd":"PAT","statusCd":"A","scopingEntityUid":-2,"subjectEntityUid":-28,"scopingClassCd":"PAT","subjectClassCd":"HCFAC","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"eDXDocumentCollection":[{"payload":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\" standalone\u003d\"yes\"?\u003e\n\u003cContainer xmlns\u003d\"http://www.cdc.gov/NEDSS\"\u003e\n \u003cHL7LabReport\u003e\n \u003cHL7MSH\u003e\n \u003cFieldSeparator\u003e|\u003c/FieldSeparator\u003e\n \u003cEncodingCharacters\u003e^~\\\u0026amp;\u003c/EncodingCharacters\u003e\n \u003cSendingApplication\u003e\n \u003cHL7NamespaceID\u003eLABCORP-CORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/SendingApplication\u003e\n \u003cSendingFacility\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/SendingFacility\u003e\n \u003cReceivingApplication\u003e\n \u003cHL7NamespaceID\u003eALDOH\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingApplication\u003e\n \u003cReceivingFacility\u003e\n \u003cHL7NamespaceID\u003eAL\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingFacility\u003e\n \u003cDateTimeOfMessage\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfMessage\u003e\n \u003cSecurity\u003e\u003c/Security\u003e\n \u003cMessageType\u003e\n \u003cMessageCode\u003eORU\u003c/MessageCode\u003e\n \u003cTriggerEvent\u003eR01\u003c/TriggerEvent\u003e\n \u003cMessageStructure\u003eORU_R01\u003c/MessageStructure\u003e\n \u003c/MessageType\u003e\n \u003cMessageControlID\u003e20120509010020114_251.2\u003c/MessageControlID\u003e\n \u003cProcessingID\u003e\n \u003cHL7ProcessingID\u003eD\u003c/HL7ProcessingID\u003e\n \u003cHL7ProcessingMode\u003e\u003c/HL7ProcessingMode\u003e\n \u003c/ProcessingID\u003e\n \u003cVersionID\u003e\n \u003cHL7VersionID\u003e2.5.1\u003c/HL7VersionID\u003e\n \u003c/VersionID\u003e\n \u003cAcceptAcknowledgmentType\u003eNE\u003c/AcceptAcknowledgmentType\u003e\n \u003cApplicationAcknowledgmentType\u003eNE\u003c/ApplicationAcknowledgmentType\u003e\n \u003cCountryCode\u003eUSA\u003c/CountryCode\u003e\n \u003cMessageProfileIdentifier\u003e\n \u003cHL7EntityIdentifier\u003eV251_IG_LB_LABRPTPH_R1_INFORM_2010FEB\u003c/HL7EntityIdentifier\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.5\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/MessageProfileIdentifier\u003e\n \u003c/HL7MSH\u003e\n \u003cHL7SoftwareSegment\u003e\n \u003cSoftwareVendorOrganization\u003e\n \u003cHL7OrganizationName\u003eMirth Corp.\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/SoftwareVendorOrganization\u003e\n \u003cSoftwareCertifiedVersionOrReleaseNumber\u003e2.0\u003c/SoftwareCertifiedVersionOrReleaseNumber\u003e\n \u003cSoftwareProductName\u003eMirth Connect\u003c/SoftwareProductName\u003e\n \u003cSoftwareBinaryID\u003e789654\u003c/SoftwareBinaryID\u003e\n \u003cSoftwareProductInformation/\u003e\n \u003cSoftwareInstallDate\u003e\n \u003cyear\u003e2011\u003c/year\u003e\n \u003cmonth\u003e1\u003c/month\u003e\n \u003cday\u003e1\u003c/day\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SoftwareInstallDate\u003e\n \u003c/HL7SoftwareSegment\u003e\n \u003cHL7PATIENT_RESULT\u003e\n \u003cPATIENT\u003e\n \u003cPatientIdentification\u003e\n \u003cSetIDPID\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDPID\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e05540205114\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eLABC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePN\u003c/HL7IdentifierTypeCode\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e17485458372\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eAssignAuth\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePI\u003c/HL7IdentifierTypeCode\u003e\n \u003cHL7AssigningFacility\u003e\n \u003cHL7NamespaceID\u003eNE CLINIC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e24D1040593\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningFacility\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eKertzmann\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTMAX251\u003c/HL7GivenName\u003e\n \u003c/PatientName\u003e\n \u003cMothersMaidenName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMOTHER\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003ePATERSON\u003c/HL7GivenName\u003e\n \u003c/MothersMaidenName\u003e\n \u003cDateTimeOfBirth\u003e\n \u003cyear\u003e1960\u003c/year\u003e\n \u003cmonth\u003e11\u003c/month\u003e\n \u003cday\u003e9\u003c/day\u003e\n \u003chours\u003e20\u003c/hours\u003e\n \u003cminutes\u003e25\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfBirth\u003e\n \u003cAdministrativeSex\u003eF\u003c/AdministrativeSex\u003e\n \u003cRace\u003e\n \u003cHL7Identifier\u003eW\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eWHITE\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eHL70005\u003c/HL7NameofCodingSystem\u003e\n \u003c/Race\u003e\n \u003cPatientAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e5000 Staples Dr\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eAPT100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSOMECITY\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eME\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30342\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7AddressType\u003eH\u003c/HL7AddressType\u003e\n \u003c/PatientAddress\u003e\n \u003cBirthOrder/\u003e\n \u003c/PatientIdentification\u003e\n \u003cNextofKinAssociatedParties\u003e\n \u003cSetIDNK1\u003e1\u003c/SetIDNK1\u003e\n \u003cName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eTESTNOK114B\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTNOK1\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eX\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/Name\u003e\n \u003cRelationship\u003e\n \u003cHL7Identifier\u003eFTH\u003c/HL7Identifier\u003e\n \u003c/Relationship\u003e\n \u003cAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e12 MAIN STREET\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 16\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eCOLUMBIA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eSC\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30329\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/Address\u003e\n \u003cPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e803\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e5551212\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/PhoneNumber\u003e\n \u003c/NextofKinAssociatedParties\u003e\n \u003c/PATIENT\u003e\n \u003cORDER_OBSERVATION\u003e\n \u003cCommonOrder\u003e\n \u003cOrderControl\u003eRE\u003c/OrderControl\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cOrderingFacilityName\u003e\n \u003cHL7OrganizationName\u003eCOOSA VALLEY MEDICAL CENTER\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/OrderingFacilityName\u003e\n \u003cOrderingFacilityAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e315 WEST HICKORY ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingFacilityAddress\u003e\n \u003cOrderingFacilityPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/OrderingFacilityPhoneNumber\u003e\n \u003cOrderingProviderAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e380 WEST HILL ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingProviderAddress\u003e\n \u003c/CommonOrder\u003e\n \u003cObservationRequest\u003e\n \u003cSetIDOBR\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBR\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cUniversalServiceIdentifier\u003e\n \u003cHL7Identifier\u003e100-9\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eORGANISM COUNT\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n \u003cHL7AlternateIdentifier\u003e080186\u003c/HL7AlternateIdentifier\u003e\n \u003cHL7AlternateText\u003eCULTURE\u003c/HL7AlternateText\u003e\n \u003c/UniversalServiceIdentifier\u003e\n \u003cObservationDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationDateTime\u003e\n \u003cObservationEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationEndDateTime\u003e\n \u003cCollectorIdentifier\u003e\n \u003cHL7IDNumber\u003e342384\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSUSAN\u003c/HL7GivenName\u003e\n \u003c/CollectorIdentifier\u003e\n \u003cOrderingProvider\u003e\n \u003cHL7IDNumber\u003e46466\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eBRENTNALL\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/OrderingProvider\u003e\n \u003cOrderCallbackPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension/\u003e\n \u003c/OrderCallbackPhoneNumber\u003e\n \u003cResultsRptStatusChngDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cminutes\u003e39\u003c/minutes\u003e\n \u003cseconds\u003e0\u003c/seconds\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ResultsRptStatusChngDateTime\u003e\n \u003cResultStatus\u003eF\u003c/ResultStatus\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46214\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMATHIS\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e44582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46111\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMARTIN\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eJERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cReasonforStudy\u003e\n \u003cHL7Identifier\u003e12365-4\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eTOTALLY CRAZY\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eI9\u003c/HL7NameofCodingSystem\u003e\n \u003c/ReasonforStudy\u003e\n \u003cPrincipalResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTOM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/PrincipalResultInterpreter\u003e\n \u003cAssistantResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eMOORE\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/AssistantResultInterpreter\u003e\n \u003cTechnician\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e44\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSAM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eA\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMT\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Technician\u003e\n \u003cTranscriptionist\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e82\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMASINA\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE ANN\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMS\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eRA\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Transcriptionist\u003e\n \u003cNumberofSampleContainers/\u003e\n \u003c/ObservationRequest\u003e\n \u003cPatientResultOrderObservation\u003e\n \u003cOBSERVATION\u003e\n \u003cObservationResult\u003e\n \u003cSetIDOBX\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBX\u003e\n \u003cValueType\u003eSN\u003c/ValueType\u003e\n \u003cObservationIdentifier\u003e\n\u003cHL7Identifier\u003e77190-7\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eTITER\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n\u003cHL7AlternateIdentifier\u003e080133\u003c/HL7AlternateIdentifier\u003e\n \u003c/ObservationIdentifier\u003e\n \u003cObservationSubID\u003e1\u003c/ObservationSubID\u003e\n \u003cObservationValue\u003e100^1^:^1\u003c/ObservationValue\u003e\n \u003cUnits\u003e\n\u003cHL7Identifier\u003emL\u003c/HL7Identifier\u003e\n \u003c/Units\u003e\n \u003cReferencesRange\u003e10-100\u003c/ReferencesRange\u003e\n \u003cProbability/\u003e\n \u003cObservationResultStatus\u003eF\u003c/ObservationResultStatus\u003e\n \u003cProducersReference\u003e\n\u003cHL7Identifier\u003e20D0649525\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eLABCORP BIRMINGHAM\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eCLIA\u003c/HL7NameofCodingSystem\u003e\n \u003c/ProducersReference\u003e\n \u003cDateTimeOftheAnalysis\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e4\u003c/month\u003e\n\u003cday\u003e1\u003c/day\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOftheAnalysis\u003e\n \u003cPerformingOrganizationName\u003e\n\u003cHL7OrganizationName\u003eLab1\u003c/HL7OrganizationName\u003e\n\u003cHL7OrganizationNameTypeCode\u003eL\u003c/HL7OrganizationNameTypeCode\u003e\n\u003cHL7IDNumber/\u003e\n\u003cHL7CheckDigit/\u003e\n\u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eCLIA\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.100\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n\u003c/HL7AssigningAuthority\u003e\n\u003cHL7OrganizationIdentifier\u003e1234\u003c/HL7OrganizationIdentifier\u003e\n \u003c/PerformingOrganizationName\u003e\n \u003cPerformingOrganizationAddress\u003e\n\u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e1234 Cornell Park Dr\u003c/HL7StreetOrMailingAddress\u003e\n\u003c/HL7StreetAddress\u003e\n\u003cHL7City\u003eBlue Ash\u003c/HL7City\u003e\n\u003cHL7StateOrProvince\u003eOH\u003c/HL7StateOrProvince\u003e\n\u003cHL7ZipOrPostalCode\u003e45241\u003c/HL7ZipOrPostalCode\u003e\n \u003c/PerformingOrganizationAddress\u003e\n \u003cPerformingOrganizationMedicalDirector\u003e\n\u003cHL7IDNumber\u003e9876543\u003c/HL7IDNumber\u003e\n\u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n\u003c/HL7FamilyName\u003e\n\u003cHL7GivenName\u003eBOB\u003c/HL7GivenName\u003e\n\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eF\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n\u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/PerformingOrganizationMedicalDirector\u003e\n \u003c/ObservationResult\u003e\n \u003c/OBSERVATION\u003e\n \u003c/PatientResultOrderObservation\u003e\n \u003cPatientResultOrderSPMObservation\u003e\n \u003cSPECIMEN\u003e\n \u003cSPECIMEN\u003e\n \u003cSetIDSPM\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDSPM\u003e\n \u003cSpecimenID\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e56789\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenID\u003e\n \u003cSpecimenParentIDs\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenParentIDs\u003e\n \u003cSpecimenType\u003e\n\u003cHL7AlternateIdentifier\u003eBLD\u003c/HL7AlternateIdentifier\u003e\n\u003cHL7AlternateText\u003eBLOOD\u003c/HL7AlternateText\u003e\n\u003cHL7NameofAlternateCodingSystem\u003eL\u003c/HL7NameofAlternateCodingSystem\u003e\n \u003c/SpecimenType\u003e\n \u003cSpecimenSourceSite\u003e\n\u003cHL7Identifier\u003eLA\u003c/HL7Identifier\u003e\n\u003cHL7NameofCodingSystem\u003eHL70070\u003c/HL7NameofCodingSystem\u003e\n \u003c/SpecimenSourceSite\u003e\n \u003cGroupedSpecimenCount/\u003e\n \u003cSpecimenDescription\u003eSOURCE NOT SPECIFIED\u003c/SpecimenDescription\u003e\n \u003cSpecimenCollectionDateTime\u003e\n\u003cHL7RangeStartDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeStartDateTime\u003e\n\u003cHL7RangeEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeEndDateTime\u003e\n \u003c/SpecimenCollectionDateTime\u003e\n \u003cSpecimenReceivedDateTime\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e3\u003c/month\u003e\n\u003cday\u003e25\u003c/day\u003e\n\u003chours\u003e1\u003c/hours\u003e\n\u003cminutes\u003e37\u003c/minutes\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SpecimenReceivedDateTime\u003e\n \u003cNumberOfSpecimenContainers/\u003e\n \u003c/SPECIMEN\u003e\n \u003c/SPECIMEN\u003e\n \u003c/PatientResultOrderSPMObservation\u003e\n \u003c/ORDER_OBSERVATION\u003e\n \u003c/HL7PATIENT_RESULT\u003e\n \u003c/HL7LabReport\u003e\n\u003c/Container\u003e\n\n\u003c!-- raw_message_id \u003d DBE3D8BD-35F0-41D4-A8C2-1EF1F1A9B8DE --\u003e","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 6:06:00 PM","addTime":"Jun 13, 2024, 6:06:00 PM","docTypeCd":"11648804","nbsDocumentMetadataUid":1005,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"manualLab":false,"pageProxyTypeCd":"","isSTDProgramArea":false,"thePersonContainerCollection":[{"thePersonDto":{"personUid":-2,"addReasonCd":"because","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 6:06:00 PM","asOfDateEthnicity":"Jun 13, 2024, 6:06:00 PM","asOfDateGeneral":"Jun 13, 2024, 6:06:00 PM","asOfDateMorbidity":"Jun 13, 2024, 6:06:00 PM","asOfDateSex":"Jun 13, 2024, 6:06:00 PM","birthTime":"Nov 9, 1960, 12:00:00 AM","birthTimeCalc":"Nov 9, 1960, 12:00:00 AM","cd":"PAT","cdDescTxt":"Observation Subject","currSexCd":"F","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"mothersMaidenNm":"MOTHER PATERSON","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","firstNm":"FIRSTMAX251","lastNm":"Kertzmann","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","firstNm":"FIRSTMAX251","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"lastNm":"Kertzmann","nmUseCd":"L","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[{"personUid":-2,"raceCd":"W","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","raceCategoryCd":"W","raceDescTxt":"WHITE","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","cd":"H","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"H","entityUid":-2,"thePostalLocatorDto":{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"cityDescTxt":"SOMECITY","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 6:06:00 PM","stateCd":"23","streetAddr1":"5000 Staples Dr","streetAddr2":"APT100","zipCd":"30342","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[{"entityUid":-2,"entityIdSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"OID","assigningAuthorityDescTxt":"LABC","lastChgUserId":36,"recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 6:06:00 PM","rootExtensionTxt":"05540205114","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","typeCd":"PN","assigningAuthorityIdType":"ISO","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"entityUid":-2,"entityIdSeq":2,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"OID","assigningAuthorityDescTxt":"AssignAuth","lastChgUserId":36,"recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 6:06:00 PM","rootExtensionTxt":"17485458372","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","typeCd":"PI","assigningAuthorityIdType":"ISO","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":-5,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 6:06:00 PM","asOfDateEthnicity":"Jun 13, 2024, 6:06:00 PM","asOfDateGeneral":"Jun 13, 2024, 6:06:00 PM","asOfDateMorbidity":"Jun 13, 2024, 6:06:00 PM","asOfDateSex":"Jun 13, 2024, 6:06:00 PM","cd":"PAT","cdDescTxt":"Observation Participant","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","firstNm":"FIRSTNOK1","lastNm":"TESTNOK114B","middleNm":"X","nmPrefix":"DR","nmSuffix":"JR","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","firstNm":"FIRSTNOK1","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"lastNm":"TESTNOK114B","middleNm":"X","nmPrefix":"DR","nmSuffix":"JR","nmUseCd":"L","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","cd":"H","cdDescTxt":"House","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"EC","entityUid":-5,"thePostalLocatorDto":{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"cityDescTxt":"COLUMBIA","cntryCd":"840","cntyCd":"RICHLAND","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 6:06:00 PM","stateCd":"45","streetAddr1":"12 MAIN STREET","streetAddr2":"SUITE 16","zipCd":"30329","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","cd":"PH","cdDescTxt":"PHONE","classCd":"TELE","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"H","entityUid":-5,"theTeleLocatorDto":{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"extensionTxt":"123","phoneNbrTxt":"803-555-1212","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"NOK","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":-8,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 6:06:00 PM","asOfDateEthnicity":"Jun 13, 2024, 6:06:00 PM","asOfDateGeneral":"Jun 13, 2024, 6:06:00 PM","asOfDateMorbidity":"Jun 13, 2024, 6:06:00 PM","asOfDateSex":"Jun 13, 2024, 6:06:00 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"firstNm":"SUSAN","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"lastNm":"JONES","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":-7,"entityIdSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"342384","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":-12,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 6:06:00 PM","asOfDateEthnicity":"Jun 13, 2024, 6:06:00 PM","asOfDateGeneral":"Jun 13, 2024, 6:06:00 PM","asOfDateMorbidity":"Jun 13, 2024, 6:06:00 PM","asOfDateSex":"Jun 13, 2024, 6:06:00 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"firstNm":"GERRY","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"lastNm":"BRENTNALL","middleNm":"LEE","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"SR","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"cd":"O","cdDescTxt":"Office","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","thePostalLocatorDto":{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"cityDescTxt":"SYLACAUGA","cntryCd":"840","cntyCd":"RICHLAND","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 6:06:00 PM","stateCd":"01","streetAddr1":"380 WEST HILL ST.","streetAddr2":" ","zipCd":"35150","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","cd":"PH","cdDescTxt":"PHONE","classCd":"TELE","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-12,"theTeleLocatorDto":{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"extensionTxt":"null","phoneNbrTxt":"256-249-5780","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[{"entityUid":-11,"entityIdSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"46466","statusCd":"A","typeCd":"PRN","typeDescTxt":"Provider Registration Number","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"OP","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":-13,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 6:06:00 PM","asOfDateEthnicity":"Jun 13, 2024, 6:06:00 PM","asOfDateGeneral":"Jun 13, 2024, 6:06:00 PM","asOfDateMorbidity":"Jun 13, 2024, 6:06:00 PM","asOfDateSex":"Jun 13, 2024, 6:06:00 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","firstNm":"TOM","lastNm":"JONES","nmPrefix":"DR","nmSuffix":"JR","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","firstNm":"TOM","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"lastNm":"JONES","middleNm":"L","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"JR","nmUseCd":"L","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":-14,"entityIdSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"22582","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":-15,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 6:06:00 PM","asOfDateEthnicity":"Jun 13, 2024, 6:06:00 PM","asOfDateGeneral":"Jun 13, 2024, 6:06:00 PM","asOfDateMorbidity":"Jun 13, 2024, 6:06:00 PM","asOfDateSex":"Jun 13, 2024, 6:06:00 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","firstNm":"THOMAS","lastNm":"MOORE","nmPrefix":"DR","nmSuffix":"III","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","firstNm":"THOMAS","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"lastNm":"MOORE","middleNm":"E","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"III","nmUseCd":"L","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":-16,"entityIdSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"22582","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":-17,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 6:06:00 PM","asOfDateEthnicity":"Jun 13, 2024, 6:06:00 PM","asOfDateGeneral":"Jun 13, 2024, 6:06:00 PM","asOfDateMorbidity":"Jun 13, 2024, 6:06:00 PM","asOfDateSex":"Jun 13, 2024, 6:06:00 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","firstNm":"SAM","lastNm":"JONES","nmPrefix":"MR","nmSuffix":"JR","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","firstNm":"SAM","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"lastNm":"JONES","middleNm":"A","nmDegree":"MT","nmPrefix":"MR","nmSuffix":"JR","nmUseCd":"L","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":-18,"entityIdSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"44","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":-19,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 6:06:00 PM","asOfDateEthnicity":"Jun 13, 2024, 6:06:00 PM","asOfDateGeneral":"Jun 13, 2024, 6:06:00 PM","asOfDateMorbidity":"Jun 13, 2024, 6:06:00 PM","asOfDateSex":"Jun 13, 2024, 6:06:00 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","firstNm":"THOMASINA","lastNm":"JONES","nmPrefix":"MS","nmSuffix":"II","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 6:06:00 PM","firstNm":"THOMASINA","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"lastNm":"JONES","middleNm":"LEE ANN","nmDegree":"RA","nmPrefix":"MS","nmSuffix":"II","nmUseCd":"L","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":-20,"entityIdSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"82","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":-22,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 6:06:00 PM","asOfDateEthnicity":"Jun 13, 2024, 6:06:00 PM","asOfDateGeneral":"Jun 13, 2024, 6:06:00 PM","asOfDateMorbidity":"Jun 13, 2024, 6:06:00 PM","asOfDateSex":"Jun 13, 2024, 6:06:00 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"firstNm":"GERRY","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"lastNm":"MATHIS","middleNm":"LEE","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"SR","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":-21,"entityIdSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"46214","statusCd":"A","typeCd":"PRN","typeDescTxt":"Provider Registration Number","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":-24,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 6:06:00 PM","asOfDateEthnicity":"Jun 13, 2024, 6:06:00 PM","asOfDateGeneral":"Jun 13, 2024, 6:06:00 PM","asOfDateMorbidity":"Jun 13, 2024, 6:06:00 PM","asOfDateSex":"Jun 13, 2024, 6:06:00 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"firstNm":"THOMAS","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"lastNm":"JONES","middleNm":"LEE","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"III","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":-23,"entityIdSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"44582","statusCd":"A","typeCd":"PRN","typeDescTxt":"Provider Registration Number","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":-26,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 6:06:00 PM","asOfDateEthnicity":"Jun 13, 2024, 6:06:00 PM","asOfDateGeneral":"Jun 13, 2024, 6:06:00 PM","asOfDateMorbidity":"Jun 13, 2024, 6:06:00 PM","asOfDateSex":"Jun 13, 2024, 6:06:00 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 6:06:00 PM","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"firstNm":"JERRY","lastChgTime":"Jun 13, 2024, 6:06:00 PM","lastChgUserId":36,"lastNm":"MARTIN","middleNm":"L","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"JR","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":-25,"entityIdSeq":1,"addTime":"Jun 13, 2024, 6:06:00 PM","asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"46111","statusCd":"A","typeCd":"PRN","typeDescTxt":"Provider Registration Number","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[{"addReasonCd":"because","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 6:06:00 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"AUT","typeDescTxt":"Author","subjectEntityUid":-4,"cd":"SF","actClassCd":"OBS","subjectClassCd":"ORG","actUid":-1,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"PATSBJ","typeDescTxt":"Patient Subject","subjectEntityUid":-2,"cd":"PAT","actClassCd":"OBS","subjectClassCd":"PSN","actUid":-1,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 6:06:00 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ORD","typeDescTxt":"Orderer","subjectEntityUid":-6,"cd":"OP","actClassCd":"OBS","subjectClassCd":"ORG","actUid":-1,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 6:06:00 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"SPC","typeDescTxt":"Specimen","subjectEntityUid":-9,"cd":"NI","actClassCd":"OBS","subjectClassCd":"MAT","actUid":-1,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 6:06:00 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ORD","typeDescTxt":"Orderer","subjectEntityUid":-12,"cd":"OP","actClassCd":"OBS","subjectClassCd":"PSN","actUid":-1,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 6:06:00 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"VRF","typeDescTxt":"Verifier","subjectEntityUid":-13,"cd":"LABP","actClassCd":"OBS","subjectClassCd":"PSN","actUid":-1,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 6:06:00 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ASS","typeDescTxt":"Assistant","subjectEntityUid":-15,"cd":"ASS","actClassCd":"OBS","subjectClassCd":"PSN","actUid":-1,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 6:06:00 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"PRF","typeDescTxt":"Performer","subjectEntityUid":-17,"cd":"LABP","actClassCd":"OBS","subjectClassCd":"PSN","actUid":-1,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 6:06:00 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ENT","typeDescTxt":"Enterer","subjectEntityUid":-19,"cd":"ENT","actClassCd":"OBS","subjectClassCd":"PSN","actUid":-1,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"PRF","typeDescTxt":"Performer","subjectEntityUid":-28,"cd":"RE","actClassCd":"OBS","subjectClassCd":"ORG","actUid":-27,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theActRelationshipDtoCollection":[{"addTime":"Jun 13, 2024, 6:06:00 PM","lastChgTime":"Jun 13, 2024, 6:06:00 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 6:06:00 PM","sequenceNbr":1,"statusCd":"A","sourceActUid":-27,"typeDescTxt":"Has Component","targetActUid":-1,"sourceClassCd":"OBS","targetClassCd":"OBS","typeCd":"COMP","isShareInd":false,"isNNDInd":false,"isExportInd":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theOrganizationContainerCollection":[{"theOrganizationDto":{"organizationUid":-4,"cd":"LAB","cdDescTxt":"Laboratory","standardIndustryClassCd":"CLIA","standardIndustryDescTxt":"LABCORP","displayNm":"LABCORP","electronicInd":"Y","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"theOrganizationNameDtoCollection":[{"organizationUid":-4,"organizationNameSeq":1,"nmTxt":"LABCORP","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityIdSeq":1,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20D0649525","statusCd":"A","typeCd":"FI","typeDescTxt":"Facility Identifier","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"role":"SF","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"theOrganizationDto":{"organizationUid":-6,"addUserId":36,"cd":"OTH","cdDescTxt":"Other","standardIndustryClassCd":"621399","standardIndustryDescTxt":"Offices of Misc. Health Providers","displayNm":"COOSA VALLEY MEDICAL CENTER","electronicInd":"Y","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"theOrganizationNameDtoCollection":[{"organizationNameSeq":0,"nmTxt":"COOSA VALLEY MEDICAL CENTER","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"cd":"O","cdDescTxt":"Office","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-6,"thePostalLocatorDto":{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"cityDescTxt":"SYLACAUGA","cntryCd":"840","cntyCd":"RICHLAND","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 6:06:00 PM","stateCd":"01","streetAddr1":"315 WEST HICKORY ST.","streetAddr2":"SUITE 100","zipCd":"35150","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"cd":"PH","cdDescTxt":"PHONE","classCd":"TELE","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-6,"theTeleLocatorDto":{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"extensionTxt":"123","phoneNbrTxt":"256-249-5780","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[],"role":"OP","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"theOrganizationDto":{"organizationUid":-28,"addUserId":36,"cd":"LAB","cdDescTxt":"Laboratory","standardIndustryClassCd":"621511","standardIndustryDescTxt":"Medical Laboratory","displayNm":"Lab1","electronicInd":"Y","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"theOrganizationNameDtoCollection":[{"organizationNameSeq":1,"nmTxt":"Lab1","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"cd":"O","cdDescTxt":"Office","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-28,"thePostalLocatorDto":{"addTime":"Jun 13, 2024, 6:06:00 PM","addUserId":36,"cityDescTxt":"Blue Ash","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 6:06:00 PM","stateCd":"39","streetAddr1":"1234 Cornell Park Dr","streetAddr2":" ","zipCd":"45241","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[{"entityUid":-28,"entityIdSeq":1,"asOfDate":"Jun 13, 2024, 6:06:00 PM","assigningAuthorityCd":"2.16.840.1.114222.4.3.2.5.2.100","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"1234","statusCd":"A","typeCd":"FI","typeDescTxt":"Facility Identifier","assigningAuthorityIdType":"ISO","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"isOOSystemInd":false,"isOOSystemPendInd":false,"associatedNotificationsInd":false,"isUnsavedNote":false,"isMergeCase":false,"isRenterant":false,"isConversionHasModified":false,"messageLogDTMap":{},"itNew":false,"itOld":false,"itDirty":false,"itDelete":false} \ No newline at end of file +{ + "associatedNotificationInd": false, + "associatedInvInd": false, + "theObservationContainerCollection": [ + { + "theObservationDto": { + "observationUid": -1, + "activityToTime": "Apr 4, 2006, 1:39:00 AM", + "altCd": "080186", + "altCdDescTxt": "CULTURE", + "altCdSystemCd": "L", + "altCdSystemDescTxt": "LOCAL", + "cd": "100-9", + "cdDescTxt": "ORGANISM COUNT", + "cdSystemCd": "LN", + "cdSystemDescTxt": "LOINC", + "ctrlCdDisplayForm": "LabReport", + "effectiveFromTime": "Mar 24, 2006, 4:55:00 PM", + "effectiveToTime": "Mar 24, 2006, 4:55:00 PM", + "electronicInd": "Y", + "obsDomainCd": "LabReport", + "obsDomainCdSt1": "Order", + "rptToStateTime": "Jun 13, 2024, 6:06:00 PM", + "statusCd": "D", + "targetSiteCd": "LA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theActIdDtoCollection": [ + { + "actUid": -1, + "actIdSeq": 1, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120509010020114_251.2", + "typeCd": "MCID", + "typeDescTxt": "Message Control ID", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "actUid": -1, + "actIdSeq": 2, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120601114", + "typeCd": "FN", + "typeDescTxt": "Filler Number", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theObservationReasonDtoCollection": [ + { + "reasonCd": "12365-4", + "reasonDescTxt": "TOTALLY CRAZY", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "theObservationDto": { + "observationUid": -27, + "activityToTime": "Apr 1, 2006, 12:00:00 AM", + "altCd": "080133", + "altCdSystemCd": "L", + "altCdSystemDescTxt": "LOCAL", + "cd": "77190-7", + "cdDescTxt": "TITER", + "cdSystemCd": "LN", + "cdSystemDescTxt": "LOINC", + "ctrlCdDisplayForm": "LabReport", + "electronicInd": "Y", + "methodCd": "", + "methodDescTxt": "", + "obsDomainCdSt1": "Result", + "statusCd": "D", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theActIdDtoCollection": [ + { + "actUid": -27, + "actIdSeq": 1, + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120509010020114_251.2", + "typeCd": "MCID", + "typeDescTxt": "Message Control ID", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "actUid": -27, + "actIdSeq": 2, + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120601114", + "typeCd": "FN", + "typeDescTxt": "Filler Number", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theObsValueNumericDtoCollection": [ + { + "observationUid": -27, + "obsValueNumericSeq": 1, + "lowRange": "10-100", + "comparatorCd1": "100", + "numericValue1": 1, + "numericValue2": 1, + "numericUnitCd": "mL", + "separatorCd": ":", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theMaterialContainerCollection": [ + { + "theMaterialDto": { + "materialUid": -9, + "description": "SOURCE NOT SPECIFIED", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theEntityIdDtoCollection": [ + { + "entityUid": -10, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "56789", + "typeCd": "SPC", + "typeDescTxt": "Specimen", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theRoleDtoCollection": [ + { + "roleSeq": 1, + "cd": "SF", + "cdDescTxt": "Sending Facility", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "subjectEntityUid": -4, + "subjectClassCd": "HCFAC", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "addUserId": 36, + "cd": "PAT", + "cdDescTxt": "PATIENT", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "subjectEntityUid": -2, + "subjectClassCd": "PATIENT", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "addUserId": 36, + "cd": "FTH", + "cdDescTxt": "Next of Kin", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "PAT", + "statusCd": "A", + "scopingEntityUid": -2, + "scopingRoleSeq": 1, + "subjectEntityUid": -5, + "scopingClassCd": "PAT", + "subjectClassCd": "CON", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "addUserId": 36, + "cd": "OP", + "cdDescTxt": "Order Provider", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "subjectEntityUid": -6, + "scopingClassCd": "HCFAC", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "cd": "SPP", + "cdDescTxt": "Specimen Procurer", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "PAT", + "statusCd": "A", + "scopingEntityUid": -2, + "scopingRoleSeq": 1, + "subjectEntityUid": -8, + "scopingClassCd": "PAT", + "subjectClassCd": "PROV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "cd": "NI", + "cdDescTxt": "No Information Given", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "PATIENT", + "statusCd": "A", + "scopingEntityUid": -2, + "scopingRoleSeq": 1, + "subjectEntityUid": -9, + "scopingClassCd": "PATIENT", + "subjectClassCd": "MAT", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 2, + "cd": "NI", + "cdDescTxt": "No Information Given", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "SPP", + "statusCd": "A", + "scopingEntityUid": -8, + "scopingRoleSeq": 1, + "subjectEntityUid": -9, + "scopingClassCd": "PRV", + "subjectClassCd": "MAT", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "addUserId": 36, + "cd": "OP", + "cdDescTxt": "Order Provider", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "PAT", + "statusCd": "A", + "scopingEntityUid": -2, + "scopingRoleSeq": 1, + "subjectEntityUid": -12, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "addUserId": 36, + "cd": "LABP", + "cdDescTxt": "Laboratory Provider", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "PAT", + "statusCd": "A", + "scopingEntityUid": -2, + "scopingRoleSeq": 1, + "subjectEntityUid": -13, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "addUserId": 36, + "cd": "LABP", + "cdDescTxt": "Laboratory Provider", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "PAT", + "statusCd": "A", + "scopingEntityUid": -2, + "scopingRoleSeq": 1, + "subjectEntityUid": -15, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "addUserId": 36, + "cd": "LABP", + "cdDescTxt": "Laboratory Provider", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "PAT", + "statusCd": "A", + "scopingEntityUid": -2, + "scopingRoleSeq": 1, + "subjectEntityUid": -17, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "addUserId": 36, + "cd": "LABP", + "cdDescTxt": "Laboratory Provider", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "PAT", + "statusCd": "A", + "scopingEntityUid": -2, + "scopingRoleSeq": 1, + "subjectEntityUid": -19, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "addUserId": 36, + "cd": "CT", + "cdDescTxt": "Copy To", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "PAT", + "statusCd": "A", + "scopingEntityUid": -2, + "scopingRoleSeq": 1, + "subjectEntityUid": -22, + "scopingClassCd": "PAT", + "subjectClassCd": "PROV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "addUserId": 36, + "cd": "CT", + "cdDescTxt": "Copy To", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "PAT", + "statusCd": "A", + "scopingEntityUid": -2, + "scopingRoleSeq": 1, + "subjectEntityUid": -24, + "scopingClassCd": "PAT", + "subjectClassCd": "PROV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "addUserId": 36, + "cd": "CT", + "cdDescTxt": "Copy To", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "PAT", + "statusCd": "A", + "scopingEntityUid": -2, + "scopingRoleSeq": 1, + "subjectEntityUid": -26, + "scopingClassCd": "PAT", + "subjectClassCd": "PROV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "addUserId": 36, + "cd": "RE", + "cdDescTxt": "Reporting Entity", + "recordStatusCd": "ACTIVE", + "scopingRoleCd": "PAT", + "statusCd": "A", + "scopingEntityUid": -2, + "subjectEntityUid": -28, + "scopingClassCd": "PAT", + "subjectClassCd": "HCFAC", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "eDXDocumentCollection": [ + { + "payload": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\" standalone\u003d\"yes\"?\u003e\n\u003cContainer xmlns\u003d\"http://www.cdc.gov/NEDSS\"\u003e\n \u003cHL7LabReport\u003e\n \u003cHL7MSH\u003e\n \u003cFieldSeparator\u003e|\u003c/FieldSeparator\u003e\n \u003cEncodingCharacters\u003e^~\\\u0026amp;\u003c/EncodingCharacters\u003e\n \u003cSendingApplication\u003e\n \u003cHL7NamespaceID\u003eLABCORP-CORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/SendingApplication\u003e\n \u003cSendingFacility\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/SendingFacility\u003e\n \u003cReceivingApplication\u003e\n \u003cHL7NamespaceID\u003eALDOH\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingApplication\u003e\n \u003cReceivingFacility\u003e\n \u003cHL7NamespaceID\u003eAL\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingFacility\u003e\n \u003cDateTimeOfMessage\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfMessage\u003e\n \u003cSecurity\u003e\u003c/Security\u003e\n \u003cMessageType\u003e\n \u003cMessageCode\u003eORU\u003c/MessageCode\u003e\n \u003cTriggerEvent\u003eR01\u003c/TriggerEvent\u003e\n \u003cMessageStructure\u003eORU_R01\u003c/MessageStructure\u003e\n \u003c/MessageType\u003e\n \u003cMessageControlID\u003e20120509010020114_251.2\u003c/MessageControlID\u003e\n \u003cProcessingID\u003e\n \u003cHL7ProcessingID\u003eD\u003c/HL7ProcessingID\u003e\n \u003cHL7ProcessingMode\u003e\u003c/HL7ProcessingMode\u003e\n \u003c/ProcessingID\u003e\n \u003cVersionID\u003e\n \u003cHL7VersionID\u003e2.5.1\u003c/HL7VersionID\u003e\n \u003c/VersionID\u003e\n \u003cAcceptAcknowledgmentType\u003eNE\u003c/AcceptAcknowledgmentType\u003e\n \u003cApplicationAcknowledgmentType\u003eNE\u003c/ApplicationAcknowledgmentType\u003e\n \u003cCountryCode\u003eUSA\u003c/CountryCode\u003e\n \u003cMessageProfileIdentifier\u003e\n \u003cHL7EntityIdentifier\u003eV251_IG_LB_LABRPTPH_R1_INFORM_2010FEB\u003c/HL7EntityIdentifier\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.5\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/MessageProfileIdentifier\u003e\n \u003c/HL7MSH\u003e\n \u003cHL7SoftwareSegment\u003e\n \u003cSoftwareVendorOrganization\u003e\n \u003cHL7OrganizationName\u003eMirth Corp.\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/SoftwareVendorOrganization\u003e\n \u003cSoftwareCertifiedVersionOrReleaseNumber\u003e2.0\u003c/SoftwareCertifiedVersionOrReleaseNumber\u003e\n \u003cSoftwareProductName\u003eMirth Connect\u003c/SoftwareProductName\u003e\n \u003cSoftwareBinaryID\u003e789654\u003c/SoftwareBinaryID\u003e\n \u003cSoftwareProductInformation/\u003e\n \u003cSoftwareInstallDate\u003e\n \u003cyear\u003e2011\u003c/year\u003e\n \u003cmonth\u003e1\u003c/month\u003e\n \u003cday\u003e1\u003c/day\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SoftwareInstallDate\u003e\n \u003c/HL7SoftwareSegment\u003e\n \u003cHL7PATIENT_RESULT\u003e\n \u003cPATIENT\u003e\n \u003cPatientIdentification\u003e\n \u003cSetIDPID\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDPID\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e05540205114\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eLABC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePN\u003c/HL7IdentifierTypeCode\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e17485458372\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eAssignAuth\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePI\u003c/HL7IdentifierTypeCode\u003e\n \u003cHL7AssigningFacility\u003e\n \u003cHL7NamespaceID\u003eNE CLINIC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e24D1040593\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningFacility\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eKertzmann\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTMAX251\u003c/HL7GivenName\u003e\n \u003c/PatientName\u003e\n \u003cMothersMaidenName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMOTHER\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003ePATERSON\u003c/HL7GivenName\u003e\n \u003c/MothersMaidenName\u003e\n \u003cDateTimeOfBirth\u003e\n \u003cyear\u003e1960\u003c/year\u003e\n \u003cmonth\u003e11\u003c/month\u003e\n \u003cday\u003e9\u003c/day\u003e\n \u003chours\u003e20\u003c/hours\u003e\n \u003cminutes\u003e25\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfBirth\u003e\n \u003cAdministrativeSex\u003eF\u003c/AdministrativeSex\u003e\n \u003cRace\u003e\n \u003cHL7Identifier\u003eW\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eWHITE\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eHL70005\u003c/HL7NameofCodingSystem\u003e\n \u003c/Race\u003e\n \u003cPatientAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e5000 Staples Dr\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eAPT100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSOMECITY\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eME\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30342\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7AddressType\u003eH\u003c/HL7AddressType\u003e\n \u003c/PatientAddress\u003e\n \u003cBirthOrder/\u003e\n \u003c/PatientIdentification\u003e\n \u003cNextofKinAssociatedParties\u003e\n \u003cSetIDNK1\u003e1\u003c/SetIDNK1\u003e\n \u003cName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eTESTNOK114B\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTNOK1\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eX\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/Name\u003e\n \u003cRelationship\u003e\n \u003cHL7Identifier\u003eFTH\u003c/HL7Identifier\u003e\n \u003c/Relationship\u003e\n \u003cAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e12 MAIN STREET\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 16\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eCOLUMBIA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eSC\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30329\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/Address\u003e\n \u003cPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e803\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e5551212\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/PhoneNumber\u003e\n \u003c/NextofKinAssociatedParties\u003e\n \u003c/PATIENT\u003e\n \u003cORDER_OBSERVATION\u003e\n \u003cCommonOrder\u003e\n \u003cOrderControl\u003eRE\u003c/OrderControl\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cOrderingFacilityName\u003e\n \u003cHL7OrganizationName\u003eCOOSA VALLEY MEDICAL CENTER\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/OrderingFacilityName\u003e\n \u003cOrderingFacilityAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e315 WEST HICKORY ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingFacilityAddress\u003e\n \u003cOrderingFacilityPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/OrderingFacilityPhoneNumber\u003e\n \u003cOrderingProviderAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e380 WEST HILL ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingProviderAddress\u003e\n \u003c/CommonOrder\u003e\n \u003cObservationRequest\u003e\n \u003cSetIDOBR\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBR\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cUniversalServiceIdentifier\u003e\n \u003cHL7Identifier\u003e100-9\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eORGANISM COUNT\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n \u003cHL7AlternateIdentifier\u003e080186\u003c/HL7AlternateIdentifier\u003e\n \u003cHL7AlternateText\u003eCULTURE\u003c/HL7AlternateText\u003e\n \u003c/UniversalServiceIdentifier\u003e\n \u003cObservationDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationDateTime\u003e\n \u003cObservationEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationEndDateTime\u003e\n \u003cCollectorIdentifier\u003e\n \u003cHL7IDNumber\u003e342384\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSUSAN\u003c/HL7GivenName\u003e\n \u003c/CollectorIdentifier\u003e\n \u003cOrderingProvider\u003e\n \u003cHL7IDNumber\u003e46466\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eBRENTNALL\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/OrderingProvider\u003e\n \u003cOrderCallbackPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension/\u003e\n \u003c/OrderCallbackPhoneNumber\u003e\n \u003cResultsRptStatusChngDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cminutes\u003e39\u003c/minutes\u003e\n \u003cseconds\u003e0\u003c/seconds\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ResultsRptStatusChngDateTime\u003e\n \u003cResultStatus\u003eF\u003c/ResultStatus\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46214\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMATHIS\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e44582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46111\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMARTIN\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eJERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cReasonforStudy\u003e\n \u003cHL7Identifier\u003e12365-4\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eTOTALLY CRAZY\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eI9\u003c/HL7NameofCodingSystem\u003e\n \u003c/ReasonforStudy\u003e\n \u003cPrincipalResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTOM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/PrincipalResultInterpreter\u003e\n \u003cAssistantResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eMOORE\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/AssistantResultInterpreter\u003e\n \u003cTechnician\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e44\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSAM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eA\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMT\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Technician\u003e\n \u003cTranscriptionist\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e82\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMASINA\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE ANN\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMS\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eRA\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Transcriptionist\u003e\n \u003cNumberofSampleContainers/\u003e\n \u003c/ObservationRequest\u003e\n \u003cPatientResultOrderObservation\u003e\n \u003cOBSERVATION\u003e\n \u003cObservationResult\u003e\n \u003cSetIDOBX\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBX\u003e\n \u003cValueType\u003eSN\u003c/ValueType\u003e\n \u003cObservationIdentifier\u003e\n\u003cHL7Identifier\u003e77190-7\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eTITER\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n\u003cHL7AlternateIdentifier\u003e080133\u003c/HL7AlternateIdentifier\u003e\n \u003c/ObservationIdentifier\u003e\n \u003cObservationSubID\u003e1\u003c/ObservationSubID\u003e\n \u003cObservationValue\u003e100^1^:^1\u003c/ObservationValue\u003e\n \u003cUnits\u003e\n\u003cHL7Identifier\u003emL\u003c/HL7Identifier\u003e\n \u003c/Units\u003e\n \u003cReferencesRange\u003e10-100\u003c/ReferencesRange\u003e\n \u003cProbability/\u003e\n \u003cObservationResultStatus\u003eF\u003c/ObservationResultStatus\u003e\n \u003cProducersReference\u003e\n\u003cHL7Identifier\u003e20D0649525\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eLABCORP BIRMINGHAM\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eCLIA\u003c/HL7NameofCodingSystem\u003e\n \u003c/ProducersReference\u003e\n \u003cDateTimeOftheAnalysis\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e4\u003c/month\u003e\n\u003cday\u003e1\u003c/day\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOftheAnalysis\u003e\n \u003cPerformingOrganizationName\u003e\n\u003cHL7OrganizationName\u003eLab1\u003c/HL7OrganizationName\u003e\n\u003cHL7OrganizationNameTypeCode\u003eL\u003c/HL7OrganizationNameTypeCode\u003e\n\u003cHL7IDNumber/\u003e\n\u003cHL7CheckDigit/\u003e\n\u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eCLIA\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.100\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n\u003c/HL7AssigningAuthority\u003e\n\u003cHL7OrganizationIdentifier\u003e1234\u003c/HL7OrganizationIdentifier\u003e\n \u003c/PerformingOrganizationName\u003e\n \u003cPerformingOrganizationAddress\u003e\n\u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e1234 Cornell Park Dr\u003c/HL7StreetOrMailingAddress\u003e\n\u003c/HL7StreetAddress\u003e\n\u003cHL7City\u003eBlue Ash\u003c/HL7City\u003e\n\u003cHL7StateOrProvince\u003eOH\u003c/HL7StateOrProvince\u003e\n\u003cHL7ZipOrPostalCode\u003e45241\u003c/HL7ZipOrPostalCode\u003e\n \u003c/PerformingOrganizationAddress\u003e\n \u003cPerformingOrganizationMedicalDirector\u003e\n\u003cHL7IDNumber\u003e9876543\u003c/HL7IDNumber\u003e\n\u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n\u003c/HL7FamilyName\u003e\n\u003cHL7GivenName\u003eBOB\u003c/HL7GivenName\u003e\n\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eF\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n\u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/PerformingOrganizationMedicalDirector\u003e\n \u003c/ObservationResult\u003e\n \u003c/OBSERVATION\u003e\n \u003c/PatientResultOrderObservation\u003e\n \u003cPatientResultOrderSPMObservation\u003e\n \u003cSPECIMEN\u003e\n \u003cSPECIMEN\u003e\n \u003cSetIDSPM\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDSPM\u003e\n \u003cSpecimenID\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e56789\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenID\u003e\n \u003cSpecimenParentIDs\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenParentIDs\u003e\n \u003cSpecimenType\u003e\n\u003cHL7AlternateIdentifier\u003eBLD\u003c/HL7AlternateIdentifier\u003e\n\u003cHL7AlternateText\u003eBLOOD\u003c/HL7AlternateText\u003e\n\u003cHL7NameofAlternateCodingSystem\u003eL\u003c/HL7NameofAlternateCodingSystem\u003e\n \u003c/SpecimenType\u003e\n \u003cSpecimenSourceSite\u003e\n\u003cHL7Identifier\u003eLA\u003c/HL7Identifier\u003e\n\u003cHL7NameofCodingSystem\u003eHL70070\u003c/HL7NameofCodingSystem\u003e\n \u003c/SpecimenSourceSite\u003e\n \u003cGroupedSpecimenCount/\u003e\n \u003cSpecimenDescription\u003eSOURCE NOT SPECIFIED\u003c/SpecimenDescription\u003e\n \u003cSpecimenCollectionDateTime\u003e\n\u003cHL7RangeStartDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeStartDateTime\u003e\n\u003cHL7RangeEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeEndDateTime\u003e\n \u003c/SpecimenCollectionDateTime\u003e\n \u003cSpecimenReceivedDateTime\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e3\u003c/month\u003e\n\u003cday\u003e25\u003c/day\u003e\n\u003chours\u003e1\u003c/hours\u003e\n\u003cminutes\u003e37\u003c/minutes\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SpecimenReceivedDateTime\u003e\n \u003cNumberOfSpecimenContainers/\u003e\n \u003c/SPECIMEN\u003e\n \u003c/SPECIMEN\u003e\n \u003c/PatientResultOrderSPMObservation\u003e\n \u003c/ORDER_OBSERVATION\u003e\n \u003c/HL7PATIENT_RESULT\u003e\n \u003c/HL7LabReport\u003e\n\u003c/Container\u003e\n\n\u003c!-- raw_message_id \u003d DBE3D8BD-35F0-41D4-A8C2-1EF1F1A9B8DE --\u003e", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 6:06:00 PM", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "docTypeCd": "11648804", + "nbsDocumentMetadataUid": 1005, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "manualLab": false, + "pageProxyTypeCd": "", + "isSTDProgramArea": false, + "thePersonContainerCollection": [ + { + "thePersonDto": { + "personUid": -2, + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 6:06:00 PM", + "asOfDateEthnicity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateGeneral": "Jun 13, 2024, 6:06:00 PM", + "asOfDateMorbidity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateSex": "Jun 13, 2024, 6:06:00 PM", + "birthTime": "Nov 9, 1960, 12:00:00 AM", + "birthTimeCalc": "Nov 9, 1960, 12:00:00 AM", + "cd": "PAT", + "cdDescTxt": "Observation Subject", + "currSexCd": "F", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "mothersMaidenNm": "MOTHER PATERSON", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "firstNm": "FIRSTMAX251", + "lastNm": "Kertzmann", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "firstNm": "FIRSTMAX251", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "lastNm": "Kertzmann", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [ + { + "personUid": -2, + "raceCd": "W", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "raceCategoryCd": "W", + "raceDescTxt": "WHITE", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "cd": "H", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "H", + "entityUid": -2, + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "cityDescTxt": "SOMECITY", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 6:06:00 PM", + "stateCd": "23", + "streetAddr1": "5000 Staples Dr", + "streetAddr2": "APT100", + "zipCd": "30342", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [ + { + "entityUid": -2, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "OID", + "assigningAuthorityDescTxt": "LABC", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 6:06:00 PM", + "rootExtensionTxt": "05540205114", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "typeCd": "PN", + "assigningAuthorityIdType": "ISO", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "entityUid": -2, + "entityIdSeq": 2, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "OID", + "assigningAuthorityDescTxt": "AssignAuth", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 6:06:00 PM", + "rootExtensionTxt": "17485458372", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "typeCd": "PI", + "assigningAuthorityIdType": "ISO", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": -5, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 6:06:00 PM", + "asOfDateEthnicity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateGeneral": "Jun 13, 2024, 6:06:00 PM", + "asOfDateMorbidity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateSex": "Jun 13, 2024, 6:06:00 PM", + "cd": "PAT", + "cdDescTxt": "Observation Participant", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "firstNm": "FIRSTNOK1", + "lastNm": "TESTNOK114B", + "middleNm": "X", + "nmPrefix": "DR", + "nmSuffix": "JR", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "firstNm": "FIRSTNOK1", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "lastNm": "TESTNOK114B", + "middleNm": "X", + "nmPrefix": "DR", + "nmSuffix": "JR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "cd": "H", + "cdDescTxt": "House", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "EC", + "entityUid": -5, + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "cityDescTxt": "COLUMBIA", + "cntryCd": "840", + "cntyCd": "RICHLAND", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 6:06:00 PM", + "stateCd": "45", + "streetAddr1": "12 MAIN STREET", + "streetAddr2": "SUITE 16", + "zipCd": "30329", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "cd": "PH", + "cdDescTxt": "PHONE", + "classCd": "TELE", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "H", + "entityUid": -5, + "theTeleLocatorDto": { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "extensionTxt": "123", + "phoneNbrTxt": "803-555-1212", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "NOK", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": -8, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 6:06:00 PM", + "asOfDateEthnicity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateGeneral": "Jun 13, 2024, 6:06:00 PM", + "asOfDateMorbidity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateSex": "Jun 13, 2024, 6:06:00 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "firstNm": "SUSAN", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": -7, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "342384", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": -12, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 6:06:00 PM", + "asOfDateEthnicity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateGeneral": "Jun 13, 2024, 6:06:00 PM", + "asOfDateMorbidity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateSex": "Jun 13, 2024, 6:06:00 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "firstNm": "GERRY", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "lastNm": "BRENTNALL", + "middleNm": "LEE", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "SR", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "cd": "O", + "cdDescTxt": "Office", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "cityDescTxt": "SYLACAUGA", + "cntryCd": "840", + "cntyCd": "RICHLAND", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 6:06:00 PM", + "stateCd": "01", + "streetAddr1": "380 WEST HILL ST.", + "streetAddr2": " ", + "zipCd": "35150", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "cd": "PH", + "cdDescTxt": "PHONE", + "classCd": "TELE", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -12, + "theTeleLocatorDto": { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "extensionTxt": "null", + "phoneNbrTxt": "256-249-5780", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [ + { + "entityUid": -11, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "46466", + "statusCd": "A", + "typeCd": "PRN", + "typeDescTxt": "Provider Registration Number", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "OP", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": -13, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 6:06:00 PM", + "asOfDateEthnicity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateGeneral": "Jun 13, 2024, 6:06:00 PM", + "asOfDateMorbidity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateSex": "Jun 13, 2024, 6:06:00 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "firstNm": "TOM", + "lastNm": "JONES", + "nmPrefix": "DR", + "nmSuffix": "JR", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "firstNm": "TOM", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "middleNm": "L", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "JR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": -14, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "22582", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": -15, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 6:06:00 PM", + "asOfDateEthnicity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateGeneral": "Jun 13, 2024, 6:06:00 PM", + "asOfDateMorbidity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateSex": "Jun 13, 2024, 6:06:00 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "firstNm": "THOMAS", + "lastNm": "MOORE", + "nmPrefix": "DR", + "nmSuffix": "III", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "firstNm": "THOMAS", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "lastNm": "MOORE", + "middleNm": "E", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "III", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": -16, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "22582", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": -17, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 6:06:00 PM", + "asOfDateEthnicity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateGeneral": "Jun 13, 2024, 6:06:00 PM", + "asOfDateMorbidity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateSex": "Jun 13, 2024, 6:06:00 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "firstNm": "SAM", + "lastNm": "JONES", + "nmPrefix": "MR", + "nmSuffix": "JR", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "firstNm": "SAM", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "middleNm": "A", + "nmDegree": "MT", + "nmPrefix": "MR", + "nmSuffix": "JR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": -18, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "44", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": -19, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 6:06:00 PM", + "asOfDateEthnicity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateGeneral": "Jun 13, 2024, 6:06:00 PM", + "asOfDateMorbidity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateSex": "Jun 13, 2024, 6:06:00 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "firstNm": "THOMASINA", + "lastNm": "JONES", + "nmPrefix": "MS", + "nmSuffix": "II", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "firstNm": "THOMASINA", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "middleNm": "LEE ANN", + "nmDegree": "RA", + "nmPrefix": "MS", + "nmSuffix": "II", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": -20, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "82", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": -22, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 6:06:00 PM", + "asOfDateEthnicity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateGeneral": "Jun 13, 2024, 6:06:00 PM", + "asOfDateMorbidity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateSex": "Jun 13, 2024, 6:06:00 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "firstNm": "GERRY", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "lastNm": "MATHIS", + "middleNm": "LEE", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "SR", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": -21, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "46214", + "statusCd": "A", + "typeCd": "PRN", + "typeDescTxt": "Provider Registration Number", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": -24, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 6:06:00 PM", + "asOfDateEthnicity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateGeneral": "Jun 13, 2024, 6:06:00 PM", + "asOfDateMorbidity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateSex": "Jun 13, 2024, 6:06:00 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "firstNm": "THOMAS", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "middleNm": "LEE", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "III", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": -23, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "44582", + "statusCd": "A", + "typeCd": "PRN", + "typeDescTxt": "Provider Registration Number", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": -26, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 6:06:00 PM", + "asOfDateEthnicity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateGeneral": "Jun 13, 2024, 6:06:00 PM", + "asOfDateMorbidity": "Jun 13, 2024, 6:06:00 PM", + "asOfDateSex": "Jun 13, 2024, 6:06:00 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 6:06:00 PM", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "firstNm": "JERRY", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgUserId": 36, + "lastNm": "MARTIN", + "middleNm": "L", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "JR", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": -25, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 6:06:00 PM", + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "46111", + "statusCd": "A", + "typeCd": "PRN", + "typeDescTxt": "Provider Registration Number", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [ + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "AUT", + "typeDescTxt": "Author", + "subjectEntityUid": -4, + "cd": "SF", + "actClassCd": "OBS", + "subjectClassCd": "ORG", + "actUid": -1, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "PATSBJ", + "typeDescTxt": "Patient Subject", + "subjectEntityUid": -2, + "cd": "PAT", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": -1, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ORD", + "typeDescTxt": "Orderer", + "subjectEntityUid": -6, + "cd": "OP", + "actClassCd": "OBS", + "subjectClassCd": "ORG", + "actUid": -1, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "SPC", + "typeDescTxt": "Specimen", + "subjectEntityUid": -9, + "cd": "NI", + "actClassCd": "OBS", + "subjectClassCd": "MAT", + "actUid": -1, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ORD", + "typeDescTxt": "Orderer", + "subjectEntityUid": -12, + "cd": "OP", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": -1, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "VRF", + "typeDescTxt": "Verifier", + "subjectEntityUid": -13, + "cd": "LABP", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": -1, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ASS", + "typeDescTxt": "Assistant", + "subjectEntityUid": -15, + "cd": "ASS", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": -1, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "PRF", + "typeDescTxt": "Performer", + "subjectEntityUid": -17, + "cd": "LABP", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": -1, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ENT", + "typeDescTxt": "Enterer", + "subjectEntityUid": -19, + "cd": "ENT", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": -1, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "PRF", + "typeDescTxt": "Performer", + "subjectEntityUid": -28, + "cd": "RE", + "actClassCd": "OBS", + "subjectClassCd": "ORG", + "actUid": -27, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theActRelationshipDtoCollection": [ + { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "lastChgTime": "Jun 13, 2024, 6:06:00 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 6:06:00 PM", + "sequenceNbr": 1, + "statusCd": "A", + "sourceActUid": -27, + "typeDescTxt": "Has Component", + "targetActUid": -1, + "sourceClassCd": "OBS", + "targetClassCd": "OBS", + "typeCd": "COMP", + "isShareInd": false, + "isNNDInd": false, + "isExportInd": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theOrganizationContainerCollection": [ + { + "theOrganizationDto": { + "organizationUid": -4, + "cd": "LAB", + "cdDescTxt": "Laboratory", + "standardIndustryClassCd": "CLIA", + "standardIndustryDescTxt": "LABCORP", + "displayNm": "LABCORP", + "electronicInd": "Y", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theOrganizationNameDtoCollection": [ + { + "organizationUid": -4, + "organizationNameSeq": 1, + "nmTxt": "LABCORP", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityIdSeq": 1, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20D0649525", + "statusCd": "A", + "typeCd": "FI", + "typeDescTxt": "Facility Identifier", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "role": "SF", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "theOrganizationDto": { + "organizationUid": -6, + "addUserId": 36, + "cd": "OTH", + "cdDescTxt": "Other", + "standardIndustryClassCd": "621399", + "standardIndustryDescTxt": "Offices of Misc. Health Providers", + "displayNm": "COOSA VALLEY MEDICAL CENTER", + "electronicInd": "Y", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theOrganizationNameDtoCollection": [ + { + "organizationNameSeq": 0, + "nmTxt": "COOSA VALLEY MEDICAL CENTER", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "cd": "O", + "cdDescTxt": "Office", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -6, + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "cityDescTxt": "SYLACAUGA", + "cntryCd": "840", + "cntyCd": "RICHLAND", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 6:06:00 PM", + "stateCd": "01", + "streetAddr1": "315 WEST HICKORY ST.", + "streetAddr2": "SUITE 100", + "zipCd": "35150", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "cd": "PH", + "cdDescTxt": "PHONE", + "classCd": "TELE", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -6, + "theTeleLocatorDto": { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "extensionTxt": "123", + "phoneNbrTxt": "256-249-5780", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [], + "role": "OP", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "theOrganizationDto": { + "organizationUid": -28, + "addUserId": 36, + "cd": "LAB", + "cdDescTxt": "Laboratory", + "standardIndustryClassCd": "621511", + "standardIndustryDescTxt": "Medical Laboratory", + "displayNm": "Lab1", + "electronicInd": "Y", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theOrganizationNameDtoCollection": [ + { + "organizationNameSeq": 1, + "nmTxt": "Lab1", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "cd": "O", + "cdDescTxt": "Office", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -28, + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 6:06:00 PM", + "addUserId": 36, + "cityDescTxt": "Blue Ash", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 6:06:00 PM", + "stateCd": "39", + "streetAddr1": "1234 Cornell Park Dr", + "streetAddr2": " ", + "zipCd": "45241", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [ + { + "entityUid": -28, + "entityIdSeq": 1, + "asOfDate": "Jun 13, 2024, 6:06:00 PM", + "assigningAuthorityCd": "2.16.840.1.114222.4.3.2.5.2.100", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "1234", + "statusCd": "A", + "typeCd": "FI", + "typeDescTxt": "Facility Identifier", + "assigningAuthorityIdType": "ISO", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "isOOSystemInd": false, + "isOOSystemPendInd": false, + "associatedNotificationsInd": false, + "isUnsavedNote": false, + "isMergeCase": false, + "isRenterant": false, + "isConversionHasModified": false, + "messageLogDTMap": {}, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false +} \ No newline at end of file diff --git a/data-processing-service/src/test/resources/test_data/phc/phc_investigation_obs.json b/data-processing-service/src/test/resources/test_data/phc/phc_investigation_obs.json index 172cb8273..9c3b2f7c1 100644 --- a/data-processing-service/src/test/resources/test_data/phc/phc_investigation_obs.json +++ b/data-processing-service/src/test/resources/test_data/phc/phc_investigation_obs.json @@ -1 +1,292 @@ -{"theObservationDto":{"observationUid":10006212,"activityToTime":"Apr 4, 2006, 1:39:00 AM","addTime":"Jun 20, 2024, 12:36:12 PM","addUserId":10055282,"altCd":"080186","altCdDescTxt":"CULTURE","altCdSystemCd":"L","altCdSystemDescTxt":"LOCAL","cd":"257-9","cdDescTxt":"ORGANISM COUNT","cdSystemCd":"LN","cdSystemDescTxt":"LOINC","ctrlCdDisplayForm":"LabReport","effectiveFromTime":"Mar 24, 2006, 4:55:00 PM","effectiveToTime":"Mar 24, 2006, 4:55:00 PM","electronicInd":"Y","jurisdictionCd":"130001","lastChgTime":"Jun 20, 2024, 12:36:12 PM","lastChgUserId":10055282,"localId":"OBS10006212GA01","obsDomainCd":"LabReport","obsDomainCdSt1":"Order","progAreaCd":"HEP","recordStatusCd":"UNPROCESSED","recordStatusTime":"Jun 20, 2024, 12:36:12 PM","rptToStateTime":"Jun 20, 2024, 12:36:11 PM","statusCd":"D","targetSiteCd":"LA","programJurisdictionOid":1300100011,"sharedInd":"T","versionCtrlNbr":1,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"theActIdDtoCollection":[{"actUid":10006212,"actIdSeq":1,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120509010020114_251.2","typeCd":"MCID","typeDescTxt":"Message Control ID","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"actUid":10006212,"actIdSeq":2,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120601114","typeCd":"FN","typeDescTxt":"Filler Number","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"theObservationReasonDtoCollection":[{"observationUid":10006212,"reasonCd":"12365-4","reasonDescTxt":"TOTALLY CRAZY","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"theObservationInterpDtoCollection":[],"theObsValueCodedDtoCollection":[],"theObsValueTxtDtoCollection":[],"theObsValueDateDtoCollection":[],"theObsValueNumericDtoCollection":[],"theActivityLocatorParticipationDtoCollection":[],"theParticipationDtoCollection":[{"addReasonCd":"because","addTime":"Jun 20, 2024, 12:36:11 PM","addUserId":36,"lastChgTime":"Jun 20, 2024, 12:36:11 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ASS","typeDescTxt":"Assistant","subjectEntityClassCd":"PSN","subjectEntityUid":10098764,"cd":"ASS","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10006212,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 20, 2024, 12:36:11 PM","addUserId":36,"lastChgTime":"Jun 20, 2024, 12:36:11 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"AUT","typeDescTxt":"Author","subjectEntityClassCd":"ORG","subjectEntityUid":10004700,"cd":"SF","actClassCd":"OBS","subjectClassCd":"ORG","actUid":10006212,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 20, 2024, 12:36:11 PM","addUserId":36,"lastChgTime":"Jun 20, 2024, 12:36:11 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ENT","typeDescTxt":"Enterer","subjectEntityClassCd":"PSN","subjectEntityUid":10098766,"cd":"ENT","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10006212,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 20, 2024, 12:36:11 PM","addUserId":36,"lastChgTime":"Jun 20, 2024, 12:36:11 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ORD","typeDescTxt":"Orderer","subjectEntityClassCd":"ORG","subjectEntityUid":10002002,"cd":"OP","actClassCd":"OBS","subjectClassCd":"ORG","actUid":10006212,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 20, 2024, 12:36:11 PM","addUserId":36,"lastChgTime":"Jun 20, 2024, 12:36:11 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ORD","typeDescTxt":"Orderer","subjectEntityClassCd":"PSN","subjectEntityUid":10091010,"cd":"OP","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10006212,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"addUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"PATSBJ","typeDescTxt":"Patient Subject","subjectEntityClassCd":"PSN","subjectEntityUid":10098755,"cd":"PAT","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10006212,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 20, 2024, 12:36:11 PM","addUserId":36,"lastChgTime":"Jun 20, 2024, 12:36:11 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"PRF","typeDescTxt":"Performer","subjectEntityClassCd":"PSN","subjectEntityUid":10098765,"cd":"LABP","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10006212,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 20, 2024, 12:36:11 PM","addUserId":36,"lastChgTime":"Jun 20, 2024, 12:36:11 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"SPC","typeDescTxt":"Specimen","subjectEntityClassCd":"MAT","subjectEntityUid":10005117,"cd":"NI","actClassCd":"OBS","subjectClassCd":"MAT","actUid":10006212,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 20, 2024, 12:36:11 PM","addUserId":36,"lastChgTime":"Jun 20, 2024, 12:36:11 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"VRF","typeDescTxt":"Verifier","subjectEntityClassCd":"PSN","subjectEntityUid":10098763,"cd":"LABP","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10006212,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"theActRelationshipDtoCollection":[{"addTime":"Jun 20, 2024, 12:36:11 PM","lastChgTime":"Jun 20, 2024, 12:36:11 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 20, 2024, 12:36:11 PM","sequenceNbr":1,"statusCd":"A","sourceActUid":10006213,"typeDescTxt":"Has Component","targetActUid":10006212,"sourceClassCd":"OBS","targetClassCd":"OBS","typeCd":"COMP","isShareInd":false,"isNNDInd":false,"isExportInd":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":false,"itOld":false,"itDirty":false,"itDelete":false} \ No newline at end of file +{ + "theObservationDto": { + "observationUid": 10006212, + "activityToTime": "Apr 4, 2006, 1:39:00 AM", + "addTime": "Jun 20, 2024, 12:36:12 PM", + "addUserId": 10055282, + "altCd": "080186", + "altCdDescTxt": "CULTURE", + "altCdSystemCd": "L", + "altCdSystemDescTxt": "LOCAL", + "cd": "257-9", + "cdDescTxt": "ORGANISM COUNT", + "cdSystemCd": "LN", + "cdSystemDescTxt": "LOINC", + "ctrlCdDisplayForm": "LabReport", + "effectiveFromTime": "Mar 24, 2006, 4:55:00 PM", + "effectiveToTime": "Mar 24, 2006, 4:55:00 PM", + "electronicInd": "Y", + "jurisdictionCd": "130001", + "lastChgTime": "Jun 20, 2024, 12:36:12 PM", + "lastChgUserId": 10055282, + "localId": "OBS10006212GA01", + "obsDomainCd": "LabReport", + "obsDomainCdSt1": "Order", + "progAreaCd": "HEP", + "recordStatusCd": "UNPROCESSED", + "recordStatusTime": "Jun 20, 2024, 12:36:12 PM", + "rptToStateTime": "Jun 20, 2024, 12:36:11 PM", + "statusCd": "D", + "targetSiteCd": "LA", + "programJurisdictionOid": 1300100011, + "sharedInd": "T", + "versionCtrlNbr": 1, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theActIdDtoCollection": [ + { + "actUid": 10006212, + "actIdSeq": 1, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120509010020114_251.2", + "typeCd": "MCID", + "typeDescTxt": "Message Control ID", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "actUid": 10006212, + "actIdSeq": 2, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120601114", + "typeCd": "FN", + "typeDescTxt": "Filler Number", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theObservationReasonDtoCollection": [ + { + "observationUid": 10006212, + "reasonCd": "12365-4", + "reasonDescTxt": "TOTALLY CRAZY", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theObservationInterpDtoCollection": [], + "theObsValueCodedDtoCollection": [], + "theObsValueTxtDtoCollection": [], + "theObsValueDateDtoCollection": [], + "theObsValueNumericDtoCollection": [], + "theActivityLocatorParticipationDtoCollection": [], + "theParticipationDtoCollection": [ + { + "addReasonCd": "because", + "addTime": "Jun 20, 2024, 12:36:11 PM", + "addUserId": 36, + "lastChgTime": "Jun 20, 2024, 12:36:11 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ASS", + "typeDescTxt": "Assistant", + "subjectEntityClassCd": "PSN", + "subjectEntityUid": 10098764, + "cd": "ASS", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10006212, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 20, 2024, 12:36:11 PM", + "addUserId": 36, + "lastChgTime": "Jun 20, 2024, 12:36:11 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "AUT", + "typeDescTxt": "Author", + "subjectEntityClassCd": "ORG", + "subjectEntityUid": 10004700, + "cd": "SF", + "actClassCd": "OBS", + "subjectClassCd": "ORG", + "actUid": 10006212, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 20, 2024, 12:36:11 PM", + "addUserId": 36, + "lastChgTime": "Jun 20, 2024, 12:36:11 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ENT", + "typeDescTxt": "Enterer", + "subjectEntityClassCd": "PSN", + "subjectEntityUid": 10098766, + "cd": "ENT", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10006212, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 20, 2024, 12:36:11 PM", + "addUserId": 36, + "lastChgTime": "Jun 20, 2024, 12:36:11 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ORD", + "typeDescTxt": "Orderer", + "subjectEntityClassCd": "ORG", + "subjectEntityUid": 10002002, + "cd": "OP", + "actClassCd": "OBS", + "subjectClassCd": "ORG", + "actUid": 10006212, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 20, 2024, 12:36:11 PM", + "addUserId": 36, + "lastChgTime": "Jun 20, 2024, 12:36:11 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ORD", + "typeDescTxt": "Orderer", + "subjectEntityClassCd": "PSN", + "subjectEntityUid": 10091010, + "cd": "OP", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10006212, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "PATSBJ", + "typeDescTxt": "Patient Subject", + "subjectEntityClassCd": "PSN", + "subjectEntityUid": 10098755, + "cd": "PAT", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10006212, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 20, 2024, 12:36:11 PM", + "addUserId": 36, + "lastChgTime": "Jun 20, 2024, 12:36:11 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "PRF", + "typeDescTxt": "Performer", + "subjectEntityClassCd": "PSN", + "subjectEntityUid": 10098765, + "cd": "LABP", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10006212, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 20, 2024, 12:36:11 PM", + "addUserId": 36, + "lastChgTime": "Jun 20, 2024, 12:36:11 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "SPC", + "typeDescTxt": "Specimen", + "subjectEntityClassCd": "MAT", + "subjectEntityUid": 10005117, + "cd": "NI", + "actClassCd": "OBS", + "subjectClassCd": "MAT", + "actUid": 10006212, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 20, 2024, 12:36:11 PM", + "addUserId": 36, + "lastChgTime": "Jun 20, 2024, 12:36:11 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "VRF", + "typeDescTxt": "Verifier", + "subjectEntityClassCd": "PSN", + "subjectEntityUid": 10098763, + "cd": "LABP", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10006212, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theActRelationshipDtoCollection": [ + { + "addTime": "Jun 20, 2024, 12:36:11 PM", + "lastChgTime": "Jun 20, 2024, 12:36:11 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 20, 2024, 12:36:11 PM", + "sequenceNbr": 1, + "statusCd": "A", + "sourceActUid": 10006213, + "typeDescTxt": "Has Component", + "targetActUid": 10006212, + "sourceClassCd": "OBS", + "targetClassCd": "OBS", + "typeCd": "COMP", + "isShareInd": false, + "isNNDInd": false, + "isExportInd": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false +} \ No newline at end of file diff --git a/data-processing-service/src/test/resources/test_data/wds/wds_reviewed_algo_col.json b/data-processing-service/src/test/resources/test_data/wds/wds_reviewed_algo_col.json index dd087d8d8..d39c55f41 100644 --- a/data-processing-service/src/test/resources/test_data/wds/wds_reviewed_algo_col.json +++ b/data-processing-service/src/test/resources/test_data/wds/wds_reviewed_algo_col.json @@ -1 +1,19 @@ -[{"dsmAlgorithmUid":9,"algorithmNm":"He","eventType":"11648804","conditionList":"11065","frequency":"1","applyTo":"1","sendingSystemList":"","eventAction":"3","algorithmPayload":"\u003cAlgorithm xmlns\u003d\"http://www.cdc.gov/NEDSS\"\u003e\n \u003cAlgorithmName\u003eHe\u003c/AlgorithmName\u003e\n \u003cEvent\u003e\n \u003cCode\u003e11648804\u003c/Code\u003e\n \u003cCodeDescTxt\u003eLaboratory Report\u003c/CodeDescTxt\u003e\n \u003cCodeSystemCode\u003e2.16.840.1.113883.6.96\u003c/CodeSystemCode\u003e\n \u003c/Event\u003e\n \u003cFrequency\u003e\n \u003cCode\u003e1\u003c/Code\u003e\n \u003cCodeDescTxt\u003eReal-Time\u003c/CodeDescTxt\u003e\n \u003cCodeSystemCode\u003eL\u003c/CodeSystemCode\u003e\n \u003c/Frequency\u003e\n \u003cAppliesToEntryMethods\u003e\n \u003cEntryMethod\u003e\n \u003cCode\u003e1\u003c/Code\u003e\n \u003cCodeDescTxt\u003eElectronic Document\u003c/CodeDescTxt\u003e\n \u003cCodeSystemCode\u003eL\u003c/CodeSystemCode\u003e\n \u003c/EntryMethod\u003e\n \u003c/AppliesToEntryMethods\u003e\n \u003cInvestigationType/\u003e\n \u003cApplyToConditions\u003e\n \u003cCondition\u003e\n \u003cCode\u003e11065\u003c/Code\u003e\n \u003cCodeDescTxt\u003e2019 Novel Coronavirus\u003c/CodeDescTxt\u003e\n \u003cCodeSystemCode\u003e2.16.840.1.114222.4.5.277\u003c/CodeSystemCode\u003e\n \u003c/Condition\u003e\n \u003c/ApplyToConditions\u003e\n \u003cComment/\u003e\n \u003cElrAdvancedCriteria\u003e\n \u003cEventDateLogic\u003e\n \u003cElrTimeLogic\u003e\n \u003cElrTimeLogicInd\u003e\n \u003cCode\u003eN\u003c/Code\u003e\n \u003c/ElrTimeLogicInd\u003e\n \u003c/ElrTimeLogic\u003e\n \u003c/EventDateLogic\u003e\n \u003cAndOrLogic\u003eOR\u003c/AndOrLogic\u003e\n \u003cElrCriteria\u003e\n \u003cResultedTest\u003e\n \u003cCode\u003e77190-7\u003c/Code\u003e\n \u003cCodeDescTxt\u003eHepatitis B virus core and surface Ab and surface Ag panel - Serum (77190-7)\u003c/CodeDescTxt\u003e\n \u003c/ResultedTest\u003e\n \u003cElrNumericResultValue\u003e\n \u003cComparatorCode\u003e\n \u003cCode\u003e\u003e\u003d\u003c/Code\u003e\n \u003cCodeDescTxt\u003e\u003e\u003d\u003c/CodeDescTxt\u003e\n \u003c/ComparatorCode\u003e\n \u003cValue1\u003e1\u003c/Value1\u003e\n \u003cUnit\u003e\n \u003cCode\u003emL\u003c/Code\u003e\n \u003cCodeDescTxt\u003emL\u003c/CodeDescTxt\u003e\n \u003c/Unit\u003e\n \u003c/ElrNumericResultValue\u003e\n \u003c/ElrCriteria\u003e\n \u003cInvLogic\u003e\n \u003cInvLogicInd\u003e\n \u003cCode\u003eN\u003c/Code\u003e\n \u003c/InvLogicInd\u003e\n \u003c/InvLogic\u003e\n \u003c/ElrAdvancedCriteria\u003e\n \u003cAction\u003e\n \u003cMarkAsReviewed\u003e\n \u003cOnFailureToMarkAsReviewed\u003e\n \u003cCode\u003e2\u003c/Code\u003e\n \u003cCodeDescTxt\u003eRetain Event Record\u003c/CodeDescTxt\u003e\n \u003cCodeSystemCode\u003eL\u003c/CodeSystemCode\u003e\n \u003c/OnFailureToMarkAsReviewed\u003e\n \u003cAdditionalComment/\u003e\n \u003c/MarkAsReviewed\u003e\n \u003c/Action\u003e\n\u003c/Algorithm\u003e","adminComment":"","statusCd":"A","statusTime":"Jun 13, 2024, 7:18:51 PM","lastChgUserId":10055282,"lastChgTime":"Jun 13, 2024, 7:18:48 PM","resultedTestList":"77190-7"}] \ No newline at end of file +[ + { + "dsmAlgorithmUid": 9, + "algorithmNm": "He", + "eventType": "11648804", + "conditionList": "11065", + "frequency": "1", + "applyTo": "1", + "sendingSystemList": "", + "eventAction": "3", + "algorithmPayload": "\u003cAlgorithm xmlns\u003d\"http://www.cdc.gov/NEDSS\"\u003e\n \u003cAlgorithmName\u003eHe\u003c/AlgorithmName\u003e\n \u003cEvent\u003e\n \u003cCode\u003e11648804\u003c/Code\u003e\n \u003cCodeDescTxt\u003eLaboratory Report\u003c/CodeDescTxt\u003e\n \u003cCodeSystemCode\u003e2.16.840.1.113883.6.96\u003c/CodeSystemCode\u003e\n \u003c/Event\u003e\n \u003cFrequency\u003e\n \u003cCode\u003e1\u003c/Code\u003e\n \u003cCodeDescTxt\u003eReal-Time\u003c/CodeDescTxt\u003e\n \u003cCodeSystemCode\u003eL\u003c/CodeSystemCode\u003e\n \u003c/Frequency\u003e\n \u003cAppliesToEntryMethods\u003e\n \u003cEntryMethod\u003e\n \u003cCode\u003e1\u003c/Code\u003e\n \u003cCodeDescTxt\u003eElectronic Document\u003c/CodeDescTxt\u003e\n \u003cCodeSystemCode\u003eL\u003c/CodeSystemCode\u003e\n \u003c/EntryMethod\u003e\n \u003c/AppliesToEntryMethods\u003e\n \u003cInvestigationType/\u003e\n \u003cApplyToConditions\u003e\n \u003cCondition\u003e\n \u003cCode\u003e11065\u003c/Code\u003e\n \u003cCodeDescTxt\u003e2019 Novel Coronavirus\u003c/CodeDescTxt\u003e\n \u003cCodeSystemCode\u003e2.16.840.1.114222.4.5.277\u003c/CodeSystemCode\u003e\n \u003c/Condition\u003e\n \u003c/ApplyToConditions\u003e\n \u003cComment/\u003e\n \u003cElrAdvancedCriteria\u003e\n \u003cEventDateLogic\u003e\n \u003cElrTimeLogic\u003e\n \u003cElrTimeLogicInd\u003e\n \u003cCode\u003eN\u003c/Code\u003e\n \u003c/ElrTimeLogicInd\u003e\n \u003c/ElrTimeLogic\u003e\n \u003c/EventDateLogic\u003e\n \u003cAndOrLogic\u003eOR\u003c/AndOrLogic\u003e\n \u003cElrCriteria\u003e\n \u003cResultedTest\u003e\n \u003cCode\u003e77190-7\u003c/Code\u003e\n \u003cCodeDescTxt\u003eHepatitis B virus core and surface Ab and surface Ag panel - Serum (77190-7)\u003c/CodeDescTxt\u003e\n \u003c/ResultedTest\u003e\n \u003cElrNumericResultValue\u003e\n \u003cComparatorCode\u003e\n \u003cCode\u003e\u003e\u003d\u003c/Code\u003e\n \u003cCodeDescTxt\u003e\u003e\u003d\u003c/CodeDescTxt\u003e\n \u003c/ComparatorCode\u003e\n \u003cValue1\u003e1\u003c/Value1\u003e\n \u003cUnit\u003e\n \u003cCode\u003emL\u003c/Code\u003e\n \u003cCodeDescTxt\u003emL\u003c/CodeDescTxt\u003e\n \u003c/Unit\u003e\n \u003c/ElrNumericResultValue\u003e\n \u003c/ElrCriteria\u003e\n \u003cInvLogic\u003e\n \u003cInvLogicInd\u003e\n \u003cCode\u003eN\u003c/Code\u003e\n \u003c/InvLogicInd\u003e\n \u003c/InvLogic\u003e\n \u003c/ElrAdvancedCriteria\u003e\n \u003cAction\u003e\n \u003cMarkAsReviewed\u003e\n \u003cOnFailureToMarkAsReviewed\u003e\n \u003cCode\u003e2\u003c/Code\u003e\n \u003cCodeDescTxt\u003eRetain Event Record\u003c/CodeDescTxt\u003e\n \u003cCodeSystemCode\u003eL\u003c/CodeSystemCode\u003e\n \u003c/OnFailureToMarkAsReviewed\u003e\n \u003cAdditionalComment/\u003e\n \u003c/MarkAsReviewed\u003e\n \u003c/Action\u003e\n\u003c/Algorithm\u003e", + "adminComment": "", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 7:18:51 PM", + "lastChgUserId": 10055282, + "lastChgTime": "Jun 13, 2024, 7:18:48 PM", + "resultedTestList": "77190-7" + } +] \ No newline at end of file diff --git a/data-processing-service/src/test/resources/test_data/wds/wds_reviewed_edx.json b/data-processing-service/src/test/resources/test_data/wds/wds_reviewed_edx.json index 2cbb70edd..4a74ab54d 100644 --- a/data-processing-service/src/test/resources/test_data/wds/wds_reviewed_edx.json +++ b/data-processing-service/src/test/resources/test_data/wds/wds_reviewed_edx.json @@ -1 +1,2431 @@ -{"addTime":"Jun 13, 2024, 3:25:01 PM","role":"CT","rootObserbationUid":10004074,"orderingProviderVO":{"thePersonDto":{"addUserId":36,"isCaseInd":false,"isReentrant":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cd":"O","cdDescTxt":"Office","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","thePostalLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cityDescTxt":"SYLACAUGA","cntryCd":"840","cntyCd":"RICHLAND","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","stateCd":"01","streetAddr1":"380 WEST HILL ST.","streetAddr2":" ","zipCd":"35150","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","cd":"PH","cdDescTxt":"PHONE","classCd":"TELE","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-12,"theTeleLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"extensionTxt":"null","phoneNbrTxt":"256-249-5780","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"OP","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"sendingFacilityClia":"20D0649525","sendingFacilityName":"LABCORP","patientUid":-2,"userId":36,"nextUid":-28,"fillerNumber":"20120601114","messageControlID":"20120509010020114_251.2","parentObservationUid":0,"isOrderingProvider":true,"labResultProxyContainer":{"associatedNotificationInd":false,"associatedInvInd":false,"theObservationContainerCollection":[{"theObservationDto":{"observationUid":10004074,"activityToTime":"Apr 4, 2006, 1:39:00 AM","addTime":"Jun 13, 2024, 3:25:03 PM","addUserId":10055282,"altCd":"080186","altCdDescTxt":"CULTURE","altCdSystemCd":"L","altCdSystemDescTxt":"LOCAL","cd":"525-9","cdDescTxt":"ORGANISM COUNT","cdSystemCd":"LN","cdSystemDescTxt":"LOINC","ctrlCdDisplayForm":"LabReport","effectiveFromTime":"Mar 24, 2006, 4:55:00 PM","effectiveToTime":"Mar 24, 2006, 4:55:00 PM","electronicInd":"Y","jurisdictionCd":"130001","lastChgTime":"Jun 13, 2024, 3:25:03 PM","lastChgUserId":10055282,"obsDomainCd":"LabReport","obsDomainCdSt1":"Order","progAreaCd":"HEP","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:03 PM","rptToStateTime":"Jun 13, 2024, 3:25:01 PM","statusCd":"D","targetSiteCd":"LA","programJurisdictionOid":1300100011,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false,"superClassType":"Act"},"theActIdDtoCollection":[{"actUid":10004074,"actIdSeq":1,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120509010020114_251.2","typeCd":"MCID","typeDescTxt":"Message Control ID","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"actUid":10004074,"actIdSeq":2,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120601114","typeCd":"FN","typeDescTxt":"Filler Number","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"theObservationReasonDtoCollection":[{"observationUid":10004074,"reasonCd":"12365-4","reasonDescTxt":"TOTALLY CRAZY","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"theObservationDto":{"observationUid":-27,"activityToTime":"Apr 1, 2006, 12:00:00 AM","addUserId":10055282,"altCd":"080133","altCdSystemCd":"L","altCdSystemDescTxt":"LOCAL","cd":"77190-7","cdDescTxt":"TITER","cdSystemCd":"LN","cdSystemDescTxt":"LOINC","ctrlCdDisplayForm":"LabReport","electronicInd":"Y","lastChgUserId":10055282,"methodCd":"","methodDescTxt":"","obsDomainCdSt1":"Result","statusCd":"D","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"theActIdDtoCollection":[{"actUid":10004075,"actIdSeq":1,"assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120509010020114_251.2","typeCd":"MCID","typeDescTxt":"Message Control ID","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"actUid":10004075,"actIdSeq":2,"assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120601114","typeCd":"FN","typeDescTxt":"Filler Number","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"theObsValueNumericDtoCollection":[{"observationUid":10004075,"obsValueNumericSeq":1,"lowRange":"10-100","comparatorCd1":"100","numericValue1":1,"numericValue2":1,"numericUnitCd":"mL","separatorCd":":","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theMaterialContainerCollection":[{"theMaterialDto":{"materialUid":-9,"addTime":"Jun 13, 2024, 3:25:04 PM","addUserId":36,"description":"SOURCE NOT SPECIFIED","lastChgTime":"Jun 13, 2024, 3:25:04 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false,"superClassType":"Entity"},"theEntityIdDtoCollection":[{"entityUid":10003042,"entityIdSeq":0,"addTime":"Jun 13, 2024, 3:25:01 PM","asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"56789","typeCd":"SPC","typeDescTxt":"Specimen","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theRoleDtoCollection":[{"roleSeq":1,"cd":"NI","cdDescTxt":"No Information Given","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PATIENT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10003042,"scopingClassCd":"PATIENT","subjectClassCd":"MAT","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"cd":"SF","cdDescTxt":"Sending Facility","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","subjectEntityUid":10004635,"subjectClassCd":"HCFAC","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"LABP","cdDescTxt":"Laboratory Provider","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095034,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"LABP","cdDescTxt":"Laboratory Provider","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095033,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":12,"addReasonCd":"because","cd":"FTH","cdDescTxt":"Next of Kin","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10091043,"scopingClassCd":"PAT","subjectClassCd":"CON","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"PAT","cdDescTxt":"PATIENT","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","subjectEntityUid":10095026,"subjectClassCd":"PATIENT","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":2,"cd":"NI","cdDescTxt":"No Information Given","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"SPP","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095030,"scopingRoleSeq":1,"subjectEntityUid":10003042,"scopingClassCd":"PRV","subjectClassCd":"MAT","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"LABP","cdDescTxt":"Laboratory Provider","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095031,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"CT","cdDescTxt":"Copy To","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095036,"scopingClassCd":"PAT","subjectClassCd":"PROV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"LABP","cdDescTxt":"Laboratory Provider","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095032,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"CT","cdDescTxt":"Copy To","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095035,"scopingClassCd":"PAT","subjectClassCd":"PROV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"cd":"SPP","cdDescTxt":"Specimen Procurer","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095030,"scopingClassCd":"PAT","subjectClassCd":"PROV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"CT","cdDescTxt":"Copy To","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095037,"scopingClassCd":"PAT","subjectClassCd":"PROV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"eDXDocumentCollection":[{"actUid":10004074,"payload":"\u003cContainer xmlns\u003d\"http://www.cdc.gov/NEDSS\"\u003e\n \u003cHL7LabReport\u003e\n \u003cHL7MSH\u003e\n \u003cFieldSeparator\u003e|\u003c/FieldSeparator\u003e\n \u003cEncodingCharacters\u003e^~\\\u0026amp;\u003c/EncodingCharacters\u003e\n \u003cSendingApplication\u003e\n \u003cHL7NamespaceID\u003eLABCORP-CORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/SendingApplication\u003e\n \u003cSendingFacility\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/SendingFacility\u003e\n \u003cReceivingApplication\u003e\n \u003cHL7NamespaceID\u003eALDOH\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingApplication\u003e\n \u003cReceivingFacility\u003e\n \u003cHL7NamespaceID\u003eAL\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingFacility\u003e\n \u003cDateTimeOfMessage\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfMessage\u003e\n \u003cSecurity\u003e\u003c/Security\u003e\n \u003cMessageType\u003e\n \u003cMessageCode\u003eORU\u003c/MessageCode\u003e\n \u003cTriggerEvent\u003eR01\u003c/TriggerEvent\u003e\n \u003cMessageStructure\u003eORU_R01\u003c/MessageStructure\u003e\n \u003c/MessageType\u003e\n \u003cMessageControlID\u003e20120509010020114_251.2\u003c/MessageControlID\u003e\n \u003cProcessingID\u003e\n \u003cHL7ProcessingID\u003eD\u003c/HL7ProcessingID\u003e\n \u003cHL7ProcessingMode\u003e\u003c/HL7ProcessingMode\u003e\n \u003c/ProcessingID\u003e\n \u003cVersionID\u003e\n \u003cHL7VersionID\u003e2.5.1\u003c/HL7VersionID\u003e\n \u003c/VersionID\u003e\n \u003cAcceptAcknowledgmentType\u003eNE\u003c/AcceptAcknowledgmentType\u003e\n \u003cApplicationAcknowledgmentType\u003eNE\u003c/ApplicationAcknowledgmentType\u003e\n \u003cCountryCode\u003eUSA\u003c/CountryCode\u003e\n \u003cMessageProfileIdentifier\u003e\n \u003cHL7EntityIdentifier\u003eV251_IG_LB_LABRPTPH_R1_INFORM_2010FEB\u003c/HL7EntityIdentifier\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.5\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/MessageProfileIdentifier\u003e\n \u003c/HL7MSH\u003e\n \u003cHL7SoftwareSegment\u003e\n \u003cSoftwareVendorOrganization\u003e\n \u003cHL7OrganizationName\u003eMirth Corp.\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/SoftwareVendorOrganization\u003e\n \u003cSoftwareCertifiedVersionOrReleaseNumber\u003e2.0\u003c/SoftwareCertifiedVersionOrReleaseNumber\u003e\n \u003cSoftwareProductName\u003eMirth Connect\u003c/SoftwareProductName\u003e\n \u003cSoftwareBinaryID\u003e789654\u003c/SoftwareBinaryID\u003e\n \u003cSoftwareProductInformation/\u003e\n \u003cSoftwareInstallDate\u003e\n \u003cyear\u003e2011\u003c/year\u003e\n \u003cmonth\u003e1\u003c/month\u003e\n \u003cday\u003e1\u003c/day\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SoftwareInstallDate\u003e\n \u003c/HL7SoftwareSegment\u003e\n \u003cHL7PATIENT_RESULT\u003e\n \u003cPATIENT\u003e\n \u003cPatientIdentification\u003e\n \u003cSetIDPID\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDPID\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e05540205114\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eLABC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePN\u003c/HL7IdentifierTypeCode\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e17485458372\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eAssignAuth\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePI\u003c/HL7IdentifierTypeCode\u003e\n \u003cHL7AssigningFacility\u003e\n \u003cHL7NamespaceID\u003eNE CLINIC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e24D1040593\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningFacility\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eWilkinson\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTMAX251\u003c/HL7GivenName\u003e\n \u003c/PatientName\u003e\n \u003cMothersMaidenName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMOTHER\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003ePATERSON\u003c/HL7GivenName\u003e\n \u003c/MothersMaidenName\u003e\n \u003cDateTimeOfBirth\u003e\n \u003cyear\u003e1960\u003c/year\u003e\n \u003cmonth\u003e11\u003c/month\u003e\n \u003cday\u003e9\u003c/day\u003e\n \u003chours\u003e20\u003c/hours\u003e\n \u003cminutes\u003e25\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfBirth\u003e\n \u003cAdministrativeSex\u003eF\u003c/AdministrativeSex\u003e\n \u003cRace\u003e\n \u003cHL7Identifier\u003eW\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eWHITE\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eHL70005\u003c/HL7NameofCodingSystem\u003e\n \u003c/Race\u003e\n \u003cPatientAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e5000 Staples Dr\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eAPT100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSOMECITY\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eME\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30342\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7AddressType\u003eH\u003c/HL7AddressType\u003e\n \u003c/PatientAddress\u003e\n \u003cBirthOrder/\u003e\n \u003c/PatientIdentification\u003e\n \u003cNextofKinAssociatedParties\u003e\n \u003cSetIDNK1\u003e1\u003c/SetIDNK1\u003e\n \u003cName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eTESTNOK114B\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTNOK1\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eX\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/Name\u003e\n \u003cRelationship\u003e\n \u003cHL7Identifier\u003eFTH\u003c/HL7Identifier\u003e\n \u003c/Relationship\u003e\n \u003cAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e12 MAIN STREET\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 16\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eCOLUMBIA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eSC\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30329\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/Address\u003e\n \u003cPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e803\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e5551212\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/PhoneNumber\u003e\n \u003c/NextofKinAssociatedParties\u003e\n \u003c/PATIENT\u003e\n \u003cORDER_OBSERVATION\u003e\n \u003cCommonOrder\u003e\n \u003cOrderControl\u003eRE\u003c/OrderControl\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cOrderingFacilityName\u003e\n \u003cHL7OrganizationName\u003eCOOSA VALLEY MEDICAL CENTER\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/OrderingFacilityName\u003e\n \u003cOrderingFacilityAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e315 WEST HICKORY ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingFacilityAddress\u003e\n \u003cOrderingFacilityPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/OrderingFacilityPhoneNumber\u003e\n \u003cOrderingProviderAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e380 WEST HILL ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingProviderAddress\u003e\n \u003c/CommonOrder\u003e\n \u003cObservationRequest\u003e\n \u003cSetIDOBR\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBR\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cUniversalServiceIdentifier\u003e\n \u003cHL7Identifier\u003e525-9\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eORGANISM COUNT\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n \u003cHL7AlternateIdentifier\u003e080186\u003c/HL7AlternateIdentifier\u003e\n \u003cHL7AlternateText\u003eCULTURE\u003c/HL7AlternateText\u003e\n \u003c/UniversalServiceIdentifier\u003e\n \u003cObservationDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationDateTime\u003e\n \u003cObservationEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationEndDateTime\u003e\n \u003cCollectorIdentifier\u003e\n \u003cHL7IDNumber\u003e342384\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSUSAN\u003c/HL7GivenName\u003e\n \u003c/CollectorIdentifier\u003e\n \u003cOrderingProvider\u003e\n \u003cHL7IDNumber\u003e46466\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eBRENTNALL\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/OrderingProvider\u003e\n \u003cOrderCallbackPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension/\u003e\n \u003c/OrderCallbackPhoneNumber\u003e\n \u003cResultsRptStatusChngDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cminutes\u003e39\u003c/minutes\u003e\n \u003cseconds\u003e0\u003c/seconds\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ResultsRptStatusChngDateTime\u003e\n \u003cResultStatus\u003eF\u003c/ResultStatus\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46214\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMATHIS\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e44582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46111\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMARTIN\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eJERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cReasonforStudy\u003e\n \u003cHL7Identifier\u003e12365-4\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eTOTALLY CRAZY\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eI9\u003c/HL7NameofCodingSystem\u003e\n \u003c/ReasonforStudy\u003e\n \u003cPrincipalResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTOM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/PrincipalResultInterpreter\u003e\n \u003cAssistantResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eMOORE\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/AssistantResultInterpreter\u003e\n \u003cTechnician\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e44\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSAM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eA\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMT\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Technician\u003e\n \u003cTranscriptionist\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e82\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMASINA\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE ANN\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMS\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eRA\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Transcriptionist\u003e\n \u003cNumberofSampleContainers/\u003e\n \u003c/ObservationRequest\u003e\n \u003cPatientResultOrderObservation\u003e\n \u003cOBSERVATION\u003e\n \u003cObservationResult\u003e\n \u003cSetIDOBX\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBX\u003e\n \u003cValueType\u003eSN\u003c/ValueType\u003e\n \u003cObservationIdentifier\u003e\n\u003cHL7Identifier\u003e77190-7\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eTITER\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n\u003cHL7AlternateIdentifier\u003e080133\u003c/HL7AlternateIdentifier\u003e\n \u003c/ObservationIdentifier\u003e\n \u003cObservationSubID\u003e1\u003c/ObservationSubID\u003e\n \u003cObservationValue\u003e100^1^:^1\u003c/ObservationValue\u003e\n \u003cUnits\u003e\n\u003cHL7Identifier\u003emL\u003c/HL7Identifier\u003e\n \u003c/Units\u003e\n \u003cReferencesRange\u003e10-100\u003c/ReferencesRange\u003e\n \u003cProbability/\u003e\n \u003cObservationResultStatus\u003eF\u003c/ObservationResultStatus\u003e\n \u003cProducersReference\u003e\n\u003cHL7Identifier\u003e20D0649525\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eLABCORP BIRMINGHAM\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eCLIA\u003c/HL7NameofCodingSystem\u003e\n \u003c/ProducersReference\u003e\n \u003cDateTimeOftheAnalysis\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e4\u003c/month\u003e\n\u003cday\u003e1\u003c/day\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOftheAnalysis\u003e\n \u003cPerformingOrganizationName\u003e\n\u003cHL7OrganizationName\u003eLab1\u003c/HL7OrganizationName\u003e\n\u003cHL7OrganizationNameTypeCode\u003eL\u003c/HL7OrganizationNameTypeCode\u003e\n\u003cHL7IDNumber/\u003e\n\u003cHL7CheckDigit/\u003e\n\u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eCLIA\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.100\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n\u003c/HL7AssigningAuthority\u003e\n\u003cHL7OrganizationIdentifier\u003e1234\u003c/HL7OrganizationIdentifier\u003e\n \u003c/PerformingOrganizationName\u003e\n \u003cPerformingOrganizationAddress\u003e\n\u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e1234 Cornell Park Dr\u003c/HL7StreetOrMailingAddress\u003e\n\u003c/HL7StreetAddress\u003e\n\u003cHL7City\u003eBlue Ash\u003c/HL7City\u003e\n\u003cHL7StateOrProvince\u003eOH\u003c/HL7StateOrProvince\u003e\n\u003cHL7ZipOrPostalCode\u003e45241\u003c/HL7ZipOrPostalCode\u003e\n \u003c/PerformingOrganizationAddress\u003e\n \u003cPerformingOrganizationMedicalDirector\u003e\n\u003cHL7IDNumber\u003e9876543\u003c/HL7IDNumber\u003e\n\u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n\u003c/HL7FamilyName\u003e\n\u003cHL7GivenName\u003eBOB\u003c/HL7GivenName\u003e\n\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eF\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n\u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/PerformingOrganizationMedicalDirector\u003e\n \u003c/ObservationResult\u003e\n \u003c/OBSERVATION\u003e\n \u003c/PatientResultOrderObservation\u003e\n \u003cPatientResultOrderSPMObservation\u003e\n \u003cSPECIMEN\u003e\n \u003cSPECIMEN\u003e\n \u003cSetIDSPM\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDSPM\u003e\n \u003cSpecimenID\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e56789\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenID\u003e\n \u003cSpecimenParentIDs\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenParentIDs\u003e\n \u003cSpecimenType\u003e\n\u003cHL7AlternateIdentifier\u003eBLD\u003c/HL7AlternateIdentifier\u003e\n\u003cHL7AlternateText\u003eBLOOD\u003c/HL7AlternateText\u003e\n\u003cHL7NameofAlternateCodingSystem\u003eL\u003c/HL7NameofAlternateCodingSystem\u003e\n \u003c/SpecimenType\u003e\n \u003cSpecimenSourceSite\u003e\n\u003cHL7Identifier\u003eLA\u003c/HL7Identifier\u003e\n\u003cHL7NameofCodingSystem\u003eHL70070\u003c/HL7NameofCodingSystem\u003e\n \u003c/SpecimenSourceSite\u003e\n \u003cGroupedSpecimenCount/\u003e\n \u003cSpecimenDescription\u003eSOURCE NOT SPECIFIED\u003c/SpecimenDescription\u003e\n \u003cSpecimenCollectionDateTime\u003e\n\u003cHL7RangeStartDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeStartDateTime\u003e\n\u003cHL7RangeEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeEndDateTime\u003e\n \u003c/SpecimenCollectionDateTime\u003e\n \u003cSpecimenReceivedDateTime\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e3\u003c/month\u003e\n\u003cday\u003e25\u003c/day\u003e\n\u003chours\u003e1\u003c/hours\u003e\n\u003cminutes\u003e37\u003c/minutes\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SpecimenReceivedDateTime\u003e\n \u003cNumberOfSpecimenContainers/\u003e\n \u003c/SPECIMEN\u003e\n \u003c/SPECIMEN\u003e\n \u003c/PatientResultOrderSPMObservation\u003e\n \u003c/ORDER_OBSERVATION\u003e\n \u003c/HL7PATIENT_RESULT\u003e\n \u003c/HL7LabReport\u003e\n\u003c/Container\u003e\n\n\u003c!-- raw_message_id \u003d D09DCC71-5B0F-4C28-9395-B831B3F2CEC3 --\u003e","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","addTime":"Jun 13, 2024, 3:25:01 PM","docTypeCd":"11648804","nbsDocumentMetadataUid":1005,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"manualLab":false,"pageProxyTypeCd":"","isSTDProgramArea":false,"thePersonContainerCollection":[{"thePersonDto":{"personUid":10095026,"personParentUid":10095023,"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:02 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","birthTime":"Nov 9, 1960, 12:00:00 AM","birthTimeCalc":"Nov 9, 1960, 12:00:00 AM","cd":"PAT","cdDescTxt":"Observation Subject","currSexCd":"F","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:02 PM","lastChgUserId":36,"localId":"PSN10095023GA01","mothersMaidenNm":"MOTHER PATERSON","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:02 PM","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","firstNm":"FIRSTMAX251","lastNm":"Wilkinson","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false,"superClassType":"Entity"},"thePersonNameDtoCollection":[{"personUid":10095026,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","firstNm":"FIRSTMAX251","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"Wilkinson","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[{"personUid":10095026,"raceCd":"W","addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","raceCategoryCd":"W","raceDescTxt":"WHITE","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[{"locatorUid":10095027,"asOfDate":"Jun 13, 2024, 3:25:01 PM","cd":"H","classCd":"PST","lastChgTime":"Jun 13, 2024, 3:25:02 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:02 PM","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","useCd":"H","entityUid":10095026,"thePostalLocatorDto":{"postalLocatorUid":10095027,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cityDescTxt":"SOMECITY","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","stateCd":"23","streetAddr1":"5000 Staples Dr","streetAddr2":"APT100","zipCd":"30342","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"versionCtrlNbr":1,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[{"entityUid":10095026,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"OID","assigningAuthorityDescTxt":"LABC","lastChgUserId":36,"recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","rootExtensionTxt":"05540205114","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","typeCd":"PN","assigningAuthorityIdType":"ISO","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"entityUid":10095026,"entityIdSeq":2,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"OID","assigningAuthorityDescTxt":"AssignAuth","lastChgUserId":36,"recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","rootExtensionTxt":"17485458372","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","typeCd":"PI","assigningAuthorityIdType":"ISO","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PAT","patientMatchedFound":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10091043,"personParentUid":10091043,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PAT","cdDescTxt":"Observation Participant","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10091043GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"FIRSTNOK1","lastNm":"TESTNOK114B","middleNm":"X","nmPrefix":"DR","nmSuffix":"JR","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","firstNm":"FIRSTNOK1","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"TESTNOK114B","middleNm":"X","nmPrefix":"DR","nmSuffix":"JR","nmUseCd":"L","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","cd":"H","cdDescTxt":"House","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"EC","entityUid":-5,"thePostalLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cityDescTxt":"COLUMBIA","cntryCd":"840","cntyCd":"RICHLAND","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","stateCd":"45","streetAddr1":"12 MAIN STREET","streetAddr2":"SUITE 16","zipCd":"30329","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","cd":"PH","cdDescTxt":"PHONE","classCd":"TELE","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"H","entityUid":-5,"theTeleLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"extensionTxt":"123","phoneNbrTxt":"803-555-1212","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"NOK","patientMatchedFound":true,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095030,"personParentUid":10095030,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095030GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"SUSAN","lastNm":"JONES","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095030,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"firstNm":"SUSAN","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"JONES","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095030,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"342384","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":-12,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"firstNm":"GERRY","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"BRENTNALL","middleNm":"LEE","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"SR","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cd":"O","cdDescTxt":"Office","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","thePostalLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cityDescTxt":"SYLACAUGA","cntryCd":"840","cntyCd":"RICHLAND","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","stateCd":"01","streetAddr1":"380 WEST HILL ST.","streetAddr2":" ","zipCd":"35150","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","cd":"PH","cdDescTxt":"PHONE","classCd":"TELE","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-12,"theTeleLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"extensionTxt":"null","phoneNbrTxt":"256-249-5780","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[{"entityUid":-11,"entityIdSeq":1,"addTime":"Jun 13, 2024, 3:25:01 PM","asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"46466","statusCd":"A","typeCd":"PRN","typeDescTxt":"Provider Registration Number","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095031,"personParentUid":10095031,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095031GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"TOM","lastNm":"JONES","nmPrefix":"DR","nmSuffix":"JR","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095031,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","firstNm":"TOM","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"JONES","middleNm":"L","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"JR","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095031,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"22582","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095032,"personParentUid":10095032,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095032GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"THOMAS","lastNm":"MOORE","nmPrefix":"DR","nmSuffix":"III","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095032,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","firstNm":"THOMAS","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"MOORE","middleNm":"E","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"III","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095032,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"22582","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095033,"personParentUid":10095033,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095033GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"SAM","lastNm":"JONES","nmPrefix":"MR","nmSuffix":"JR","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095033,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","firstNm":"SAM","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"JONES","middleNm":"A","nmDegree":"MT","nmPrefix":"MR","nmSuffix":"JR","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095033,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"44","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095034,"personParentUid":10095034,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095034GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"THOMASINA","lastNm":"JONES","nmPrefix":"MS","nmSuffix":"II","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095034,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","firstNm":"THOMASINA","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"JONES","middleNm":"LEE ANN","nmDegree":"RA","nmPrefix":"MS","nmSuffix":"II","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095034,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"82","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095035,"personParentUid":10095035,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095035GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"GERRY","lastNm":"MATHIS","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095035,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"firstNm":"GERRY","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"MATHIS","middleNm":"LEE","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"SR","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:03 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095035,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"46214","statusCd":"A","typeCd":"PRN","typeDescTxt":"Provider Registration Number","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095036,"personParentUid":10095036,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095036GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"THOMAS","lastNm":"JONES","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095036,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"firstNm":"THOMAS","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"JONES","middleNm":"LEE","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"III","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:03 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095036,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"44582","statusCd":"A","typeCd":"PRN","typeDescTxt":"Provider Registration Number","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095037,"personParentUid":10095037,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095037GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"JERRY","lastNm":"MARTIN","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095037,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"firstNm":"JERRY","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"MARTIN","middleNm":"L","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"JR","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:03 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095037,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"46111","statusCd":"A","typeCd":"PRN","typeDescTxt":"Provider Registration Number","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"AUT","typeDescTxt":"Author","subjectEntityUid":10004635,"cd":"SF","actClassCd":"OBS","subjectClassCd":"ORG","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"PATSBJ","typeDescTxt":"Patient Subject","subjectEntityUid":10095026,"cd":"PAT","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ORD","typeDescTxt":"Orderer","subjectEntityUid":10002002,"cd":"OP","actClassCd":"OBS","subjectClassCd":"ORG","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"SPC","typeDescTxt":"Specimen","subjectEntityUid":10003042,"cd":"NI","actClassCd":"OBS","subjectClassCd":"MAT","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ORD","typeDescTxt":"Orderer","subjectEntityUid":10091010,"cd":"OP","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"VRF","typeDescTxt":"Verifier","subjectEntityUid":10095031,"cd":"LABP","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ASS","typeDescTxt":"Assistant","subjectEntityUid":10095032,"cd":"ASS","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"PRF","typeDescTxt":"Performer","subjectEntityUid":10095033,"cd":"LABP","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ENT","typeDescTxt":"Enterer","subjectEntityUid":10095034,"cd":"ENT","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"PRF","typeDescTxt":"Performer","subjectEntityUid":10002005,"cd":"RE","actClassCd":"OBS","subjectClassCd":"ORG","actUid":10004075,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theActRelationshipDtoCollection":[{"addTime":"Jun 13, 2024, 3:25:01 PM","lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","sequenceNbr":1,"statusCd":"A","sourceActUid":10004075,"typeDescTxt":"Has Component","targetActUid":10004074,"sourceClassCd":"OBS","targetClassCd":"OBS","typeCd":"COMP","isShareInd":false,"isNNDInd":false,"isExportInd":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theOrganizationContainerCollection":[{"theOrganizationDto":{"organizationUid":10004635,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cd":"ORG","cdDescTxt":"Laboratory","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"ORG10004635GA01","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","standardIndustryClassCd":"CLIA","standardIndustryDescTxt":"LABCORP","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","displayNm":"LABCORP","electronicInd":"Y","versionCtrlNbr":1,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false,"superClassType":"Entity"},"theOrganizationNameDtoCollection":[{"organizationUid":10004635,"organizationNameSeq":1,"nmTxt":"LABCORP","nmUseCd":"L","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10004635,"entityIdSeq":1,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20D0649525","statusCd":"A","typeCd":"FI","typeDescTxt":"Facility Identifier","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"role":"SF","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"theOrganizationDto":{"organizationUid":10002002,"addUserId":36,"cd":"OTH","cdDescTxt":"Other","standardIndustryClassCd":"621399","standardIndustryDescTxt":"Offices of Misc. Health Providers","displayNm":"COOSA VALLEY MEDICAL CENTER","electronicInd":"Y","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"theOrganizationNameDtoCollection":[{"organizationNameSeq":0,"nmTxt":"COOSA VALLEY MEDICAL CENTER","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cd":"O","cdDescTxt":"Office","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-6,"thePostalLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cityDescTxt":"SYLACAUGA","cntryCd":"840","cntyCd":"RICHLAND","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","stateCd":"01","streetAddr1":"315 WEST HICKORY ST.","streetAddr2":"SUITE 100","zipCd":"35150","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cd":"PH","cdDescTxt":"PHONE","classCd":"TELE","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-6,"theTeleLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"extensionTxt":"123","phoneNbrTxt":"256-249-5780","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[],"role":"OP","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"theOrganizationDto":{"organizationUid":10002005,"addUserId":36,"cd":"LAB","cdDescTxt":"Laboratory","standardIndustryClassCd":"621511","standardIndustryDescTxt":"Medical Laboratory","displayNm":"Lab1","electronicInd":"Y","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"theOrganizationNameDtoCollection":[{"organizationNameSeq":1,"nmTxt":"Lab1","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cd":"O","cdDescTxt":"Office","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-28,"thePostalLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cityDescTxt":"Blue Ash","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","stateCd":"39","streetAddr1":"1234 Cornell Park Dr","streetAddr2":" ","zipCd":"45241","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[{"entityUid":-28,"entityIdSeq":1,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"2.16.840.1.114222.4.3.2.5.2.100","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"1234","statusCd":"A","typeCd":"FI","typeDescTxt":"Facility Identifier","assigningAuthorityIdType":"ISO","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"isOOSystemInd":false,"isOOSystemPendInd":false,"associatedNotificationsInd":false,"isUnsavedNote":false,"isMergeCase":false,"isRenterant":false,"isConversionHasModified":false,"messageLogDTMap":{},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"localId":"OBS10004074GA01","isParentObsInd":false,"edxLabIdentiferDTColl":[{"identifer":"77190-7","subMapID":"1","observationUid":-27,"observationValues":["100^1^:^1"]}],"entityName":"FIRSTMAX251 Wilkinson","userName":"superuser","universalIdType":"CLIA","publicHealthCaseUid":0,"notificationUid":0,"originalAssociatedPHCUid":0,"nbsInterfaceUid":10000078,"jurisdictionName":"Fulton County","programAreaName":"HEP","jurisdictionAndProgramAreaSuccessfullyDerived":false,"algorithmHasInvestigation":false,"investigationSuccessfullyCreated":false,"investigationMissingFields":false,"algorithmHasNotification":false,"notificationSuccessfullyCreated":false,"notificationMissingFields":false,"labIsCreate":true,"labIsCreateSuccess":true,"labIsUpdateDRRQ":false,"labIsUpdateDRSA":false,"labIsUpdateSuccess":false,"labIsMarkedAsReviewed":false,"edxSusLabDTMap":{"-27":{"identifer":"77190-7","subMapID":"1","observationUid":-27.0,"observationValues":["100^1^:^1"]}},"addReasonCd":"because","rootObservationContainer":{"theObservationDto":{"observationUid":10004074,"activityToTime":"Apr 4, 2006, 1:39:00 AM","addTime":"Jun 13, 2024, 3:25:03 PM","addUserId":10055282,"altCd":"080186","altCdDescTxt":"CULTURE","altCdSystemCd":"L","altCdSystemDescTxt":"LOCAL","cd":"525-9","cdDescTxt":"ORGANISM COUNT","cdSystemCd":"LN","cdSystemDescTxt":"LOINC","ctrlCdDisplayForm":"LabReport","effectiveFromTime":"Mar 24, 2006, 4:55:00 PM","effectiveToTime":"Mar 24, 2006, 4:55:00 PM","electronicInd":"Y","jurisdictionCd":"130001","lastChgTime":"Jun 13, 2024, 3:25:03 PM","lastChgUserId":10055282,"obsDomainCd":"LabReport","obsDomainCdSt1":"Order","progAreaCd":"HEP","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:03 PM","rptToStateTime":"Jun 13, 2024, 3:25:01 PM","statusCd":"D","targetSiteCd":"LA","programJurisdictionOid":1300100011,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false,"superClassType":"Act"},"theActIdDtoCollection":[{"actUid":10004074,"actIdSeq":1,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120509010020114_251.2","typeCd":"MCID","typeDescTxt":"Message Control ID","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"actUid":10004074,"actIdSeq":2,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120601114","typeCd":"FN","typeDescTxt":"Filler Number","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"theObservationReasonDtoCollection":[{"observationUid":10004074,"reasonCd":"12365-4","reasonDescTxt":"TOTALLY CRAZY","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"multipleSubjectMatch":false,"multipleOrderingProvider":false,"multipleCollector":false,"multiplePrincipalInterpreter":false,"multipleOrderingFacility":false,"multipleSpecimen":false,"ethnicityCodeTranslated":true,"obsMethodTranslated":true,"raceTranslated":false,"sexTranslated":true,"ssnInvalid":false,"nullClia":false,"nextOfKin":true,"isProvider":true,"fillerNumberPresent":true,"finalPostCorrected":false,"preliminaryPostFinal":false,"preliminaryPostCorrected":false,"activityTimeOutOfSequence":false,"multiplePerformingLab":false,"orderTestNameMissing":false,"reflexOrderedTestCdMissing":false,"reflexResultedTestCdMissing":false,"resultedTestNameMissing":false,"drugNameMissing":false,"obsStatusTranslated":true,"relationship":"FTH","activityToTimeMissing":false,"systemException":false,"universalServiceIdMissing":false,"missingOrderingProvider":false,"missingOrderingFacility":false,"multipleReceivingFacility":false,"personParentUid":10095023,"patientMatch":false,"multipleOBR":false,"multipleSubject":false,"noSubject":false,"orderOBRWithParent":false,"childOBRWithoutParent":false,"invalidXML":false,"missingOrderingProviderandFacility":false,"createLabPermission":true,"updateLabPermission":true,"markAsReviewPermission":true,"createInvestigationPermission":true,"createNotificationPermission":true,"matchingAlgorithm":true,"unexpectedResultType":false,"childSuscWithoutParentResult":false,"fieldTruncationError":false,"invalidDateError":false,"labAssociatedToInv":false,"reasonforStudyCdMissing":false,"status":"Success","wdsReports":[],"errorText":"2","isContactRecordDoc":false,"eDXEventProcessCaseSummaryDTMap":{},"isUpdatedDocument":false,"isLabReportDoc":false,"isMorbReportDoc":false,"isCaseUpdated":false,"edxActivityLogDto":{"businessObjLocalId":"OBS10004074GA01","EDXActivityLogDTDetails":[],"newaddedCodeSets":{},"logDetailAllStatus":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false}} \ No newline at end of file +{ + "addTime": "Jun 13, 2024, 3:25:01 PM", + "role": "CT", + "rootObserbationUid": 10004074, + "orderingProviderVO": { + "thePersonDto": { + "addUserId": 36, + "isCaseInd": false, + "isReentrant": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cd": "O", + "cdDescTxt": "Office", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cityDescTxt": "SYLACAUGA", + "cntryCd": "840", + "cntyCd": "RICHLAND", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "stateCd": "01", + "streetAddr1": "380 WEST HILL ST.", + "streetAddr2": " ", + "zipCd": "35150", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "cd": "PH", + "cdDescTxt": "PHONE", + "classCd": "TELE", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -12, + "theTeleLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "extensionTxt": "null", + "phoneNbrTxt": "256-249-5780", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "OP", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "sendingFacilityClia": "20D0649525", + "sendingFacilityName": "LABCORP", + "patientUid": -2, + "userId": 36, + "nextUid": -28, + "fillerNumber": "20120601114", + "messageControlID": "20120509010020114_251.2", + "parentObservationUid": 0, + "isOrderingProvider": true, + "labResultProxyContainer": { + "associatedNotificationInd": false, + "associatedInvInd": false, + "theObservationContainerCollection": [ + { + "theObservationDto": { + "observationUid": 10004074, + "activityToTime": "Apr 4, 2006, 1:39:00 AM", + "addTime": "Jun 13, 2024, 3:25:03 PM", + "addUserId": 10055282, + "altCd": "080186", + "altCdDescTxt": "CULTURE", + "altCdSystemCd": "L", + "altCdSystemDescTxt": "LOCAL", + "cd": "525-9", + "cdDescTxt": "ORGANISM COUNT", + "cdSystemCd": "LN", + "cdSystemDescTxt": "LOINC", + "ctrlCdDisplayForm": "LabReport", + "effectiveFromTime": "Mar 24, 2006, 4:55:00 PM", + "effectiveToTime": "Mar 24, 2006, 4:55:00 PM", + "electronicInd": "Y", + "jurisdictionCd": "130001", + "lastChgTime": "Jun 13, 2024, 3:25:03 PM", + "lastChgUserId": 10055282, + "obsDomainCd": "LabReport", + "obsDomainCdSt1": "Order", + "progAreaCd": "HEP", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:03 PM", + "rptToStateTime": "Jun 13, 2024, 3:25:01 PM", + "statusCd": "D", + "targetSiteCd": "LA", + "programJurisdictionOid": 1300100011, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false, + "superClassType": "Act" + }, + "theActIdDtoCollection": [ + { + "actUid": 10004074, + "actIdSeq": 1, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120509010020114_251.2", + "typeCd": "MCID", + "typeDescTxt": "Message Control ID", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "actUid": 10004074, + "actIdSeq": 2, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120601114", + "typeCd": "FN", + "typeDescTxt": "Filler Number", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theObservationReasonDtoCollection": [ + { + "observationUid": 10004074, + "reasonCd": "12365-4", + "reasonDescTxt": "TOTALLY CRAZY", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "theObservationDto": { + "observationUid": -27, + "activityToTime": "Apr 1, 2006, 12:00:00 AM", + "addUserId": 10055282, + "altCd": "080133", + "altCdSystemCd": "L", + "altCdSystemDescTxt": "LOCAL", + "cd": "77190-7", + "cdDescTxt": "TITER", + "cdSystemCd": "LN", + "cdSystemDescTxt": "LOINC", + "ctrlCdDisplayForm": "LabReport", + "electronicInd": "Y", + "lastChgUserId": 10055282, + "methodCd": "", + "methodDescTxt": "", + "obsDomainCdSt1": "Result", + "statusCd": "D", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theActIdDtoCollection": [ + { + "actUid": 10004075, + "actIdSeq": 1, + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120509010020114_251.2", + "typeCd": "MCID", + "typeDescTxt": "Message Control ID", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "actUid": 10004075, + "actIdSeq": 2, + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120601114", + "typeCd": "FN", + "typeDescTxt": "Filler Number", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theObsValueNumericDtoCollection": [ + { + "observationUid": 10004075, + "obsValueNumericSeq": 1, + "lowRange": "10-100", + "comparatorCd1": "100", + "numericValue1": 1, + "numericValue2": 1, + "numericUnitCd": "mL", + "separatorCd": ":", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theMaterialContainerCollection": [ + { + "theMaterialDto": { + "materialUid": -9, + "addTime": "Jun 13, 2024, 3:25:04 PM", + "addUserId": 36, + "description": "SOURCE NOT SPECIFIED", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false, + "superClassType": "Entity" + }, + "theEntityIdDtoCollection": [ + { + "entityUid": 10003042, + "entityIdSeq": 0, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "56789", + "typeCd": "SPC", + "typeDescTxt": "Specimen", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theRoleDtoCollection": [ + { + "roleSeq": 1, + "cd": "NI", + "cdDescTxt": "No Information Given", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PATIENT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10003042, + "scopingClassCd": "PATIENT", + "subjectClassCd": "MAT", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "cd": "SF", + "cdDescTxt": "Sending Facility", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "subjectEntityUid": 10004635, + "subjectClassCd": "HCFAC", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "LABP", + "cdDescTxt": "Laboratory Provider", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095034, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "LABP", + "cdDescTxt": "Laboratory Provider", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095033, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 12, + "addReasonCd": "because", + "cd": "FTH", + "cdDescTxt": "Next of Kin", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10091043, + "scopingClassCd": "PAT", + "subjectClassCd": "CON", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "PAT", + "cdDescTxt": "PATIENT", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "subjectEntityUid": 10095026, + "subjectClassCd": "PATIENT", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 2, + "cd": "NI", + "cdDescTxt": "No Information Given", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "SPP", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095030, + "scopingRoleSeq": 1, + "subjectEntityUid": 10003042, + "scopingClassCd": "PRV", + "subjectClassCd": "MAT", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "LABP", + "cdDescTxt": "Laboratory Provider", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095031, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "CT", + "cdDescTxt": "Copy To", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095036, + "scopingClassCd": "PAT", + "subjectClassCd": "PROV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "LABP", + "cdDescTxt": "Laboratory Provider", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095032, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "CT", + "cdDescTxt": "Copy To", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095035, + "scopingClassCd": "PAT", + "subjectClassCd": "PROV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "cd": "SPP", + "cdDescTxt": "Specimen Procurer", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095030, + "scopingClassCd": "PAT", + "subjectClassCd": "PROV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "CT", + "cdDescTxt": "Copy To", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095037, + "scopingClassCd": "PAT", + "subjectClassCd": "PROV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "eDXDocumentCollection": [ + { + "actUid": 10004074, + "payload": "\u003cContainer xmlns\u003d\"http://www.cdc.gov/NEDSS\"\u003e\n \u003cHL7LabReport\u003e\n \u003cHL7MSH\u003e\n \u003cFieldSeparator\u003e|\u003c/FieldSeparator\u003e\n \u003cEncodingCharacters\u003e^~\\\u0026amp;\u003c/EncodingCharacters\u003e\n \u003cSendingApplication\u003e\n \u003cHL7NamespaceID\u003eLABCORP-CORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/SendingApplication\u003e\n \u003cSendingFacility\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/SendingFacility\u003e\n \u003cReceivingApplication\u003e\n \u003cHL7NamespaceID\u003eALDOH\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingApplication\u003e\n \u003cReceivingFacility\u003e\n \u003cHL7NamespaceID\u003eAL\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingFacility\u003e\n \u003cDateTimeOfMessage\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfMessage\u003e\n \u003cSecurity\u003e\u003c/Security\u003e\n \u003cMessageType\u003e\n \u003cMessageCode\u003eORU\u003c/MessageCode\u003e\n \u003cTriggerEvent\u003eR01\u003c/TriggerEvent\u003e\n \u003cMessageStructure\u003eORU_R01\u003c/MessageStructure\u003e\n \u003c/MessageType\u003e\n \u003cMessageControlID\u003e20120509010020114_251.2\u003c/MessageControlID\u003e\n \u003cProcessingID\u003e\n \u003cHL7ProcessingID\u003eD\u003c/HL7ProcessingID\u003e\n \u003cHL7ProcessingMode\u003e\u003c/HL7ProcessingMode\u003e\n \u003c/ProcessingID\u003e\n \u003cVersionID\u003e\n \u003cHL7VersionID\u003e2.5.1\u003c/HL7VersionID\u003e\n \u003c/VersionID\u003e\n \u003cAcceptAcknowledgmentType\u003eNE\u003c/AcceptAcknowledgmentType\u003e\n \u003cApplicationAcknowledgmentType\u003eNE\u003c/ApplicationAcknowledgmentType\u003e\n \u003cCountryCode\u003eUSA\u003c/CountryCode\u003e\n \u003cMessageProfileIdentifier\u003e\n \u003cHL7EntityIdentifier\u003eV251_IG_LB_LABRPTPH_R1_INFORM_2010FEB\u003c/HL7EntityIdentifier\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.5\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/MessageProfileIdentifier\u003e\n \u003c/HL7MSH\u003e\n \u003cHL7SoftwareSegment\u003e\n \u003cSoftwareVendorOrganization\u003e\n \u003cHL7OrganizationName\u003eMirth Corp.\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/SoftwareVendorOrganization\u003e\n \u003cSoftwareCertifiedVersionOrReleaseNumber\u003e2.0\u003c/SoftwareCertifiedVersionOrReleaseNumber\u003e\n \u003cSoftwareProductName\u003eMirth Connect\u003c/SoftwareProductName\u003e\n \u003cSoftwareBinaryID\u003e789654\u003c/SoftwareBinaryID\u003e\n \u003cSoftwareProductInformation/\u003e\n \u003cSoftwareInstallDate\u003e\n \u003cyear\u003e2011\u003c/year\u003e\n \u003cmonth\u003e1\u003c/month\u003e\n \u003cday\u003e1\u003c/day\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SoftwareInstallDate\u003e\n \u003c/HL7SoftwareSegment\u003e\n \u003cHL7PATIENT_RESULT\u003e\n \u003cPATIENT\u003e\n \u003cPatientIdentification\u003e\n \u003cSetIDPID\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDPID\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e05540205114\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eLABC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePN\u003c/HL7IdentifierTypeCode\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e17485458372\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eAssignAuth\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePI\u003c/HL7IdentifierTypeCode\u003e\n \u003cHL7AssigningFacility\u003e\n \u003cHL7NamespaceID\u003eNE CLINIC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e24D1040593\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningFacility\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eWilkinson\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTMAX251\u003c/HL7GivenName\u003e\n \u003c/PatientName\u003e\n \u003cMothersMaidenName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMOTHER\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003ePATERSON\u003c/HL7GivenName\u003e\n \u003c/MothersMaidenName\u003e\n \u003cDateTimeOfBirth\u003e\n \u003cyear\u003e1960\u003c/year\u003e\n \u003cmonth\u003e11\u003c/month\u003e\n \u003cday\u003e9\u003c/day\u003e\n \u003chours\u003e20\u003c/hours\u003e\n \u003cminutes\u003e25\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfBirth\u003e\n \u003cAdministrativeSex\u003eF\u003c/AdministrativeSex\u003e\n \u003cRace\u003e\n \u003cHL7Identifier\u003eW\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eWHITE\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eHL70005\u003c/HL7NameofCodingSystem\u003e\n \u003c/Race\u003e\n \u003cPatientAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e5000 Staples Dr\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eAPT100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSOMECITY\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eME\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30342\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7AddressType\u003eH\u003c/HL7AddressType\u003e\n \u003c/PatientAddress\u003e\n \u003cBirthOrder/\u003e\n \u003c/PatientIdentification\u003e\n \u003cNextofKinAssociatedParties\u003e\n \u003cSetIDNK1\u003e1\u003c/SetIDNK1\u003e\n \u003cName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eTESTNOK114B\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTNOK1\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eX\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/Name\u003e\n \u003cRelationship\u003e\n \u003cHL7Identifier\u003eFTH\u003c/HL7Identifier\u003e\n \u003c/Relationship\u003e\n \u003cAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e12 MAIN STREET\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 16\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eCOLUMBIA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eSC\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30329\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/Address\u003e\n \u003cPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e803\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e5551212\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/PhoneNumber\u003e\n \u003c/NextofKinAssociatedParties\u003e\n \u003c/PATIENT\u003e\n \u003cORDER_OBSERVATION\u003e\n \u003cCommonOrder\u003e\n \u003cOrderControl\u003eRE\u003c/OrderControl\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cOrderingFacilityName\u003e\n \u003cHL7OrganizationName\u003eCOOSA VALLEY MEDICAL CENTER\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/OrderingFacilityName\u003e\n \u003cOrderingFacilityAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e315 WEST HICKORY ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingFacilityAddress\u003e\n \u003cOrderingFacilityPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/OrderingFacilityPhoneNumber\u003e\n \u003cOrderingProviderAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e380 WEST HILL ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingProviderAddress\u003e\n \u003c/CommonOrder\u003e\n \u003cObservationRequest\u003e\n \u003cSetIDOBR\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBR\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cUniversalServiceIdentifier\u003e\n \u003cHL7Identifier\u003e525-9\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eORGANISM COUNT\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n \u003cHL7AlternateIdentifier\u003e080186\u003c/HL7AlternateIdentifier\u003e\n \u003cHL7AlternateText\u003eCULTURE\u003c/HL7AlternateText\u003e\n \u003c/UniversalServiceIdentifier\u003e\n \u003cObservationDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationDateTime\u003e\n \u003cObservationEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationEndDateTime\u003e\n \u003cCollectorIdentifier\u003e\n \u003cHL7IDNumber\u003e342384\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSUSAN\u003c/HL7GivenName\u003e\n \u003c/CollectorIdentifier\u003e\n \u003cOrderingProvider\u003e\n \u003cHL7IDNumber\u003e46466\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eBRENTNALL\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/OrderingProvider\u003e\n \u003cOrderCallbackPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension/\u003e\n \u003c/OrderCallbackPhoneNumber\u003e\n \u003cResultsRptStatusChngDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cminutes\u003e39\u003c/minutes\u003e\n \u003cseconds\u003e0\u003c/seconds\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ResultsRptStatusChngDateTime\u003e\n \u003cResultStatus\u003eF\u003c/ResultStatus\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46214\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMATHIS\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e44582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46111\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMARTIN\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eJERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cReasonforStudy\u003e\n \u003cHL7Identifier\u003e12365-4\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eTOTALLY CRAZY\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eI9\u003c/HL7NameofCodingSystem\u003e\n \u003c/ReasonforStudy\u003e\n \u003cPrincipalResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTOM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/PrincipalResultInterpreter\u003e\n \u003cAssistantResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eMOORE\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/AssistantResultInterpreter\u003e\n \u003cTechnician\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e44\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSAM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eA\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMT\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Technician\u003e\n \u003cTranscriptionist\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e82\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMASINA\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE ANN\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMS\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eRA\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Transcriptionist\u003e\n \u003cNumberofSampleContainers/\u003e\n \u003c/ObservationRequest\u003e\n \u003cPatientResultOrderObservation\u003e\n \u003cOBSERVATION\u003e\n \u003cObservationResult\u003e\n \u003cSetIDOBX\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBX\u003e\n \u003cValueType\u003eSN\u003c/ValueType\u003e\n \u003cObservationIdentifier\u003e\n\u003cHL7Identifier\u003e77190-7\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eTITER\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n\u003cHL7AlternateIdentifier\u003e080133\u003c/HL7AlternateIdentifier\u003e\n \u003c/ObservationIdentifier\u003e\n \u003cObservationSubID\u003e1\u003c/ObservationSubID\u003e\n \u003cObservationValue\u003e100^1^:^1\u003c/ObservationValue\u003e\n \u003cUnits\u003e\n\u003cHL7Identifier\u003emL\u003c/HL7Identifier\u003e\n \u003c/Units\u003e\n \u003cReferencesRange\u003e10-100\u003c/ReferencesRange\u003e\n \u003cProbability/\u003e\n \u003cObservationResultStatus\u003eF\u003c/ObservationResultStatus\u003e\n \u003cProducersReference\u003e\n\u003cHL7Identifier\u003e20D0649525\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eLABCORP BIRMINGHAM\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eCLIA\u003c/HL7NameofCodingSystem\u003e\n \u003c/ProducersReference\u003e\n \u003cDateTimeOftheAnalysis\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e4\u003c/month\u003e\n\u003cday\u003e1\u003c/day\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOftheAnalysis\u003e\n \u003cPerformingOrganizationName\u003e\n\u003cHL7OrganizationName\u003eLab1\u003c/HL7OrganizationName\u003e\n\u003cHL7OrganizationNameTypeCode\u003eL\u003c/HL7OrganizationNameTypeCode\u003e\n\u003cHL7IDNumber/\u003e\n\u003cHL7CheckDigit/\u003e\n\u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eCLIA\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.100\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n\u003c/HL7AssigningAuthority\u003e\n\u003cHL7OrganizationIdentifier\u003e1234\u003c/HL7OrganizationIdentifier\u003e\n \u003c/PerformingOrganizationName\u003e\n \u003cPerformingOrganizationAddress\u003e\n\u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e1234 Cornell Park Dr\u003c/HL7StreetOrMailingAddress\u003e\n\u003c/HL7StreetAddress\u003e\n\u003cHL7City\u003eBlue Ash\u003c/HL7City\u003e\n\u003cHL7StateOrProvince\u003eOH\u003c/HL7StateOrProvince\u003e\n\u003cHL7ZipOrPostalCode\u003e45241\u003c/HL7ZipOrPostalCode\u003e\n \u003c/PerformingOrganizationAddress\u003e\n \u003cPerformingOrganizationMedicalDirector\u003e\n\u003cHL7IDNumber\u003e9876543\u003c/HL7IDNumber\u003e\n\u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n\u003c/HL7FamilyName\u003e\n\u003cHL7GivenName\u003eBOB\u003c/HL7GivenName\u003e\n\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eF\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n\u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/PerformingOrganizationMedicalDirector\u003e\n \u003c/ObservationResult\u003e\n \u003c/OBSERVATION\u003e\n \u003c/PatientResultOrderObservation\u003e\n \u003cPatientResultOrderSPMObservation\u003e\n \u003cSPECIMEN\u003e\n \u003cSPECIMEN\u003e\n \u003cSetIDSPM\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDSPM\u003e\n \u003cSpecimenID\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e56789\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenID\u003e\n \u003cSpecimenParentIDs\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenParentIDs\u003e\n \u003cSpecimenType\u003e\n\u003cHL7AlternateIdentifier\u003eBLD\u003c/HL7AlternateIdentifier\u003e\n\u003cHL7AlternateText\u003eBLOOD\u003c/HL7AlternateText\u003e\n\u003cHL7NameofAlternateCodingSystem\u003eL\u003c/HL7NameofAlternateCodingSystem\u003e\n \u003c/SpecimenType\u003e\n \u003cSpecimenSourceSite\u003e\n\u003cHL7Identifier\u003eLA\u003c/HL7Identifier\u003e\n\u003cHL7NameofCodingSystem\u003eHL70070\u003c/HL7NameofCodingSystem\u003e\n \u003c/SpecimenSourceSite\u003e\n \u003cGroupedSpecimenCount/\u003e\n \u003cSpecimenDescription\u003eSOURCE NOT SPECIFIED\u003c/SpecimenDescription\u003e\n \u003cSpecimenCollectionDateTime\u003e\n\u003cHL7RangeStartDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeStartDateTime\u003e\n\u003cHL7RangeEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeEndDateTime\u003e\n \u003c/SpecimenCollectionDateTime\u003e\n \u003cSpecimenReceivedDateTime\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e3\u003c/month\u003e\n\u003cday\u003e25\u003c/day\u003e\n\u003chours\u003e1\u003c/hours\u003e\n\u003cminutes\u003e37\u003c/minutes\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SpecimenReceivedDateTime\u003e\n \u003cNumberOfSpecimenContainers/\u003e\n \u003c/SPECIMEN\u003e\n \u003c/SPECIMEN\u003e\n \u003c/PatientResultOrderSPMObservation\u003e\n \u003c/ORDER_OBSERVATION\u003e\n \u003c/HL7PATIENT_RESULT\u003e\n \u003c/HL7LabReport\u003e\n\u003c/Container\u003e\n\n\u003c!-- raw_message_id \u003d D09DCC71-5B0F-4C28-9395-B831B3F2CEC3 --\u003e", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "docTypeCd": "11648804", + "nbsDocumentMetadataUid": 1005, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "manualLab": false, + "pageProxyTypeCd": "", + "isSTDProgramArea": false, + "thePersonContainerCollection": [ + { + "thePersonDto": { + "personUid": 10095026, + "personParentUid": 10095023, + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:02 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "birthTime": "Nov 9, 1960, 12:00:00 AM", + "birthTimeCalc": "Nov 9, 1960, 12:00:00 AM", + "cd": "PAT", + "cdDescTxt": "Observation Subject", + "currSexCd": "F", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:02 PM", + "lastChgUserId": 36, + "localId": "PSN10095023GA01", + "mothersMaidenNm": "MOTHER PATERSON", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:02 PM", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "firstNm": "FIRSTMAX251", + "lastNm": "Wilkinson", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false, + "superClassType": "Entity" + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095026, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "FIRSTMAX251", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "Wilkinson", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [ + { + "personUid": 10095026, + "raceCd": "W", + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "raceCategoryCd": "W", + "raceDescTxt": "WHITE", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [ + { + "locatorUid": 10095027, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "cd": "H", + "classCd": "PST", + "lastChgTime": "Jun 13, 2024, 3:25:02 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:02 PM", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "useCd": "H", + "entityUid": 10095026, + "thePostalLocatorDto": { + "postalLocatorUid": 10095027, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cityDescTxt": "SOMECITY", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "stateCd": "23", + "streetAddr1": "5000 Staples Dr", + "streetAddr2": "APT100", + "zipCd": "30342", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "versionCtrlNbr": 1, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095026, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "OID", + "assigningAuthorityDescTxt": "LABC", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "rootExtensionTxt": "05540205114", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "typeCd": "PN", + "assigningAuthorityIdType": "ISO", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "entityUid": 10095026, + "entityIdSeq": 2, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "OID", + "assigningAuthorityDescTxt": "AssignAuth", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "rootExtensionTxt": "17485458372", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "typeCd": "PI", + "assigningAuthorityIdType": "ISO", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PAT", + "patientMatchedFound": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10091043, + "personParentUid": 10091043, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PAT", + "cdDescTxt": "Observation Participant", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10091043GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "FIRSTNOK1", + "lastNm": "TESTNOK114B", + "middleNm": "X", + "nmPrefix": "DR", + "nmSuffix": "JR", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "FIRSTNOK1", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "TESTNOK114B", + "middleNm": "X", + "nmPrefix": "DR", + "nmSuffix": "JR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "cd": "H", + "cdDescTxt": "House", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "EC", + "entityUid": -5, + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cityDescTxt": "COLUMBIA", + "cntryCd": "840", + "cntyCd": "RICHLAND", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "stateCd": "45", + "streetAddr1": "12 MAIN STREET", + "streetAddr2": "SUITE 16", + "zipCd": "30329", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "cd": "PH", + "cdDescTxt": "PHONE", + "classCd": "TELE", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "H", + "entityUid": -5, + "theTeleLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "extensionTxt": "123", + "phoneNbrTxt": "803-555-1212", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "NOK", + "patientMatchedFound": true, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095030, + "personParentUid": 10095030, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095030GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "SUSAN", + "lastNm": "JONES", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095030, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "firstNm": "SUSAN", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095030, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "342384", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": -12, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "firstNm": "GERRY", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "BRENTNALL", + "middleNm": "LEE", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "SR", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cd": "O", + "cdDescTxt": "Office", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cityDescTxt": "SYLACAUGA", + "cntryCd": "840", + "cntyCd": "RICHLAND", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "stateCd": "01", + "streetAddr1": "380 WEST HILL ST.", + "streetAddr2": " ", + "zipCd": "35150", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "cd": "PH", + "cdDescTxt": "PHONE", + "classCd": "TELE", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -12, + "theTeleLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "extensionTxt": "null", + "phoneNbrTxt": "256-249-5780", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [ + { + "entityUid": -11, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "46466", + "statusCd": "A", + "typeCd": "PRN", + "typeDescTxt": "Provider Registration Number", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095031, + "personParentUid": 10095031, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095031GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "TOM", + "lastNm": "JONES", + "nmPrefix": "DR", + "nmSuffix": "JR", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095031, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "TOM", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "middleNm": "L", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "JR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095031, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "22582", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095032, + "personParentUid": 10095032, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095032GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "THOMAS", + "lastNm": "MOORE", + "nmPrefix": "DR", + "nmSuffix": "III", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095032, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "THOMAS", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "MOORE", + "middleNm": "E", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "III", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095032, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "22582", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095033, + "personParentUid": 10095033, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095033GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "SAM", + "lastNm": "JONES", + "nmPrefix": "MR", + "nmSuffix": "JR", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095033, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "SAM", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "middleNm": "A", + "nmDegree": "MT", + "nmPrefix": "MR", + "nmSuffix": "JR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095033, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "44", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095034, + "personParentUid": 10095034, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095034GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "THOMASINA", + "lastNm": "JONES", + "nmPrefix": "MS", + "nmSuffix": "II", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095034, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "THOMASINA", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "middleNm": "LEE ANN", + "nmDegree": "RA", + "nmPrefix": "MS", + "nmSuffix": "II", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095034, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "82", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095035, + "personParentUid": 10095035, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095035GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "GERRY", + "lastNm": "MATHIS", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095035, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "firstNm": "GERRY", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "MATHIS", + "middleNm": "LEE", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "SR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:03 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095035, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "46214", + "statusCd": "A", + "typeCd": "PRN", + "typeDescTxt": "Provider Registration Number", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095036, + "personParentUid": 10095036, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095036GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "THOMAS", + "lastNm": "JONES", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095036, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "firstNm": "THOMAS", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "middleNm": "LEE", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "III", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:03 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095036, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "44582", + "statusCd": "A", + "typeCd": "PRN", + "typeDescTxt": "Provider Registration Number", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095037, + "personParentUid": 10095037, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095037GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "JERRY", + "lastNm": "MARTIN", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095037, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "firstNm": "JERRY", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "MARTIN", + "middleNm": "L", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "JR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:03 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095037, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "46111", + "statusCd": "A", + "typeCd": "PRN", + "typeDescTxt": "Provider Registration Number", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [ + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "AUT", + "typeDescTxt": "Author", + "subjectEntityUid": 10004635, + "cd": "SF", + "actClassCd": "OBS", + "subjectClassCd": "ORG", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "PATSBJ", + "typeDescTxt": "Patient Subject", + "subjectEntityUid": 10095026, + "cd": "PAT", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ORD", + "typeDescTxt": "Orderer", + "subjectEntityUid": 10002002, + "cd": "OP", + "actClassCd": "OBS", + "subjectClassCd": "ORG", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "SPC", + "typeDescTxt": "Specimen", + "subjectEntityUid": 10003042, + "cd": "NI", + "actClassCd": "OBS", + "subjectClassCd": "MAT", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ORD", + "typeDescTxt": "Orderer", + "subjectEntityUid": 10091010, + "cd": "OP", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "VRF", + "typeDescTxt": "Verifier", + "subjectEntityUid": 10095031, + "cd": "LABP", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ASS", + "typeDescTxt": "Assistant", + "subjectEntityUid": 10095032, + "cd": "ASS", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "PRF", + "typeDescTxt": "Performer", + "subjectEntityUid": 10095033, + "cd": "LABP", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ENT", + "typeDescTxt": "Enterer", + "subjectEntityUid": 10095034, + "cd": "ENT", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "PRF", + "typeDescTxt": "Performer", + "subjectEntityUid": 10002005, + "cd": "RE", + "actClassCd": "OBS", + "subjectClassCd": "ORG", + "actUid": 10004075, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theActRelationshipDtoCollection": [ + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "sequenceNbr": 1, + "statusCd": "A", + "sourceActUid": 10004075, + "typeDescTxt": "Has Component", + "targetActUid": 10004074, + "sourceClassCd": "OBS", + "targetClassCd": "OBS", + "typeCd": "COMP", + "isShareInd": false, + "isNNDInd": false, + "isExportInd": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theOrganizationContainerCollection": [ + { + "theOrganizationDto": { + "organizationUid": 10004635, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cd": "ORG", + "cdDescTxt": "Laboratory", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "ORG10004635GA01", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "standardIndustryClassCd": "CLIA", + "standardIndustryDescTxt": "LABCORP", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "displayNm": "LABCORP", + "electronicInd": "Y", + "versionCtrlNbr": 1, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false, + "superClassType": "Entity" + }, + "theOrganizationNameDtoCollection": [ + { + "organizationUid": 10004635, + "organizationNameSeq": 1, + "nmTxt": "LABCORP", + "nmUseCd": "L", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10004635, + "entityIdSeq": 1, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20D0649525", + "statusCd": "A", + "typeCd": "FI", + "typeDescTxt": "Facility Identifier", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "role": "SF", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "theOrganizationDto": { + "organizationUid": 10002002, + "addUserId": 36, + "cd": "OTH", + "cdDescTxt": "Other", + "standardIndustryClassCd": "621399", + "standardIndustryDescTxt": "Offices of Misc. Health Providers", + "displayNm": "COOSA VALLEY MEDICAL CENTER", + "electronicInd": "Y", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theOrganizationNameDtoCollection": [ + { + "organizationNameSeq": 0, + "nmTxt": "COOSA VALLEY MEDICAL CENTER", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cd": "O", + "cdDescTxt": "Office", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -6, + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cityDescTxt": "SYLACAUGA", + "cntryCd": "840", + "cntyCd": "RICHLAND", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "stateCd": "01", + "streetAddr1": "315 WEST HICKORY ST.", + "streetAddr2": "SUITE 100", + "zipCd": "35150", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cd": "PH", + "cdDescTxt": "PHONE", + "classCd": "TELE", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -6, + "theTeleLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "extensionTxt": "123", + "phoneNbrTxt": "256-249-5780", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [], + "role": "OP", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "theOrganizationDto": { + "organizationUid": 10002005, + "addUserId": 36, + "cd": "LAB", + "cdDescTxt": "Laboratory", + "standardIndustryClassCd": "621511", + "standardIndustryDescTxt": "Medical Laboratory", + "displayNm": "Lab1", + "electronicInd": "Y", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theOrganizationNameDtoCollection": [ + { + "organizationNameSeq": 1, + "nmTxt": "Lab1", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cd": "O", + "cdDescTxt": "Office", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -28, + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cityDescTxt": "Blue Ash", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "stateCd": "39", + "streetAddr1": "1234 Cornell Park Dr", + "streetAddr2": " ", + "zipCd": "45241", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [ + { + "entityUid": -28, + "entityIdSeq": 1, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "2.16.840.1.114222.4.3.2.5.2.100", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "1234", + "statusCd": "A", + "typeCd": "FI", + "typeDescTxt": "Facility Identifier", + "assigningAuthorityIdType": "ISO", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "isOOSystemInd": false, + "isOOSystemPendInd": false, + "associatedNotificationsInd": false, + "isUnsavedNote": false, + "isMergeCase": false, + "isRenterant": false, + "isConversionHasModified": false, + "messageLogDTMap": {}, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "localId": "OBS10004074GA01", + "isParentObsInd": false, + "edxLabIdentiferDTColl": [ + { + "identifer": "77190-7", + "subMapID": "1", + "observationUid": -27, + "observationValues": [ + "100^1^:^1" + ] + } + ], + "entityName": "FIRSTMAX251 Wilkinson", + "userName": "superuser", + "universalIdType": "CLIA", + "publicHealthCaseUid": 0, + "notificationUid": 0, + "originalAssociatedPHCUid": 0, + "nbsInterfaceUid": 10000078, + "jurisdictionName": "Fulton County", + "programAreaName": "HEP", + "jurisdictionAndProgramAreaSuccessfullyDerived": false, + "algorithmHasInvestigation": false, + "investigationSuccessfullyCreated": false, + "investigationMissingFields": false, + "algorithmHasNotification": false, + "notificationSuccessfullyCreated": false, + "notificationMissingFields": false, + "labIsCreate": true, + "labIsCreateSuccess": true, + "labIsUpdateDRRQ": false, + "labIsUpdateDRSA": false, + "labIsUpdateSuccess": false, + "labIsMarkedAsReviewed": false, + "edxSusLabDTMap": { + "-27": { + "identifer": "77190-7", + "subMapID": "1", + "observationUid": -27.0, + "observationValues": [ + "100^1^:^1" + ] + } + }, + "addReasonCd": "because", + "rootObservationContainer": { + "theObservationDto": { + "observationUid": 10004074, + "activityToTime": "Apr 4, 2006, 1:39:00 AM", + "addTime": "Jun 13, 2024, 3:25:03 PM", + "addUserId": 10055282, + "altCd": "080186", + "altCdDescTxt": "CULTURE", + "altCdSystemCd": "L", + "altCdSystemDescTxt": "LOCAL", + "cd": "525-9", + "cdDescTxt": "ORGANISM COUNT", + "cdSystemCd": "LN", + "cdSystemDescTxt": "LOINC", + "ctrlCdDisplayForm": "LabReport", + "effectiveFromTime": "Mar 24, 2006, 4:55:00 PM", + "effectiveToTime": "Mar 24, 2006, 4:55:00 PM", + "electronicInd": "Y", + "jurisdictionCd": "130001", + "lastChgTime": "Jun 13, 2024, 3:25:03 PM", + "lastChgUserId": 10055282, + "obsDomainCd": "LabReport", + "obsDomainCdSt1": "Order", + "progAreaCd": "HEP", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:03 PM", + "rptToStateTime": "Jun 13, 2024, 3:25:01 PM", + "statusCd": "D", + "targetSiteCd": "LA", + "programJurisdictionOid": 1300100011, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false, + "superClassType": "Act" + }, + "theActIdDtoCollection": [ + { + "actUid": 10004074, + "actIdSeq": 1, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120509010020114_251.2", + "typeCd": "MCID", + "typeDescTxt": "Message Control ID", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "actUid": 10004074, + "actIdSeq": 2, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120601114", + "typeCd": "FN", + "typeDescTxt": "Filler Number", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theObservationReasonDtoCollection": [ + { + "observationUid": 10004074, + "reasonCd": "12365-4", + "reasonDescTxt": "TOTALLY CRAZY", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "multipleSubjectMatch": false, + "multipleOrderingProvider": false, + "multipleCollector": false, + "multiplePrincipalInterpreter": false, + "multipleOrderingFacility": false, + "multipleSpecimen": false, + "ethnicityCodeTranslated": true, + "obsMethodTranslated": true, + "raceTranslated": false, + "sexTranslated": true, + "ssnInvalid": false, + "nullClia": false, + "nextOfKin": true, + "isProvider": true, + "fillerNumberPresent": true, + "finalPostCorrected": false, + "preliminaryPostFinal": false, + "preliminaryPostCorrected": false, + "activityTimeOutOfSequence": false, + "multiplePerformingLab": false, + "orderTestNameMissing": false, + "reflexOrderedTestCdMissing": false, + "reflexResultedTestCdMissing": false, + "resultedTestNameMissing": false, + "drugNameMissing": false, + "obsStatusTranslated": true, + "relationship": "FTH", + "activityToTimeMissing": false, + "systemException": false, + "universalServiceIdMissing": false, + "missingOrderingProvider": false, + "missingOrderingFacility": false, + "multipleReceivingFacility": false, + "personParentUid": 10095023, + "patientMatch": false, + "multipleOBR": false, + "multipleSubject": false, + "noSubject": false, + "orderOBRWithParent": false, + "childOBRWithoutParent": false, + "invalidXML": false, + "missingOrderingProviderandFacility": false, + "createLabPermission": true, + "updateLabPermission": true, + "markAsReviewPermission": true, + "createInvestigationPermission": true, + "createNotificationPermission": true, + "matchingAlgorithm": true, + "unexpectedResultType": false, + "childSuscWithoutParentResult": false, + "fieldTruncationError": false, + "invalidDateError": false, + "labAssociatedToInv": false, + "reasonforStudyCdMissing": false, + "status": "Success", + "wdsReports": [], + "errorText": "2", + "isContactRecordDoc": false, + "eDXEventProcessCaseSummaryDTMap": {}, + "isUpdatedDocument": false, + "isLabReportDoc": false, + "isMorbReportDoc": false, + "isCaseUpdated": false, + "edxActivityLogDto": { + "businessObjLocalId": "OBS10004074GA01", + "EDXActivityLogDTDetails": [], + "newaddedCodeSets": {}, + "logDetailAllStatus": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } +} \ No newline at end of file diff --git a/data-processing-service/src/test/resources/test_data/wds/wds_reviewed_lab.json b/data-processing-service/src/test/resources/test_data/wds/wds_reviewed_lab.json index 2ff090b25..9ac21f2ba 100644 --- a/data-processing-service/src/test/resources/test_data/wds/wds_reviewed_lab.json +++ b/data-processing-service/src/test/resources/test_data/wds/wds_reviewed_lab.json @@ -1 +1,2133 @@ -{"associatedNotificationInd":false,"associatedInvInd":false,"theObservationContainerCollection":[{"theObservationDto":{"observationUid":10004074,"activityToTime":"Apr 4, 2006, 1:39:00 AM","addTime":"Jun 13, 2024, 3:25:03 PM","addUserId":10055282,"altCd":"080186","altCdDescTxt":"CULTURE","altCdSystemCd":"L","altCdSystemDescTxt":"LOCAL","cd":"525-9","cdDescTxt":"ORGANISM COUNT","cdSystemCd":"LN","cdSystemDescTxt":"LOINC","ctrlCdDisplayForm":"LabReport","effectiveFromTime":"Mar 24, 2006, 4:55:00 PM","effectiveToTime":"Mar 24, 2006, 4:55:00 PM","electronicInd":"Y","jurisdictionCd":"130001","lastChgTime":"Jun 13, 2024, 3:25:03 PM","lastChgUserId":10055282,"obsDomainCd":"LabReport","obsDomainCdSt1":"Order","progAreaCd":"HEP","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:03 PM","rptToStateTime":"Jun 13, 2024, 3:25:01 PM","statusCd":"D","targetSiteCd":"LA","programJurisdictionOid":1300100011,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false,"superClassType":"Act"},"theActIdDtoCollection":[{"actUid":10004074,"actIdSeq":1,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120509010020114_251.2","typeCd":"MCID","typeDescTxt":"Message Control ID","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"actUid":10004074,"actIdSeq":2,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120601114","typeCd":"FN","typeDescTxt":"Filler Number","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"theObservationReasonDtoCollection":[{"observationUid":10004074,"reasonCd":"12365-4","reasonDescTxt":"TOTALLY CRAZY","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"theObservationDto":{"observationUid":-27,"activityToTime":"Apr 1, 2006, 12:00:00 AM","addUserId":10055282,"altCd":"080133","altCdSystemCd":"L","altCdSystemDescTxt":"LOCAL","cd":"77190-7","cdDescTxt":"TITER","cdSystemCd":"LN","cdSystemDescTxt":"LOINC","ctrlCdDisplayForm":"LabReport","electronicInd":"Y","lastChgUserId":10055282,"methodCd":"","methodDescTxt":"","obsDomainCdSt1":"Result","statusCd":"D","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"theActIdDtoCollection":[{"actUid":10004075,"actIdSeq":1,"assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120509010020114_251.2","typeCd":"MCID","typeDescTxt":"Message Control ID","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"actUid":10004075,"actIdSeq":2,"assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"20120601114","typeCd":"FN","typeDescTxt":"Filler Number","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"theObsValueNumericDtoCollection":[{"observationUid":10004075,"obsValueNumericSeq":1,"lowRange":"10-100","comparatorCd1":"100","numericValue1":1,"numericValue2":1,"numericUnitCd":"mL","separatorCd":":","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theMaterialContainerCollection":[{"theMaterialDto":{"materialUid":-9,"addTime":"Jun 13, 2024, 3:25:04 PM","addUserId":36,"description":"SOURCE NOT SPECIFIED","lastChgTime":"Jun 13, 2024, 3:25:04 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false,"superClassType":"Entity"},"theEntityIdDtoCollection":[{"entityUid":10003042,"entityIdSeq":0,"addTime":"Jun 13, 2024, 3:25:01 PM","asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"56789","typeCd":"SPC","typeDescTxt":"Specimen","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theRoleDtoCollection":[{"roleSeq":1,"cd":"NI","cdDescTxt":"No Information Given","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PATIENT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10003042,"scopingClassCd":"PATIENT","subjectClassCd":"MAT","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"cd":"SF","cdDescTxt":"Sending Facility","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","subjectEntityUid":10004635,"subjectClassCd":"HCFAC","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"LABP","cdDescTxt":"Laboratory Provider","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095034,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"LABP","cdDescTxt":"Laboratory Provider","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095033,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":12,"addReasonCd":"because","cd":"FTH","cdDescTxt":"Next of Kin","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10091043,"scopingClassCd":"PAT","subjectClassCd":"CON","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"PAT","cdDescTxt":"PATIENT","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","subjectEntityUid":10095026,"subjectClassCd":"PATIENT","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":2,"cd":"NI","cdDescTxt":"No Information Given","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"SPP","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095030,"scopingRoleSeq":1,"subjectEntityUid":10003042,"scopingClassCd":"PRV","subjectClassCd":"MAT","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"LABP","cdDescTxt":"Laboratory Provider","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095031,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"CT","cdDescTxt":"Copy To","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095036,"scopingClassCd":"PAT","subjectClassCd":"PROV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"LABP","cdDescTxt":"Laboratory Provider","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095032,"scopingClassCd":"PAT","subjectClassCd":"PRV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"CT","cdDescTxt":"Copy To","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095035,"scopingClassCd":"PAT","subjectClassCd":"PROV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"cd":"SPP","cdDescTxt":"Specimen Procurer","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095030,"scopingClassCd":"PAT","subjectClassCd":"PROV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"roleSeq":1,"addReasonCd":"because","cd":"CT","cdDescTxt":"Copy To","lastChgTime":"Jun 13, 2024, 3:25:04 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:04 PM","scopingRoleCd":"PAT","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:04 PM","scopingEntityUid":10095026,"scopingRoleSeq":1,"subjectEntityUid":10095037,"scopingClassCd":"PAT","subjectClassCd":"PROV","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"eDXDocumentCollection":[{"actUid":10004074,"payload":"\u003cContainer xmlns\u003d\"http://www.cdc.gov/NEDSS\"\u003e\n \u003cHL7LabReport\u003e\n \u003cHL7MSH\u003e\n \u003cFieldSeparator\u003e|\u003c/FieldSeparator\u003e\n \u003cEncodingCharacters\u003e^~\\\u0026amp;\u003c/EncodingCharacters\u003e\n \u003cSendingApplication\u003e\n \u003cHL7NamespaceID\u003eLABCORP-CORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/SendingApplication\u003e\n \u003cSendingFacility\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/SendingFacility\u003e\n \u003cReceivingApplication\u003e\n \u003cHL7NamespaceID\u003eALDOH\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingApplication\u003e\n \u003cReceivingFacility\u003e\n \u003cHL7NamespaceID\u003eAL\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingFacility\u003e\n \u003cDateTimeOfMessage\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfMessage\u003e\n \u003cSecurity\u003e\u003c/Security\u003e\n \u003cMessageType\u003e\n \u003cMessageCode\u003eORU\u003c/MessageCode\u003e\n \u003cTriggerEvent\u003eR01\u003c/TriggerEvent\u003e\n \u003cMessageStructure\u003eORU_R01\u003c/MessageStructure\u003e\n \u003c/MessageType\u003e\n \u003cMessageControlID\u003e20120509010020114_251.2\u003c/MessageControlID\u003e\n \u003cProcessingID\u003e\n \u003cHL7ProcessingID\u003eD\u003c/HL7ProcessingID\u003e\n \u003cHL7ProcessingMode\u003e\u003c/HL7ProcessingMode\u003e\n \u003c/ProcessingID\u003e\n \u003cVersionID\u003e\n \u003cHL7VersionID\u003e2.5.1\u003c/HL7VersionID\u003e\n \u003c/VersionID\u003e\n \u003cAcceptAcknowledgmentType\u003eNE\u003c/AcceptAcknowledgmentType\u003e\n \u003cApplicationAcknowledgmentType\u003eNE\u003c/ApplicationAcknowledgmentType\u003e\n \u003cCountryCode\u003eUSA\u003c/CountryCode\u003e\n \u003cMessageProfileIdentifier\u003e\n \u003cHL7EntityIdentifier\u003eV251_IG_LB_LABRPTPH_R1_INFORM_2010FEB\u003c/HL7EntityIdentifier\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.5\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/MessageProfileIdentifier\u003e\n \u003c/HL7MSH\u003e\n \u003cHL7SoftwareSegment\u003e\n \u003cSoftwareVendorOrganization\u003e\n \u003cHL7OrganizationName\u003eMirth Corp.\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/SoftwareVendorOrganization\u003e\n \u003cSoftwareCertifiedVersionOrReleaseNumber\u003e2.0\u003c/SoftwareCertifiedVersionOrReleaseNumber\u003e\n \u003cSoftwareProductName\u003eMirth Connect\u003c/SoftwareProductName\u003e\n \u003cSoftwareBinaryID\u003e789654\u003c/SoftwareBinaryID\u003e\n \u003cSoftwareProductInformation/\u003e\n \u003cSoftwareInstallDate\u003e\n \u003cyear\u003e2011\u003c/year\u003e\n \u003cmonth\u003e1\u003c/month\u003e\n \u003cday\u003e1\u003c/day\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SoftwareInstallDate\u003e\n \u003c/HL7SoftwareSegment\u003e\n \u003cHL7PATIENT_RESULT\u003e\n \u003cPATIENT\u003e\n \u003cPatientIdentification\u003e\n \u003cSetIDPID\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDPID\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e05540205114\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eLABC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePN\u003c/HL7IdentifierTypeCode\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e17485458372\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eAssignAuth\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePI\u003c/HL7IdentifierTypeCode\u003e\n \u003cHL7AssigningFacility\u003e\n \u003cHL7NamespaceID\u003eNE CLINIC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e24D1040593\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningFacility\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eWilkinson\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTMAX251\u003c/HL7GivenName\u003e\n \u003c/PatientName\u003e\n \u003cMothersMaidenName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMOTHER\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003ePATERSON\u003c/HL7GivenName\u003e\n \u003c/MothersMaidenName\u003e\n \u003cDateTimeOfBirth\u003e\n \u003cyear\u003e1960\u003c/year\u003e\n \u003cmonth\u003e11\u003c/month\u003e\n \u003cday\u003e9\u003c/day\u003e\n \u003chours\u003e20\u003c/hours\u003e\n \u003cminutes\u003e25\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfBirth\u003e\n \u003cAdministrativeSex\u003eF\u003c/AdministrativeSex\u003e\n \u003cRace\u003e\n \u003cHL7Identifier\u003eW\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eWHITE\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eHL70005\u003c/HL7NameofCodingSystem\u003e\n \u003c/Race\u003e\n \u003cPatientAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e5000 Staples Dr\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eAPT100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSOMECITY\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eME\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30342\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7AddressType\u003eH\u003c/HL7AddressType\u003e\n \u003c/PatientAddress\u003e\n \u003cBirthOrder/\u003e\n \u003c/PatientIdentification\u003e\n \u003cNextofKinAssociatedParties\u003e\n \u003cSetIDNK1\u003e1\u003c/SetIDNK1\u003e\n \u003cName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eTESTNOK114B\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTNOK1\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eX\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/Name\u003e\n \u003cRelationship\u003e\n \u003cHL7Identifier\u003eFTH\u003c/HL7Identifier\u003e\n \u003c/Relationship\u003e\n \u003cAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e12 MAIN STREET\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 16\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eCOLUMBIA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eSC\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30329\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/Address\u003e\n \u003cPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e803\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e5551212\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/PhoneNumber\u003e\n \u003c/NextofKinAssociatedParties\u003e\n \u003c/PATIENT\u003e\n \u003cORDER_OBSERVATION\u003e\n \u003cCommonOrder\u003e\n \u003cOrderControl\u003eRE\u003c/OrderControl\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cOrderingFacilityName\u003e\n \u003cHL7OrganizationName\u003eCOOSA VALLEY MEDICAL CENTER\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/OrderingFacilityName\u003e\n \u003cOrderingFacilityAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e315 WEST HICKORY ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingFacilityAddress\u003e\n \u003cOrderingFacilityPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/OrderingFacilityPhoneNumber\u003e\n \u003cOrderingProviderAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e380 WEST HILL ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingProviderAddress\u003e\n \u003c/CommonOrder\u003e\n \u003cObservationRequest\u003e\n \u003cSetIDOBR\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBR\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cUniversalServiceIdentifier\u003e\n \u003cHL7Identifier\u003e525-9\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eORGANISM COUNT\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n \u003cHL7AlternateIdentifier\u003e080186\u003c/HL7AlternateIdentifier\u003e\n \u003cHL7AlternateText\u003eCULTURE\u003c/HL7AlternateText\u003e\n \u003c/UniversalServiceIdentifier\u003e\n \u003cObservationDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationDateTime\u003e\n \u003cObservationEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationEndDateTime\u003e\n \u003cCollectorIdentifier\u003e\n \u003cHL7IDNumber\u003e342384\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSUSAN\u003c/HL7GivenName\u003e\n \u003c/CollectorIdentifier\u003e\n \u003cOrderingProvider\u003e\n \u003cHL7IDNumber\u003e46466\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eBRENTNALL\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/OrderingProvider\u003e\n \u003cOrderCallbackPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension/\u003e\n \u003c/OrderCallbackPhoneNumber\u003e\n \u003cResultsRptStatusChngDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cminutes\u003e39\u003c/minutes\u003e\n \u003cseconds\u003e0\u003c/seconds\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ResultsRptStatusChngDateTime\u003e\n \u003cResultStatus\u003eF\u003c/ResultStatus\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46214\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMATHIS\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e44582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46111\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMARTIN\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eJERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cReasonforStudy\u003e\n \u003cHL7Identifier\u003e12365-4\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eTOTALLY CRAZY\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eI9\u003c/HL7NameofCodingSystem\u003e\n \u003c/ReasonforStudy\u003e\n \u003cPrincipalResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTOM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/PrincipalResultInterpreter\u003e\n \u003cAssistantResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eMOORE\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/AssistantResultInterpreter\u003e\n \u003cTechnician\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e44\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSAM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eA\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMT\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Technician\u003e\n \u003cTranscriptionist\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e82\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMASINA\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE ANN\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMS\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eRA\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Transcriptionist\u003e\n \u003cNumberofSampleContainers/\u003e\n \u003c/ObservationRequest\u003e\n \u003cPatientResultOrderObservation\u003e\n \u003cOBSERVATION\u003e\n \u003cObservationResult\u003e\n \u003cSetIDOBX\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBX\u003e\n \u003cValueType\u003eSN\u003c/ValueType\u003e\n \u003cObservationIdentifier\u003e\n\u003cHL7Identifier\u003e77190-7\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eTITER\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n\u003cHL7AlternateIdentifier\u003e080133\u003c/HL7AlternateIdentifier\u003e\n \u003c/ObservationIdentifier\u003e\n \u003cObservationSubID\u003e1\u003c/ObservationSubID\u003e\n \u003cObservationValue\u003e100^1^:^1\u003c/ObservationValue\u003e\n \u003cUnits\u003e\n\u003cHL7Identifier\u003emL\u003c/HL7Identifier\u003e\n \u003c/Units\u003e\n \u003cReferencesRange\u003e10-100\u003c/ReferencesRange\u003e\n \u003cProbability/\u003e\n \u003cObservationResultStatus\u003eF\u003c/ObservationResultStatus\u003e\n \u003cProducersReference\u003e\n\u003cHL7Identifier\u003e20D0649525\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eLABCORP BIRMINGHAM\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eCLIA\u003c/HL7NameofCodingSystem\u003e\n \u003c/ProducersReference\u003e\n \u003cDateTimeOftheAnalysis\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e4\u003c/month\u003e\n\u003cday\u003e1\u003c/day\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOftheAnalysis\u003e\n \u003cPerformingOrganizationName\u003e\n\u003cHL7OrganizationName\u003eLab1\u003c/HL7OrganizationName\u003e\n\u003cHL7OrganizationNameTypeCode\u003eL\u003c/HL7OrganizationNameTypeCode\u003e\n\u003cHL7IDNumber/\u003e\n\u003cHL7CheckDigit/\u003e\n\u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eCLIA\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.100\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n\u003c/HL7AssigningAuthority\u003e\n\u003cHL7OrganizationIdentifier\u003e1234\u003c/HL7OrganizationIdentifier\u003e\n \u003c/PerformingOrganizationName\u003e\n \u003cPerformingOrganizationAddress\u003e\n\u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e1234 Cornell Park Dr\u003c/HL7StreetOrMailingAddress\u003e\n\u003c/HL7StreetAddress\u003e\n\u003cHL7City\u003eBlue Ash\u003c/HL7City\u003e\n\u003cHL7StateOrProvince\u003eOH\u003c/HL7StateOrProvince\u003e\n\u003cHL7ZipOrPostalCode\u003e45241\u003c/HL7ZipOrPostalCode\u003e\n \u003c/PerformingOrganizationAddress\u003e\n \u003cPerformingOrganizationMedicalDirector\u003e\n\u003cHL7IDNumber\u003e9876543\u003c/HL7IDNumber\u003e\n\u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n\u003c/HL7FamilyName\u003e\n\u003cHL7GivenName\u003eBOB\u003c/HL7GivenName\u003e\n\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eF\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n\u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/PerformingOrganizationMedicalDirector\u003e\n \u003c/ObservationResult\u003e\n \u003c/OBSERVATION\u003e\n \u003c/PatientResultOrderObservation\u003e\n \u003cPatientResultOrderSPMObservation\u003e\n \u003cSPECIMEN\u003e\n \u003cSPECIMEN\u003e\n \u003cSetIDSPM\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDSPM\u003e\n \u003cSpecimenID\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e56789\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenID\u003e\n \u003cSpecimenParentIDs\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenParentIDs\u003e\n \u003cSpecimenType\u003e\n\u003cHL7AlternateIdentifier\u003eBLD\u003c/HL7AlternateIdentifier\u003e\n\u003cHL7AlternateText\u003eBLOOD\u003c/HL7AlternateText\u003e\n\u003cHL7NameofAlternateCodingSystem\u003eL\u003c/HL7NameofAlternateCodingSystem\u003e\n \u003c/SpecimenType\u003e\n \u003cSpecimenSourceSite\u003e\n\u003cHL7Identifier\u003eLA\u003c/HL7Identifier\u003e\n\u003cHL7NameofCodingSystem\u003eHL70070\u003c/HL7NameofCodingSystem\u003e\n \u003c/SpecimenSourceSite\u003e\n \u003cGroupedSpecimenCount/\u003e\n \u003cSpecimenDescription\u003eSOURCE NOT SPECIFIED\u003c/SpecimenDescription\u003e\n \u003cSpecimenCollectionDateTime\u003e\n\u003cHL7RangeStartDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeStartDateTime\u003e\n\u003cHL7RangeEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeEndDateTime\u003e\n \u003c/SpecimenCollectionDateTime\u003e\n \u003cSpecimenReceivedDateTime\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e3\u003c/month\u003e\n\u003cday\u003e25\u003c/day\u003e\n\u003chours\u003e1\u003c/hours\u003e\n\u003cminutes\u003e37\u003c/minutes\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SpecimenReceivedDateTime\u003e\n \u003cNumberOfSpecimenContainers/\u003e\n \u003c/SPECIMEN\u003e\n \u003c/SPECIMEN\u003e\n \u003c/PatientResultOrderSPMObservation\u003e\n \u003c/ORDER_OBSERVATION\u003e\n \u003c/HL7PATIENT_RESULT\u003e\n \u003c/HL7LabReport\u003e\n\u003c/Container\u003e\n\n\u003c!-- raw_message_id \u003d D09DCC71-5B0F-4C28-9395-B831B3F2CEC3 --\u003e","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","addTime":"Jun 13, 2024, 3:25:01 PM","docTypeCd":"11648804","nbsDocumentMetadataUid":1005,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"manualLab":false,"pageProxyTypeCd":"","isSTDProgramArea":false,"thePersonContainerCollection":[{"thePersonDto":{"personUid":10095026,"personParentUid":10095023,"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:02 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","birthTime":"Nov 9, 1960, 12:00:00 AM","birthTimeCalc":"Nov 9, 1960, 12:00:00 AM","cd":"PAT","cdDescTxt":"Observation Subject","currSexCd":"F","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:02 PM","lastChgUserId":36,"localId":"PSN10095023GA01","mothersMaidenNm":"MOTHER PATERSON","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:02 PM","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","firstNm":"FIRSTMAX251","lastNm":"Wilkinson","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false,"superClassType":"Entity"},"thePersonNameDtoCollection":[{"personUid":10095026,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","firstNm":"FIRSTMAX251","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"Wilkinson","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[{"personUid":10095026,"raceCd":"W","addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","raceCategoryCd":"W","raceDescTxt":"WHITE","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[{"locatorUid":10095027,"asOfDate":"Jun 13, 2024, 3:25:01 PM","cd":"H","classCd":"PST","lastChgTime":"Jun 13, 2024, 3:25:02 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:02 PM","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","useCd":"H","entityUid":10095026,"thePostalLocatorDto":{"postalLocatorUid":10095027,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cityDescTxt":"SOMECITY","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","stateCd":"23","streetAddr1":"5000 Staples Dr","streetAddr2":"APT100","zipCd":"30342","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"versionCtrlNbr":1,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[{"entityUid":10095026,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"OID","assigningAuthorityDescTxt":"LABC","lastChgUserId":36,"recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","rootExtensionTxt":"05540205114","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","typeCd":"PN","assigningAuthorityIdType":"ISO","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"entityUid":10095026,"entityIdSeq":2,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"OID","assigningAuthorityDescTxt":"AssignAuth","lastChgUserId":36,"recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","rootExtensionTxt":"17485458372","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","typeCd":"PI","assigningAuthorityIdType":"ISO","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PAT","patientMatchedFound":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10091043,"personParentUid":10091043,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PAT","cdDescTxt":"Observation Participant","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10091043GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"FIRSTNOK1","lastNm":"TESTNOK114B","middleNm":"X","nmPrefix":"DR","nmSuffix":"JR","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","firstNm":"FIRSTNOK1","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"TESTNOK114B","middleNm":"X","nmPrefix":"DR","nmSuffix":"JR","nmUseCd":"L","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","cd":"H","cdDescTxt":"House","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"EC","entityUid":-5,"thePostalLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cityDescTxt":"COLUMBIA","cntryCd":"840","cntyCd":"RICHLAND","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","stateCd":"45","streetAddr1":"12 MAIN STREET","streetAddr2":"SUITE 16","zipCd":"30329","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","cd":"PH","cdDescTxt":"PHONE","classCd":"TELE","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"H","entityUid":-5,"theTeleLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"extensionTxt":"123","phoneNbrTxt":"803-555-1212","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"NOK","patientMatchedFound":true,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095030,"personParentUid":10095030,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095030GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"SUSAN","lastNm":"JONES","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095030,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"firstNm":"SUSAN","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"JONES","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095030,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"342384","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":-12,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","versionCtrlNbr":1,"isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personNameSeq":1,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"firstNm":"GERRY","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"BRENTNALL","middleNm":"LEE","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"SR","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cd":"O","cdDescTxt":"Office","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","thePostalLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cityDescTxt":"SYLACAUGA","cntryCd":"840","cntyCd":"RICHLAND","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","stateCd":"01","streetAddr1":"380 WEST HILL ST.","streetAddr2":" ","zipCd":"35150","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","cd":"PH","cdDescTxt":"PHONE","classCd":"TELE","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-12,"theTeleLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"extensionTxt":"null","phoneNbrTxt":"256-249-5780","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[{"entityUid":-11,"entityIdSeq":1,"addTime":"Jun 13, 2024, 3:25:01 PM","asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","recordStatusCd":"ACTIVE","rootExtensionTxt":"46466","statusCd":"A","typeCd":"PRN","typeDescTxt":"Provider Registration Number","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095031,"personParentUid":10095031,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095031GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"TOM","lastNm":"JONES","nmPrefix":"DR","nmSuffix":"JR","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095031,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","firstNm":"TOM","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"JONES","middleNm":"L","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"JR","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095031,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"22582","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095032,"personParentUid":10095032,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095032GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"THOMAS","lastNm":"MOORE","nmPrefix":"DR","nmSuffix":"III","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095032,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","firstNm":"THOMAS","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"MOORE","middleNm":"E","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"III","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095032,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"22582","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095033,"personParentUid":10095033,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095033GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"SAM","lastNm":"JONES","nmPrefix":"MR","nmSuffix":"JR","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095033,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","firstNm":"SAM","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"JONES","middleNm":"A","nmDegree":"MT","nmPrefix":"MR","nmSuffix":"JR","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095033,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"44","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095034,"personParentUid":10095034,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095034GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"THOMASINA","lastNm":"JONES","nmPrefix":"MS","nmSuffix":"II","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095034,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","firstNm":"THOMASINA","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"JONES","middleNm":"LEE ANN","nmDegree":"RA","nmPrefix":"MS","nmSuffix":"II","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:02 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095034,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"82","statusCd":"A","typeCd":"EI","typeDescTxt":"Employee Identifier","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095035,"personParentUid":10095035,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095035GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"GERRY","lastNm":"MATHIS","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095035,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"firstNm":"GERRY","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"MATHIS","middleNm":"LEE","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"SR","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:03 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095035,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"46214","statusCd":"A","typeCd":"PRN","typeDescTxt":"Provider Registration Number","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095036,"personParentUid":10095036,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095036GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"THOMAS","lastNm":"JONES","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095036,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"firstNm":"THOMAS","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"JONES","middleNm":"LEE","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"III","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:03 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095036,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"44582","statusCd":"A","typeCd":"PRN","typeDescTxt":"Provider Registration Number","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"thePersonDto":{"personUid":10095037,"personParentUid":10095037,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDateAdmin":"Jun 13, 2024, 3:25:01 PM","asOfDateEthnicity":"Jun 13, 2024, 3:25:01 PM","asOfDateGeneral":"Jun 13, 2024, 3:25:01 PM","asOfDateMorbidity":"Jun 13, 2024, 3:25:01 PM","asOfDateSex":"Jun 13, 2024, 3:25:01 PM","cd":"PRV","cdDescTxt":"Provider","electronicInd":"Y","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"PSN10095037GA01","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","firstNm":"JERRY","lastNm":"MARTIN","versionCtrlNbr":1,"edxInd":"Y","isCaseInd":false,"isReentrant":false,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"thePersonNameDtoCollection":[{"personUid":10095037,"personNameSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"firstNm":"JERRY","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"lastNm":"MARTIN","middleNm":"L","nmDegree":"MD","nmPrefix":"DR","nmSuffix":"JR","nmUseCd":"L","recordStatusCd":"ACTIVE","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:03 PM","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"thePersonRaceDtoCollection":[],"thePersonEthnicGroupDtoCollection":[],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10095037,"entityIdSeq":1,"addReasonCd":"Add","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"20D0649525","assigningAuthorityDescTxt":"LABCORP","lastChgUserId":36,"recordStatusCd":"ACTIVE","rootExtensionTxt":"46111","statusCd":"A","typeCd":"PRN","typeDescTxt":"Provider Registration Number","assigningAuthorityIdType":"CLIA","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[],"theRoleDtoCollection":[],"isExt":false,"isMPRUpdateValid":true,"role":"PROV","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"theParticipationDtoCollection":[{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"AUT","typeDescTxt":"Author","subjectEntityUid":10004635,"cd":"SF","actClassCd":"OBS","subjectClassCd":"ORG","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"PATSBJ","typeDescTxt":"Patient Subject","subjectEntityUid":10095026,"cd":"PAT","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ORD","typeDescTxt":"Orderer","subjectEntityUid":10002002,"cd":"OP","actClassCd":"OBS","subjectClassCd":"ORG","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"SPC","typeDescTxt":"Specimen","subjectEntityUid":10003042,"cd":"NI","actClassCd":"OBS","subjectClassCd":"MAT","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ORD","typeDescTxt":"Orderer","subjectEntityUid":10091010,"cd":"OP","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"VRF","typeDescTxt":"Verifier","subjectEntityUid":10095031,"cd":"LABP","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ASS","typeDescTxt":"Assistant","subjectEntityUid":10095032,"cd":"ASS","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"PRF","typeDescTxt":"Performer","subjectEntityUid":10095033,"cd":"LABP","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"ENT","typeDescTxt":"Enterer","subjectEntityUid":10095034,"cd":"ENT","actClassCd":"OBS","subjectClassCd":"PSN","actUid":10004074,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addReasonCd":"because","addUserId":36,"recordStatusCd":"ACTIVE","statusCd":"A","typeCd":"PRF","typeDescTxt":"Performer","subjectEntityUid":10002005,"cd":"RE","actClassCd":"OBS","subjectClassCd":"ORG","actUid":10004075,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theActRelationshipDtoCollection":[{"addTime":"Jun 13, 2024, 3:25:01 PM","lastChgTime":"Jun 13, 2024, 3:25:01 PM","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","sequenceNbr":1,"statusCd":"A","sourceActUid":10004075,"typeDescTxt":"Has Component","targetActUid":10004074,"sourceClassCd":"OBS","targetClassCd":"OBS","typeCd":"COMP","isShareInd":false,"isNNDInd":false,"isExportInd":false,"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theOrganizationContainerCollection":[{"theOrganizationDto":{"organizationUid":10004635,"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cd":"ORG","cdDescTxt":"Laboratory","lastChgTime":"Jun 13, 2024, 3:25:01 PM","lastChgUserId":36,"localId":"ORG10004635GA01","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","standardIndustryClassCd":"CLIA","standardIndustryDescTxt":"LABCORP","statusCd":"A","statusTime":"Jun 13, 2024, 3:25:01 PM","displayNm":"LABCORP","electronicInd":"Y","versionCtrlNbr":1,"itNew":false,"itOld":false,"itDirty":false,"itDelete":false,"superClassType":"Entity"},"theOrganizationNameDtoCollection":[{"organizationUid":10004635,"organizationNameSeq":1,"nmTxt":"LABCORP","nmUseCd":"L","itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityLocatorParticipationDtoCollection":[],"theEntityIdDtoCollection":[{"entityUid":10004635,"entityIdSeq":1,"assigningAuthorityCd":"CLIA","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"20D0649525","statusCd":"A","typeCd":"FI","typeDescTxt":"Facility Identifier","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"role":"SF","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"theOrganizationDto":{"organizationUid":10002002,"addUserId":36,"cd":"OTH","cdDescTxt":"Other","standardIndustryClassCd":"621399","standardIndustryDescTxt":"Offices of Misc. Health Providers","displayNm":"COOSA VALLEY MEDICAL CENTER","electronicInd":"Y","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"theOrganizationNameDtoCollection":[{"organizationNameSeq":0,"nmTxt":"COOSA VALLEY MEDICAL CENTER","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cd":"O","cdDescTxt":"Office","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-6,"thePostalLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cityDescTxt":"SYLACAUGA","cntryCd":"840","cntyCd":"RICHLAND","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","stateCd":"01","streetAddr1":"315 WEST HICKORY ST.","streetAddr2":"SUITE 100","zipCd":"35150","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false},{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cd":"PH","cdDescTxt":"PHONE","classCd":"TELE","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-6,"theTeleLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"extensionTxt":"123","phoneNbrTxt":"256-249-5780","recordStatusCd":"ACTIVE","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[],"role":"OP","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},{"theOrganizationDto":{"organizationUid":10002005,"addUserId":36,"cd":"LAB","cdDescTxt":"Laboratory","standardIndustryClassCd":"621511","standardIndustryDescTxt":"Medical Laboratory","displayNm":"Lab1","electronicInd":"Y","itNew":false,"itOld":false,"itDirty":false,"itDelete":false},"theOrganizationNameDtoCollection":[{"organizationNameSeq":1,"nmTxt":"Lab1","nmUseCd":"L","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityLocatorParticipationDtoCollection":[{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cd":"O","cdDescTxt":"Office","classCd":"PST","recordStatusCd":"ACTIVE","statusCd":"A","useCd":"WP","entityUid":-28,"thePostalLocatorDto":{"addTime":"Jun 13, 2024, 3:25:01 PM","addUserId":36,"cityDescTxt":"Blue Ash","recordStatusCd":"ACTIVE","recordStatusTime":"Jun 13, 2024, 3:25:01 PM","stateCd":"39","streetAddr1":"1234 Cornell Park Dr","streetAddr2":" ","zipCd":"45241","itNew":true,"itOld":false,"itDirty":false,"itDelete":false},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"theEntityIdDtoCollection":[{"entityUid":-28,"entityIdSeq":1,"asOfDate":"Jun 13, 2024, 3:25:01 PM","assigningAuthorityCd":"2.16.840.1.114222.4.3.2.5.2.100","assigningAuthorityDescTxt":"Clinical Laboratory Improvement Amendment","recordStatusCd":"ACTIVE","rootExtensionTxt":"1234","statusCd":"A","typeCd":"FI","typeDescTxt":"Facility Identifier","assigningAuthorityIdType":"ISO","itNew":true,"itOld":false,"itDirty":false,"itDelete":false}],"itNew":false,"itOld":false,"itDirty":false,"itDelete":false}],"isOOSystemInd":false,"isOOSystemPendInd":false,"associatedNotificationsInd":false,"isUnsavedNote":false,"isMergeCase":false,"isRenterant":false,"isConversionHasModified":false,"messageLogDTMap":{},"itNew":true,"itOld":false,"itDirty":false,"itDelete":false} \ No newline at end of file +{ + "associatedNotificationInd": false, + "associatedInvInd": false, + "theObservationContainerCollection": [ + { + "theObservationDto": { + "observationUid": 10004074, + "activityToTime": "Apr 4, 2006, 1:39:00 AM", + "addTime": "Jun 13, 2024, 3:25:03 PM", + "addUserId": 10055282, + "altCd": "080186", + "altCdDescTxt": "CULTURE", + "altCdSystemCd": "L", + "altCdSystemDescTxt": "LOCAL", + "cd": "525-9", + "cdDescTxt": "ORGANISM COUNT", + "cdSystemCd": "LN", + "cdSystemDescTxt": "LOINC", + "ctrlCdDisplayForm": "LabReport", + "effectiveFromTime": "Mar 24, 2006, 4:55:00 PM", + "effectiveToTime": "Mar 24, 2006, 4:55:00 PM", + "electronicInd": "Y", + "jurisdictionCd": "130001", + "lastChgTime": "Jun 13, 2024, 3:25:03 PM", + "lastChgUserId": 10055282, + "obsDomainCd": "LabReport", + "obsDomainCdSt1": "Order", + "progAreaCd": "HEP", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:03 PM", + "rptToStateTime": "Jun 13, 2024, 3:25:01 PM", + "statusCd": "D", + "targetSiteCd": "LA", + "programJurisdictionOid": 1300100011, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false, + "superClassType": "Act" + }, + "theActIdDtoCollection": [ + { + "actUid": 10004074, + "actIdSeq": 1, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120509010020114_251.2", + "typeCd": "MCID", + "typeDescTxt": "Message Control ID", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "actUid": 10004074, + "actIdSeq": 2, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120601114", + "typeCd": "FN", + "typeDescTxt": "Filler Number", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theObservationReasonDtoCollection": [ + { + "observationUid": 10004074, + "reasonCd": "12365-4", + "reasonDescTxt": "TOTALLY CRAZY", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "theObservationDto": { + "observationUid": -27, + "activityToTime": "Apr 1, 2006, 12:00:00 AM", + "addUserId": 10055282, + "altCd": "080133", + "altCdSystemCd": "L", + "altCdSystemDescTxt": "LOCAL", + "cd": "77190-7", + "cdDescTxt": "TITER", + "cdSystemCd": "LN", + "cdSystemDescTxt": "LOINC", + "ctrlCdDisplayForm": "LabReport", + "electronicInd": "Y", + "lastChgUserId": 10055282, + "methodCd": "", + "methodDescTxt": "", + "obsDomainCdSt1": "Result", + "statusCd": "D", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theActIdDtoCollection": [ + { + "actUid": 10004075, + "actIdSeq": 1, + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120509010020114_251.2", + "typeCd": "MCID", + "typeDescTxt": "Message Control ID", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "actUid": 10004075, + "actIdSeq": 2, + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20120601114", + "typeCd": "FN", + "typeDescTxt": "Filler Number", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theObsValueNumericDtoCollection": [ + { + "observationUid": 10004075, + "obsValueNumericSeq": 1, + "lowRange": "10-100", + "comparatorCd1": "100", + "numericValue1": 1, + "numericValue2": 1, + "numericUnitCd": "mL", + "separatorCd": ":", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theMaterialContainerCollection": [ + { + "theMaterialDto": { + "materialUid": -9, + "addTime": "Jun 13, 2024, 3:25:04 PM", + "addUserId": 36, + "description": "SOURCE NOT SPECIFIED", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false, + "superClassType": "Entity" + }, + "theEntityIdDtoCollection": [ + { + "entityUid": 10003042, + "entityIdSeq": 0, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "56789", + "typeCd": "SPC", + "typeDescTxt": "Specimen", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theRoleDtoCollection": [ + { + "roleSeq": 1, + "cd": "NI", + "cdDescTxt": "No Information Given", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PATIENT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10003042, + "scopingClassCd": "PATIENT", + "subjectClassCd": "MAT", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "cd": "SF", + "cdDescTxt": "Sending Facility", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "subjectEntityUid": 10004635, + "subjectClassCd": "HCFAC", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "LABP", + "cdDescTxt": "Laboratory Provider", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095034, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "LABP", + "cdDescTxt": "Laboratory Provider", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095033, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 12, + "addReasonCd": "because", + "cd": "FTH", + "cdDescTxt": "Next of Kin", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10091043, + "scopingClassCd": "PAT", + "subjectClassCd": "CON", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "PAT", + "cdDescTxt": "PATIENT", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "subjectEntityUid": 10095026, + "subjectClassCd": "PATIENT", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 2, + "cd": "NI", + "cdDescTxt": "No Information Given", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "SPP", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095030, + "scopingRoleSeq": 1, + "subjectEntityUid": 10003042, + "scopingClassCd": "PRV", + "subjectClassCd": "MAT", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "LABP", + "cdDescTxt": "Laboratory Provider", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095031, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "CT", + "cdDescTxt": "Copy To", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095036, + "scopingClassCd": "PAT", + "subjectClassCd": "PROV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "LABP", + "cdDescTxt": "Laboratory Provider", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095032, + "scopingClassCd": "PAT", + "subjectClassCd": "PRV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "CT", + "cdDescTxt": "Copy To", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095035, + "scopingClassCd": "PAT", + "subjectClassCd": "PROV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "cd": "SPP", + "cdDescTxt": "Specimen Procurer", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095030, + "scopingClassCd": "PAT", + "subjectClassCd": "PROV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "roleSeq": 1, + "addReasonCd": "because", + "cd": "CT", + "cdDescTxt": "Copy To", + "lastChgTime": "Jun 13, 2024, 3:25:04 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingRoleCd": "PAT", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:04 PM", + "scopingEntityUid": 10095026, + "scopingRoleSeq": 1, + "subjectEntityUid": 10095037, + "scopingClassCd": "PAT", + "subjectClassCd": "PROV", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "eDXDocumentCollection": [ + { + "actUid": 10004074, + "payload": "\u003cContainer xmlns\u003d\"http://www.cdc.gov/NEDSS\"\u003e\n \u003cHL7LabReport\u003e\n \u003cHL7MSH\u003e\n \u003cFieldSeparator\u003e|\u003c/FieldSeparator\u003e\n \u003cEncodingCharacters\u003e^~\\\u0026amp;\u003c/EncodingCharacters\u003e\n \u003cSendingApplication\u003e\n \u003cHL7NamespaceID\u003eLABCORP-CORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/SendingApplication\u003e\n \u003cSendingFacility\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/SendingFacility\u003e\n \u003cReceivingApplication\u003e\n \u003cHL7NamespaceID\u003eALDOH\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingApplication\u003e\n \u003cReceivingFacility\u003e\n \u003cHL7NamespaceID\u003eAL\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/ReceivingFacility\u003e\n \u003cDateTimeOfMessage\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfMessage\u003e\n \u003cSecurity\u003e\u003c/Security\u003e\n \u003cMessageType\u003e\n \u003cMessageCode\u003eORU\u003c/MessageCode\u003e\n \u003cTriggerEvent\u003eR01\u003c/TriggerEvent\u003e\n \u003cMessageStructure\u003eORU_R01\u003c/MessageStructure\u003e\n \u003c/MessageType\u003e\n \u003cMessageControlID\u003e20120509010020114_251.2\u003c/MessageControlID\u003e\n \u003cProcessingID\u003e\n \u003cHL7ProcessingID\u003eD\u003c/HL7ProcessingID\u003e\n \u003cHL7ProcessingMode\u003e\u003c/HL7ProcessingMode\u003e\n \u003c/ProcessingID\u003e\n \u003cVersionID\u003e\n \u003cHL7VersionID\u003e2.5.1\u003c/HL7VersionID\u003e\n \u003c/VersionID\u003e\n \u003cAcceptAcknowledgmentType\u003eNE\u003c/AcceptAcknowledgmentType\u003e\n \u003cApplicationAcknowledgmentType\u003eNE\u003c/ApplicationAcknowledgmentType\u003e\n \u003cCountryCode\u003eUSA\u003c/CountryCode\u003e\n \u003cMessageProfileIdentifier\u003e\n \u003cHL7EntityIdentifier\u003eV251_IG_LB_LABRPTPH_R1_INFORM_2010FEB\u003c/HL7EntityIdentifier\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.5\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/MessageProfileIdentifier\u003e\n \u003c/HL7MSH\u003e\n \u003cHL7SoftwareSegment\u003e\n \u003cSoftwareVendorOrganization\u003e\n \u003cHL7OrganizationName\u003eMirth Corp.\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/SoftwareVendorOrganization\u003e\n \u003cSoftwareCertifiedVersionOrReleaseNumber\u003e2.0\u003c/SoftwareCertifiedVersionOrReleaseNumber\u003e\n \u003cSoftwareProductName\u003eMirth Connect\u003c/SoftwareProductName\u003e\n \u003cSoftwareBinaryID\u003e789654\u003c/SoftwareBinaryID\u003e\n \u003cSoftwareProductInformation/\u003e\n \u003cSoftwareInstallDate\u003e\n \u003cyear\u003e2011\u003c/year\u003e\n \u003cmonth\u003e1\u003c/month\u003e\n \u003cday\u003e1\u003c/day\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SoftwareInstallDate\u003e\n \u003c/HL7SoftwareSegment\u003e\n \u003cHL7PATIENT_RESULT\u003e\n \u003cPATIENT\u003e\n \u003cPatientIdentification\u003e\n \u003cSetIDPID\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDPID\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e05540205114\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eLABC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePN\u003c/HL7IdentifierTypeCode\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientIdentifierList\u003e\n \u003cHL7IDNumber\u003e17485458372\u003c/HL7IDNumber\u003e\n \u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eAssignAuth\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003eOID\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningAuthority\u003e\n \u003cHL7IdentifierTypeCode\u003ePI\u003c/HL7IdentifierTypeCode\u003e\n \u003cHL7AssigningFacility\u003e\n \u003cHL7NamespaceID\u003eNE CLINIC\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e24D1040593\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/HL7AssigningFacility\u003e\n \u003c/PatientIdentifierList\u003e\n \u003cPatientName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eWilkinson\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTMAX251\u003c/HL7GivenName\u003e\n \u003c/PatientName\u003e\n \u003cMothersMaidenName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMOTHER\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003ePATERSON\u003c/HL7GivenName\u003e\n \u003c/MothersMaidenName\u003e\n \u003cDateTimeOfBirth\u003e\n \u003cyear\u003e1960\u003c/year\u003e\n \u003cmonth\u003e11\u003c/month\u003e\n \u003cday\u003e9\u003c/day\u003e\n \u003chours\u003e20\u003c/hours\u003e\n \u003cminutes\u003e25\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOfBirth\u003e\n \u003cAdministrativeSex\u003eF\u003c/AdministrativeSex\u003e\n \u003cRace\u003e\n \u003cHL7Identifier\u003eW\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eWHITE\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eHL70005\u003c/HL7NameofCodingSystem\u003e\n \u003c/Race\u003e\n \u003cPatientAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e5000 Staples Dr\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eAPT100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSOMECITY\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eME\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30342\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7AddressType\u003eH\u003c/HL7AddressType\u003e\n \u003c/PatientAddress\u003e\n \u003cBirthOrder/\u003e\n \u003c/PatientIdentification\u003e\n \u003cNextofKinAssociatedParties\u003e\n \u003cSetIDNK1\u003e1\u003c/SetIDNK1\u003e\n \u003cName\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eTESTNOK114B\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eFIRSTNOK1\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eX\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/Name\u003e\n \u003cRelationship\u003e\n \u003cHL7Identifier\u003eFTH\u003c/HL7Identifier\u003e\n \u003c/Relationship\u003e\n \u003cAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e12 MAIN STREET\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 16\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eCOLUMBIA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eSC\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e30329\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/Address\u003e\n \u003cPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e803\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e5551212\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/PhoneNumber\u003e\n \u003c/NextofKinAssociatedParties\u003e\n \u003c/PATIENT\u003e\n \u003cORDER_OBSERVATION\u003e\n \u003cCommonOrder\u003e\n \u003cOrderControl\u003eRE\u003c/OrderControl\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cOrderingFacilityName\u003e\n \u003cHL7OrganizationName\u003eCOOSA VALLEY MEDICAL CENTER\u003c/HL7OrganizationName\u003e\n \u003cHL7IDNumber/\u003e\n \u003cHL7CheckDigit/\u003e\n \u003c/OrderingFacilityName\u003e\n \u003cOrderingFacilityAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e315 WEST HICKORY ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7OtherDesignation\u003eSUITE 100\u003c/HL7OtherDesignation\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingFacilityAddress\u003e\n \u003cOrderingFacilityPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension\u003e\n \u003cHL7Numeric\u003e123\u003c/HL7Numeric\u003e\n \u003c/HL7Extension\u003e\n \u003c/OrderingFacilityPhoneNumber\u003e\n \u003cOrderingProviderAddress\u003e\n \u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e380 WEST HILL ST.\u003c/HL7StreetOrMailingAddress\u003e\n \u003c/HL7StreetAddress\u003e\n \u003cHL7City\u003eSYLACAUGA\u003c/HL7City\u003e\n \u003cHL7StateOrProvince\u003eAL\u003c/HL7StateOrProvince\u003e\n \u003cHL7ZipOrPostalCode\u003e35150\u003c/HL7ZipOrPostalCode\u003e\n \u003cHL7Country\u003eUSA\u003c/HL7Country\u003e\n \u003cHL7CountyParishCode\u003eRICHLAND\u003c/HL7CountyParishCode\u003e\n \u003c/OrderingProviderAddress\u003e\n \u003c/CommonOrder\u003e\n \u003cObservationRequest\u003e\n \u003cSetIDOBR\u003e\n \u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBR\u003e\n \u003cFillerOrderNumber\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n \u003c/FillerOrderNumber\u003e\n \u003cUniversalServiceIdentifier\u003e\n \u003cHL7Identifier\u003e525-9\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eORGANISM COUNT\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n \u003cHL7AlternateIdentifier\u003e080186\u003c/HL7AlternateIdentifier\u003e\n \u003cHL7AlternateText\u003eCULTURE\u003c/HL7AlternateText\u003e\n \u003c/UniversalServiceIdentifier\u003e\n \u003cObservationDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationDateTime\u003e\n \u003cObservationEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ObservationEndDateTime\u003e\n \u003cCollectorIdentifier\u003e\n \u003cHL7IDNumber\u003e342384\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSUSAN\u003c/HL7GivenName\u003e\n \u003c/CollectorIdentifier\u003e\n \u003cOrderingProvider\u003e\n \u003cHL7IDNumber\u003e46466\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eBRENTNALL\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/OrderingProvider\u003e\n \u003cOrderCallbackPhoneNumber\u003e\n \u003cHL7CountryCode/\u003e\n \u003cHL7AreaCityCode\u003e\n \u003cHL7Numeric\u003e256\u003c/HL7Numeric\u003e\n \u003c/HL7AreaCityCode\u003e\n \u003cHL7LocalNumber\u003e\n \u003cHL7Numeric\u003e2495780\u003c/HL7Numeric\u003e\n \u003c/HL7LocalNumber\u003e\n \u003cHL7Extension/\u003e\n \u003c/OrderCallbackPhoneNumber\u003e\n \u003cResultsRptStatusChngDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e4\u003c/month\u003e\n \u003cday\u003e4\u003c/day\u003e\n \u003chours\u003e1\u003c/hours\u003e\n \u003cminutes\u003e39\u003c/minutes\u003e\n \u003cseconds\u003e0\u003c/seconds\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/ResultsRptStatusChngDateTime\u003e\n \u003cResultStatus\u003eF\u003c/ResultStatus\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46214\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMATHIS\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eGERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eSR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e44582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cResultCopiesTo\u003e\n \u003cHL7IDNumber\u003e46111\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eMARTIN\u003c/HL7Surname\u003e\n \u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eJERRY\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/ResultCopiesTo\u003e\n \u003cReasonforStudy\u003e\n \u003cHL7Identifier\u003e12365-4\u003c/HL7Identifier\u003e\n \u003cHL7Text\u003eTOTALLY CRAZY\u003c/HL7Text\u003e\n \u003cHL7NameofCodingSystem\u003eI9\u003c/HL7NameofCodingSystem\u003e\n \u003c/ReasonforStudy\u003e\n \u003cPrincipalResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTOM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eL\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/PrincipalResultInterpreter\u003e\n \u003cAssistantResultInterpreter\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e22582\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eMOORE\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMAS\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eE\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eIII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eDR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/AssistantResultInterpreter\u003e\n \u003cTechnician\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e44\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eSAM\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eA\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eJR\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMR\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eMT\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Technician\u003e\n \u003cTranscriptionist\u003e\n \u003cHL7Name\u003e\n \u003cHL7IDNumber\u003e82\u003c/HL7IDNumber\u003e\n \u003cHL7FamilyName\u003eJONES\u003c/HL7FamilyName\u003e\n \u003cHL7GivenName\u003eTHOMASINA\u003c/HL7GivenName\u003e\n \u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eLEE ANN\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n \u003cHL7Suffix\u003eII\u003c/HL7Suffix\u003e\n \u003cHL7Prefix\u003eMS\u003c/HL7Prefix\u003e\n \u003cHL7Degree\u003eRA\u003c/HL7Degree\u003e\n \u003c/HL7Name\u003e\n \u003c/Transcriptionist\u003e\n \u003cNumberofSampleContainers/\u003e\n \u003c/ObservationRequest\u003e\n \u003cPatientResultOrderObservation\u003e\n \u003cOBSERVATION\u003e\n \u003cObservationResult\u003e\n \u003cSetIDOBX\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDOBX\u003e\n \u003cValueType\u003eSN\u003c/ValueType\u003e\n \u003cObservationIdentifier\u003e\n\u003cHL7Identifier\u003e77190-7\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eTITER\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eLN\u003c/HL7NameofCodingSystem\u003e\n\u003cHL7AlternateIdentifier\u003e080133\u003c/HL7AlternateIdentifier\u003e\n \u003c/ObservationIdentifier\u003e\n \u003cObservationSubID\u003e1\u003c/ObservationSubID\u003e\n \u003cObservationValue\u003e100^1^:^1\u003c/ObservationValue\u003e\n \u003cUnits\u003e\n\u003cHL7Identifier\u003emL\u003c/HL7Identifier\u003e\n \u003c/Units\u003e\n \u003cReferencesRange\u003e10-100\u003c/ReferencesRange\u003e\n \u003cProbability/\u003e\n \u003cObservationResultStatus\u003eF\u003c/ObservationResultStatus\u003e\n \u003cProducersReference\u003e\n\u003cHL7Identifier\u003e20D0649525\u003c/HL7Identifier\u003e\n\u003cHL7Text\u003eLABCORP BIRMINGHAM\u003c/HL7Text\u003e\n\u003cHL7NameofCodingSystem\u003eCLIA\u003c/HL7NameofCodingSystem\u003e\n \u003c/ProducersReference\u003e\n \u003cDateTimeOftheAnalysis\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e4\u003c/month\u003e\n\u003cday\u003e1\u003c/day\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/DateTimeOftheAnalysis\u003e\n \u003cPerformingOrganizationName\u003e\n\u003cHL7OrganizationName\u003eLab1\u003c/HL7OrganizationName\u003e\n\u003cHL7OrganizationNameTypeCode\u003eL\u003c/HL7OrganizationNameTypeCode\u003e\n\u003cHL7IDNumber/\u003e\n\u003cHL7CheckDigit/\u003e\n\u003cHL7AssigningAuthority\u003e\n \u003cHL7NamespaceID\u003eCLIA\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e2.16.840.1.114222.4.3.2.5.2.100\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eISO\u003c/HL7UniversalIDType\u003e\n\u003c/HL7AssigningAuthority\u003e\n\u003cHL7OrganizationIdentifier\u003e1234\u003c/HL7OrganizationIdentifier\u003e\n \u003c/PerformingOrganizationName\u003e\n \u003cPerformingOrganizationAddress\u003e\n\u003cHL7StreetAddress\u003e\n \u003cHL7StreetOrMailingAddress\u003e1234 Cornell Park Dr\u003c/HL7StreetOrMailingAddress\u003e\n\u003c/HL7StreetAddress\u003e\n\u003cHL7City\u003eBlue Ash\u003c/HL7City\u003e\n\u003cHL7StateOrProvince\u003eOH\u003c/HL7StateOrProvince\u003e\n\u003cHL7ZipOrPostalCode\u003e45241\u003c/HL7ZipOrPostalCode\u003e\n \u003c/PerformingOrganizationAddress\u003e\n \u003cPerformingOrganizationMedicalDirector\u003e\n\u003cHL7IDNumber\u003e9876543\u003c/HL7IDNumber\u003e\n\u003cHL7FamilyName\u003e\n \u003cHL7Surname\u003eJONES\u003c/HL7Surname\u003e\n\u003c/HL7FamilyName\u003e\n\u003cHL7GivenName\u003eBOB\u003c/HL7GivenName\u003e\n\u003cHL7SecondAndFurtherGivenNamesOrInitialsThereof\u003eF\u003c/HL7SecondAndFurtherGivenNamesOrInitialsThereof\u003e\n\u003cHL7Degree\u003eMD\u003c/HL7Degree\u003e\n \u003c/PerformingOrganizationMedicalDirector\u003e\n \u003c/ObservationResult\u003e\n \u003c/OBSERVATION\u003e\n \u003c/PatientResultOrderObservation\u003e\n \u003cPatientResultOrderSPMObservation\u003e\n \u003cSPECIMEN\u003e\n \u003cSPECIMEN\u003e\n \u003cSetIDSPM\u003e\n\u003cHL7SequenceID\u003e1\u003c/HL7SequenceID\u003e\n \u003c/SetIDSPM\u003e\n \u003cSpecimenID\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e56789\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenID\u003e\n \u003cSpecimenParentIDs\u003e\n\u003cHL7FillerAssignedIdentifier\u003e\n \u003cHL7EntityIdentifier\u003e20120601114\u003c/HL7EntityIdentifier\u003e\n \u003cHL7NamespaceID\u003eLABCORP\u003c/HL7NamespaceID\u003e\n \u003cHL7UniversalID\u003e20D0649525\u003c/HL7UniversalID\u003e\n \u003cHL7UniversalIDType\u003eCLIA\u003c/HL7UniversalIDType\u003e\n\u003c/HL7FillerAssignedIdentifier\u003e\n \u003c/SpecimenParentIDs\u003e\n \u003cSpecimenType\u003e\n\u003cHL7AlternateIdentifier\u003eBLD\u003c/HL7AlternateIdentifier\u003e\n\u003cHL7AlternateText\u003eBLOOD\u003c/HL7AlternateText\u003e\n\u003cHL7NameofAlternateCodingSystem\u003eL\u003c/HL7NameofAlternateCodingSystem\u003e\n \u003c/SpecimenType\u003e\n \u003cSpecimenSourceSite\u003e\n\u003cHL7Identifier\u003eLA\u003c/HL7Identifier\u003e\n\u003cHL7NameofCodingSystem\u003eHL70070\u003c/HL7NameofCodingSystem\u003e\n \u003c/SpecimenSourceSite\u003e\n \u003cGroupedSpecimenCount/\u003e\n \u003cSpecimenDescription\u003eSOURCE NOT SPECIFIED\u003c/SpecimenDescription\u003e\n \u003cSpecimenCollectionDateTime\u003e\n\u003cHL7RangeStartDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeStartDateTime\u003e\n\u003cHL7RangeEndDateTime\u003e\n \u003cyear\u003e2006\u003c/year\u003e\n \u003cmonth\u003e3\u003c/month\u003e\n \u003cday\u003e24\u003c/day\u003e\n \u003chours\u003e16\u003c/hours\u003e\n \u003cminutes\u003e55\u003c/minutes\u003e\n \u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n\u003c/HL7RangeEndDateTime\u003e\n \u003c/SpecimenCollectionDateTime\u003e\n \u003cSpecimenReceivedDateTime\u003e\n\u003cyear\u003e2006\u003c/year\u003e\n\u003cmonth\u003e3\u003c/month\u003e\n\u003cday\u003e25\u003c/day\u003e\n\u003chours\u003e1\u003c/hours\u003e\n\u003cminutes\u003e37\u003c/minutes\u003e\n\u003cgmtOffset\u003e\u003c/gmtOffset\u003e\n \u003c/SpecimenReceivedDateTime\u003e\n \u003cNumberOfSpecimenContainers/\u003e\n \u003c/SPECIMEN\u003e\n \u003c/SPECIMEN\u003e\n \u003c/PatientResultOrderSPMObservation\u003e\n \u003c/ORDER_OBSERVATION\u003e\n \u003c/HL7PATIENT_RESULT\u003e\n \u003c/HL7LabReport\u003e\n\u003c/Container\u003e\n\n\u003c!-- raw_message_id \u003d D09DCC71-5B0F-4C28-9395-B831B3F2CEC3 --\u003e", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "docTypeCd": "11648804", + "nbsDocumentMetadataUid": 1005, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "manualLab": false, + "pageProxyTypeCd": "", + "isSTDProgramArea": false, + "thePersonContainerCollection": [ + { + "thePersonDto": { + "personUid": 10095026, + "personParentUid": 10095023, + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:02 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "birthTime": "Nov 9, 1960, 12:00:00 AM", + "birthTimeCalc": "Nov 9, 1960, 12:00:00 AM", + "cd": "PAT", + "cdDescTxt": "Observation Subject", + "currSexCd": "F", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:02 PM", + "lastChgUserId": 36, + "localId": "PSN10095023GA01", + "mothersMaidenNm": "MOTHER PATERSON", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:02 PM", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "firstNm": "FIRSTMAX251", + "lastNm": "Wilkinson", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false, + "superClassType": "Entity" + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095026, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "FIRSTMAX251", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "Wilkinson", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [ + { + "personUid": 10095026, + "raceCd": "W", + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "raceCategoryCd": "W", + "raceDescTxt": "WHITE", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [ + { + "locatorUid": 10095027, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "cd": "H", + "classCd": "PST", + "lastChgTime": "Jun 13, 2024, 3:25:02 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:02 PM", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "useCd": "H", + "entityUid": 10095026, + "thePostalLocatorDto": { + "postalLocatorUid": 10095027, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cityDescTxt": "SOMECITY", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "stateCd": "23", + "streetAddr1": "5000 Staples Dr", + "streetAddr2": "APT100", + "zipCd": "30342", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "versionCtrlNbr": 1, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095026, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "OID", + "assigningAuthorityDescTxt": "LABC", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "rootExtensionTxt": "05540205114", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "typeCd": "PN", + "assigningAuthorityIdType": "ISO", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "entityUid": 10095026, + "entityIdSeq": 2, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "OID", + "assigningAuthorityDescTxt": "AssignAuth", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "rootExtensionTxt": "17485458372", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "typeCd": "PI", + "assigningAuthorityIdType": "ISO", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PAT", + "patientMatchedFound": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10091043, + "personParentUid": 10091043, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PAT", + "cdDescTxt": "Observation Participant", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10091043GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "FIRSTNOK1", + "lastNm": "TESTNOK114B", + "middleNm": "X", + "nmPrefix": "DR", + "nmSuffix": "JR", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "FIRSTNOK1", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "TESTNOK114B", + "middleNm": "X", + "nmPrefix": "DR", + "nmSuffix": "JR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "cd": "H", + "cdDescTxt": "House", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "EC", + "entityUid": -5, + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cityDescTxt": "COLUMBIA", + "cntryCd": "840", + "cntyCd": "RICHLAND", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "stateCd": "45", + "streetAddr1": "12 MAIN STREET", + "streetAddr2": "SUITE 16", + "zipCd": "30329", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "cd": "PH", + "cdDescTxt": "PHONE", + "classCd": "TELE", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "H", + "entityUid": -5, + "theTeleLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "extensionTxt": "123", + "phoneNbrTxt": "803-555-1212", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "NOK", + "patientMatchedFound": true, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095030, + "personParentUid": 10095030, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095030GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "SUSAN", + "lastNm": "JONES", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095030, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "firstNm": "SUSAN", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095030, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "342384", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": -12, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "versionCtrlNbr": 1, + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personNameSeq": 1, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "firstNm": "GERRY", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "BRENTNALL", + "middleNm": "LEE", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "SR", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cd": "O", + "cdDescTxt": "Office", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cityDescTxt": "SYLACAUGA", + "cntryCd": "840", + "cntyCd": "RICHLAND", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "stateCd": "01", + "streetAddr1": "380 WEST HILL ST.", + "streetAddr2": " ", + "zipCd": "35150", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "cd": "PH", + "cdDescTxt": "PHONE", + "classCd": "TELE", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -12, + "theTeleLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "extensionTxt": "null", + "phoneNbrTxt": "256-249-5780", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [ + { + "entityUid": -11, + "entityIdSeq": 1, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "46466", + "statusCd": "A", + "typeCd": "PRN", + "typeDescTxt": "Provider Registration Number", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095031, + "personParentUid": 10095031, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095031GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "TOM", + "lastNm": "JONES", + "nmPrefix": "DR", + "nmSuffix": "JR", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095031, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "TOM", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "middleNm": "L", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "JR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095031, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "22582", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095032, + "personParentUid": 10095032, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095032GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "THOMAS", + "lastNm": "MOORE", + "nmPrefix": "DR", + "nmSuffix": "III", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095032, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "THOMAS", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "MOORE", + "middleNm": "E", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "III", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095032, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "22582", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095033, + "personParentUid": 10095033, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095033GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "SAM", + "lastNm": "JONES", + "nmPrefix": "MR", + "nmSuffix": "JR", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095033, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "SAM", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "middleNm": "A", + "nmDegree": "MT", + "nmPrefix": "MR", + "nmSuffix": "JR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095033, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "44", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095034, + "personParentUid": 10095034, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095034GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "THOMASINA", + "lastNm": "JONES", + "nmPrefix": "MS", + "nmSuffix": "II", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095034, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "THOMASINA", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "middleNm": "LEE ANN", + "nmDegree": "RA", + "nmPrefix": "MS", + "nmSuffix": "II", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:02 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095034, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "82", + "statusCd": "A", + "typeCd": "EI", + "typeDescTxt": "Employee Identifier", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095035, + "personParentUid": 10095035, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095035GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "GERRY", + "lastNm": "MATHIS", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095035, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "firstNm": "GERRY", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "MATHIS", + "middleNm": "LEE", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "SR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:03 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095035, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "46214", + "statusCd": "A", + "typeCd": "PRN", + "typeDescTxt": "Provider Registration Number", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095036, + "personParentUid": 10095036, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095036GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "THOMAS", + "lastNm": "JONES", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095036, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "firstNm": "THOMAS", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "JONES", + "middleNm": "LEE", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "III", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:03 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095036, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "44582", + "statusCd": "A", + "typeCd": "PRN", + "typeDescTxt": "Provider Registration Number", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "thePersonDto": { + "personUid": 10095037, + "personParentUid": 10095037, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDateAdmin": "Jun 13, 2024, 3:25:01 PM", + "asOfDateEthnicity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateGeneral": "Jun 13, 2024, 3:25:01 PM", + "asOfDateMorbidity": "Jun 13, 2024, 3:25:01 PM", + "asOfDateSex": "Jun 13, 2024, 3:25:01 PM", + "cd": "PRV", + "cdDescTxt": "Provider", + "electronicInd": "Y", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "PSN10095037GA01", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "firstNm": "JERRY", + "lastNm": "MARTIN", + "versionCtrlNbr": 1, + "edxInd": "Y", + "isCaseInd": false, + "isReentrant": false, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "thePersonNameDtoCollection": [ + { + "personUid": 10095037, + "personNameSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "firstNm": "JERRY", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "lastNm": "MARTIN", + "middleNm": "L", + "nmDegree": "MD", + "nmPrefix": "DR", + "nmSuffix": "JR", + "nmUseCd": "L", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:03 PM", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "thePersonRaceDtoCollection": [], + "thePersonEthnicGroupDtoCollection": [], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10095037, + "entityIdSeq": 1, + "addReasonCd": "Add", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "20D0649525", + "assigningAuthorityDescTxt": "LABCORP", + "lastChgUserId": 36, + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "46111", + "statusCd": "A", + "typeCd": "PRN", + "typeDescTxt": "Provider Registration Number", + "assigningAuthorityIdType": "CLIA", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [], + "theRoleDtoCollection": [], + "isExt": false, + "isMPRUpdateValid": true, + "role": "PROV", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theParticipationDtoCollection": [ + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "AUT", + "typeDescTxt": "Author", + "subjectEntityUid": 10004635, + "cd": "SF", + "actClassCd": "OBS", + "subjectClassCd": "ORG", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "PATSBJ", + "typeDescTxt": "Patient Subject", + "subjectEntityUid": 10095026, + "cd": "PAT", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ORD", + "typeDescTxt": "Orderer", + "subjectEntityUid": 10002002, + "cd": "OP", + "actClassCd": "OBS", + "subjectClassCd": "ORG", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "SPC", + "typeDescTxt": "Specimen", + "subjectEntityUid": 10003042, + "cd": "NI", + "actClassCd": "OBS", + "subjectClassCd": "MAT", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ORD", + "typeDescTxt": "Orderer", + "subjectEntityUid": 10091010, + "cd": "OP", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "VRF", + "typeDescTxt": "Verifier", + "subjectEntityUid": 10095031, + "cd": "LABP", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ASS", + "typeDescTxt": "Assistant", + "subjectEntityUid": 10095032, + "cd": "ASS", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "PRF", + "typeDescTxt": "Performer", + "subjectEntityUid": 10095033, + "cd": "LABP", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "ENT", + "typeDescTxt": "Enterer", + "subjectEntityUid": 10095034, + "cd": "ENT", + "actClassCd": "OBS", + "subjectClassCd": "PSN", + "actUid": 10004074, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addReasonCd": "because", + "addUserId": 36, + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "typeCd": "PRF", + "typeDescTxt": "Performer", + "subjectEntityUid": 10002005, + "cd": "RE", + "actClassCd": "OBS", + "subjectClassCd": "ORG", + "actUid": 10004075, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theActRelationshipDtoCollection": [ + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "sequenceNbr": 1, + "statusCd": "A", + "sourceActUid": 10004075, + "typeDescTxt": "Has Component", + "targetActUid": 10004074, + "sourceClassCd": "OBS", + "targetClassCd": "OBS", + "typeCd": "COMP", + "isShareInd": false, + "isNNDInd": false, + "isExportInd": false, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theOrganizationContainerCollection": [ + { + "theOrganizationDto": { + "organizationUid": 10004635, + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cd": "ORG", + "cdDescTxt": "Laboratory", + "lastChgTime": "Jun 13, 2024, 3:25:01 PM", + "lastChgUserId": 36, + "localId": "ORG10004635GA01", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "standardIndustryClassCd": "CLIA", + "standardIndustryDescTxt": "LABCORP", + "statusCd": "A", + "statusTime": "Jun 13, 2024, 3:25:01 PM", + "displayNm": "LABCORP", + "electronicInd": "Y", + "versionCtrlNbr": 1, + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false, + "superClassType": "Entity" + }, + "theOrganizationNameDtoCollection": [ + { + "organizationUid": 10004635, + "organizationNameSeq": 1, + "nmTxt": "LABCORP", + "nmUseCd": "L", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityLocatorParticipationDtoCollection": [], + "theEntityIdDtoCollection": [ + { + "entityUid": 10004635, + "entityIdSeq": 1, + "assigningAuthorityCd": "CLIA", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "20D0649525", + "statusCd": "A", + "typeCd": "FI", + "typeDescTxt": "Facility Identifier", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "role": "SF", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "theOrganizationDto": { + "organizationUid": 10002002, + "addUserId": 36, + "cd": "OTH", + "cdDescTxt": "Other", + "standardIndustryClassCd": "621399", + "standardIndustryDescTxt": "Offices of Misc. Health Providers", + "displayNm": "COOSA VALLEY MEDICAL CENTER", + "electronicInd": "Y", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theOrganizationNameDtoCollection": [ + { + "organizationNameSeq": 0, + "nmTxt": "COOSA VALLEY MEDICAL CENTER", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cd": "O", + "cdDescTxt": "Office", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -6, + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cityDescTxt": "SYLACAUGA", + "cntryCd": "840", + "cntyCd": "RICHLAND", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "stateCd": "01", + "streetAddr1": "315 WEST HICKORY ST.", + "streetAddr2": "SUITE 100", + "zipCd": "35150", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cd": "PH", + "cdDescTxt": "PHONE", + "classCd": "TELE", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -6, + "theTeleLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "extensionTxt": "123", + "phoneNbrTxt": "256-249-5780", + "recordStatusCd": "ACTIVE", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [], + "role": "OP", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + { + "theOrganizationDto": { + "organizationUid": 10002005, + "addUserId": 36, + "cd": "LAB", + "cdDescTxt": "Laboratory", + "standardIndustryClassCd": "621511", + "standardIndustryDescTxt": "Medical Laboratory", + "displayNm": "Lab1", + "electronicInd": "Y", + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "theOrganizationNameDtoCollection": [ + { + "organizationNameSeq": 1, + "nmTxt": "Lab1", + "nmUseCd": "L", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityLocatorParticipationDtoCollection": [ + { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cd": "O", + "cdDescTxt": "Office", + "classCd": "PST", + "recordStatusCd": "ACTIVE", + "statusCd": "A", + "useCd": "WP", + "entityUid": -28, + "thePostalLocatorDto": { + "addTime": "Jun 13, 2024, 3:25:01 PM", + "addUserId": 36, + "cityDescTxt": "Blue Ash", + "recordStatusCd": "ACTIVE", + "recordStatusTime": "Jun 13, 2024, 3:25:01 PM", + "stateCd": "39", + "streetAddr1": "1234 Cornell Park Dr", + "streetAddr2": " ", + "zipCd": "45241", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + }, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "theEntityIdDtoCollection": [ + { + "entityUid": -28, + "entityIdSeq": 1, + "asOfDate": "Jun 13, 2024, 3:25:01 PM", + "assigningAuthorityCd": "2.16.840.1.114222.4.3.2.5.2.100", + "assigningAuthorityDescTxt": "Clinical Laboratory Improvement Amendment", + "recordStatusCd": "ACTIVE", + "rootExtensionTxt": "1234", + "statusCd": "A", + "typeCd": "FI", + "typeDescTxt": "Facility Identifier", + "assigningAuthorityIdType": "ISO", + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "itNew": false, + "itOld": false, + "itDirty": false, + "itDelete": false + } + ], + "isOOSystemInd": false, + "isOOSystemPendInd": false, + "associatedNotificationsInd": false, + "isUnsavedNote": false, + "isMergeCase": false, + "isRenterant": false, + "isConversionHasModified": false, + "messageLogDTMap": {}, + "itNew": true, + "itOld": false, + "itDirty": false, + "itDelete": false +} \ No newline at end of file diff --git a/data-processing-service/src/test/resources/test_data/xml_payload/payload_1.xml b/data-processing-service/src/test/resources/test_data/xml_payload/payload_1.xml index 9f3d14af3..81b6d37e2 100644 --- a/data-processing-service/src/test/resources/test_data/xml_payload/payload_1.xml +++ b/data-processing-service/src/test/resources/test_data/xml_payload/payload_1.xml @@ -145,7 +145,8 @@ TESTNOK114B FIRSTNOK1 - X + X + JR DR MD @@ -272,7 +273,8 @@ BRENTNALL GERRY - LEE + LEE + SR DR MD @@ -303,7 +305,8 @@ MATHIS GERRY - LEE + LEE + SR DR MD @@ -314,7 +317,8 @@ JONES THOMAS - LEE + LEE + III DR MD @@ -325,7 +329,8 @@ MARTIN JERRY - L + L + JR DR MD @@ -340,7 +345,8 @@ 22582 JONES TOM - L + L + JR DR MD @@ -351,7 +357,8 @@ 22582 MOORE THOMAS - E + E + III DR MD @@ -362,7 +369,8 @@ 44 JONES SAM - A + A + JR MR MT @@ -373,7 +381,8 @@ 82 JONES THOMASINA - LEE ANN + LEE ANN + II MS RA @@ -439,7 +448,8 @@ JONES BOB - F + F + MD diff --git a/hl7-parser/src/test/java/gov/cdc/dataingestion/hl7/helper/unitTest/model/FhirConvertedMessageTest.java b/hl7-parser/src/test/java/gov/cdc/dataingestion/hl7/helper/unitTest/model/FhirConvertedMessageTest.java new file mode 100644 index 000000000..7688041c8 --- /dev/null +++ b/hl7-parser/src/test/java/gov/cdc/dataingestion/hl7/helper/unitTest/model/FhirConvertedMessageTest.java @@ -0,0 +1,47 @@ +package gov.cdc.dataingestion.hl7.helper.unitTest.model; + + +import gov.cdc.dataingestion.hl7.helper.model.FhirConvertedMessage; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class FhirConvertedMessageTest { + + @Test + public void testGettersAndSetters() { + FhirConvertedMessage message = new FhirConvertedMessage(); + message.setHl7Message("HL7 test message"); + message.setFhirMessage("FHIR test message"); + + assertEquals("HL7 test message", message.getHl7Message()); + assertEquals("FHIR test message", message.getFhirMessage()); + } + + @Test + public void testEqualsAndHashCode() { + FhirConvertedMessage message1 = new FhirConvertedMessage(); + message1.setHl7Message("HL7 test message"); + message1.setFhirMessage("FHIR test message"); + + FhirConvertedMessage message2 = new FhirConvertedMessage(); + message2.setHl7Message("HL7 test message"); + message2.setFhirMessage("FHIR test message"); + + FhirConvertedMessage message3 = new FhirConvertedMessage(); + message3.setHl7Message("Different HL7 message"); + message3.setFhirMessage("Different FHIR message"); + + assertNotEquals(message1, message2); + assertNotEquals(message1, message3); + } + + @Test + public void testToString() { + FhirConvertedMessage message = new FhirConvertedMessage(); + message.setHl7Message("HL7 test message"); + message.setFhirMessage("FHIR test message"); + + assertNotNull( message.toString()); + } +}