EncounterServiceTest

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total3,820 of 3,8200%42 of 420%139139991991118118
saveEncounter_shouldCascadeSaveEncounterProviders()1440%n/a11323211
filterEncountersByViewPermissions_shouldFilterEncountersIfUserIsNotAllowedToSeeSomeEncounters()1230%40%33313111
saveEncounter_shouldNotOverwriteObsAndOrdersCreatorOrDateCreated()1220%n/a11262611
saveEncounter_shouldCascadeDeleteEncounterProviders()1200%n/a11313111
saveEncounter_shouldUpdateEncounterSuccessfully()1070%n/a11252511
getEncounters_shouldGetEncountersOnOrAfterDate()960%n/a11151511
saveEncounter_shouldVoidAndCreateNewObsWhenSavingEncounter()950%20%22191911
saveEncounter_shouldCascadeSaveToContainedObs()900%20%22191911
voidEncounter_shouldNotVoidProviders()880%n/a11202011
filterEncountersByViewPermissions_shouldNotFilterAllEncountersWhenTheEncounterTypesViewPrivilegeColumnIsNull()880%n/a11212111
saveEncounter_shouldAssignEncounterToVisitIfTheAssignToExistingOrNewHandlerIsRegistered()770%n/a11191911
saveEncounterType_shouldNotOverwriteCreatorOrDateCreated()660%n/a11151511
getEncounterType_shouldNotGetRetiredTypes()620%60%44171711
saveEncounter_shouldCascadeChangeOfLocationInEncounterToContainedObs()530%n/a11141411
saveEncounter_shouldNotOverwriteDateCreatedIfNonNull()530%n/a11131311
saveEncounterType_shouldNotOverwriteCreator()530%n/a11121211
saveEncounter_shouldOnlyCascadeTheObsdatetimesToObsWithDifferentInitialObsdatetimes()520%40%33141411
findEncounterTypes_shouldReturnTypesOrderedOnNameAndNonretiredFirst()520%n/a118811
saveEncounter_shouldNotOverwriteCreatorIfNonNull()460%n/a11111111
canViewAllEncounterTypes_shouldReturnTrueIfUserIsGrantedToViewEncounters()450%n/a11131311
canEditAllEncounterTypes_shouldReturnTrueIfUserIsGrantedToEditEncounters()450%n/a11131311
saveEncounter_shouldCascadeSaveToContainedObsWhenEncounterAlreadyExists()440%n/a11121211
voidEncounter_shouldVoidEncounterAndSetAttributes()440%n/a11131311
retireEncounterType_shouldRetireTypeAndSetAttributes()440%n/a11131311
retireEncounterRole_shouldRetireTypeAndSetAttributes()440%n/a11131311
purgeEncounter_shouldCascadePurgeToObsAndOrders()420%n/a11111111
getEncounters_shouldGetEncountersOnOrUpToADate()420%n/a117711
saveEncounterType_shouldNotOverwriteDateCreated()420%n/a11121211
unvoidEncounter_shouldUnvoidAndUnmarkAllAttributes()410%n/a11131311
unretireEncounterType_shouldUnretireTypeAndUnmarkAttributes()410%n/a11131311
unretireEncounterRole_shouldUnretireTypeAndUnmarkAttributes()410%n/a11131311
buildEncounter()390%n/a117711
saveEncounter_shouldCascadeEncounterDatetimeToObs()390%n/a11101011
saveEncounterRole_shouldSaveEncounterRoleWithBasicDetails()370%n/a11121211
saveEncounter_shouldNotCascadeLocationChangeForDifferentInitialLocations()360%n/a11101011
getAllEncounterTypes_shouldIncludeRetiredTypesWithTrueIncludeRetiredParameter()340%40%339911
findEncounterTypes_shouldIncludeRetiredTypesInTheResults()340%40%339911
getEncountersNotAssignedToAnyVisit_shouldReturnTheUnvoidedEncountersNotAssignedToAnyVisit()340%n/a117711
getEncounter_shouldReturnEncounterIfUserIsAllowedToViewIt()330%n/a11101011
canViewAllEncounterTypes_shouldReturnTrueWhenTheEncounterTypesViewPrivilegeColumnIsNull()320%20%228811
canViewAllEncounterTypes_shouldReturnTrueWhenTheEncounterTypesEditPrivilegeColumnIsNull()320%20%228811
saveEncounterType_shouldUpdateAnExistingEncounterTypeName()310%n/a118811
getEncounters_shouldGetEncountersByVisit()310%n/a116611
getEncounters_shouldGetEncountersByVisitType()310%n/a116611
saveEncounter_shouldCascadePatientToOrdersInTheEncounter()300%n/a116611
getEncounterWithEditPrivilege()300%n/a11101011
getEncounterWithViewPrivilege()300%n/a11101011
getEncounters_shouldGetEncountersByForm()290%n/a116611
getEncounters_shouldGetEncountersByType()290%n/a116611
saveEncounter_shouldAssignEncounterToVisitIfTheAssignToExistingHandlerIsRegistered()290%n/a11101011
getEncounters_shouldGetEncountersByProvider()280%n/a116611
canEditEncounter_shouldReturnTrueIfUserCanEditEncounter()280%n/a118811
canViewEncounter_shouldReturnTrueIfUserCanViewEncounter()280%n/a118811
saveEncounter_shouldSaveEncounterWithBasicDetails()270%n/a118811
getAllEncounters_shouldGetAllEncountersForACohortOfPatients()270%n/a116611
voidEncounter_shouldCascadeToObs()260%n/a117711
voidEncounter_shouldCascadeToOrders()260%n/a117711
getVisitAssignmentHandlers_shouldReturnTheExistingVisitOnlyAssignmentHandler()260%40%338811
getVisitAssignmentHandlers_shouldReturnTheExistingOrNewVisitAssignmentHandler()260%40%338811
getVisitAssignmentHandlers_shouldReturnTheNoAssignmentHandler()250%40%337711
saveEncounter_shouldNotAssignEncounterToVisitIfTheNoAssignHandlerIsRegistered()250%n/a119911
buildObs()240%n/a115511
unvoidEncounter_shouldCascadeUnvoidToObs()240%n/a117711
unvoidEncounter_shouldCascadeUnvoidToOrders()240%n/a117711
saveEncounterType_shouldSaveEncounterType()230%n/a117711
getEncounterType_shouldReturnNullIfOnlyRetiredTypeFound()230%n/a116611
getAllEncounterRoles_shouldGetAllEncounterRolesBasedOnIncludeRetiredFlag()230%n/a116611
getEncounters_shouldGetEncountersByLocation()210%n/a114411
findEncounterTypes_shouldNotPartialMatchNameOnInternalSubstrings()210%n/a116611
getEncounter_shouldFailIfUserIsNotAllowedToViewEncounterByGivenId()200%n/a117711
voidEncounter_shouldFailfIfUserIsNotSupposedToEditEncountersOfTypeOfGivenEncounter()200%n/a117711
purgeEncounterCascade_shouldFailfIfUserIsNotSupposedToEditEncountersOfTypeOfGivenEncounter()200%n/a117711
purgeEncounter_shouldPurgeEncounter()190%n/a116611
getEncounterType_shouldNotGetByInexactName()190%n/a116611
purgeEncounterRole_shouldPurgeEncounterRole()190%n/a116611
saveEncounter_shouldFailfIfUserIsNotSupposedToEditEncountersOfTypeOfGivenEncounter()190%n/a117711
unvoidEncounter_shouldFailfIfUserIsNotSupposedToEditEncountersOfTypeOfGivenEncounter()190%n/a117711
purgeEncounterType_shouldPurgeType()180%n/a116611
getEncounters_shouldGetAllTheUniqueEncountersThatMatchTheSpecifiedParameterValues()180%n/a114411
getEncounters_shouldNotReturnVoidedEncountersIfIncludeVoidedIsSetToTrue()180%n/a114411
purgeEncounter_shouldFailfIfUserIsNotSupposedToEditEncountersOfTypeOfGivenEncounter()180%n/a117711
getEncounterRoleByUuid_shouldFindEncounterRoleBasedOnUuid()170%n/a116611
getEncountersByPatient_shouldNotGetVoidedEncounters()160%n/a114411
getEncounters_shouldExcludeVoidedEncounters()150%n/a112211
getEncounters_shouldIncludeVoidedEncounters()150%n/a112211
getEncountersByVisit_shouldGetActiveEncountersByVisit()150%n/a113311
getEncountersByVisit_shouldIncludeVoidedEncountersWhenIncludeVoidedIsTrue()150%n/a113311
canEditEncounter_shouldReturnFalseIfUserCanNotEditEncounter()150%n/a115511
canViewEncounter_shouldReturnFalseIfUserCanNotViewEncounter()150%n/a115511
getAllEncounterTypes_shouldNotReturnRetiredTypes()140%n/a115511
saveEncounter_shouldNotAssignEncounterToVisitIfNoHandlerIsRegistered()140%n/a115511
getEncountersByPatientId_shouldNotGetVoidedEncounters()130%n/a114411
voidEncounter_shouldThrowErrorWithNullReasonParameter()130%n/a114411
retireEncounterType_shouldThrowErrorIfGivenNullReasonParameter()130%n/a114411
getEncounterByUuid_shouldFindObjectGivenValidUuid()130%n/a114411
getEncounterTypeByUuid_shouldFindObjectGivenValidUuid()130%n/a114411
getEncountersByPatient_shouldGetAllUnvoidedEncountersForTheGivenPatientIdentifier()130%n/a114411
getEncountersByPatient_shouldGetAllUnvoidedEncountersForTheGivenPatientName()130%n/a114411
getEncountersByPatient_shouldIncludeVoidedEncountersInTheReturnedListIfIncludedVoidedIsTrue()130%n/a114411
retireEncounterRole_shouldThrowErrorIfGivenNullReasonParameter()130%n/a114411
getEncountersByPatientIdentifier_shouldNotGetVoidedEncounters()120%n/a114411
findEncounterTypes_shouldReturnTypesByPartialNameMatch()120%n/a114411
findEncounterTypes_shouldReturnTypesByPartialCaseInsensitiveMatch()120%n/a114411
getCountOfEncounters_shouldGetTheCorrectCountOfUniqueEncounters()120%n/a113311
getEncounters_shouldReturnEmptyListForEmptyQuery()110%n/a113311
getEncounterType_shouldReturnNullWithNullNameParameter()90%n/a114411
getEncountersByPatient_shouldThrowErrorIfGivenNullParameter()60%n/a112211
canEditEncounter_shouldFailfIfEncounterIsNull()60%n/a112211
canViewEncounter_shouldFailfIfEncounterIsNull()60%n/a112211
getEncountersByPatient_shouldThrowErrorWhenGivenNullParameter()50%n/a112211
getEncountersByPatientId_shouldThrowErrorIfGivenANullParameter()50%n/a112211
getEncountersByPatientIdentifier_shouldThrowErrorIfGivenNullParameter()50%n/a112211
getEncounter_shouldThrowErrorIfGivenNullParameter()50%n/a112211
getEncounterType_shouldThrowErrorIfGivenNullParameter()50%n/a112211
getEncounterByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid()50%n/a112211
getEncounterTypeByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid()50%n/a112211
runBeforeEachTest()40%n/a112211
EncounterServiceTest()30%n/a111111