Buggy code:
} public static final class PatientIdentifierTypes { public static final String HIVEMR_V1 = "139766e8-15f5-102d-96e4-000c29c2a5d7" ; public static final String EXTERNAL_DOSSIER_NUMBER = "9dbea4d4-35a9-4793-959e-952f2a9f5347" ; public static final String DOSSIER_NUMBER = "e66645eb-03a8-4991-b4ce-e87318e37566" ; public static final String ZL_EMR_ID = "a541af1e-105c-40bf-b345-ba1fd6a59b85" ; } public static final class VisitTypes { public static final String CLINIC_OR_HOSPITAL_VISIT = "f01c54cb-2225-471a-9cd5-d348552c337c" ; } public static final class PersonAttributeTypes { public static final String PROVIDER_IDENTIFIER = "6de6c415-97a2-4cca-817a-9501cd9ef382" ; public static final String TELEPHONE_NUMBER = "14d4f066-15f5-102d-96e4-000c29c2a5d7" ; public static final String UNKNOWN_PATIENT = "8b56eac7-5c76-4b9c-8c6f-1deab8d3fc47" ; } public static final class EncounterTypes { public static final String PATIENT_REGISTRATION = "873f968a-73a8-4f9c-ac78-9f4778b751b6" ; public static final String CHECK_IN = "55a0d3ea-a4d7-4e88-8f01-5aceb2d3c61b" ; public static final String PAYMENT = "f1c286d0-b83f-4cd4-8348-7ea3c28ead13" ; public static final String VITALS = "4fb47712-34a6-40d2-8ed3-e153abbd25b7" ; public static final String PRIMARY_CARE_VISIT = "1373cf95-06e8-468b-a3da-360ac1cf026d" ; public static final String CONSULTATION = "92fd09b4-5335-4f7e-9f63-b2a663fd09a6" ; public static final String MEDICATION_DISPENSED = "8ff50dea-18a1-4609-b4c9-3f8f2d611b84" ; public static final String POST_OPERATIVE_NOTE = "c4941dee-7a9b-4c1c-aa6f-8193e9e5e4e5" ; public static final String TRANSFER = "436cfe33-6b81-40ef-a455-f134a9f7e580" ; public static final String ADMISSION = "260566e1-c909-4d61-a96f-c1019291a09d" ; public static final String CANCEL_ADMISSION = "edbb857b-e736-4296-9438-462b31f97ef9" ; public static final String EXIT_FROM_CARE = "b6631959-2105-49dd-b154-e1249e0fbcd7" ; } public static final class EncounterRoles { public static final String DISPENSER = "bad21515-fd04-4ff6-bfcd-78456d12f168" ; public static final String NURSE = "98bf2792-3f0a-4388-81bb-c78b29c0df92" ; public static final String CONSULTING_CLINICIAN = "4f10ad1a-ec49-48df-98c7-1391c6ac7f05" ; public static final String ADMINISTRATIVE_CLERK = "cbfe0b9d-9923-404c-941b-f048adc8cdc0" ; public static final String ORDERING_PROVIDER = "c458d78e-8374-4767-ad58-9f8fe276e01c" ; } public static final class Concepts { public static final String UNKNOWN = "3cd6fac4-26fe-102b-80cb-0017a47871b2" ; public static final String DIAGNOSIS_SET_OF_SETS = "8fcd0b0c-f977-4a66-a1b5-ad7ce68e6770" ; public static final String PAYMENT_AMOUNT = "5d1bc5de-6a35-4195-8631-7322941fe528" ; public static final String PAYMENT_REASON = "36ba7721-fae0-4da4-aef2-7e476cc04bdf" ; public static final String PAYMENT_RECEIPT_NUMBER = "20438dc7-c5b4-4d9c-8480-e888f4795123" ; public static final String PAYMENT_CONSTRUCT = "7a6330f1-9503-465c-8d63-82e1ad914b47" ; } public static final class ConceptSources { public static final String LOINC = "2889f378-f287-40a5-ac9c-ce77ee963ed7" ; } public static final class Forms { public static final String ADMISSION = "43acf930-eb1b-11e2-91e2-0800200c9a66" ; public static final String TRANSFER_WITHIN_HOSPITAL = "d068bc80-fb95-11e2-b778-0800200c9a66" ; public static final String EXIT_FROM_INPATIENT = "e0a26c20-fba6-11e2-b778-0800200c9a66" ; } public static final class Packages { public static final String HUM_METADATA = "fa25ad0c-66cc-4715-8464-58570f7b5132" ; } public static final String DEFAULT_DATE_FORMAT = "dd<seq2seq4repair_space>MMM<seq2seq4repair_space>yyyy" ; public static final String DEFAULT_DATETIME_FORMAT = "dd<seq2seq4repair_space>MMM<seq2seq4repair_space>yyyy<seq2seq4repair_space>hh:mm<seq2seq4repair_space>aa" ; public static final String DEFAULT_LOCALE = "fr" ; private static final String ZL_EMR_ID_NAME = "ZL<seq2seq4repair_space>EMR<seq2seq4repair_space>ID" ; private static final String PROVIDER_IDENTIFIER_NAME = "Provider<seq2seq4repair_space>Identifier" ; private static final String TELEPHONE_NUMBER_NAME = "Telephone<seq2seq4repair_space>Number" ; private static final String REGISTRATION_ENCOUNTER_NAME = "Enregistrement<seq2seq4repair_space>de<seq2seq4repair_space>patient" ; private static final String CHECK_IN_ENCOUNTER_NAME = "Inscription" ; private static final String PRIMARY_CARE_VISIT_ENCOUNTER_NAME = "Consultation<seq2seq4repair_space>soins<seq2seq4repair_space>de<seq2seq4repair_space>base" ; private static final String DOUBLE_METAPHONE_ALTERNATE_NAME = "Double<seq2seq4repair_space>Metaphone<seq2seq4repair_space>Alternate" ; @ Override public void install ( ) { log . info ( "Installing<seq2seq4repair_space>Core<seq2seq4repair_space>Identifier<seq2seq4repair_space>Types" ) ; install ( patientIdentifierType ( "HIVEMR-V1" , "Internal<seq2seq4repair_space>EMR<seq2seq4repair_space>ID<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>Patient<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>Haiti<seq2seq4repair_space>EMR<seq2seq4repair_space>V1<seq2seq4repair_space>system" , null , null , null , NOT_USED , false , CoreMetadata . PatientIdentifierTypes . HIVEMR_V1 ) ) ; install ( patientIdentifierType ( "External<seq2seq4repair_space>Nimewo<seq2seq4repair_space>Dosye" , "External<seq2seq4repair_space>Dossier<seq2seq4repair_space>number" , null , null , null , NOT_USED , false , CoreMetadata . PatientIdentifierTypes . EXTERNAL_DOSSIER_NUMBER ) ) ; <START_BUG> install ( patientIdentifierType ( "Nimewo<seq2seq4repair_space>Dosye" , "Patient&apos;s<seq2seq4repair_space>Dossier<seq2seq4repair_space>number" , "A\\d{6}" , "A000001" , null , REQUIRED , false , CoreMetadata . PatientIdentifierTypes . DOSSIER_NUMBER ) ) ; <END_BUG> install ( patientIdentifierType ( CoreMetadata . ZL_EMR_ID_NAME , "A<seq2seq4repair_space>unique<seq2seq4repair_space>identifier<seq2seq4repair_space>issued<seq2seq4repair_space>to<seq2seq4repair_space>all<seq2seq4repair_space>patients<seq2seq4repair_space>by<seq2seq4repair_space>the<seq2seq4repair_space>ZL<seq2seq4repair_space>EMR.<seq2seq4repair_space>Blocks<seq2seq4repair_space>of<seq2seq4repair_space>this<seq2seq4repair_space>identifier<seq2seq4repair_space>are<seq2seq4repair_space>issued<seq2seq4repair_space>to<seq2seq4repair_space>each<seq2seq4repair_space>site<seq2seq4repair_space>to<seq2seq4repair_space>prevent<seq2seq4repair_space>duplication,<seq2seq4repair_space>so<seq2seq4repair_space>the<seq2seq4repair_space>identifier<seq2seq4repair_space>is<seq2seq4repair_space>unique<seq2seq4repair_space>across<seq2seq4repair_space>all<seq2seq4repair_space>sites.<seq2seq4repair_space>The<seq2seq4repair_space>identifier<seq2seq4repair_space>uses<seq2seq4repair_space>six<seq2seq4repair_space>digits<seq2seq4repair_space>and<seq2seq4repair_space>is<seq2seq4repair_space>alphanumeric<seq2seq4repair_space>base<seq2seq4repair_space>30,<seq2seq4repair_space>omitting<seq2seq4repair_space>the<seq2seq4repair_space>letters<seq2seq4repair_space>B,<seq2seq4repair_space>I,<seq2seq4repair_space>O,<seq2seq4repair_space>Q,<seq2seq4repair_space>S<seq2seq4repair_space>and<seq2seq4repair_space>Z<seq2seq4repair_space>as<seq2seq4repair_space>these<seq2seq4repair_space>can<seq2seq4repair_space>be<seq2seq4repair_space>confused<seq2seq4repair_space>with<seq2seq4repair_space>8,<seq2seq4repair_space>1,<seq2seq4repair_space>0,<seq2seq4repair_space>0,<seq2seq4repair_space>5<seq2seq4repair_space>and<seq2seq4repair_space>2" , null , null , LuhnMod30IdentifierValidator . class , NOT_USED , false , CoreMetadata . PatientIdentifierTypes . ZL_EMR_ID ) ) ; log . info ( "Installing<seq2seq4repair_space>Core<seq2seq4repair_space>Visit<seq2seq4repair_space>Types" ) ; install ( visitType ( "Clinic<seq2seq4repair_space>or<seq2seq4repair_space>Hospital<seq2seq4repair_space>Visit" , "Patient<seq2seq4repair_space>visits<seq2seq4repair_space>the<seq2seq4repair_space>clinic//hospital<seq2seq4repair_space>(as<seq2seq4repair_space>opposed<seq2seq4repair_space>to<seq2seq4repair_space>a<seq2seq4repair_space>home<seq2seq4repair_space>visit,<seq2seq4repair_space>or<seq2seq4repair_space>telephone<seq2seq4repair_space>contact)" , CoreMetadata . VisitTypes . CLINIC_OR_HOSPITAL_VISIT ) ) ; log . info ( "Installing<seq2seq4repair_space>core<seq2seq4repair_space>Person<seq2seq4repair_space>Attribute<seq2seq4repair_space>Types" ) ; install ( personAttributeType ( CoreMetadata . PROVIDER_IDENTIFIER_NAME , "" , String . class , null , true , 12 , CoreMetadata . PersonAttributeTypes . PROVIDER_IDENTIFIER ) ) ; install ( personAttributeType ( CoreMetadata . TELEPHONE_NUMBER_NAME , "The<seq2seq4repair_space>telephone<seq2seq4repair_space>number<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>person" , String . class , null , false , 7 , CoreMetadata . PersonAttributeTypes . TELEPHONE_NUMBER ) ) ; install ( personAttributeType ( "Unknown<seq2seq4repair_space>patient" , "Used<seq2seq4repair_space>to<seq2seq4repair_space>flag<seq2seq4repair_space>patients<seq2seq4repair_space>that<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>identified<seq2seq4repair_space>during<seq2seq4repair_space>the<seq2seq4repair_space>check-in<seq2seq4repair_space>process" , String . class , null , false , 13 , CoreMetadata . PersonAttributeTypes . UNKNOWN_PATIENT ) ) ; log . info ( "Installing<seq2seq4repair_space>core<seq2seq4repair_space>Encounter<seq2seq4repair_space>Types" ) ; install ( encounterType ( CoreMetadata . REGISTRATION_ENCOUNTER_NAME , "Patient<seq2seq4repair_space>registration<seq2seq4repair_space>--<seq2seq4repair_space>normally<seq2seq4repair_space>a<seq2seq4repair_space>new<seq2seq4repair_space>patient" , CoreMetadata . EncounterTypes . PATIENT_REGISTRATION ) ) ; install ( encounterType ( CoreMetadata . CHECK_IN_ENCOUNTER_NAME , "Check-in<seq2seq4repair_space>encounter,<seq2seq4repair_space>formerly<seq2seq4repair_space>known<seq2seq4repair_space>as<seq2seq4repair_space>Primary<seq2seq4repair_space>care<seq2seq4repair_space>reception" , CoreMetadata . EncounterTypes . CHECK_IN ) ) ; install ( encounterType ( CoreMetadata . PRIMARY_CARE_VISIT_ENCOUNTER_NAME , "Primary<seq2seq4repair_space>care<seq2seq4repair_space>visit<seq2seq4repair_space>(In<seq2seq4repair_space>Kreyol,<seq2seq4repair_space>it&apos;s<seq2seq4repair_space>&apos;vizit<seq2seq4repair_space>swen<seq2seq4repair_space>primè&apos;)" , CoreMetadata . EncounterTypes . PRIMARY_CARE_VISIT ) ) ; install ( encounterType ( "Rencontre<seq2seq4repair_space>de<seq2seq4repair_space>paiement" , "Encounter<seq2seq4repair_space>used<seq2seq4repair_space>to<seq2seq4repair_space>capture<seq2seq4repair_space>patient<seq2seq4repair_space>payments" , CoreMetadata . EncounterTypes . PAYMENT ) ) ; install ( encounterType ( "Signes<seq2seq4repair_space>vitaux" , "Encounter<seq2seq4repair_space>where<seq2seq4repair_space>vital<seq2seq4repair_space>signs<seq2seq4repair_space>were<seq2seq4repair_space>captured,<seq2seq4repair_space>and<seq2seq4repair_space>triage<seq2seq4repair_space>may<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>done,<seq2seq4repair_space>possibly<seq2seq4repair_space>for<seq2seq4repair_space>triage<seq2seq4repair_space>purposes,<seq2seq4repair_space>but<seq2seq4repair_space>a<seq2seq4repair_space>complete<seq2seq4repair_space>exam<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>done." , CoreMetadata . EncounterTypes . VITALS ) ) ; install ( encounterType ( "Consultation" , "Encounter<seq2seq4repair_space>where<seq2seq4repair_space>a<seq2seq4repair_space>full<seq2seq4repair_space>or<seq2seq4repair_space>abbreviated<seq2seq4repair_space>examination<seq2seq4repair_space>is<seq2seq4repair_space>done,<seq2seq4repair_space>leading<seq2seq4repair_space>to<seq2seq4repair_space>a<seq2seq4repair_space>presumptive<seq2seq4repair_space>or<seq2seq4repair_space>confirmed<seq2seq4repair_space>diagnosis" , CoreMetadata . EncounterTypes . CONSULTATION ) ) ; install ( encounterType ( "Médicaments<seq2seq4repair_space>administrés" , "When<seq2seq4repair_space>someone<seq2seq4repair_space>gets<seq2seq4repair_space>medicine<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>pharmacy" , CoreMetadata . EncounterTypes . MEDICATION_DISPENSED ) ) ; install ( encounterType ( "Note<seq2seq4repair_space>de<seq2seq4repair_space>chirurgie" , "The<seq2seq4repair_space>surgeons&apos;<seq2seq4repair_space>notes<seq2seq4repair_space>after<seq2seq4repair_space>performing<seq2seq4repair_space>surgery" , CoreMetadata . EncounterTypes . POST_OPERATIVE_NOTE ) ) ; install ( encounterType ( "Transfert" , "Indicates<seq2seq4repair_space>that<seq2seq4repair_space>a<seq2seq4repair_space>patient<seq2seq4repair_space>is<seq2seq4repair_space>being<seq2seq4repair_space>transferred<seq2seq4repair_space>into<seq2seq4repair_space>a<seq2seq4repair_space>different<seq2seq4repair_space>department<seq2seq4repair_space>within<seq2seq4repair_space>the<seq2seq4repair_space>hospital.<seq2seq4repair_space>(Transfers<seq2seq4repair_space>out<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>hospital<seq2seq4repair_space>should<seq2seq4repair_space>not<seq2seq4repair_space>use<seq2seq4repair_space>this<seq2seq4repair_space>encounter<seq2seq4repair_space>type.)" , CoreMetadata . EncounterTypes . TRANSFER ) ) ; install ( encounterType ( "Admission<seq2seq4repair_space>aux<seq2seq4repair_space>soins<seq2seq4repair_space>hospitaliers" , "Indicates<seq2seq4repair_space>that<seq2seq4repair_space>the<seq2seq4repair_space>patient<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>admitted<seq2seq4repair_space>for<seq2seq4repair_space>inpatient<seq2seq4repair_space>care,<seq2seq4repair_space>and<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>expected<seq2seq4repair_space>to<seq2seq4repair_space>leave<seq2seq4repair_space>the<seq2seq4repair_space>hospital<seq2seq4repair_space>unless<seq2seq4repair_space>discharged." , CoreMetadata . EncounterTypes . ADMISSION ) ) ; install ( encounterType ( "Annuler<seq2seq4repair_space>l'admission" , "An<seq2seq4repair_space>encounter<seq2seq4repair_space>that<seq2seq4repair_space>notes<seq2seq4repair_space>that<seq2seq4repair_space>a<seq2seq4repair_space>request<seq2seq4repair_space>to<seq2seq4repair_space>admit<seq2seq4repair_space>a<seq2seq4repair_space>patient<seq2seq4repair_space>(via<seq2seq4repair_space>giving<seq2seq4repair_space>them<seq2seq4repair_space>a<seq2seq4repair_space>dispositon<seq2seq4repair_space>of<seq2seq4repair_space>&quot;admit&quot;<seq2seq4repair_space>on<seq2seq4repair_space>another<seq2seq4repair_space>form)<seq2seq4repair_space>is<seq2seq4repair_space>being<seq2seq4repair_space>overridden" , CoreMetadata . EncounterTypes . CANCEL_ADMISSION ) ) ; install ( encounterType ( "Sortie<seq2seq4repair_space>de<seq2seq4repair_space>soins<seq2seq4repair_space>hospitaliers" , "Indicates<seq2seq4repair_space>that<seq2seq4repair_space>a<seq2seq4repair_space>patient&apos;s<seq2seq4repair_space>inpatient<seq2seq4repair_space>care<seq2seq4repair_space>at<seq2seq4repair_space>the<seq2seq4repair_space>hospital<seq2seq4repair_space>is<seq2seq4repair_space>ending,<seq2seq4repair_space>and<seq2seq4repair_space>they<seq2seq4repair_space>are<seq2seq4repair_space>expected<seq2seq4repair_space>to<seq2seq4repair_space>leave<seq2seq4repair_space>soon" , CoreMetadata . EncounterTypes . EXIT_FROM_CARE ) ) ; log . info ( "Installing<seq2seq4repair_space>core<seq2seq4repair_space>Encounter<seq2seq4repair_space>Roles" ) ; install ( encounterRole ( "Dispenser" , "Provider<seq2seq4repair_space>that<seq2seq4repair_space>dispenses<seq2seq4repair_space>medications<seq2seq4repair_space>or<seq2seq4repair_space>other<seq2seq4repair_space>products" , CoreMetadata . EncounterRoles . DISPENSER ) ) ; install ( encounterRole ( "Nurse" , "A<seq2seq4repair_space>person<seq2seq4repair_space>educated<seq2seq4repair_space>and<seq2seq4repair_space>trained<seq2seq4repair_space>to<seq2seq4repair_space>care<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>sick<seq2seq4repair_space>or<seq2seq4repair_space>disabled." , CoreMetadata . EncounterRoles . NURSE ) ) ; install ( encounterRole ( "Consulting<seq2seq4repair_space>Clinician" , "Clinician<seq2seq4repair_space>who<seq2seq4repair_space>is<seq2seq4repair_space>primarily<seq2seq4repair_space>responsible<seq2seq4repair_space>for<seq2seq4repair_space>examining<seq2seq4repair_space>and<seq2seq4repair_space>diagnosing<seq2seq4repair_space>a<seq2seq4repair_space>patient" , CoreMetadata . EncounterRoles . CONSULTING_CLINICIAN ) ) ; install ( encounterRole ( "Administrative<seq2seq4repair_space>Clerk" , "This<seq2seq4repair_space>role<seq2seq4repair_space>is<seq2seq4repair_space>used<seq2seq4repair_space>for<seq2seq4repair_space>creating<seq2seq4repair_space>a<seq2seq4repair_space>Check-in<seq2seq4repair_space>encounter" , CoreMetadata . EncounterRoles . ADMINISTRATIVE_CLERK ) ) ; install ( encounterRole ( "Ordering<seq2seq4repair_space>Provider" , "For<seq2seq4repair_space>encounters<seq2seq4repair_space>associated<seq2seq4repair_space>with<seq2seq4repair_space>orders,<seq2seq4repair_space>used<seq2seq4repair_space>to<seq2seq4repair_space>store<seq2seq4repair_space>the<seq2seq4repair_space>provider<seq2seq4repair_space>responsible<seq2seq4repair_space>for<seq2seq4repair_space>placing<seq2seq4repair_space>the<seq2seq4repair_space>order" , CoreMetadata . EncounterRoles . ORDERING_PROVIDER ) ) ; log . info ( "Installing<seq2seq4repair_space>Locations" ) ; install ( location ( "Unknown<seq2seq4repair_space>Location" , "Unknown<seq2seq4repair_space>Location" , CoreMetadata . Locations . UNKNOWN ) ) ; log . info ( "Installing<seq2seq4repair_space>location<seq2seq4repair_space>tags" ) ;

Fix:
install ( patientIdentifierType ( "Nimewo<seq2seq4repair_space>Dosye" , "Patient&apos;s<seq2seq4repair_space>Dossier<seq2seq4repair_space>number" , "\\w{1,3}\\d{6}" , "A000001" , null , REQUIRED , false , CoreMetadata . PatientIdentifierTypes . DOSSIER_NUMBER ) ) ;