diff --git a/Unpublished/NEW-RULE/negative/01/data/.env b/Unpublished/NEW-RULE/negative/01/data/.env new file mode 100644 index 000000000..8433142da --- /dev/null +++ b/Unpublished/NEW-RULE/negative/01/data/.env @@ -0,0 +1,6 @@ +PRODUCT= +VERSION= +SUBSTANDARD= +USE_CASE= +DEFINE_XML= +CT= diff --git a/Unpublished/NEW-RULE/negative/01/data/_datasets.csv b/Unpublished/NEW-RULE/negative/01/data/_datasets.csv new file mode 100644 index 000000000..581ee9dad --- /dev/null +++ b/Unpublished/NEW-RULE/negative/01/data/_datasets.csv @@ -0,0 +1,3 @@ +Filename,Label +pr,Procedures +ho,Healthcare Encounters diff --git a/Unpublished/NEW-RULE/negative/01/data/_variables.csv b/Unpublished/NEW-RULE/negative/01/data/_variables.csv new file mode 100644 index 000000000..6ee52de30 --- /dev/null +++ b/Unpublished/NEW-RULE/negative/01/data/_variables.csv @@ -0,0 +1,41 @@ +dataset,variable,label,type,length +pr,STUDYID,Study Identifier,Char,50 +pr,DOMAIN,Domain Abbreviation,Char,50 +pr,USUBJID,Unique Subject Identifier,Char,50 +pr,PRSEQ,Sequence Number,Num,8 +pr,PRSPID,Sponsor-Defined Identifier,Char,50 +pr,PRTRT,Reported Name of Procedure,Char,50 +pr,PRDECOD,Standardized Procedure Name,Char,50 +pr,PRCAT,Category,Char,50 +pr,PRPRESP,Pre-specified,Char,50 +pr,PROCCUR,Occurrence,Char,50 +pr,PRINDC,Indication,Char,50 +pr,VISITNUM,Visit Number,Num,8 +pr,VISIT,Visit Name,Char,50 +pr,VISITDY,Planned Study Day of Visit,Num,8 +pr,EPOCH,Epoch,Char,50 +pr,PRSTDTC,Start Date/Time of Procedure,Char,50 +pr,PRENDTC,End Date/Time of Procedure,Char,50 +pr,PRSTDY,Study Day of Start of Procedure,Num,8 +pr,PRENDY,Study Day of End of Procedure,Num,8 +pr,PRSTRTPT,Start Relative to Reference Time Point,Char,50 +pr,PRSTTPT,Start Reference Time Point,Char,50 +pr,PRENRTPT,End Relative to Reference Time Point,Char,50 +pr,PRENTPT,End Reference Time Point,Char,50 +ho,STUDYID,Study Identifier,Char,50 +ho,DOMAIN,Domain Abbreviation,Char,50 +ho,USUBJID,Unique Subject Identifier,Char,50 +ho,HOSEQ,Sequence Number,Num,8 +ho,HOGRPID,Group ID,Char,50 +ho,HOTERM,Healthcare Encounter Term,Char,50 +ho,HOPRESP,Pre-Specified Healthcare Encounter,Char,50 +ho,HOOCCUR,Healthcare Encounter Occurrence,Char,50 +ho,EPOCH,Epoch,Char,50 +ho,HOSTDTC,Start Date/Time of Healthcare Encounter,Char,50 +ho,HOENDTC,End Date/Time of Healthcare Encounter,Char,50 +ho,HOSTDY,Study Day of Start of Encounter,Num,8 +ho,HOENDY,Study Day of End of Healthcare Encounter,Num,8 +ho,HOSTRTPT,Start Relative to Reference Time Point,Char,50 +ho,HOSTTPT,Start Reference Time Point,Char,50 +ho,HOENRTPT,End Relative to Reference Time Point,Char,50 +ho,HOENTPT,End Reference Time Point,Char,50 diff --git a/Unpublished/NEW-RULE/negative/01/results/results_engine.log.txt b/Unpublished/NEW-RULE/negative/01/results/results_engine.log.txt new file mode 100644 index 000000000..0132568fe --- /dev/null +++ b/Unpublished/NEW-RULE/negative/01/results/results_engine.log.txt @@ -0,0 +1,18 @@ +Traceback (most recent call last): + File "C:\Users\valen\cdisc-open-rules-training\engine\core.py", line 21, in + from cdisc_rules_engine.config import config + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\__init__.py", line 1, in + from .plugin_loader import PluginLoader + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\plugin_loader.py", line 9, in + from cdisc_rules_engine.interfaces import FactoryInterface + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\interfaces\__init__.py", line 4, in + from .data_reader_interface import DataReaderInterface + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\interfaces\data_reader_interface.py", line 1, in + from cdisc_rules_engine.models.dataset import PandasDataset + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\models\dataset\__init__.py", line 6, in + from .dask_dataset import DaskDataset + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\models\dataset\dask_dataset.py", line 1, in + from cdisc_rules_engine.models.dataset.pandas_dataset import PandasDataset + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\models\dataset\pandas_dataset.py", line 2, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' \ No newline at end of file diff --git a/Unpublished/NEW-RULE/positive/01/data/.env b/Unpublished/NEW-RULE/positive/01/data/.env new file mode 100644 index 000000000..0bcfc2f82 --- /dev/null +++ b/Unpublished/NEW-RULE/positive/01/data/.env @@ -0,0 +1,6 @@ +PRODUCT=SDTMIG +VERSION=3-4 +SUBSTANDARD= +USE_CASE= +DEFINE_XML= +CT= diff --git a/Unpublished/NEW-RULE/positive/01/data/_datasets.csv b/Unpublished/NEW-RULE/positive/01/data/_datasets.csv new file mode 100644 index 000000000..581ee9dad --- /dev/null +++ b/Unpublished/NEW-RULE/positive/01/data/_datasets.csv @@ -0,0 +1,3 @@ +Filename,Label +pr,Procedures +ho,Healthcare Encounters diff --git a/Unpublished/NEW-RULE/positive/01/data/_variables.csv b/Unpublished/NEW-RULE/positive/01/data/_variables.csv new file mode 100644 index 000000000..6ee52de30 --- /dev/null +++ b/Unpublished/NEW-RULE/positive/01/data/_variables.csv @@ -0,0 +1,41 @@ +dataset,variable,label,type,length +pr,STUDYID,Study Identifier,Char,50 +pr,DOMAIN,Domain Abbreviation,Char,50 +pr,USUBJID,Unique Subject Identifier,Char,50 +pr,PRSEQ,Sequence Number,Num,8 +pr,PRSPID,Sponsor-Defined Identifier,Char,50 +pr,PRTRT,Reported Name of Procedure,Char,50 +pr,PRDECOD,Standardized Procedure Name,Char,50 +pr,PRCAT,Category,Char,50 +pr,PRPRESP,Pre-specified,Char,50 +pr,PROCCUR,Occurrence,Char,50 +pr,PRINDC,Indication,Char,50 +pr,VISITNUM,Visit Number,Num,8 +pr,VISIT,Visit Name,Char,50 +pr,VISITDY,Planned Study Day of Visit,Num,8 +pr,EPOCH,Epoch,Char,50 +pr,PRSTDTC,Start Date/Time of Procedure,Char,50 +pr,PRENDTC,End Date/Time of Procedure,Char,50 +pr,PRSTDY,Study Day of Start of Procedure,Num,8 +pr,PRENDY,Study Day of End of Procedure,Num,8 +pr,PRSTRTPT,Start Relative to Reference Time Point,Char,50 +pr,PRSTTPT,Start Reference Time Point,Char,50 +pr,PRENRTPT,End Relative to Reference Time Point,Char,50 +pr,PRENTPT,End Reference Time Point,Char,50 +ho,STUDYID,Study Identifier,Char,50 +ho,DOMAIN,Domain Abbreviation,Char,50 +ho,USUBJID,Unique Subject Identifier,Char,50 +ho,HOSEQ,Sequence Number,Num,8 +ho,HOGRPID,Group ID,Char,50 +ho,HOTERM,Healthcare Encounter Term,Char,50 +ho,HOPRESP,Pre-Specified Healthcare Encounter,Char,50 +ho,HOOCCUR,Healthcare Encounter Occurrence,Char,50 +ho,EPOCH,Epoch,Char,50 +ho,HOSTDTC,Start Date/Time of Healthcare Encounter,Char,50 +ho,HOENDTC,End Date/Time of Healthcare Encounter,Char,50 +ho,HOSTDY,Study Day of Start of Encounter,Num,8 +ho,HOENDY,Study Day of End of Healthcare Encounter,Num,8 +ho,HOSTRTPT,Start Relative to Reference Time Point,Char,50 +ho,HOSTTPT,Start Reference Time Point,Char,50 +ho,HOENRTPT,End Relative to Reference Time Point,Char,50 +ho,HOENTPT,End Reference Time Point,Char,50 diff --git a/Unpublished/NEW-RULE/positive/01/results/results_engine.log.txt b/Unpublished/NEW-RULE/positive/01/results/results_engine.log.txt new file mode 100644 index 000000000..0132568fe --- /dev/null +++ b/Unpublished/NEW-RULE/positive/01/results/results_engine.log.txt @@ -0,0 +1,18 @@ +Traceback (most recent call last): + File "C:\Users\valen\cdisc-open-rules-training\engine\core.py", line 21, in + from cdisc_rules_engine.config import config + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\__init__.py", line 1, in + from .plugin_loader import PluginLoader + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\plugin_loader.py", line 9, in + from cdisc_rules_engine.interfaces import FactoryInterface + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\interfaces\__init__.py", line 4, in + from .data_reader_interface import DataReaderInterface + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\interfaces\data_reader_interface.py", line 1, in + from cdisc_rules_engine.models.dataset import PandasDataset + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\models\dataset\__init__.py", line 6, in + from .dask_dataset import DaskDataset + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\models\dataset\dask_dataset.py", line 1, in + from cdisc_rules_engine.models.dataset.pandas_dataset import PandasDataset + File "C:\Users\valen\cdisc-open-rules-training\engine\cdisc_rules_engine\models\dataset\pandas_dataset.py", line 2, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' \ No newline at end of file diff --git a/Unpublished/NEW-RULE/rule.yml b/Unpublished/NEW-RULE/rule.yml new file mode 100644 index 000000000..2c252a58f --- /dev/null +++ b/Unpublished/NEW-RULE/rule.yml @@ -0,0 +1,50 @@ +Authorities: + - Organization: 'CDISC' + Standards: + - Name: 'SDTMIG' + References: + - Citations: + - Cited Guidance: 'The characterization of the start of an observation relative to a reference time point. The sponsor-defined reference time point is in --STTPT.' + Document: 'Model v2.0' + Item: '--STRTPT' + Section: 'Timing' + Criteria: + Logical Expression: + Condition: '' + Rule: '' + Plain Language Expression: '' + Type: 'Success' + Origin: SDTM and SDTMIG Conformance Rules + Release Notes: '' + Rule Identifier: + Id: 'CG0060' + Version: '1' + Validator Rule Message: '' + Version: '2.0' + Version: '3.4' +Check: + all: + - name: '--STTPT' + operator: 'non_empty' + - name: '--STRTPT' + operator: 'empty' +Core: + Id: 'CORE-000001' + Status: Published + Version: '1' +Description: 'Raise an error if the value of --STTPT is present and--STRTPT is not present.' +Executability: Fully Executable +Outcome: + Message: ' --STTPT is present but--STRTPT is not present' + Output Variables: + - '--STTPT' + - '--STRTPT' +Rule Type: 'Record Data' +Scope: + Classes: + Include: + - ALL + Domains: + Include: + - ALL +Sensitivity: Dataset