<commit_before><?php

class m140815_135553_unique_patient_identifiers extends OEMigration
{
	public function safeUp()
	{
		$this->createIndex('patient_hos_num_unique', 'patient', 'hos_num', true);
		$this->createIndex('patient_nhs_num_unique', 'patient', 'nhs_num', true);
	}

	public function safeDown()
	{
		$this->dropIndex('patient_hos_num_unique', 'patient');
		$this->dropIndex('patient_nhs_num_unique', 'patient');
	}
}<commit_msg>fix for blank nhs_num values.<commit_after><?php

class m140815_135553_unique_patient_identifiers extends OEMigration
{
	public function safeUp()
	{
		$this->createIndex('patient_hos_num_unique', 'patient', 'hos_num', true);

		$this->update('patient',array('nhs_num' => null),"nhs_num = ''");
		$this->createIndex('patient_nhs_num_unique', 'patient', 'nhs_num', true);
	}

	public function safeDown()
	{
		$this->dropIndex('patient_hos_num_unique', 'patient');
		$this->dropIndex('patient_nhs_num_unique', 'patient');
	}
}
{'fraction_non_alphanumeric': 0.16233090530697192, 'fraction_numerical': 0.02497398543184183, 'mean_word_length': 7.666666666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '7590048', 'n_tokens_mistral': 367, 'n_tokens_neox': 343, 'n_words': 52}