<commit_before>select count(*) from orders
where discontinued_date > auto_expire_date
   or discontinued_date < start_date
   or auto_expire_date < start_date;

select count(*) from orders
where discontinued = false
  and (discontinued_date is not null or discontinued_by is not null or discontinued_reason is not null);

select dt.name, count(*)
from obs o
	inner join concept c on o.concept_id = c.concept_id
	inner join concept_datatype dt on c.datatype_id = dt.concept_datatype_id
where (dt.hl7_abbreviation in ('NM', 'SN') and o.value_numeric is null)
   or (dt.hl7_abbreviation in ('DT', 'TM', 'TS') and o.value_datetime is null)
   or (dt.hl7_abbreviation in ('CWE') and o.value_coded is null)
   or (dt.hl7_abbreviation in ('ST') and o.value_text is null)
group by dt.name;<commit_msg>slight fix to a data convention check<commit_after>select count(*) from orders
where discontinued_date > auto_expire_date
   or discontinued_date < start_date
   or auto_expire_date < start_date;

select count(*) from orders
where discontinued = false
  and (discontinued_date is not null or discontinued_by is not null or discontinued_reason is not null);

select dt.name, count(*)
from obs o
	inner join concept c on o.concept_id = c.concept_id
	inner join concept_datatype dt on c.datatype_id = dt.concept_datatype_id
where
  o.voided = false
  and ((dt.hl7_abbreviation in ('NM', 'SN', 'BIT') and o.value_numeric is null) or
       (dt.hl7_abbreviation in ('DT', 'TM', 'TS') and o.value_datetime is null) or
       (dt.hl7_abbreviation in ('CWE') and o.value_coded is null)  or
       (dt.hl7_abbreviation in ('ST') and o.value_text is null))
group by dt.name;
{'fraction_non_alphanumeric': 0.08800945067926758, 'fraction_numerical': 0.004725339633786178, 'mean_word_length': 4.102409638554217, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5701651', 'n_tokens_mistral': 612, 'n_tokens_neox': 555, 'n_words': 195}