From f7fcff02ca1296982a13a02286029e586524b195 Mon Sep 17 00:00:00 2001 From: eljanssens Date: Fri, 3 Jul 2026 13:08:56 +0200 Subject: [PATCH 1/3] testing CG0045 --- Unpublished/NEW-RULE/negative/01/data/.env | 2 + .../NEW-RULE/negative/01/data/_datasets.csv | 3 + .../NEW-RULE/negative/01/data/_variables.csv | 30 ++++++++ Unpublished/NEW-RULE/negative/01/data/cm.csv | 6 ++ Unpublished/NEW-RULE/negative/01/data/mh.csv | 5 ++ .../NEW-RULE/negative/01/results/results.csv | 19 +++++ .../NEW-RULE/negative/01/results/results.json | 1 + .../01/results/results_engine.log.txt | 32 ++++++++ Unpublished/NEW-RULE/positive/01/data/.env | 2 + .../NEW-RULE/positive/01/data/_datasets.csv | 3 + .../NEW-RULE/positive/01/data/_variables.csv | 30 ++++++++ Unpublished/NEW-RULE/positive/01/data/cm.csv | 7 ++ Unpublished/NEW-RULE/positive/01/data/mh.csv | 5 ++ .../NEW-RULE/positive/01/results/results.csv | 1 + .../NEW-RULE/positive/01/results/results.json | 1 + .../01/results/results_engine.log.txt | 32 ++++++++ Unpublished/NEW-RULE/rule.yml | 75 +++++++++++++++++++ 17 files changed, 254 insertions(+) create mode 100644 Unpublished/NEW-RULE/negative/01/data/.env create mode 100644 Unpublished/NEW-RULE/negative/01/data/_datasets.csv create mode 100644 Unpublished/NEW-RULE/negative/01/data/_variables.csv create mode 100644 Unpublished/NEW-RULE/negative/01/data/cm.csv create mode 100644 Unpublished/NEW-RULE/negative/01/data/mh.csv create mode 100644 Unpublished/NEW-RULE/negative/01/results/results.csv create mode 100644 Unpublished/NEW-RULE/negative/01/results/results.json create mode 100644 Unpublished/NEW-RULE/negative/01/results/results_engine.log.txt create mode 100644 Unpublished/NEW-RULE/positive/01/data/.env create mode 100644 Unpublished/NEW-RULE/positive/01/data/_datasets.csv create mode 100644 Unpublished/NEW-RULE/positive/01/data/_variables.csv create mode 100644 Unpublished/NEW-RULE/positive/01/data/cm.csv create mode 100644 Unpublished/NEW-RULE/positive/01/data/mh.csv create mode 100644 Unpublished/NEW-RULE/positive/01/results/results.csv create mode 100644 Unpublished/NEW-RULE/positive/01/results/results.json create mode 100644 Unpublished/NEW-RULE/positive/01/results/results_engine.log.txt create mode 100644 Unpublished/NEW-RULE/rule.yml diff --git a/Unpublished/NEW-RULE/negative/01/data/.env b/Unpublished/NEW-RULE/negative/01/data/.env new file mode 100644 index 000000000..929573120 --- /dev/null +++ b/Unpublished/NEW-RULE/negative/01/data/.env @@ -0,0 +1,2 @@ +PRODUCT=SDTMIG +VERSION=3-4 \ No newline at end of file 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..291dd3b34 --- /dev/null +++ b/Unpublished/NEW-RULE/negative/01/data/_datasets.csv @@ -0,0 +1,3 @@ +Filename,Label +cm,Concomitant/Prior Medications +mh, Medical History \ No newline at end of file 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..a1aa0376d --- /dev/null +++ b/Unpublished/NEW-RULE/negative/01/data/_variables.csv @@ -0,0 +1,30 @@ +dataset,variable,label,type,length +cm,STUDYID,Study Identifier,Char,12 +cm,DOMAIN,Domain Abbreviation,Char,2 +cm,USUBJID,Unique Subject Identifier,Char,8 +cm,CMSEQ,Sequence Number,Num,8 +cm,CMTRT,"Reported Name of Drug, Med, or Therapy",Char,200 +cm,CMINDC,Indication,Char,200 +cm,CMDOSE,Dose per Administration,Num,8 +cm,CMDOSU,Dose Units,Char,6 +cm,CMDOSFRQ,Dosing Frequency per Interval,Char,3 +cm,CMROUTE,Route of Administration,Char,24 +cm,EPOCH,Epoch,Char,9 +cm,CMSTDTC,Start Date/Time of Medication,Char,10 +cm,CMENDTC,End Date/Time of Medication,Char,10 +cm,CMSTDY,Study Day of Start of Medication,Num,8 +cm,CMENDY,Study Day of End of Medication,Num,8 +cm,CMENRTPT,End Relative to Reference Time Point,Char,7 +cm,CMENTPT,End Reference Time Point,Char,10 +mh,STUDYID,Study Identifier,Char,12 +mh,DOMAIN,Domain Abbreviation,Char,2 +mh,USUBJID,Unique Subject Identifier,Char,8 +mh,MHSEQ,Sequence Number,Num,8 +mh,MHTERM,Reported Term for the Medical History,Char,19 +mh,MHEVDTYP,Medical History Event Date Type,Char,13 +mh,MHSTDTC,Start Date/Time of Medical History Event,Char,10 +mh,MHSTDY,Study Day of Start of Observation,Num,8 +mh,MHENDTC,End Date/Time of Medical History Event,Char,50 +mh,MHENDY,Study Day of End of Observation,Num,8 +mh,MHENRTPT,End Relative to Reference Time Point,Char,50 +mh,MHENTPT,End Reference Time Point,Char,50 \ No newline at end of file diff --git a/Unpublished/NEW-RULE/negative/01/data/cm.csv b/Unpublished/NEW-RULE/negative/01/data/cm.csv new file mode 100644 index 000000000..e226a55f9 --- /dev/null +++ b/Unpublished/NEW-RULE/negative/01/data/cm.csv @@ -0,0 +1,6 @@ +STUDYID,DOMAIN,USUBJID,CMSEQ,CMTRT,CMINDC,CMDOSE,CMDOSU,CMDOSFRQ,CMROUTE,EPOCH,CMSTDTC,CMENDTC,CMSTDY,CMENDY,CMENRTPT,CMENTPT +CDISCPILOT01,CM,CDISC005,1,CENTRUM SILVER,PROPHYLAXIS OR NON-THERAPEUTIC USE,1,TABLET,,ORAL,SCREENING,2012-03,,,,,2013-08-06 +CDISCPILOT01,CM,CDISC005,4,HYDROCORTISONE,PROPHYLAXIS OR NON-THERAPEUTIC USE,1,TABLET,,TOPICAL,TREATMENT,2013-05-14,,100,,,2013-08-06 +CDISCPILOT01,CM,CDISC017,1,ACETAMINOPHEN,PROPHYLAXIS OR NON-THERAPEUTIC USE,2,TABLET,,ORAL,SCREENING,2008,,,,,2014-03-08 +CDISCPILOT01,CM,CDISC017,2,MULTIVITAMIN,PROPHYLAXIS OR NON-THERAPEUTIC USE,1,TABLET,,ORAL,SCREENING,2011-08,,,,,2014-03-08 +CDISCPILOT01,CM,CDISC017,3,VITAMIN E,PROPHYLAXIS OR NON-THERAPEUTIC USE,400,mg,,ORAL,SCREENING,2011-08,,,,,2014-03-08 \ No newline at end of file diff --git a/Unpublished/NEW-RULE/negative/01/data/mh.csv b/Unpublished/NEW-RULE/negative/01/data/mh.csv new file mode 100644 index 000000000..e2022a4cb --- /dev/null +++ b/Unpublished/NEW-RULE/negative/01/data/mh.csv @@ -0,0 +1,5 @@ +STUDYID,DOMAIN,USUBJID,MHSEQ,MHTERM,MHEVDTYP,MHSTDTC,MHSTDY,MHENDTC,MHENDY,MHENRTPT,MHENTPT +CDISCPILOT01,MH,CDISC001,1,ALZHEIMER'S DISEASE,SYMPTOM ONSET,2004-05-28,-3108,,,,2021-05-01 +CDISCPILOT01,MH,CDISC002,1,ALZHEIMER'S DISEASE,SYMPTOM ONSET,2010-03-19,-972,2010-03-21,-970,,2021-02-15 +CDISCPILOT01,MH,CDISC003,1,ALZHEIMER'S DISEASE,SYMPTOM ONSET,2007-02-09,-2393,2007-02-09,-2393,,2015-05-09 +CDISCPILOT01,MH,CDISC004,1,ALZHEIMER'S DISEASE,SYMPTOM ONSET,2010-11-05,-1068,,,,2011-06-11 \ No newline at end of file diff --git a/Unpublished/NEW-RULE/negative/01/results/results.csv b/Unpublished/NEW-RULE/negative/01/results/results.csv new file mode 100644 index 000000000..d27d8af14 --- /dev/null +++ b/Unpublished/NEW-RULE/negative/01/results/results.csv @@ -0,0 +1,19 @@ +Dataset,Record,Variable,Value +CM,1,CMENTPT,2013-08-06 +CM,1,CMENRTPT,null +CM,2,CMENTPT,2013-08-06 +CM,2,CMENRTPT,null +CM,3,CMENTPT,2014-03-08 +CM,3,CMENRTPT,null +CM,4,CMENTPT,2014-03-08 +CM,4,CMENRTPT,null +CM,5,CMENTPT,2014-03-08 +CM,5,CMENRTPT,null +MH,1,MHENTPT,2021-05-01 +MH,1,MHENRTPT,null +MH,2,MHENTPT,2021-02-15 +MH,2,MHENRTPT,null +MH,3,MHENTPT,2015-05-09 +MH,3,MHENRTPT,null +MH,4,MHENTPT,2011-06-11 +MH,4,MHENRTPT,null diff --git a/Unpublished/NEW-RULE/negative/01/results/results.json b/Unpublished/NEW-RULE/negative/01/results/results.json new file mode 100644 index 000000000..f31bdeb0f --- /dev/null +++ b/Unpublished/NEW-RULE/negative/01/results/results.json @@ -0,0 +1 @@ +{"Conformance_Details": {"Report_Generation": "2026-07-03T13:06:39", "Total_Runtime": "7.67 seconds", "CORE_Engine_Version": "0.16.0", "Issue_Limit_Per_Rule": "None", "Issue_Limit_Per_Dataset": "None", "Issue_Limit_Per_Sheet": null, "Standard": "SDTMIG", "Version": "V3.4", "CT_Version": "", "Define_XML_Version": null}, "Dataset_Details": [{"filename": "CM", "label": "Concomitant/Prior Medications", "path": "C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\negative\\01\\data", "modification_date": "2026-07-03T13:03:20.750712", "size_kb": 0.751, "length": 5}, {"filename": "MH", "label": " Medical History", "path": "C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\negative\\01\\data", "modification_date": "2026-07-03T13:03:26.889708", "size_kb": 0.491, "length": 4}], "Issue_Summary": [{"dataset": "CM", "core_id": "CG0045", "message": "CMENRTPT is not populated when CMENTPT is populated.", "issues": 5}, {"dataset": "MH", "core_id": "CG0045", "message": "MHENRTPT is not populated when MHENTPT is populated.", "issues": 4}], "Issue_Details": [{"core_id": "CG0045", "message": "CMENRTPT is not populated when CMENTPT is populated.", "executability": "fully executable", "dataset": "CM", "USUBJID": "CDISC005", "row": 1, "SEQ": 1, "variables": ["CMENTPT", "CMENRTPT"], "values": ["2013-08-06", "null"]}, {"core_id": "CG0045", "message": "CMENRTPT is not populated when CMENTPT is populated.", "executability": "fully executable", "dataset": "CM", "USUBJID": "CDISC005", "row": 2, "SEQ": 4, "variables": ["CMENTPT", "CMENRTPT"], "values": ["2013-08-06", "null"]}, {"core_id": "CG0045", "message": "CMENRTPT is not populated when CMENTPT is populated.", "executability": "fully executable", "dataset": "CM", "USUBJID": "CDISC017", "row": 3, "SEQ": 1, "variables": ["CMENTPT", "CMENRTPT"], "values": ["2014-03-08", "null"]}, {"core_id": "CG0045", "message": "CMENRTPT is not populated when CMENTPT is populated.", "executability": "fully executable", "dataset": "CM", "USUBJID": "CDISC017", "row": 4, "SEQ": 2, "variables": ["CMENTPT", "CMENRTPT"], "values": ["2014-03-08", "null"]}, {"core_id": "CG0045", "message": "CMENRTPT is not populated when CMENTPT is populated.", "executability": "fully executable", "dataset": "CM", "USUBJID": "CDISC017", "row": 5, "SEQ": 3, "variables": ["CMENTPT", "CMENRTPT"], "values": ["2014-03-08", "null"]}, {"core_id": "CG0045", "message": "MHENRTPT is not populated when MHENTPT is populated.", "executability": "fully executable", "dataset": "MH", "USUBJID": "CDISC001", "row": 1, "SEQ": 1, "variables": ["MHENTPT", "MHENRTPT"], "values": ["2021-05-01", "null"]}, {"core_id": "CG0045", "message": "MHENRTPT is not populated when MHENTPT is populated.", "executability": "fully executable", "dataset": "MH", "USUBJID": "CDISC002", "row": 2, "SEQ": 1, "variables": ["MHENTPT", "MHENRTPT"], "values": ["2021-02-15", "null"]}, {"core_id": "CG0045", "message": "MHENRTPT is not populated when MHENTPT is populated.", "executability": "fully executable", "dataset": "MH", "USUBJID": "CDISC003", "row": 3, "SEQ": 1, "variables": ["MHENTPT", "MHENRTPT"], "values": ["2015-05-09", "null"]}, {"core_id": "CG0045", "message": "MHENRTPT is not populated when MHENTPT is populated.", "executability": "fully executable", "dataset": "MH", "USUBJID": "CDISC004", "row": 4, "SEQ": 1, "variables": ["MHENTPT", "MHENRTPT"], "values": ["2011-06-11", "null"]}], "Rules_Report": [{"core_id": "CG0045", "version": "1", "cdisc_rule_id": "CG0045", "fda_rule_id": "", "message": "--ENRTPT is not populated when --ENTPT is populated.", "status": "ISSUE REPORTED"}]} \ No newline at end of file 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..01d6b7e94 --- /dev/null +++ b/Unpublished/NEW-RULE/negative/01/results/results_engine.log.txt @@ -0,0 +1,32 @@ +[INFO 2026-07-03 13:06:31,758 - console_logger.py:44] - Populating cache, cache path: C:\Users\els_janssens\CORE\Rule_Authoring_CDISC_training\cdisc-open-rules-training\engine\resources\cache +[INFO 2026-07-03 13:06:31,759 - console_logger.py:44] - No rules specified with -r or -er rules flags. Validating with rules in local directory +[INFO 2026-07-03 13:06:32,071 - console_logger.py:44] - Using PANDAS dataset implementation +[INFO 2026-07-03 13:06:32,088 - console_logger.py:44] - Running 1 rules against 2 datasets +[INFO 2026-07-03 13:06:39,575 - console_logger.py:44] - Using PANDAS dataset implementation +[INFO 2026-07-03 13:06:39,575 - console_logger.py:44] - Using PANDAS dataset implementation +[INFO 2026-07-03 13:06:39,605 - console_logger.py:44] - Validating CM. rule={'core_id': 'CG0045', 'author': 'CDISC', 'reference': [[{'Citations': [{'Cited_Guidance': 'The description or date and/or time of a time point that acts as a fixed reference for characterizing the end of an observation. This is the sponsor-defined reference point referred to by --ENRTPT.', 'Document': 'Model v2.0', 'Item': '--ENTPT', 'Section': 'Timing'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], [{'Citations': [{'Cited_Guidance': 'Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.7', 'Item': 'Table 2.2.5.1: --ENRTPT', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], [{'Citations': [{'Cited_Guidance': '(--ENRTPT) Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.4', 'Item': 'Specification', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}]], 'sensitivity': 'Record', 'executability': 'fully executable', 'description': 'Raise an error when --ENTPT is populated but --ENRTPT is not populated.', 'authorities': [{'Organization': 'CDISC', 'Standards': [{'Name': 'SDTMIG', 'References': [{'Citations': [{'Cited_Guidance': 'The description or date and/or time of a time point that acts as a fixed reference for characterizing the end of an observation. This is the sponsor-defined reference point referred to by --ENRTPT.', 'Document': 'Model v2.0', 'Item': '--ENTPT', 'Section': 'Timing'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], 'Version': '3.4'}, {'Name': 'SDTMIG', 'References': [{'Citations': [{'Cited_Guidance': 'Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.7', 'Item': 'Table 2.2.5.1: --ENRTPT', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], 'Version': '3.3'}, {'Name': 'SDTMIG', 'References': [{'Citations': [{'Cited_Guidance': '(--ENRTPT) Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.4', 'Item': 'Specification', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], 'Version': '3.2'}]}], 'standards': [{'Name': 'SDTMIG', 'Version': '3.4', 'Substandard': None}, {'Name': 'SDTMIG', 'Version': '3.3', 'Substandard': None}, {'Name': 'SDTMIG', 'Version': '3.2', 'Substandard': None}], 'classes': {'Include': ['ALL']}, 'domains': {'Include': ['ALL']}, 'entities': None, 'rule_type': 'Record Data', 'conditions': , 'actions': [{'name': 'generate_dataset_error_objects', 'params': {'message': '--ENRTPT is not populated when --ENTPT is populated.'}}], 'use_case': None, 'data_structures': None, 'status': 'Draft', 'output_variables': ['--ENTPT', '--ENRTPT']}. dataset_path=C:\Users\els_janssens\CORE\Rule_Authoring_CDISC_training\cdisc-open-rules-training\Unpublished\NEW-RULE\negative\01\data\cm.csv. datasets=[SDTMDatasetMetadata(name='CM', label='Concomitant/Prior Medications', filename='cm.csv', file_size=751, record_count=5, modification_date='2026-07-03T13:03:20.750712', full_path='C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\negative\\01\\data\\cm.csv', first_record={'STUDYID': 'CDISCPILOT01', 'DOMAIN': 'CM', 'USUBJID': 'CDISC005', 'CMSEQ': '1', 'CMTRT': 'CENTRUM SILVER', 'CMINDC': 'PROPHYLAXIS OR NON-THERAPEUTIC USE', 'CMDOSE': '1', 'CMDOSU': 'TABLET', 'CMDOSFRQ': '', 'CMROUTE': 'ORAL', 'EPOCH': 'SCREENING', 'CMSTDTC': '2012-03', 'CMENDTC': '', 'CMSTDY': '', 'CMENDY': '', 'CMENRTPT': '', 'CMENTPT': '2013-08-06'}, original_path=None), SDTMDatasetMetadata(name='MH', label=' Medical History', filename='mh.csv', file_size=491, record_count=4, modification_date='2026-07-03T13:03:26.889708', full_path='C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\negative\\01\\data\\mh.csv', first_record={'STUDYID': 'CDISCPILOT01', 'DOMAIN': 'MH', 'USUBJID': 'CDISC001', 'MHSEQ': '1', 'MHTERM': "ALZHEIMER'S DISEASE", 'MHEVDTYP': 'SYMPTOM ONSET', 'MHSTDTC': '2004-05-28', 'MHSTDY': '-3108', 'MHENDTC': '', 'MHENDY': '', 'MHENRTPT': '', 'MHENTPT': '2021-05-01'}, original_path=None)]. +[INFO 2026-07-03 13:06:39,606 - console_logger.py:44] - is_suitable_for_validation. rule id=CG0045, dataset=CM, result=True +[INFO 2026-07-03 13:06:39,608 - console_logger.py:44] - Downloading dataset from storage. dataset_name=CM, wrapped function=get_dataset +[INFO 2026-07-03 13:06:39,623 - console_logger.py:44] - Downloaded dataset. dataset= +[INFO 2026-07-03 13:06:39,630 - console_logger.py:44] - Using dataset build by: +[INFO 2026-07-03 13:06:39,630 - console_logger.py:44] - Starting check operator: non_empty +[INFO 2026-07-03 13:06:39,631 - console_logger.py:44] - Starting check operator: empty +[INFO 2026-07-03 13:06:39,632 - console_logger.py:44] - Completed check operator: empty +[INFO 2026-07-03 13:06:39,633 - console_logger.py:44] - Completed check operator: non_empty +[INFO 2026-07-03 13:06:39,633 - console_logger.py:44] - Starting check operator: empty +[INFO 2026-07-03 13:06:39,635 - console_logger.py:44] - Completed check operator: empty +[INFO 2026-07-03 13:06:39,641 - console_logger.py:44] - Validated dataset CM. Result = [{'executionStatus': 'issue reported', 'dataset': 'CM', 'domain': 'CM', 'variables': ['CMENTPT', 'CMENRTPT'], 'message': 'CMENRTPT is not populated when CMENTPT is populated.', 'errors': [{'value': {'CMENTPT': '2013-08-06', 'CMENRTPT': None}, 'dataset': 'CM', 'row': 1, 'USUBJID': 'CDISC005', 'SEQ': 1}, {'value': {'CMENTPT': '2013-08-06', 'CMENRTPT': None}, 'dataset': 'CM', 'row': 2, 'USUBJID': 'CDISC005', 'SEQ': 4}, {'value': {'CMENTPT': '2014-03-08', 'CMENRTPT': None}, 'dataset': 'CM', 'row': 3, 'USUBJID': 'CDISC017', 'SEQ': 1}, {'value': {'CMENTPT': '2014-03-08', 'CMENRTPT': None}, 'dataset': 'CM', 'row': 4, 'USUBJID': 'CDISC017', 'SEQ': 2}, {'value': {'CMENTPT': '2014-03-08', 'CMENRTPT': None}, 'dataset': 'CM', 'row': 5, 'USUBJID': 'CDISC017', 'SEQ': 3}]}] +[INFO 2026-07-03 13:06:39,641 - console_logger.py:44] - Validating MH. rule={'core_id': 'CG0045', 'author': 'CDISC', 'reference': [[{'Citations': [{'Cited_Guidance': 'The description or date and/or time of a time point that acts as a fixed reference for characterizing the end of an observation. This is the sponsor-defined reference point referred to by --ENRTPT.', 'Document': 'Model v2.0', 'Item': '--ENTPT', 'Section': 'Timing'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], [{'Citations': [{'Cited_Guidance': 'Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.7', 'Item': 'Table 2.2.5.1: --ENRTPT', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], [{'Citations': [{'Cited_Guidance': '(--ENRTPT) Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.4', 'Item': 'Specification', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}]], 'sensitivity': 'Record', 'executability': 'fully executable', 'description': 'Raise an error when --ENTPT is populated but --ENRTPT is not populated.', 'authorities': [{'Organization': 'CDISC', 'Standards': [{'Name': 'SDTMIG', 'References': [{'Citations': [{'Cited_Guidance': 'The description or date and/or time of a time point that acts as a fixed reference for characterizing the end of an observation. This is the sponsor-defined reference point referred to by --ENRTPT.', 'Document': 'Model v2.0', 'Item': '--ENTPT', 'Section': 'Timing'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], 'Version': '3.4'}, {'Name': 'SDTMIG', 'References': [{'Citations': [{'Cited_Guidance': 'Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.7', 'Item': 'Table 2.2.5.1: --ENRTPT', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], 'Version': '3.3'}, {'Name': 'SDTMIG', 'References': [{'Citations': [{'Cited_Guidance': '(--ENRTPT) Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.4', 'Item': 'Specification', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], 'Version': '3.2'}]}], 'standards': [{'Name': 'SDTMIG', 'Version': '3.4', 'Substandard': None}, {'Name': 'SDTMIG', 'Version': '3.3', 'Substandard': None}, {'Name': 'SDTMIG', 'Version': '3.2', 'Substandard': None}], 'classes': {'Include': ['ALL']}, 'domains': {'Include': ['ALL']}, 'entities': None, 'rule_type': 'Record Data', 'conditions': , 'actions': [{'name': 'generate_dataset_error_objects', 'params': {'message': '--ENRTPT is not populated when --ENTPT is populated.'}}], 'use_case': None, 'data_structures': None, 'status': 'Draft', 'output_variables': ['--ENTPT', '--ENRTPT']}. dataset_path=C:\Users\els_janssens\CORE\Rule_Authoring_CDISC_training\cdisc-open-rules-training\Unpublished\NEW-RULE\negative\01\data\mh.csv. datasets=[SDTMDatasetMetadata(name='CM', label='Concomitant/Prior Medications', filename='cm.csv', file_size=751, record_count=5, modification_date='2026-07-03T13:03:20.750712', full_path='C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\negative\\01\\data\\cm.csv', first_record={'STUDYID': 'CDISCPILOT01', 'DOMAIN': 'CM', 'USUBJID': 'CDISC005', 'CMSEQ': '1', 'CMTRT': 'CENTRUM SILVER', 'CMINDC': 'PROPHYLAXIS OR NON-THERAPEUTIC USE', 'CMDOSE': '1', 'CMDOSU': 'TABLET', 'CMDOSFRQ': '', 'CMROUTE': 'ORAL', 'EPOCH': 'SCREENING', 'CMSTDTC': '2012-03', 'CMENDTC': '', 'CMSTDY': '', 'CMENDY': '', 'CMENRTPT': '', 'CMENTPT': '2013-08-06'}, original_path=None), SDTMDatasetMetadata(name='MH', label=' Medical History', filename='mh.csv', file_size=491, record_count=4, modification_date='2026-07-03T13:03:26.889708', full_path='C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\negative\\01\\data\\mh.csv', first_record={'STUDYID': 'CDISCPILOT01', 'DOMAIN': 'MH', 'USUBJID': 'CDISC001', 'MHSEQ': '1', 'MHTERM': "ALZHEIMER'S DISEASE", 'MHEVDTYP': 'SYMPTOM ONSET', 'MHSTDTC': '2004-05-28', 'MHSTDY': '-3108', 'MHENDTC': '', 'MHENDY': '', 'MHENRTPT': '', 'MHENTPT': '2021-05-01'}, original_path=None)]. +[INFO 2026-07-03 13:06:39,641 - console_logger.py:44] - is_suitable_for_validation. rule id=CG0045, dataset=MH, result=True +[INFO 2026-07-03 13:06:39,642 - console_logger.py:44] - Downloading dataset from storage. dataset_name=MH, wrapped function=get_dataset +[INFO 2026-07-03 13:06:39,652 - console_logger.py:44] - Downloaded dataset. dataset= +[INFO 2026-07-03 13:06:39,658 - console_logger.py:44] - Using dataset build by: +[INFO 2026-07-03 13:06:39,658 - console_logger.py:44] - Starting check operator: non_empty +[INFO 2026-07-03 13:06:39,659 - console_logger.py:44] - Starting check operator: empty +[INFO 2026-07-03 13:06:39,660 - console_logger.py:44] - Completed check operator: empty +[INFO 2026-07-03 13:06:39,660 - console_logger.py:44] - Completed check operator: non_empty +[INFO 2026-07-03 13:06:39,661 - console_logger.py:44] - Starting check operator: empty +[INFO 2026-07-03 13:06:39,662 - console_logger.py:44] - Completed check operator: empty +[INFO 2026-07-03 13:06:39,669 - console_logger.py:44] - Validated dataset MH. Result = [{'executionStatus': 'issue reported', 'dataset': 'MH', 'domain': 'MH', 'variables': ['MHENTPT', 'MHENRTPT'], 'message': 'MHENRTPT is not populated when MHENTPT is populated.', 'errors': [{'value': {'MHENTPT': '2021-05-01', 'MHENRTPT': None}, 'dataset': 'MH', 'row': 1, 'USUBJID': 'CDISC001', 'SEQ': 1}, {'value': {'MHENTPT': '2021-02-15', 'MHENRTPT': None}, 'dataset': 'MH', 'row': 2, 'USUBJID': 'CDISC002', 'SEQ': 1}, {'value': {'MHENTPT': '2015-05-09', 'MHENRTPT': None}, 'dataset': 'MH', 'row': 3, 'USUBJID': 'CDISC003', 'SEQ': 1}, {'value': {'MHENTPT': '2011-06-11', 'MHENRTPT': None}, 'dataset': 'MH', 'row': 4, 'USUBJID': 'CDISC004', 'SEQ': 1}]}] +[INFO 2026-07-03 13:06:39,755 - console_logger.py:44] - Done Rule execution, creating reports +Output: C:\Users\els_janssens\CORE\Rule_Authoring_CDISC_training\cdisc-open-rules-training\Unpublished\NEW-RULE\negative\01\results\results.json \ 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..929573120 --- /dev/null +++ b/Unpublished/NEW-RULE/positive/01/data/.env @@ -0,0 +1,2 @@ +PRODUCT=SDTMIG +VERSION=3-4 \ No newline at end of file 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..291dd3b34 --- /dev/null +++ b/Unpublished/NEW-RULE/positive/01/data/_datasets.csv @@ -0,0 +1,3 @@ +Filename,Label +cm,Concomitant/Prior Medications +mh, Medical History \ No newline at end of file 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..a1aa0376d --- /dev/null +++ b/Unpublished/NEW-RULE/positive/01/data/_variables.csv @@ -0,0 +1,30 @@ +dataset,variable,label,type,length +cm,STUDYID,Study Identifier,Char,12 +cm,DOMAIN,Domain Abbreviation,Char,2 +cm,USUBJID,Unique Subject Identifier,Char,8 +cm,CMSEQ,Sequence Number,Num,8 +cm,CMTRT,"Reported Name of Drug, Med, or Therapy",Char,200 +cm,CMINDC,Indication,Char,200 +cm,CMDOSE,Dose per Administration,Num,8 +cm,CMDOSU,Dose Units,Char,6 +cm,CMDOSFRQ,Dosing Frequency per Interval,Char,3 +cm,CMROUTE,Route of Administration,Char,24 +cm,EPOCH,Epoch,Char,9 +cm,CMSTDTC,Start Date/Time of Medication,Char,10 +cm,CMENDTC,End Date/Time of Medication,Char,10 +cm,CMSTDY,Study Day of Start of Medication,Num,8 +cm,CMENDY,Study Day of End of Medication,Num,8 +cm,CMENRTPT,End Relative to Reference Time Point,Char,7 +cm,CMENTPT,End Reference Time Point,Char,10 +mh,STUDYID,Study Identifier,Char,12 +mh,DOMAIN,Domain Abbreviation,Char,2 +mh,USUBJID,Unique Subject Identifier,Char,8 +mh,MHSEQ,Sequence Number,Num,8 +mh,MHTERM,Reported Term for the Medical History,Char,19 +mh,MHEVDTYP,Medical History Event Date Type,Char,13 +mh,MHSTDTC,Start Date/Time of Medical History Event,Char,10 +mh,MHSTDY,Study Day of Start of Observation,Num,8 +mh,MHENDTC,End Date/Time of Medical History Event,Char,50 +mh,MHENDY,Study Day of End of Observation,Num,8 +mh,MHENRTPT,End Relative to Reference Time Point,Char,50 +mh,MHENTPT,End Reference Time Point,Char,50 \ No newline at end of file diff --git a/Unpublished/NEW-RULE/positive/01/data/cm.csv b/Unpublished/NEW-RULE/positive/01/data/cm.csv new file mode 100644 index 000000000..1f9166333 --- /dev/null +++ b/Unpublished/NEW-RULE/positive/01/data/cm.csv @@ -0,0 +1,7 @@ +STUDYID,DOMAIN,USUBJID,CMSEQ,CMTRT,CMINDC,CMDOSE,CMDOSU,CMDOSFRQ,CMROUTE,EPOCH,CMSTDTC,CMENDTC,CMSTDY,CMENDY,CMENRTPT,CMENTPT +CDISCPILOT01,CM,CDISC004,1,VITAMIN C,PROPHYLAXIS OR NON-THERAPEUTIC USE,500,mg,,ORAL,SCREENING,1983,,,,ONGOING,2014-03-18 +CDISCPILOT01,CM,CDISC004,2,VITAMIN E,PROPHYLAXIS OR NON-THERAPEUTIC USE,400,mg,,ORAL,SCREENING,1983,,,,ONGOING,2014-03-18 +CDISCPILOT01,CM,CDISC007,1,METAMUCIL,PROPHYLAXIS OR NON-THERAPEUTIC USE,3,mg,,ORAL,SCREENING,2009,,,,ONGOING,2013-06-20 +CDISCPILOT01,CM,CDISC007,2,ADVIL,PROPHYLAXIS OR NON-THERAPEUTIC USE,200,mg,,ORAL,SCREENING,2011,,,,ONGOING,2013-06-20 +CDISCPILOT01,CM,CDISC007,3,DOCUSATE SODIUM,PROPHYLAXIS OR NON-THERAPEUTIC USE,100,mg,,ORAL,SCREENING,2012-11,2013-01-05,,1,, +CDISCPILOT01,CM,CDISC007,4,BENADRYL,PROPHYLAXIS OR NON-THERAPEUTIC USE,75,mg,,ORAL,SCREENING,2013-02-18,2013-05-10,45,126,ONGOING, \ No newline at end of file diff --git a/Unpublished/NEW-RULE/positive/01/data/mh.csv b/Unpublished/NEW-RULE/positive/01/data/mh.csv new file mode 100644 index 000000000..c2ac354c4 --- /dev/null +++ b/Unpublished/NEW-RULE/positive/01/data/mh.csv @@ -0,0 +1,5 @@ +STUDYID,DOMAIN,USUBJID,MHSEQ,MHTERM,MHEVDTYP,MHSTDTC,MHSTDY,MHENDTC,MHENDY,MHENRTPT,MHENTPT +CDISCPILOT01,MH,CDISC009,1,ALZHEIMER'S DISEASE,SYMPTOM ONSET,2008-09-02,-1511,,,ONGOING,2021-05-04 +CDISCPILOT01,MH,CDISC010,1,ALZHEIMER'S DISEASE,SYMPTOM ONSET,2012-09-08,-378,,,ONGOING,2021-05-05 +CDISCPILOT01,MH,CDISC011,1,ALZHEIMER'S DISEASE,SYMPTOM ONSET,2002-12-01,-3659,,,ONGOING,2021-05-06 +CDISCPILOT01,MH,CDISC012,1,ALZHEIMER'S DISEASE,SYMPTOM ONSET,2009-03-16,-1632,,,, diff --git a/Unpublished/NEW-RULE/positive/01/results/results.csv b/Unpublished/NEW-RULE/positive/01/results/results.csv new file mode 100644 index 000000000..a13018c5f --- /dev/null +++ b/Unpublished/NEW-RULE/positive/01/results/results.csv @@ -0,0 +1 @@ +Dataset,Record,Variable,Value diff --git a/Unpublished/NEW-RULE/positive/01/results/results.json b/Unpublished/NEW-RULE/positive/01/results/results.json new file mode 100644 index 000000000..1bd2d5088 --- /dev/null +++ b/Unpublished/NEW-RULE/positive/01/results/results.json @@ -0,0 +1 @@ +{"Conformance_Details": {"Report_Generation": "2026-07-03T13:06:23", "Total_Runtime": "8.7 seconds", "CORE_Engine_Version": "0.16.0", "Issue_Limit_Per_Rule": "None", "Issue_Limit_Per_Dataset": "None", "Issue_Limit_Per_Sheet": null, "Standard": "SDTMIG", "Version": "V3.4", "CT_Version": "", "Define_XML_Version": null}, "Dataset_Details": [{"filename": "CM", "label": "Concomitant/Prior Medications", "path": "C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\positive\\01\\data", "modification_date": "2026-07-03T13:04:09.497497", "size_kb": 0.869, "length": 6}, {"filename": "MH", "label": " Medical History", "path": "C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\positive\\01\\data", "modification_date": "2026-05-11T12:41:04.574394", "size_kb": 0.475, "length": 4}], "Issue_Summary": [], "Issue_Details": [], "Rules_Report": [{"core_id": "CG0045", "version": "1", "cdisc_rule_id": "CG0045", "fda_rule_id": "", "message": "--ENRTPT is not populated when --ENTPT is populated.", "status": "SUCCESS"}]} \ No newline at end of file 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..22ed26cf7 --- /dev/null +++ b/Unpublished/NEW-RULE/positive/01/results/results_engine.log.txt @@ -0,0 +1,32 @@ +[INFO 2026-07-03 13:06:14,091 - console_logger.py:44] - Populating cache, cache path: C:\Users\els_janssens\CORE\Rule_Authoring_CDISC_training\cdisc-open-rules-training\engine\resources\cache +[INFO 2026-07-03 13:06:14,091 - console_logger.py:44] - No rules specified with -r or -er rules flags. Validating with rules in local directory +[INFO 2026-07-03 13:06:14,447 - console_logger.py:44] - Using PANDAS dataset implementation +[INFO 2026-07-03 13:06:14,464 - console_logger.py:44] - Running 1 rules against 2 datasets +[INFO 2026-07-03 13:06:22,970 - console_logger.py:44] - Using PANDAS dataset implementation +[INFO 2026-07-03 13:06:22,970 - console_logger.py:44] - Using PANDAS dataset implementation +[INFO 2026-07-03 13:06:23,008 - console_logger.py:44] - Validating CM. rule={'core_id': 'CG0045', 'author': 'CDISC', 'reference': [[{'Citations': [{'Cited_Guidance': 'The description or date and/or time of a time point that acts as a fixed reference for characterizing the end of an observation. This is the sponsor-defined reference point referred to by --ENRTPT.', 'Document': 'Model v2.0', 'Item': '--ENTPT', 'Section': 'Timing'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], [{'Citations': [{'Cited_Guidance': 'Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.7', 'Item': 'Table 2.2.5.1: --ENRTPT', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], [{'Citations': [{'Cited_Guidance': '(--ENRTPT) Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.4', 'Item': 'Specification', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}]], 'sensitivity': 'Record', 'executability': 'fully executable', 'description': 'Raise an error when --ENTPT is populated but --ENRTPT is not populated.', 'authorities': [{'Organization': 'CDISC', 'Standards': [{'Name': 'SDTMIG', 'References': [{'Citations': [{'Cited_Guidance': 'The description or date and/or time of a time point that acts as a fixed reference for characterizing the end of an observation. This is the sponsor-defined reference point referred to by --ENRTPT.', 'Document': 'Model v2.0', 'Item': '--ENTPT', 'Section': 'Timing'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], 'Version': '3.4'}, {'Name': 'SDTMIG', 'References': [{'Citations': [{'Cited_Guidance': 'Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.7', 'Item': 'Table 2.2.5.1: --ENRTPT', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], 'Version': '3.3'}, {'Name': 'SDTMIG', 'References': [{'Citations': [{'Cited_Guidance': '(--ENRTPT) Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.4', 'Item': 'Specification', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], 'Version': '3.2'}]}], 'standards': [{'Name': 'SDTMIG', 'Version': '3.4', 'Substandard': None}, {'Name': 'SDTMIG', 'Version': '3.3', 'Substandard': None}, {'Name': 'SDTMIG', 'Version': '3.2', 'Substandard': None}], 'classes': {'Include': ['ALL']}, 'domains': {'Include': ['ALL']}, 'entities': None, 'rule_type': 'Record Data', 'conditions': , 'actions': [{'name': 'generate_dataset_error_objects', 'params': {'message': '--ENRTPT is not populated when --ENTPT is populated.'}}], 'use_case': None, 'data_structures': None, 'status': 'Draft', 'output_variables': ['--ENTPT', '--ENRTPT']}. dataset_path=C:\Users\els_janssens\CORE\Rule_Authoring_CDISC_training\cdisc-open-rules-training\Unpublished\NEW-RULE\positive\01\data\cm.csv. datasets=[SDTMDatasetMetadata(name='CM', label='Concomitant/Prior Medications', filename='cm.csv', file_size=869, record_count=6, modification_date='2026-07-03T13:04:09.497497', full_path='C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\positive\\01\\data\\cm.csv', first_record={'STUDYID': 'CDISCPILOT01', 'DOMAIN': 'CM', 'USUBJID': 'CDISC004', 'CMSEQ': '1', 'CMTRT': 'VITAMIN C', 'CMINDC': 'PROPHYLAXIS OR NON-THERAPEUTIC USE', 'CMDOSE': '500', 'CMDOSU': 'mg', 'CMDOSFRQ': '', 'CMROUTE': 'ORAL', 'EPOCH': 'SCREENING', 'CMSTDTC': '1983', 'CMENDTC': '', 'CMSTDY': '', 'CMENDY': '', 'CMENRTPT': 'ONGOING', 'CMENTPT': '2014-03-18'}, original_path=None), SDTMDatasetMetadata(name='MH', label=' Medical History', filename='mh.csv', file_size=475, record_count=4, modification_date='2026-05-11T12:41:04.574394', full_path='C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\positive\\01\\data\\mh.csv', first_record={'STUDYID': 'CDISCPILOT01', 'DOMAIN': 'MH', 'USUBJID': 'CDISC009', 'MHSEQ': '1', 'MHTERM': "ALZHEIMER'S DISEASE", 'MHEVDTYP': 'SYMPTOM ONSET', 'MHSTDTC': '2008-09-02', 'MHSTDY': '-1511', 'MHENDTC': '', 'MHENDY': '', 'MHENRTPT': 'ONGOING', 'MHENTPT': '2021-05-04'}, original_path=None)]. +[INFO 2026-07-03 13:06:23,008 - console_logger.py:44] - is_suitable_for_validation. rule id=CG0045, dataset=CM, result=True +[INFO 2026-07-03 13:06:23,014 - console_logger.py:44] - Downloading dataset from storage. dataset_name=CM, wrapped function=get_dataset +[INFO 2026-07-03 13:06:23,032 - console_logger.py:44] - Downloaded dataset. dataset= +[INFO 2026-07-03 13:06:23,040 - console_logger.py:44] - Using dataset build by: +[INFO 2026-07-03 13:06:23,041 - console_logger.py:44] - Starting check operator: non_empty +[INFO 2026-07-03 13:06:23,041 - console_logger.py:44] - Starting check operator: empty +[INFO 2026-07-03 13:06:23,043 - console_logger.py:44] - Completed check operator: empty +[INFO 2026-07-03 13:06:23,043 - console_logger.py:44] - Completed check operator: non_empty +[INFO 2026-07-03 13:06:23,044 - console_logger.py:44] - Starting check operator: empty +[INFO 2026-07-03 13:06:23,045 - console_logger.py:44] - Completed check operator: empty +[INFO 2026-07-03 13:06:23,046 - console_logger.py:44] - Validated dataset CM. Result = [] +[INFO 2026-07-03 13:06:23,047 - console_logger.py:44] - Validating MH. rule={'core_id': 'CG0045', 'author': 'CDISC', 'reference': [[{'Citations': [{'Cited_Guidance': 'The description or date and/or time of a time point that acts as a fixed reference for characterizing the end of an observation. This is the sponsor-defined reference point referred to by --ENRTPT.', 'Document': 'Model v2.0', 'Item': '--ENTPT', 'Section': 'Timing'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], [{'Citations': [{'Cited_Guidance': 'Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.7', 'Item': 'Table 2.2.5.1: --ENRTPT', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], [{'Citations': [{'Cited_Guidance': '(--ENRTPT) Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.4', 'Item': 'Specification', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}]], 'sensitivity': 'Record', 'executability': 'fully executable', 'description': 'Raise an error when --ENTPT is populated but --ENRTPT is not populated.', 'authorities': [{'Organization': 'CDISC', 'Standards': [{'Name': 'SDTMIG', 'References': [{'Citations': [{'Cited_Guidance': 'The description or date and/or time of a time point that acts as a fixed reference for characterizing the end of an observation. This is the sponsor-defined reference point referred to by --ENRTPT.', 'Document': 'Model v2.0', 'Item': '--ENTPT', 'Section': 'Timing'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], 'Version': '3.4'}, {'Name': 'SDTMIG', 'References': [{'Citations': [{'Cited_Guidance': 'Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.7', 'Item': 'Table 2.2.5.1: --ENRTPT', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], 'Version': '3.3'}, {'Name': 'SDTMIG', 'References': [{'Citations': [{'Cited_Guidance': '(--ENRTPT) Identifies the end of the observation as being before or after the sponsor-defined reference time point defined by variable --ENTPT.', 'Document': 'Model v1.4', 'Item': 'Specification', 'Section': '2.2.5 Timing Variables for All Classes'}], 'Origin': 'SDTM and SDTMIG Conformance Rules', 'Rule_Identifier': {'Id': 'CG0045', 'Version': '1'}, 'Version': '2.0'}], 'Version': '3.2'}]}], 'standards': [{'Name': 'SDTMIG', 'Version': '3.4', 'Substandard': None}, {'Name': 'SDTMIG', 'Version': '3.3', 'Substandard': None}, {'Name': 'SDTMIG', 'Version': '3.2', 'Substandard': None}], 'classes': {'Include': ['ALL']}, 'domains': {'Include': ['ALL']}, 'entities': None, 'rule_type': 'Record Data', 'conditions': , 'actions': [{'name': 'generate_dataset_error_objects', 'params': {'message': '--ENRTPT is not populated when --ENTPT is populated.'}}], 'use_case': None, 'data_structures': None, 'status': 'Draft', 'output_variables': ['--ENTPT', '--ENRTPT']}. dataset_path=C:\Users\els_janssens\CORE\Rule_Authoring_CDISC_training\cdisc-open-rules-training\Unpublished\NEW-RULE\positive\01\data\mh.csv. datasets=[SDTMDatasetMetadata(name='CM', label='Concomitant/Prior Medications', filename='cm.csv', file_size=869, record_count=6, modification_date='2026-07-03T13:04:09.497497', full_path='C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\positive\\01\\data\\cm.csv', first_record={'STUDYID': 'CDISCPILOT01', 'DOMAIN': 'CM', 'USUBJID': 'CDISC004', 'CMSEQ': '1', 'CMTRT': 'VITAMIN C', 'CMINDC': 'PROPHYLAXIS OR NON-THERAPEUTIC USE', 'CMDOSE': '500', 'CMDOSU': 'mg', 'CMDOSFRQ': '', 'CMROUTE': 'ORAL', 'EPOCH': 'SCREENING', 'CMSTDTC': '1983', 'CMENDTC': '', 'CMSTDY': '', 'CMENDY': '', 'CMENRTPT': 'ONGOING', 'CMENTPT': '2014-03-18'}, original_path=None), SDTMDatasetMetadata(name='MH', label=' Medical History', filename='mh.csv', file_size=475, record_count=4, modification_date='2026-05-11T12:41:04.574394', full_path='C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\positive\\01\\data\\mh.csv', first_record={'STUDYID': 'CDISCPILOT01', 'DOMAIN': 'MH', 'USUBJID': 'CDISC009', 'MHSEQ': '1', 'MHTERM': "ALZHEIMER'S DISEASE", 'MHEVDTYP': 'SYMPTOM ONSET', 'MHSTDTC': '2008-09-02', 'MHSTDY': '-1511', 'MHENDTC': '', 'MHENDY': '', 'MHENRTPT': 'ONGOING', 'MHENTPT': '2021-05-04'}, original_path=None)]. +[INFO 2026-07-03 13:06:23,047 - console_logger.py:44] - is_suitable_for_validation. rule id=CG0045, dataset=MH, result=True +[INFO 2026-07-03 13:06:23,047 - console_logger.py:44] - Downloading dataset from storage. dataset_name=MH, wrapped function=get_dataset +[INFO 2026-07-03 13:06:23,059 - console_logger.py:44] - Downloaded dataset. dataset= +[INFO 2026-07-03 13:06:23,067 - console_logger.py:44] - Using dataset build by: +[INFO 2026-07-03 13:06:23,068 - console_logger.py:44] - Starting check operator: non_empty +[INFO 2026-07-03 13:06:23,068 - console_logger.py:44] - Starting check operator: empty +[INFO 2026-07-03 13:06:23,071 - console_logger.py:44] - Completed check operator: empty +[INFO 2026-07-03 13:06:23,071 - console_logger.py:44] - Completed check operator: non_empty +[INFO 2026-07-03 13:06:23,071 - console_logger.py:44] - Starting check operator: empty +[INFO 2026-07-03 13:06:23,073 - console_logger.py:44] - Completed check operator: empty +[INFO 2026-07-03 13:06:23,074 - console_logger.py:44] - Validated dataset MH. Result = [] +[INFO 2026-07-03 13:06:23,163 - console_logger.py:44] - Done Rule execution, creating reports +Output: C:\Users\els_janssens\CORE\Rule_Authoring_CDISC_training\cdisc-open-rules-training\Unpublished\NEW-RULE\positive\01\results\results.json \ 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..bb1f5a7bc --- /dev/null +++ b/Unpublished/NEW-RULE/rule.yml @@ -0,0 +1,75 @@ +Authorities: + - Organization: CDISC + Standards: + - Name: SDTMIG + References: + - Citations: + - Cited Guidance: The description or date and/or time of a time point that acts as + a fixed reference for characterizing the end of an + observation. This is the sponsor-defined reference point + referred to by --ENRTPT. + Document: Model v2.0 + Item: --ENTPT + Section: Timing + Origin: SDTM and SDTMIG Conformance Rules + Rule Identifier: + Id: CG0045 + Version: '1' + Version: '2.0' + Version: '3.4' + - Name: SDTMIG + References: + - Citations: + - Cited Guidance: Identifies the end of the observation as being before or after + the sponsor-defined reference time point defined by variable + --ENTPT. + Document: Model v1.7 + Item: 'Table 2.2.5.1: --ENRTPT' + Section: 2.2.5 Timing Variables for All Classes + Origin: SDTM and SDTMIG Conformance Rules + Rule Identifier: + Id: CG0045 + Version: '1' + Version: '2.0' + Version: '3.3' + - Name: SDTMIG + References: + - Citations: + - Cited Guidance: (--ENRTPT) Identifies the end of the observation as being before + or after the sponsor-defined reference time point defined by + variable --ENTPT. + Document: Model v1.4 + Item: Specification + Section: 2.2.5 Timing Variables for All Classes + Origin: SDTM and SDTMIG Conformance Rules + Rule Identifier: + Id: CG0045 + Version: '1' + Version: '2.0' + Version: '3.2' +Check: + all: + - name: --ENTPT + operator: non_empty + - name: --ENRTPT + operator: empty +Core: + Id: CG0045 + Status: Draft + Version: '1' +Description: Raise an error when --ENTPT is populated but --ENRTPT is not populated. +Executability: Fully Executable +Outcome: + Message: --ENRTPT is not populated when --ENTPT is populated. + Output Variables: + - --ENTPT + - --ENRTPT +Rule Type: Record Data +Scope: + Classes: + Include: + - ALL + Domains: + Include: + - ALL +Sensitivity: Record From e795e130f521a701908fb27d9bb305af2394b7c1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 3 Jul 2026 11:11:18 +0000 Subject: [PATCH 2/3] ci: remove results.json from NEW-RULE [skip ci] --- Unpublished/NEW-RULE/negative/01/results/results.json | 1 - Unpublished/NEW-RULE/positive/01/results/results.json | 1 - 2 files changed, 2 deletions(-) delete mode 100644 Unpublished/NEW-RULE/negative/01/results/results.json delete mode 100644 Unpublished/NEW-RULE/positive/01/results/results.json diff --git a/Unpublished/NEW-RULE/negative/01/results/results.json b/Unpublished/NEW-RULE/negative/01/results/results.json deleted file mode 100644 index f31bdeb0f..000000000 --- a/Unpublished/NEW-RULE/negative/01/results/results.json +++ /dev/null @@ -1 +0,0 @@ -{"Conformance_Details": {"Report_Generation": "2026-07-03T13:06:39", "Total_Runtime": "7.67 seconds", "CORE_Engine_Version": "0.16.0", "Issue_Limit_Per_Rule": "None", "Issue_Limit_Per_Dataset": "None", "Issue_Limit_Per_Sheet": null, "Standard": "SDTMIG", "Version": "V3.4", "CT_Version": "", "Define_XML_Version": null}, "Dataset_Details": [{"filename": "CM", "label": "Concomitant/Prior Medications", "path": "C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\negative\\01\\data", "modification_date": "2026-07-03T13:03:20.750712", "size_kb": 0.751, "length": 5}, {"filename": "MH", "label": " Medical History", "path": "C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\negative\\01\\data", "modification_date": "2026-07-03T13:03:26.889708", "size_kb": 0.491, "length": 4}], "Issue_Summary": [{"dataset": "CM", "core_id": "CG0045", "message": "CMENRTPT is not populated when CMENTPT is populated.", "issues": 5}, {"dataset": "MH", "core_id": "CG0045", "message": "MHENRTPT is not populated when MHENTPT is populated.", "issues": 4}], "Issue_Details": [{"core_id": "CG0045", "message": "CMENRTPT is not populated when CMENTPT is populated.", "executability": "fully executable", "dataset": "CM", "USUBJID": "CDISC005", "row": 1, "SEQ": 1, "variables": ["CMENTPT", "CMENRTPT"], "values": ["2013-08-06", "null"]}, {"core_id": "CG0045", "message": "CMENRTPT is not populated when CMENTPT is populated.", "executability": "fully executable", "dataset": "CM", "USUBJID": "CDISC005", "row": 2, "SEQ": 4, "variables": ["CMENTPT", "CMENRTPT"], "values": ["2013-08-06", "null"]}, {"core_id": "CG0045", "message": "CMENRTPT is not populated when CMENTPT is populated.", "executability": "fully executable", "dataset": "CM", "USUBJID": "CDISC017", "row": 3, "SEQ": 1, "variables": ["CMENTPT", "CMENRTPT"], "values": ["2014-03-08", "null"]}, {"core_id": "CG0045", "message": "CMENRTPT is not populated when CMENTPT is populated.", "executability": "fully executable", "dataset": "CM", "USUBJID": "CDISC017", "row": 4, "SEQ": 2, "variables": ["CMENTPT", "CMENRTPT"], "values": ["2014-03-08", "null"]}, {"core_id": "CG0045", "message": "CMENRTPT is not populated when CMENTPT is populated.", "executability": "fully executable", "dataset": "CM", "USUBJID": "CDISC017", "row": 5, "SEQ": 3, "variables": ["CMENTPT", "CMENRTPT"], "values": ["2014-03-08", "null"]}, {"core_id": "CG0045", "message": "MHENRTPT is not populated when MHENTPT is populated.", "executability": "fully executable", "dataset": "MH", "USUBJID": "CDISC001", "row": 1, "SEQ": 1, "variables": ["MHENTPT", "MHENRTPT"], "values": ["2021-05-01", "null"]}, {"core_id": "CG0045", "message": "MHENRTPT is not populated when MHENTPT is populated.", "executability": "fully executable", "dataset": "MH", "USUBJID": "CDISC002", "row": 2, "SEQ": 1, "variables": ["MHENTPT", "MHENRTPT"], "values": ["2021-02-15", "null"]}, {"core_id": "CG0045", "message": "MHENRTPT is not populated when MHENTPT is populated.", "executability": "fully executable", "dataset": "MH", "USUBJID": "CDISC003", "row": 3, "SEQ": 1, "variables": ["MHENTPT", "MHENRTPT"], "values": ["2015-05-09", "null"]}, {"core_id": "CG0045", "message": "MHENRTPT is not populated when MHENTPT is populated.", "executability": "fully executable", "dataset": "MH", "USUBJID": "CDISC004", "row": 4, "SEQ": 1, "variables": ["MHENTPT", "MHENRTPT"], "values": ["2011-06-11", "null"]}], "Rules_Report": [{"core_id": "CG0045", "version": "1", "cdisc_rule_id": "CG0045", "fda_rule_id": "", "message": "--ENRTPT is not populated when --ENTPT is populated.", "status": "ISSUE REPORTED"}]} \ No newline at end of file diff --git a/Unpublished/NEW-RULE/positive/01/results/results.json b/Unpublished/NEW-RULE/positive/01/results/results.json deleted file mode 100644 index 1bd2d5088..000000000 --- a/Unpublished/NEW-RULE/positive/01/results/results.json +++ /dev/null @@ -1 +0,0 @@ -{"Conformance_Details": {"Report_Generation": "2026-07-03T13:06:23", "Total_Runtime": "8.7 seconds", "CORE_Engine_Version": "0.16.0", "Issue_Limit_Per_Rule": "None", "Issue_Limit_Per_Dataset": "None", "Issue_Limit_Per_Sheet": null, "Standard": "SDTMIG", "Version": "V3.4", "CT_Version": "", "Define_XML_Version": null}, "Dataset_Details": [{"filename": "CM", "label": "Concomitant/Prior Medications", "path": "C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\positive\\01\\data", "modification_date": "2026-07-03T13:04:09.497497", "size_kb": 0.869, "length": 6}, {"filename": "MH", "label": " Medical History", "path": "C:\\Users\\els_janssens\\CORE\\Rule_Authoring_CDISC_training\\cdisc-open-rules-training\\Unpublished\\NEW-RULE\\positive\\01\\data", "modification_date": "2026-05-11T12:41:04.574394", "size_kb": 0.475, "length": 4}], "Issue_Summary": [], "Issue_Details": [], "Rules_Report": [{"core_id": "CG0045", "version": "1", "cdisc_rule_id": "CG0045", "fda_rule_id": "", "message": "--ENRTPT is not populated when --ENTPT is populated.", "status": "SUCCESS"}]} \ No newline at end of file From 1bf14f0db39a6cd38132cff15a5f052e0a62715b Mon Sep 17 00:00:00 2001 From: eljanssens Date: Fri, 3 Jul 2026 13:23:19 +0200 Subject: [PATCH 3/3] sorting --- Unpublished/NEW-RULE/rule.yml | 109 +++++++++++++++++----------------- 1 file changed, 53 insertions(+), 56 deletions(-) diff --git a/Unpublished/NEW-RULE/rule.yml b/Unpublished/NEW-RULE/rule.yml index bb1f5a7bc..f0146069c 100644 --- a/Unpublished/NEW-RULE/rule.yml +++ b/Unpublished/NEW-RULE/rule.yml @@ -1,58 +1,55 @@ Authorities: - - Organization: CDISC - Standards: - - Name: SDTMIG - References: - - Citations: - - Cited Guidance: The description or date and/or time of a time point that acts as - a fixed reference for characterizing the end of an - observation. This is the sponsor-defined reference point - referred to by --ENRTPT. - Document: Model v2.0 - Item: --ENTPT - Section: Timing - Origin: SDTM and SDTMIG Conformance Rules - Rule Identifier: - Id: CG0045 - Version: '1' - Version: '2.0' - Version: '3.4' - - Name: SDTMIG - References: - - Citations: - - Cited Guidance: Identifies the end of the observation as being before or after - the sponsor-defined reference time point defined by variable - --ENTPT. - Document: Model v1.7 - Item: 'Table 2.2.5.1: --ENRTPT' - Section: 2.2.5 Timing Variables for All Classes - Origin: SDTM and SDTMIG Conformance Rules - Rule Identifier: - Id: CG0045 - Version: '1' - Version: '2.0' - Version: '3.3' - - Name: SDTMIG - References: - - Citations: - - Cited Guidance: (--ENRTPT) Identifies the end of the observation as being before - or after the sponsor-defined reference time point defined by - variable --ENTPT. - Document: Model v1.4 - Item: Specification - Section: 2.2.5 Timing Variables for All Classes - Origin: SDTM and SDTMIG Conformance Rules - Rule Identifier: - Id: CG0045 - Version: '1' - Version: '2.0' - Version: '3.2' +- Organization: CDISC + Standards: + - Name: SDTMIG + References: + - Citations: + - Cited Guidance: The description or date and/or time of a time point that acts as a fixed reference + for characterizing the end of an observation. This is the sponsor-defined reference point referred + to by --ENRTPT. + Document: Model v2.0 + Item: --ENTPT + Section: Timing + Origin: SDTM and SDTMIG Conformance Rules + Rule Identifier: + Id: CG0045 + Version: '1' + Version: '2.0' + Version: '3.4' + - Name: SDTMIG + References: + - Citations: + - Cited Guidance: Identifies the end of the observation as being before or after the sponsor-defined + reference time point defined by variable --ENTPT. + Document: Model v1.7 + Item: 'Table 2.2.5.1: --ENRTPT' + Section: 2.2.5 Timing Variables for All Classes + Origin: SDTM and SDTMIG Conformance Rules + Rule Identifier: + Id: CG0045 + Version: '1' + Version: '2.0' + Version: '3.3' + - Name: SDTMIG + References: + - Citations: + - Cited Guidance: (--ENRTPT) Identifies the end of the observation as being before or after the + sponsor-defined reference time point defined by variable --ENTPT. + Document: Model v1.4 + Item: Specification + Section: 2.2.5 Timing Variables for All Classes + Origin: SDTM and SDTMIG Conformance Rules + Rule Identifier: + Id: CG0045 + Version: '1' + Version: '2.0' + Version: '3.2' Check: all: - - name: --ENTPT - operator: non_empty - - name: --ENRTPT - operator: empty + - name: --ENTPT + operator: non_empty + - name: --ENRTPT + operator: empty Core: Id: CG0045 Status: Draft @@ -62,14 +59,14 @@ Executability: Fully Executable Outcome: Message: --ENRTPT is not populated when --ENTPT is populated. Output Variables: - - --ENTPT - - --ENRTPT + - --ENTPT + - --ENRTPT Rule Type: Record Data Scope: Classes: Include: - - ALL + - ALL Domains: Include: - - ALL + - ALL Sensitivity: Record