cdisc-org / cdisc-org/cdisc-rules-engine

define_variable_data_type works a bit unexpectedly - Enhancement request

Aperta
#421 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Define-XML cross check
Lingua principale
Python
Stelle
113
Fork
43
Merge medio
14h 51m
PR unite (30g)
14

Descrizione

I was a bit surprised how "define_variable_data_type" works. It looks as it can only have the values "Char" and "Num", i.e. that the define.xml data types have been matched towards SAS-XPT data types.
See https://github.com/cdisc-org/cdisc-rules-engine/blob/6da66eda3e5c53020f7c41b4b148fea894bcee24/cdisc_rules_engine/services/define_xml/base_define_xml_reader.py for the code.

This works well for the moment but has some limitations.
Define-XML itself does not have data types "Char" and "Num". The Define-XML data types are modern and are "text", "integer", "float", "date", "datetime", ... . See page 29 of the Define-XML 2.1 specification.

The current "define_variable_data_type" however does not allow us to validate whether e.g. a --DTC variable has been defined as either "date", "datetime", "partialDate", "partialDatetime" etc..
Therefore I propose to also have an additional property that returns the Define-XML real datatype, instead of the one matched to SAS-XPT. We can then have 2 properties, like:
- define_variable_data_type_XPT_matched (replacing the current define_variable_data_type)
- define_variable_data_type_intrinsic - returning the "real" Define-XML datatype

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da services/define_xml/base_define_xml_reader.py e traccia gli utilizzi di define_variable_data_type. Verifica come viene utilizzato l’attuale mapping Char/Num prima di separare il valore corrispondente a XPT dal tipo di dati intrinseco di Define-XML. Il lavoro è completato quando entrambe le proprietà sono disponibili e i consumer esistenti continuano a ricevere la rappresentazione prevista.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
backend
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.