PatientServiceTest

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total3,443 of 6,00643%92 of 13431%1232348141,50670167
mergePatients_shouldMergeVisitsFromNonPreferredToPreferredPatient()2610%100%66333311
shouldCreatePatientWithValidatedIdentifier()1900%80%55444411
shouldCreatePatient()1380%n/a11393911
mergePatients_shouldNotCopyOverDuplicatePatientIdentifiers()1030%n/a11242411
getPatients_shouldFetchAllPatientsThatPartiallyMatchGivenName()970%n/a11252511
mergePatients_shouldAuditCreatedIdentifiers()850%40%33202011
mergePatients_shouldAuditCreatedAddresses()810%40%33212111
mergePatients_shouldAuditCreatedAttributes()800%40%33191911
createBasicPatient()750%n/a11222211
mergePatients_shouldAuditCreatedPatientPrograms()750%40%33171711
saveProblem_shouldSaveTheProblemAndSetTheWeightForCorrectOrdering()730%n/a11181811
mergePatients_shouldAuditCreatedNames()720%40%33161611
shouldGetPatientsByIdentifierAndIdentifierType()710%n/a11151511
mergePatients_shouldAuditMovedIndependentObservations()690%40%33161611
saveAllergy_shouldSaveTheAllergy()670%40%33171711
mergePatients_shouldAuditCreatedRelationships()670%60%44151511
getPatients_shouldSupportPatternUsingLastDigitAsCheckDigit()650%n/a11131311
mergePatients_shouldAuditPriorDateOfDeath()650%n/a11151511
shouldAllowGettingPatientsThatWereCreatedByUsersWhoArePatients()610%n/a11121211
mergePatients_shouldNotVoidRelationshipsForSameTypeAndSideWithDifferentRelatives()610%n/a11101011
getPatients_shouldSupportSimpleRegex()580%n/a11111111
mergePatients_shouldAuditCreatedOrders()574041%7330%46132101
mergePatients_shouldAuditPriorCauseOfDeath()560%n/a11121211
mergePatients_shouldAuditPriorDateOfBirth()550%n/a11131311
checkPatientIdentifiers_shouldThrowErrorWhenPatientHasIdenticalIdentifiers()540%n/a11151511
mergePatients_shouldAuditPriorDateOfDeathEstimated()540%n/a11131311
mergePatients_shouldAuditPriorDateOfBirthEstimated()530%n/a11131311
mergePatients_shouldMergeAllNonPreferredPatientsInTheTheNotPreferredListToPreferredPatient()520%n/a11101011
shouldGetPatientsByIdentifier()450%n/a11121211
mergePatients_shouldAuditMovedUsers()440%n/a11101011
mergePatients_shouldCopyNonvoidedAddressesToPreferredPatient()420%40%33101011
mergePatients_shouldCopyNonvoidedNamesToPreferredPatient()420%40%33101011
mergePatients_shouldNotCreateDuplicateRelationships()410%n/a118811
mergePatients_shouldAuditPriorGender()400%n/a119911
resolveProblem_shouldSetTheEndDateForTheProblem()370%n/a11101011
resolveAllergy_shouldSetTheEndDateForTheAllergy()370%n/a11101011
checkPatientIdentifiers_shouldRequireOneNonVoidedPatientIdentifier()360%n/a11101011
mergePatients_shouldAuditVoidedRelationships()340%n/a118811
getPatients_shouldAllowSearchStringToBeOneAccordingToMinsearchcharactersGlobalProperty()320%n/a119911
mergePatients_shouldAuditMovedEncounters()310%n/a117711
shouldGetPatientsByNameShouldLimitSize()300%20%226611
getPatients_shouldNotReturnVoidedPatients()300%n/a118811
mergePatients_shouldChangeUserRecordsOfNonPreferredPersonToPreferredPerson()290%n/a116611
mergePatients_shouldVoidAllRelationshipsForNonPreferredPatient()290%n/a118811
mergePatients_shouldCopyNonvoidedIdentifiersToPreferredPatient()274361%1583%1471701
checkPatientIdentifiers_shouldRemoveIdentifierAndThrowErrorWhenPatientHasBlankPatientIdentifier()260%n/a117711
getPatients_shouldReturnEmptyListWhenNoMatchIsFound()260%n/a118811
purgePatient_shouldDeletePatientFromDatabase()260%n/a119911
getAllergy_shouldReturnAnAllergyById()260%n/a119911
getProblems_shouldReturnEmptyListIfNoProblemsExistForThisPatient()240%n/a117711
getAllergies_shouldReturnEmptyListIfNoAllergiesExistForThisPatient()240%n/a117711
mergeAndRetrieveAudit(Patient, Patient)240%20%225511
contains(List, String)230%40%335511
mergePatients_shouldVoidNonPreferredPersonObject()210%n/a114411
mergePatients_shouldNotCopyOverRelationshipsThatAreOnlyBetweenThePreferredAndNotpreferredPatient()210%n/a116611
getPatient_shouldCreatePatientFromPerson()200%n/a116611
getPatients_shouldAllowExactSearchOfForTwoCharacterName()160%n/a115511
mergePatients_shouldNotMergePatientWithItself()160%n/a113311
checkPatientIdentifiers_shouldThrowErrorWhenPatientHasEmptyPatientIdentifiers()160%n/a115511
savePatientIdentifier_shouldThrowAnAPIExceptionWhenOneOfTheRequiredFieldsIsNull()160%n/a115511
savePatientIdentifier_shouldThrowAnAPIExceptionIfThePatientIdentifierStringIsAWhiteSpace()160%n/a115511
savePatientIdentifier_shouldThrowAnAPIExceptionIfThePatientIdentifierStringIsAnEmptyString()160%n/a115511
exitFromCare_shouldThrowErrorWhenGivenDateExitedIsNull()141755%n/a014801
exitFromCare_shouldThrowErrorWhenGivenReasonForExistIsNull()141755%n/a014801
checkPatientIdentifiers_shouldThrowErrorWhenPatientHasNullPatientIdentifiers()140%n/a115511
voidPatientIdentifier_shouldThrowAnAPIExceptionIfTheReasonIsNull()140%n/a114411
voidPatientIdentifier_shouldThrowAnAPIExceptionIfTheReasonIsAnEmptyString()140%n/a114411
voidPatientIdentifier_shouldThrowAnAPIExceptionIfTheReasonIsAWhiteSpaceCharacter()140%n/a114411
getPatient_shouldReturnNullWhenPersonDoesNotExist()140%n/a115511
exitFromCare_shouldThrowErrorWhenGivenPatientIsNull()131757%n/a014801
voidPatient_shouldReturnNullWhenPatientIsNull()130%n/a115511
isValueInList(String, List)130%40%332211
matchingVisit(Visit)90%n/a112211
savePatientIdentifier_shouldThrowAnAPIExceptionWhenANullArgumentIsPassed()80%n/a113311
assertEqualsInt(int, Integer)80%n/a113311
savePatient_shouldFailWhenPatientDoesNotHaveAnyPatientIdentifiers()71365%n/a013801
getPatientIdentifierTypes_shouldFetchRequiredPatientIdentifierTypesWhenGivenRequiredIsTrue()4095%1375%130901
getPatientIdentifierTypes_shouldFetchNonRequiredPatientIdentifierTypesWhenGivenRequiredIsFalse()3595%1375%130801
getPatientIdentifierTypes_shouldFetchPatientIdentifierTypesWithCheckDigitWhenGivenHasCheckDigitIsTrue()3595%1375%130801
getPatientIdentifierTypes_shouldFetchPatientIdentifierTypesWithoutCheckDigitWhenGivenHasCheckDigitIsFalse()3595%1375%130801
getAllPatientIdentifierTypes_shouldFetchAllNonRetiredPatientIdentifierTypes()3194%1375%131801
getAllPatientIdentifierTypes_shouldFetchPatientIdentifierTypesExcludingRetiredWhenIncludeRetiredIsFalse()2994%1375%131701
getPatientIdentifierTypes_shouldFetchAnyPatientIdentifierTypesWhenGivenRequiredIsNull()2492%1150%120701
getPatientIdentifierTypes_shouldFetchAnyPatientIdentifierTypesWhenGivenHasCheckDigitIsNull()2492%1150%120701
checkPatientIdentifiers_shouldIgnoreVoidedPatientIdentifier()78100%n/a0101901
savePatient_shouldCreateNewPatientFromExistingPersonPlusUserObject()64100%n/a0101501
isIdentifierInUseByAnotherPatient_shouldIgnoreVoidedPatients()61100%3350%3401401
savePatientIdentifierType_shouldUpdateExistingPatientIdentifierType()54100%n/a0101501
getPatientIdentifiers_shouldReturnOnlyNonVoidedPatientsAndPatientIdentifiers()54100%2100%0201101
savePatient_shouldNotThrowANonUniqueObjectExceptionWhenCalledWithAHandConstructedPatientRegression1375()49100%n/a0101001
savePatient_shouldNotThrowANonUniqueObjectExceptionWhenCalledWithAHandConstructedPatient()49100%n/a0101001
unvoidPatient_shouldUnvoidGivenPatient()44100%n/a0101301
unvoidPatient_shouldReturnUnvoidedPatient()44100%n/a0101301
isIdentifierInUseByAnotherPatient_shouldReturnFalseIfInUseForAnotherLocationAndIdUniquenessIsSetToLocation()43100%n/a0101101
savePatient_shouldUpdateAnExistingPatient()41100%n/a0101001
savePatient_shouldUpdateTheDateChangedAndChangedByOnUpdateOfThePersonAddress()41100%n/a0101101
getPatientIdentifierTypes_shouldFetchPatientIdentifierTypesThatMatchGivenNameWithGivenFormat()39100%2100%020901
unretirePatientIdentifierType_shouldUntirePatientIdentifierType()39100%n/a0101301
unretirePatientIdentifierType_shouldReturnUnretiredPatientIdentifierType()39100%n/a0101301
voidPatient_shouldVoidAllPatientIdentifiersAssociatedWithGivenPatient()39100%2100%020901
getAllPatientIdentifierTypes_shouldFetchPatientIdentifierTypesIncludingRetiredWhenIncludeRetiredIsTrue()37100%1375%1301001
voidPatientIdentifier_shouldVoidGivenPatientIdentifierWithGivenReason()37100%n/a010801
savePatientIdentifier_shouldCreateNewPatientIndentifier()36100%n/a010901
voidPatient_shouldRetireUsers()36100%n/a010801
purgePatientIdentifierType_shouldDeleteTypeFromDatabase()35100%n/a0101001
isIdentifierInUseByAnotherPatient_shouldReturnTrueIfInUseAndIdTypeUniquenessIsSetToUnique()35100%n/a010901
isIdentifierInUseByAnotherPatient_shouldReturnTrueIfInUseForALocationAndIdTypeUniquenessIsSetToLocation()35100%n/a010901
getPatients_shouldSearchFamilyName2WithName()34100%n/a010801
getCountOfPatients_shouldReturnTheRightCountWhenAPatientHasMultipleMatchingPersonNames()34100%n/a010701
unvoidPatient_shouldNotUnretireUsers()34100%n/a010801
getAllIdentifierValidators_shouldReturnAllRegisteredPatientIdentifierValidators()33100%n/a0101001
savePatientIdentifierType_shouldCreateNewPatientIdentifierType()32100%n/a0101101
getPatientByExample_shouldFetchPatientMatchingPatientIdOfGivenPatient()31100%n/a010801
voidPatient_shouldReturnVoidedPatientWithGivenReason()31100%n/a010901
isIdentifierInUseByAnotherPatient_shouldReturnTrueIfInUseAndIdTypeUniquenessIsNull()31100%n/a010801
getAllIdentifierValidators_shouldReturnAllRegisteredIdentifierValidators()30100%n/a010701
savePatientIdentifierType_shouldCreateNewType()29100%n/a0101001
getPatients_shouldForceSearchStringToBeGreaterThanMinsearchcharactersGlobalProperty()27100%n/a010701
isIdentifierInUseByAnotherPatient_shouldReturnFalseWhenPatientIdentifierContainsAPatientAndNoOtherPatientHasThisId()26100%n/a010601
isIdentifierInUseByAnotherPatient_shouldReturnTrueWhenPatientIdentifierContainsAPatientAndAnotherPatientHasThisId()26100%n/a010601
unvoidPatient_shouldUnvoidPerson()26100%n/a010701
savePatientIdentifierType_shouldUpdateExistingType()25100%n/a010701
getPatientIdentifierTypes_shouldOrderAsDefaultComparator()25100%n/a010601
getIdentifierValidator_shouldReturnPatientIdentifierValidatorGivenClassName()24100%n/a0101001
shouldFetchNamesForPersonsThatWereFirstFetchedAsPatients()22100%n/a010601
shouldFetchAddressesForPersonsThatWereFirstFetchedAsPatients()22100%n/a010601
shouldFetchPersonAttributesForPersonsThatWereFirstFetchedAsPatients()22100%n/a010601
voidPatient_shouldVoidGivenPatientWithGivenReason()22100%n/a010601
savePatientIdentifier_shouldUpdateAnExistingPatientIdentifier()22100%n/a010701
getPatientByExample_shouldReturnNullWhenNoPatientMatchesGivenPatientToMatch()21100%n/a010701
getPatientIdentifierTypeByName_shouldFetchPatientIdentifierTypeThatExactlyMatchesGivenName()21100%n/a010801
getPatientIdentifier_shouldReturnThePatientsIdentifier()21100%n/a010501
isIdentifierInUseByAnotherPatient_shouldReturnFalseWhenPatientIdentifierDoesNotContainAPatientAndNoPatientHasThisId()20100%n/a010501
isIdentifierInUseByAnotherPatient_shouldReturnTrueWhenPatientIdentifierDoesNotContainAPatientAndAPatientHasThisId()20100%n/a010501
getAllPatientIdentifierTypes_shouldOrderAsDefaultComparator()20100%n/a010601
getPatientByExample_shouldNotFetchPatientMatchingAnyOtherPatientInformation()18100%n/a010601
voidPatient_shouldVoidPerson()18100%n/a010501
isIdentifierInUseByAnotherPatient_shouldIgnoreVoidedPatientIdentifiers()17100%n/a010401
purgePatientIdentifier_shouldDeletePatientIdentifierFromDatabase()17100%n/a010501
checkPatientIdentifiers_shouldThrowErrorWhenPatientDoesNotHaveOneOrMoreRequiredIdentifiers()16100%n/a010401
getPatient_shouldFetchPatientWithGivenPatientId()16100%n/a010501
getPatientIdentifierType_shouldFetchPatientIdentifierWithGivenPatientIdentifierTypeId()16100%n/a010501
getPatientByUuid_shouldFindObjectGivenValidUuid()16100%n/a010501
getPatientIdentifierByUuid_shouldFindObjectGivenValidUuid()16100%n/a010501
getPatientIdentifierTypeByUuid_shouldFindObjectGivenValidUuid()16100%n/a010501
getPatientByUuid_shouldFetchPatientWithGivenUuid()16100%n/a010501
getPatientIdentifierByUuid_shouldFetchPatientIdentifierWithGivenUuid()16100%n/a010501
getPatientIdentifierTypeByUuid_shouldFetchPatientIdentifierTypeWithGivenUuid()15100%n/a010601
getPatients_shouldReturnEmptyListIfNameAndIdentifierIsEmpty()14100%n/a010401
getAllPatients_shouldFetchNonVoidedPatientsWhenGivenIncludeVoidedIsFalse()13100%n/a010401
getAllPatients_shouldFetchVoidedPatientsWhenGivenIncludeVoidedIsTrue()13100%n/a010401
getAllPatients_shouldFetchAllNonVoidedPatients()12100%n/a010401
runBeforeAllTests()11100%2100%020601
getPatient_shouldReturnNullWhenPatientWithGivenPatientIdDoesNotExist()11100%n/a010401
getPatientIdentifierType_shouldReturnNullWhenPatientIdentifierIdentifierDoesNotExist()11100%n/a010401
getPatientIdentifierTypeByName_shouldNotReturnPatientIdentifierTypeThatPartiallyMatchesGivenName()10100%n/a010401
getPatientIdentifierTypeByName_shouldReturnNullWhenPatientIdentifierTypeWithGivenNameDoesNotExist()10100%n/a010501
getPatientIdentifierTypeByUuid_shouldReturnNullWhenPatientIdentifierTypeWithGivenUuidDoesNotExist()10100%n/a010501
static {...}9100%n/a010401
getAllIdentifierValidators_shouldTreatEmptyStringsLikeANullEntry()9100%n/a010301
getPatient_shouldReturnNullObjectIfPatientIdDoesntExist()9100%n/a010301
PatientServiceTest()8100%n/a010201
getPatientByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid()8100%n/a010301
getPatientIdentifierByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid()8100%n/a010301
getPatientIdentifierTypeByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid()8100%n/a010301
getPatientByUuid_shouldReturnNullIfPatientNotFoundWithGivenUuid()8100%n/a010301
getPatientIdentifierByUuid_shouldReturnNullIfPatientIdentifierNotFoundWithGivenUuid()8100%n/a010301