diff --git a/api/src/main/java/org/openmrs/module/radiology/RadiologyProperties.java b/api/src/main/java/org/openmrs/module/radiology/RadiologyProperties.java index 8772ed8c1..cf0502a06 100644 --- a/api/src/main/java/org/openmrs/module/radiology/RadiologyProperties.java +++ b/api/src/main/java/org/openmrs/module/radiology/RadiologyProperties.java @@ -58,8 +58,8 @@ public class RadiologyProperties { * * @return dicom uid org root * @throws IllegalStateException if global property for dicom uid org root cannot be found - * @should return dicom uid org root - * @should throw illegal state exception if global property for dicom uid org root cannot be found + * Should return dicom uid org root + * Should throw illegal state exception if global property for dicom uid org root cannot be found */ public String getDicomUIDOrgRoot() { return getGlobalProperty(RadiologyConstants.GP_DICOM_UID_ORG_ROOT, true); @@ -70,8 +70,8 @@ public String getDicomUIDOrgRoot() { * * @return DICOM web viewer address * @throws IllegalStateException if global property for dicom web viewer address cannot be found - * @should return dicom web viewer address - * @should throw illegal state exception if global property for dicom web viewer address cannot + * Should return dicom web viewer address + * Should throw illegal state exception if global property for dicom web viewer address cannot * be found */ public String getDicomWebViewerAddress() { @@ -83,8 +83,8 @@ public String getDicomWebViewerAddress() { * * @return DICOM web viewer port * @throws IllegalStateException if global property for dicom web viewer port cannot be found - * @should return dicom web viewer port - * @should throw illegal state exception if global property for dicom web viewer port cannot be + * Should return dicom web viewer port + * Should throw illegal state exception if global property for dicom web viewer port cannot be * found */ public String getDicomWebViewerPort() { @@ -97,8 +97,8 @@ public String getDicomWebViewerPort() { * @return DICOM web viewer base url * @throws IllegalStateException if global property for dicom web viewer base url cannot be * found - * @should return dicom web viewer base url - * @should throw illegal state exception if global property for dicom web viewer base url cannot + * Should return dicom web viewer base url + * Should throw illegal state exception if global property for dicom web viewer base url cannot * be found */ public String getDicomWebViewerBaseUrl() { @@ -109,7 +109,7 @@ public String getDicomWebViewerBaseUrl() { * Return DICOM web viewer local server name. * * @return DICOM web viewer local server name - * @should return dicom web viewer local server name + * Should return dicom web viewer local server name */ public String getDicomWebViewerLocalServerName() { return getGlobalProperty(RadiologyConstants.GP_DICOM_WEB_VIEWER_LOCAL_SERVER_NAME, false); @@ -119,10 +119,10 @@ public String getDicomWebViewerLocalServerName() { * Get CareSetting for RadiologyOrder's * * @return CareSetting for radiology orders - * @should return radiology care setting - * @should throw illegal state exception if global property for radiology care setting cannot be + * Should return radiology care setting + * Should throw illegal state exception if global property for radiology care setting cannot be * found - * @should throw illegal state exception if radiology care setting cannot be found + * Should throw illegal state exception if radiology care setting cannot be found */ public CareSetting getRadiologyCareSetting() { final CareSetting result = @@ -138,8 +138,8 @@ public CareSetting getRadiologyCareSetting() { * Test order type for radiology order * * @return test order type for radiology order - * @should return order type for radiology test orders - * @should throw illegal state exception for non existing radiology test order type + * Should return order type for radiology test orders + * Should throw illegal state exception for non existing radiology test order type */ public OrderType getRadiologyTestOrderType() { return orderService.getOrderTypeByUuid(getGlobalProperty(RadiologyConstants.GP_RADIOLOGY_TEST_ORDER_TYPE, true)); @@ -149,8 +149,8 @@ public OrderType getRadiologyTestOrderType() { * Get EncounterType for RadiologyOrder's * * @return EncounterType for radiology orders - * @should return encounter type for radiology orders - * @should throw illegal state exception for non existing radiology encounter type + * Should return encounter type for radiology orders + * Should throw illegal state exception for non existing radiology encounter type */ public EncounterType getRadiologyOrderEncounterType() { return encounterService @@ -161,8 +161,8 @@ public EncounterType getRadiologyOrderEncounterType() { * Get EncounterRole for the ordering provider * * @return EncounterRole for ordering provider - * @should return encounter role for ordering provider - * @should throw illegal state exception for non existing ordering provider encounter role + * Should return encounter role for ordering provider + * Should throw illegal state exception for non existing ordering provider encounter role */ public EncounterRole getRadiologyOrderingProviderEncounterRole() { return encounterService.getEncounterRoleByUuid( @@ -173,8 +173,8 @@ public EncounterRole getRadiologyOrderingProviderEncounterRole() { * Get VisitType for RadiologyOrder's * * @return visitType for radiology orders - * @should return visit type for radiology orders - * @should throw illegal state exception for non existing radiology visit type + * Should return visit type for radiology orders + * Should throw illegal state exception for non existing radiology visit type */ public VisitType getRadiologyVisitType() { return visitService.getVisitTypeByUuid(getGlobalProperty(RadiologyConstants.GP_RADIOLOGY_VISIT_TYPE, true)); @@ -189,14 +189,14 @@ public VisitType getRadiologyVisitType() { * @throws IllegalStateException if global property radiologyConceptClasses is badly formatted * @throws IllegalStateException if global property radiologyConceptClasses contains a UUID not found among concept * classes - * @should throw illegal state exception if global property radiology concept classes is null - * @should throw illegal state exception if global property radiology concept classes is an empty + * Should throw illegal state exception if global property radiology concept classes is null + * Should throw illegal state exception if global property radiology concept classes is an empty * string - * @should throw illegal state exception if global property radiology concept classes is badly + * Should throw illegal state exception if global property radiology concept classes is badly * formatted - * @should throw illegal state exception if global property radiology concept classes contains a + * Should throw illegal state exception if global property radiology concept classes contains a * UUID not found among concept classes - * @should return comma separated list of concept class names configured via concept class UUIDs + * Should return comma separated list of concept class names configured via concept class UUIDs * in global property radiology concept classes */ public String getRadiologyConceptClassNames() { @@ -231,16 +231,16 @@ public String getRadiologyConceptClassNames() { * @throws IllegalStateException if global property radiologyOrderReasonConceptClasses is badly formatted * @throws IllegalStateException if global property radiologyOrderReasonConceptClasses contains a UUID not found among * concept classes - * @should throw illegal state exception if global property radiology order reason concept classes is badly formatted - * @should throw illegal state exception if global property radiology order reason concept classes contains a UUID not + * Should throw illegal state exception if global property radiology order reason concept classes is badly formatted + * Should throw illegal state exception if global property radiology order reason concept classes contains a UUID not * found among concept classes - * @should return the name of the diagnosis concept class if global property radiology order reason concept classes is + * Should return the name of the diagnosis concept class if global property radiology order reason concept classes is * null - * @should return the name of the diagnosis concept class if global property radiology order reason concept classes is an + * Should return the name of the diagnosis concept class if global property radiology order reason concept classes is an * empty string - * @should return an empty string if global property radiology order reason concept classes is null or an empty string + * Should return an empty string if global property radiology order reason concept classes is null or an empty string * and no diagnosis concept class is present - * @should return comma separated list of concept class names configured via concept class UUIDs in global property + * Should return comma separated list of concept class names configured via concept class UUIDs in global property * radiology order reason concept classes */ public String getRadiologyOrderReasonConceptClassNames() { @@ -283,9 +283,9 @@ public String getRadiologyOrderReasonConceptClassNames() { * @param required indicates if the global property must be configured * @return value of global property for given name * @throws IllegalStateException if global property cannot be found - * @should return global property given valid global property name - * @should return null given non required and non configured global property - * @should throw illegal state exception given required non configured global property + * Should return global property given valid global property name + * Should return null given non required and non configured global property + * Should throw illegal state exception given required non configured global property */ private String getGlobalProperty(String globalPropertyName, boolean required) { final String result = administrationService.getGlobalProperty(globalPropertyName); @@ -300,9 +300,9 @@ private String getGlobalProperty(String globalPropertyName, boolean required) { * * @return templates folder * @throws IllegalStateException if global property cannot be found - * @should create a directory under the openmrs application data directory if GP value is relative - * @should creates a directory at GP value if it is an absolute path - * @should throw illegal state exception if global property cannot be found + * Should create a directory under the openmrs application data directory if GP value is relative + * Should creates a directory at GP value if it is an absolute path + * Should throw illegal state exception if global property cannot be found */ public File getReportTemplateHome() { diff --git a/api/src/main/java/org/openmrs/module/radiology/dicom/DicomUidGenerator.java b/api/src/main/java/org/openmrs/module/radiology/dicom/DicomUidGenerator.java index 425274a3d..299bbba6f 100644 --- a/api/src/main/java/org/openmrs/module/radiology/dicom/DicomUidGenerator.java +++ b/api/src/main/java/org/openmrs/module/radiology/dicom/DicomUidGenerator.java @@ -23,7 +23,7 @@ public interface DicomUidGenerator { * Allows users of the {@code DicomUidGenerator} to validate their {@code root's} length before using this generator. * * @return maximum allowed root length - * @should return maximum allowed root length + * Should return maximum allowed root length */ public int getMaxRootLength(); @@ -37,15 +37,15 @@ public interface DicomUidGenerator { * @throws IllegalArgumentException if root is empty * @throws IllegalArgumentException if the root is not a valid UID * @throws IllegalArgumentException if the root exceeds the maximum length - * @should return a valid uid prefixed with root - * @should always return unique uids when called multiple times - * @should return a uid not exceeding 64 characters - * @should return a uid composed only of characters 0-9 separated by a dot - * @should return a uid with no non-significant leading zeros - * @should throw a null pointer exception if root is null - * @should throw an illegal argument exception if root is empty - * @should throw an illegal argument exception if root is not a valid UID - * @should throw an illegal argument exception if root exceeds the maximum length + * Should return a valid uid prefixed with root + * Should always return unique uids when called multiple times + * Should return a uid not exceeding 64 characters + * Should return a uid composed only of characters 0-9 separated by a dot + * Should return a uid with no non-significant leading zeros + * Should throw a null pointer exception if root is null + * Should throw an illegal argument exception if root is empty + * Should throw an illegal argument exception if root is not a valid UID + * Should throw an illegal argument exception if root exceeds the maximum length */ public String getNewDicomUid(String root); } diff --git a/api/src/main/java/org/openmrs/module/radiology/dicom/DicomUidValidator.java b/api/src/main/java/org/openmrs/module/radiology/dicom/DicomUidValidator.java index b150bb34d..751e08fb4 100644 --- a/api/src/main/java/org/openmrs/module/radiology/dicom/DicomUidValidator.java +++ b/api/src/main/java/org/openmrs/module/radiology/dicom/DicomUidValidator.java @@ -41,14 +41,14 @@ public class DicomUidValidator { * * @param uid DICOM UID to be validated * @return true if uid is a valid dicom uid and false otherwise - * @should return false given null - * @should return false given empty string - * @should return false for uid longer than 64 characters - * @should return false for uid containing characters other than 0-9 and dot separator - * @should return false for uid containing non-significant leading zeros - * @should return false for uid with trailing dot character - * @should return false for uid with characters other than 0-2 as first component - * @should return true for valid uid + * Should return false given null + * Should return false given empty string + * Should return false for uid longer than 64 characters + * Should return false for uid containing characters other than 0-9 and dot separator + * Should return false for uid containing non-significant leading zeros + * Should return false for uid with trailing dot character + * Should return false for uid with characters other than 0-2 as first component + * Should return true for valid uid */ public static boolean isValid(String uid) { @@ -60,10 +60,10 @@ public static boolean isValid(String uid) { * * @param uid DICOM UID to be validated * @return true if uid length is smaller or equal than 64 and false otherwise - * @should return false given null - * @should return false given empty string - * @should return false for uid length bigger than 64 - * @should return true for uid length smaller or equal to 64 + * Should return false given null + * Should return false given empty string + * Should return false for uid length bigger than 64 + * Should return true for uid length smaller or equal to 64 */ public static boolean isLengthValid(String uid) { @@ -79,13 +79,13 @@ public static boolean isLengthValid(String uid) { * * @param uid DICOM UID to be validated * @return true if uid pattern is valid and false otherwise - * @should return false given null - * @should return false given empty string - * @should return false for uid containing characters other than 0-9 and dot separator - * @should return false for uid containing non-significant leading zeros - * @should return false for uid with trailing dot character - * @should return false for uid with characters other than 0-2 as first component - * @should return true for valid uid + * Should return false given null + * Should return false given empty string + * Should return false for uid containing characters other than 0-9 and dot separator + * Should return false for uid containing non-significant leading zeros + * Should return false for uid with trailing dot character + * Should return false for uid with characters other than 0-2 as first component + * Should return true for valid uid */ public static boolean isPatternValid(String uid) { diff --git a/api/src/main/java/org/openmrs/module/radiology/dicom/DicomWebViewer.java b/api/src/main/java/org/openmrs/module/radiology/dicom/DicomWebViewer.java index 1a9122222..072ddfdac 100644 --- a/api/src/main/java/org/openmrs/module/radiology/dicom/DicomWebViewer.java +++ b/api/src/main/java/org/openmrs/module/radiology/dicom/DicomWebViewer.java @@ -33,10 +33,10 @@ public class DicomWebViewer { * @param radiologyStudy RadiologyStudy for which DICOM web viewer URL should be created * @throws IllegalArgumentException given null * @throws IllegalArgumentException given a study with studyInstanceUid null - * @should return a url to open dicom images of the given study in the configured dicom viewer - * @should add query param server name to url if local server name is not blank - * @should throw an illegal argument exception given null - * @should throw an illegal argument exception given study with studyInstanceUid null + * Should return a url to open dicom images of the given study in the configured dicom viewer + * Should add query param server name to url if local server name is not blank + * Should throw an illegal argument exception given null + * Should throw an illegal argument exception given study with studyInstanceUid null */ public String getDicomViewerUrl(RadiologyStudy radiologyStudy) { if (radiologyStudy == null) { diff --git a/api/src/main/java/org/openmrs/module/radiology/dicom/code/PerformedProcedureStepStatus.java b/api/src/main/java/org/openmrs/module/radiology/dicom/code/PerformedProcedureStepStatus.java index a948034e1..c8812b870 100644 --- a/api/src/main/java/org/openmrs/module/radiology/dicom/code/PerformedProcedureStepStatus.java +++ b/api/src/main/java/org/openmrs/module/radiology/dicom/code/PerformedProcedureStepStatus.java @@ -27,8 +27,8 @@ public enum PerformedProcedureStepStatus { * @param performedProcedureStepStatus PerformedProcedureStepStatus for which the name is * returned * @return name of given PerformedProcedureStepStatus - * @should return name given performed procedure step status - * @should return unknown given null + * Should return name given performed procedure step status + * Should return unknown given null */ public static String getNameOrUnknown(PerformedProcedureStepStatus performedProcedureStepStatus) { if (performedProcedureStepStatus == null) { @@ -44,9 +44,9 @@ public static String getNameOrUnknown(PerformedProcedureStepStatus performedProc * @param displayName name defined by DICOM standard for which the PerformedProcedureStepStatus is returned * @return PerformedProcedureStepStatus PerformedProcedureStepStatus matching given displayName * @throws IllegalArgumentException - * @should return performed procedure step status given display name - * @should return null given undefined display name - * @should throw IllegalArgumentException given null + * Should return performed procedure step status given display name + * Should return null given undefined display name + * Should throw IllegalArgumentException given null */ public static PerformedProcedureStepStatus getMatchForDisplayName(String displayName) throws IllegalArgumentException { if (displayName == null) { diff --git a/api/src/main/java/org/openmrs/module/radiology/modality/RadiologyModalityEditor.java b/api/src/main/java/org/openmrs/module/radiology/modality/RadiologyModalityEditor.java index 1219d26f6..4fd20c034 100644 --- a/api/src/main/java/org/openmrs/module/radiology/modality/RadiologyModalityEditor.java +++ b/api/src/main/java/org/openmrs/module/radiology/modality/RadiologyModalityEditor.java @@ -29,10 +29,10 @@ public class RadiologyModalityEditor extends PropertyEditorSupport { private final Logger log = LoggerFactory.getLogger(this.getClass()); /** - * @should set value to radiology modality whos id matches given text - * @should set value to radiology modality whos uuid matches given text - * @should throw illegal argument exception for radiology modality not found - * @should return null for empty text + * Should set value to radiology modality whos id matches given text + * Should set value to radiology modality whos uuid matches given text + * Should throw illegal argument exception for radiology modality not found + * Should return null for empty text * * @see PropertyEditorSupport#setAsText(String) */ @@ -56,8 +56,8 @@ public void setAsText(String text) throws IllegalArgumentException { } /** - * @should return empty string if value does not contain a radiology modality - * @should return radiology modality id if value does contain a radiology modality + * Should return empty string if value does not contain a radiology modality + * Should return radiology modality id if value does contain a radiology modality * * @see PropertyEditorSupport#getAsText() */ diff --git a/api/src/main/java/org/openmrs/module/radiology/modality/RadiologyModalityService.java b/api/src/main/java/org/openmrs/module/radiology/modality/RadiologyModalityService.java index 4601d99e4..52a7be5f2 100644 --- a/api/src/main/java/org/openmrs/module/radiology/modality/RadiologyModalityService.java +++ b/api/src/main/java/org/openmrs/module/radiology/modality/RadiologyModalityService.java @@ -31,10 +31,10 @@ public interface RadiologyModalityService extends OpenmrsService { * @return the saved radiology modality * @throws IllegalArgumentException if radiologyModality is null * @throws APIException if radiologyModality is not valid - * @should create a new radiology modality - * @should update an existing radiology modality - * @should throw illegal argument exception if given radiology modality is null - * @should throw api exception if radiology modality is not valid + * Should create a new radiology modality + * Should update an existing radiology modality + * Should throw illegal argument exception if given radiology modality is null + * Should throw api exception if radiology modality is not valid */ @Authorized(RadiologyPrivileges.MANAGE_RADIOLOGY_MODALITIES) public RadiologyModality saveRadiologyModality(RadiologyModality radiologyModality); @@ -48,9 +48,9 @@ public interface RadiologyModalityService extends OpenmrsService { * @return the retired radiology modality * @throws IllegalArgumentException if radiologyModality is null * @throws IllegalArgumentException if reason is null or contains only whitespaces - * @should retire an existing radiology modality - * @should throw illegal argument exception if given radiology modality is null - * @should throw illegal argument exception if given reason is null or contains only whitespaces + * Should retire an existing radiology modality + * Should throw illegal argument exception if given radiology modality is null + * Should throw illegal argument exception if given reason is null or contains only whitespaces */ @Authorized(RadiologyPrivileges.MANAGE_RADIOLOGY_MODALITIES) public RadiologyModality retireRadiologyModality(RadiologyModality radiologyModality, String reason); @@ -61,9 +61,9 @@ public interface RadiologyModalityService extends OpenmrsService { * @param id the modality id of the wanted radiology modality * @return the radiology modality matching given id * @throws IllegalArgumentException if given null - * @should return radiology modality matching given id - * @should return null if no match was found - * @should throw illegal argument exception if given null + * Should return radiology modality matching given id + * Should return null if no match was found + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_MODALITIES) public RadiologyModality getRadiologyModality(Integer id); @@ -74,9 +74,9 @@ public interface RadiologyModalityService extends OpenmrsService { * @param uuid the uuid of the radiology modality * @return the radiology modality matching given uuid * @throws IllegalArgumentException if given null - * @should return radiology modality matching given uuid - * @should return null if no match was found - * @should throw illegal argument exception if given null + * Should return radiology modality matching given uuid + * Should return null if no match was found + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_MODALITIES) public RadiologyModality getRadiologyModalityByUuid(String uuid); @@ -87,9 +87,9 @@ public interface RadiologyModalityService extends OpenmrsService { * @param includeRetired specifies if retired modalities should also be returned * * @return the radiology modalities - * @should return radiology modalities including retired ones if given true - * @should return radiology modalities excluding retired ones if given false - * @should return empty list if no match was found + * Should return radiology modalities including retired ones if given true + * Should return radiology modalities excluding retired ones if given false + * Should return empty list if no match was found */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_MODALITIES) public List getRadiologyModalities(boolean includeRetired); diff --git a/api/src/main/java/org/openmrs/module/radiology/modality/RadiologyModalityValidator.java b/api/src/main/java/org/openmrs/module/radiology/modality/RadiologyModalityValidator.java index 65285d1ea..e59f80c5b 100644 --- a/api/src/main/java/org/openmrs/module/radiology/modality/RadiologyModalityValidator.java +++ b/api/src/main/java/org/openmrs/module/radiology/modality/RadiologyModalityValidator.java @@ -37,8 +37,8 @@ public class RadiologyModalityValidator implements Validator { * Determines if the command object being submitted is a valid type. * * @see Validator#supports(Class) - * @should return true for radiology modality objects - * @should return false for other object types + * Should return true for radiology modality objects + * Should return false for other object types */ @Override public boolean supports(Class clazz) { @@ -49,12 +49,12 @@ public boolean supports(Class clazz) { * Checks the form object for any inconsistencies/errors. * * @see Validator#validate(Object, Errors) - * @should fail validation if radiology modality is null - * @should fail validation if ae title is null or empty or whitespaces only - * @should fail validation if name is null or empty or whitespaces only - * @should fail validation if retire reason is null or empty if retire is true and set retired to false - * @should fail validation if field lengths are not correct - * @should pass validation if all fields are correct + * Should fail validation if radiology modality is null + * Should fail validation if ae title is null or empty or whitespaces only + * Should fail validation if name is null or empty or whitespaces only + * Should fail validation if retire reason is null or empty if retire is true and set retired to false + * Should fail validation if field lengths are not correct + * Should pass validation if all fields are correct */ @Override public void validate(Object obj, Errors errors) { diff --git a/api/src/main/java/org/openmrs/module/radiology/order/AccessionNumberGenerator.java b/api/src/main/java/org/openmrs/module/radiology/order/AccessionNumberGenerator.java index 8da05e09f..cc4cb602a 100644 --- a/api/src/main/java/org/openmrs/module/radiology/order/AccessionNumberGenerator.java +++ b/api/src/main/java/org/openmrs/module/radiology/order/AccessionNumberGenerator.java @@ -20,7 +20,7 @@ public interface AccessionNumberGenerator { * therefore implementations need to be thread safe. * * @return the new accession number - * @should always return a unique accession number when called multiple times + * Should always return a unique accession number when called multiple times */ public String getNewAccessionNumber(); } diff --git a/api/src/main/java/org/openmrs/module/radiology/order/HibernateRadiologyOrderDAO.java b/api/src/main/java/org/openmrs/module/radiology/order/HibernateRadiologyOrderDAO.java index bd8dd6b16..0858c4e7a 100644 --- a/api/src/main/java/org/openmrs/module/radiology/order/HibernateRadiologyOrderDAO.java +++ b/api/src/main/java/org/openmrs/module/radiology/order/HibernateRadiologyOrderDAO.java @@ -49,12 +49,12 @@ public void setSessionFactory(SessionFactory sessionFactory) { * @throws APIException if global property radiology.nextAccessionNumberSeed is missing * @throws APIException if global property radiology.nextAccessionNumberSeed value is empty or only contains whitespaces * @throws APIException if global property radiology.nextAccessionNumberSeed value cannot be parsed to Long - * @should return the next accession number seed stored as global property radiology next accession number and increment + * Should return the next accession number seed stored as global property radiology next accession number and increment * the global property value - * @should throw an api exception if global property radiology next accession number seed is missing - * @should throw an api exception if global property radiology next accession number seed value is empty or only contains + * Should throw an api exception if global property radiology next accession number seed is missing + * Should throw an api exception if global property radiology next accession number seed value is empty or only contains * whitespaces - * @should throw an api exception if global property radiology next accession number seed value value cannot be parsed to + * Should throw an api exception if global property radiology next accession number seed value value cannot be parsed to * long */ @Override diff --git a/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrder.java b/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrder.java index e9ba6922b..bd36af91e 100644 --- a/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrder.java +++ b/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrder.java @@ -29,9 +29,9 @@ public RadiologyStudy getStudy() { * between RadiologyOrder and RadiologyStudy in sync. * * @param radiologyStudy study which should be associated with this radiology order - * @should set the study attribute to given study - * @should set the radiology order of given study to this radiology order - * @should not fail given null + * Should set the study attribute to given study + * Should set the radiology order of given study to this radiology order + * Should not fail given null */ public void setStudy(RadiologyStudy radiologyStudy) { if (radiologyStudy != null) { @@ -44,9 +44,9 @@ public void setStudy(RadiologyStudy radiologyStudy) { * Returns true if study is in progress and false otherwise. * * @return true if study is in progress and false otherwise - * @should return false if associated study is null - * @should return false if associated study is not in progress - * @should return true if associated study is in progress + * Should return false if associated study is null + * Should return false if associated study is not in progress + * Should return true if associated study is in progress */ public boolean isInProgress() { @@ -61,9 +61,9 @@ public boolean isInProgress() { * Returns true if study is not in progress and false otherwise. * * @return true if study is not in progress and false otherwise - * @should return true if associated study is null - * @should return true if associated study is not in progress - * @should return false if associated study in progress + * Should return true if associated study is null + * Should return true if associated study is not in progress + * Should return false if associated study in progress */ public boolean isNotInProgress() { @@ -74,9 +74,9 @@ public boolean isNotInProgress() { * Returns true when this RadiologyOrder has a completed RadiologyStudy and false otherwise. * * @return true if order has completed study and false otherwise - * @should return false if associated study is null - * @should return false if associated study is not completed - * @should return true if associated study is completed + * Should return false if associated study is null + * Should return false if associated study is not completed + * Should return true if associated study is completed */ public boolean isCompleted() { @@ -91,9 +91,9 @@ public boolean isCompleted() { * Returns true when this RadiologyOrder does not have a completed RadiologyStudy and false otherwise. * * @return true if order has no completed study and false otherwise - * @should return true if associated study is null - * @should return true if associated study is not completed - * @should return false if associated study is completed + * Should return true if associated study is null + * Should return true if associated study is not completed + * Should return false if associated study is completed */ public boolean isNotCompleted() { @@ -104,10 +104,10 @@ public boolean isNotCompleted() { * Returns true when this RadiologyOrder can be discontinued and false otherwise. * * @return true if radiology order can be discontinued and false otherwise - * @should return false if radiology order is discontinued right now - * @should return false if radiology order is in progress - * @should return false if radiology order is completed - * @should return true if radiology order is not discontinued right now and not in progress and not completed + * Should return false if radiology order is discontinued right now + * Should return false if radiology order is in progress + * Should return false if radiology order is completed + * Should return true if radiology order is not discontinued right now and not in progress and not completed */ public boolean isDiscontinuationAllowed() { diff --git a/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderSearchCriteria.java b/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderSearchCriteria.java index 4b359f190..5220cf21e 100644 --- a/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderSearchCriteria.java +++ b/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderSearchCriteria.java @@ -193,13 +193,13 @@ public Builder withOrderer(Provider orderer) { * Create an {@link RadiologyOrderSearchCriteria} with the properties of this builder instance. * * @return a new search criteria instance - * @should create a new radiology order search criteria instance with patient if patient is set - * @should create a new radiology order search criteria instance with include voided set to true if voided orders should be included - * @should create a new radiology order search criteria instance with urgency if urgency is set - * @should create a new radiology order search criteria instance with from effective start date if from effective start date is set - * @should create a new radiology order search criteria instance with to effective start date if to effective start date is set - * @should create a new radiology order search criteria instance with accession number if accession number is set - * @should create a new radiology order search criteria instance with orderer if orderer is set + * Should create a new radiology order search criteria instance with patient if patient is set + * Should create a new radiology order search criteria instance with include voided set to true if voided orders should be included + * Should create a new radiology order search criteria instance with urgency if urgency is set + * Should create a new radiology order search criteria instance with from effective start date if from effective start date is set + * Should create a new radiology order search criteria instance with to effective start date if to effective start date is set + * Should create a new radiology order search criteria instance with accession number if accession number is set + * Should create a new radiology order search criteria instance with orderer if orderer is set */ public RadiologyOrderSearchCriteria build() { diff --git a/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderService.java b/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderService.java index 412a57992..ea7c80aba 100644 --- a/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderService.java +++ b/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderService.java @@ -31,7 +31,7 @@ public interface RadiologyOrderService extends OpenmrsService { * * @return the accession number seed * @throws APIException - * @should return the next accession number seed + * Should return the next accession number seed */ public Long getNextAccessionNumberSeedSequenceValue(); @@ -44,12 +44,12 @@ public interface RadiologyOrderService extends OpenmrsService { * @throws IllegalArgumentException if radiologyOrder is null * @throws IllegalArgumentException if radiologyOrder.study is null * @throws APIException on saving an existing radiology order - * @should create new radiology order and study from given radiology order - * @should create radiology order encounter - * @should set the radiology order accession number - * @should throw illegal argument exception given null - * @should throw illegal argument exception if given radiology order has no study - * @should throw api exception on saving an existing radiology order + * Should create new radiology order and study from given radiology order + * Should create radiology order encounter + * Should set the radiology order accession number + * Should throw illegal argument exception given null + * Should throw illegal argument exception if given radiology order has no study + * Should throw api exception on saving an existing radiology order */ @Authorized(RadiologyPrivileges.ADD_RADIOLOGY_ORDERS) public RadiologyOrder placeRadiologyOrder(RadiologyOrder radiologyOrder); @@ -68,14 +68,14 @@ public interface RadiologyOrderService extends OpenmrsService { * @throws APIException if radiology order is discontinued * @throws APIException if radiology order is in progress * @throws APIException if radiology order is completed - * @should create discontinuation order which discontinues given radiology order that is not in progress or completed - * @should create radiology order encounter - * @should throw illegal argument exception if given radiology order is null - * @should throw illegal argument exception if given radiology order with orderId null - * @should throw illegal argument exception if given orderer is null - * @should throw api exception if given radiology order is discontinued - * @should throw api exception if given radiology order is in progress - * @should throw api exception if given radiology order is completed + * Should create discontinuation order which discontinues given radiology order that is not in progress or completed + * Should create radiology order encounter + * Should throw illegal argument exception if given radiology order is null + * Should throw illegal argument exception if given radiology order with orderId null + * Should throw illegal argument exception if given orderer is null + * Should throw api exception if given radiology order is discontinued + * Should throw api exception if given radiology order is in progress + * Should throw api exception if given radiology order is completed */ @Authorized({ RadiologyPrivileges.DELETE_RADIOLOGY_ORDERS }) public Order discontinueRadiologyOrder(RadiologyOrder radiologyOrder, Provider orderer, String discontinueReason) @@ -87,9 +87,9 @@ public Order discontinueRadiologyOrder(RadiologyOrder radiologyOrder, Provider o * @param orderId the order id of wanted radiology order * @return the radiology order matching given order id * @throws IllegalArgumentException if given null - * @should return radiology order matching given order id - * @should return null if no match was found - * @should throw illegal argument exception if given null + * Should return radiology order matching given order id + * Should return null if no match was found + * Should throw illegal argument exception if given null */ @Authorized({ RadiologyPrivileges.GET_RADIOLOGY_ORDERS }) public RadiologyOrder getRadiologyOrder(Integer orderId); @@ -100,9 +100,9 @@ public Order discontinueRadiologyOrder(RadiologyOrder radiologyOrder, Provider o * @param uuid the uuid of the radiology order * @return the radiology order matching given uuid * @throws IllegalArgumentException if given null - * @should return radiology order matching given uuid - * @should return null if no match was found - * @should throw illegal argument exception if given null + * Should return radiology order matching given uuid + * Should return null if no match was found + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_ORDERS) public RadiologyOrder getRadiologyOrderByUuid(String uuid); @@ -114,21 +114,21 @@ public Order discontinueRadiologyOrder(RadiologyOrder radiologyOrder, Provider o * @param radiologyOrderSearchCriteria the object containing search parameters * @return the radiology orders matching given criteria * @throws IllegalArgumentException if given null - * @should return all radiology orders for given patient if patient is specified - * @should return all radiology orders (including voided) matching the search query if include voided is set - * @should return all radiology orders for given urgency - * @should return all radiology orders with effective order start date in given date range if to date and from date are + * Should return all radiology orders for given patient if patient is specified + * Should return all radiology orders (including voided) matching the search query if include voided is set + * Should return all radiology orders for given urgency + * Should return all radiology orders with effective order start date in given date range if to date and from date are * specified - * @should return all radiology orders with effective order start date after or equal to from date if only from date is + * Should return all radiology orders with effective order start date after or equal to from date if only from date is * specified - * @should return all radiology orders with effective order start date before or equal to to date if only to date is + * Should return all radiology orders with effective order start date before or equal to to date if only to date is * specified - * @should return empty list if from date after to date - * @should return empty search result if no effective order start is in date range - * @should return all radiology orders for given accession number if accession number is specified - * @should return all radiology orders for given orderer - * @should return all radiology orders for given urgency and orderer - * @should throw illegal argument exception if given null + * Should return empty list if from date after to date + * Should return empty search result if no effective order start is in date range + * Should return all radiology orders for given accession number if accession number is specified + * Should return all radiology orders for given orderer + * Should return all radiology orders for given urgency and orderer + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_ORDERS) public List getRadiologyOrders(RadiologyOrderSearchCriteria radiologyOrderSearchCriteria); diff --git a/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderServiceImpl.java b/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderServiceImpl.java index 20a027457..95871d48d 100644 --- a/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderServiceImpl.java @@ -102,7 +102,7 @@ public synchronized RadiologyOrder placeRadiologyOrder(RadiologyOrder radiologyO * @param provider the encounter provider * @param encounterDateTime the encounter date * @return radiology order encounter for given parameters - * @should create radiology order encounter + * Should create radiology order encounter */ private Encounter saveRadiologyOrderEncounter(Patient patient, Provider provider, Date encounterDateTime) { final Encounter radiologyOrderEncounter = new Encounter(); diff --git a/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderValidator.java b/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderValidator.java index f75c67e28..04d648c09 100644 --- a/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderValidator.java +++ b/api/src/main/java/org/openmrs/module/radiology/order/RadiologyOrderValidator.java @@ -36,8 +36,8 @@ public class RadiologyOrderValidator implements Validator { * Determines if the command object being submitted is a valid type * * @see org.springframework.validation.Validator#supports(java.lang.Class) - * @should return true for RadiologyOrder objects - * @should return false for other object types + * Should return true for RadiologyOrder objects + * Should return false for other object types */ public boolean supports(Class clazz) { return RadiologyOrder.class.isAssignableFrom(clazz); @@ -47,19 +47,19 @@ public boolean supports(Class clazz) { * Checks the form object for any inconsistencies/errors * * @see org.springframework.validation.Validator#validate(java.lang.Object, org.springframework.validation.Errors) - * @should fail validation if radiologyOrder is null - * @should fail validation if voided is null - * @should fail validation if concept is null - * @should fail validation if patient is null - * @should fail validation if orderer is null - * @should fail validation if urgency is null - * @should fail validation if action is null - * @should fail validation if dateActivated after dateStopped - * @should fail validation if dateActivated after autoExpireDate - * @should fail validation if scheduledDate is set and urgency is not set as ON_SCHEDULED_DATE - * @should fail validation if scheduledDate is null when urgency is ON_SCHEDULED_DATE - * @should pass validation if all fields are correct - * @should not allow a future dateActivated + * Should fail validation if radiologyOrder is null + * Should fail validation if voided is null + * Should fail validation if concept is null + * Should fail validation if patient is null + * Should fail validation if orderer is null + * Should fail validation if urgency is null + * Should fail validation if action is null + * Should fail validation if dateActivated after dateStopped + * Should fail validation if dateActivated after autoExpireDate + * Should fail validation if scheduledDate is set and urgency is not set as ON_SCHEDULED_DATE + * Should fail validation if scheduledDate is null when urgency is ON_SCHEDULED_DATE + * Should pass validation if all fields are correct + * Should not allow a future dateActivated */ public void validate(Object obj, Errors errors) { final RadiologyOrder radiologyOrder = (RadiologyOrder) obj; diff --git a/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReport.java b/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReport.java index 11b8b3c19..65684eca5 100644 --- a/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReport.java +++ b/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReport.java @@ -47,9 +47,9 @@ private RadiologyReport() { * @param radiologyOrder the radiology order which is being/was reported * @throws IllegalArgumentException if given radiology order is null * @throws IllegalArgumentException if given radiology order is not completed - * @should set radiology order to given radiology order and report status to claimed - * @should throw an illegal argument exception if given radiology order is null - * @should throw an illegal argument exception if given radiology order is not completed + * Should set radiology order to given radiology order and report status to claimed + * Should throw an illegal argument exception if given radiology order is null + * Should throw an illegal argument exception if given radiology order is not completed */ public RadiologyReport(RadiologyOrder radiologyOrder) { diff --git a/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportEditor.java b/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportEditor.java index c71dfdffc..06dff9646 100644 --- a/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportEditor.java +++ b/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportEditor.java @@ -29,10 +29,10 @@ public class RadiologyReportEditor extends PropertyEditorSupport { private final Logger log = LoggerFactory.getLogger(this.getClass()); /** - * @should set value to radiology report whos id matches given text - * @should set value to radiology report whos uuid matches given text - * @should throw illegal argument exception for radiology report not found - * @should return null for empty text + * Should set value to radiology report whos id matches given text + * Should set value to radiology report whos uuid matches given text + * Should throw illegal argument exception for radiology report not found + * Should return null for empty text * * @see java.beans.PropertyEditorSupport#setAsText(java.lang.String) */ @@ -56,8 +56,8 @@ public void setAsText(String text) throws IllegalArgumentException { } /** - * @should return empty string if value does not contain a radiology report - * @should return radiology report id if value does contain a radiology report + * Should return empty string if value does not contain a radiology report + * Should return radiology report id if value does contain a radiology report * * @see java.beans.PropertyEditorSupport#getAsText() */ diff --git a/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportSearchCriteria.java b/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportSearchCriteria.java index 4bed4bd91..cef9f8b4e 100755 --- a/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportSearchCriteria.java +++ b/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportSearchCriteria.java @@ -148,10 +148,10 @@ public Builder withStatus(RadiologyReportStatus status) { * Create an {@link RadiologyReportSearchCriteria} with the properties of this builder instance. * * @return a new search criteria instance - * @should create a new radiology report search criteria instance with from and to date specified if date from and date to are set - * @should create a new radiology report search criteria instance with principal results interpreter specified if principal results interpreter is set - * @should create a new radiology report search criteria instance with include voided set to true if voided reports should be included - * @should create a new radiology report search criteria instance with report status specified if status is set to claimed or completed + * Should create a new radiology report search criteria instance with from and to date specified if date from and date to are set + * Should create a new radiology report search criteria instance with principal results interpreter specified if principal results interpreter is set + * Should create a new radiology report search criteria instance with include voided set to true if voided reports should be included + * Should create a new radiology report search criteria instance with report status specified if status is set to claimed or completed */ public RadiologyReportSearchCriteria build() { diff --git a/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportService.java b/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportService.java index 5ba63d8c1..f59203221 100644 --- a/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportService.java +++ b/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportService.java @@ -47,11 +47,11 @@ public interface RadiologyReportService extends OpenmrsService { * @throws APIException if RadiologyStudy of given radiologyOrder is not completed * @throws APIException if given radiologyOrder has a claimed RadiologyReport * @throws APIException if given radiologyOrder has a completed RadiologyReport - * @should create a radiology order with report status claimed given a completed radiology order - * @should throw illegal argument exception if given null - * @should throw api exception if given radiology order is not completed - * @should throw api exception if given order has a claimed radiology report - * @should throw api exception if given order has a completed radiology report + * Should create a radiology order with report status claimed given a completed radiology order + * Should throw illegal argument exception if given null + * Should throw api exception if given radiology order is not completed + * Should throw api exception if given order has a claimed radiology report + * Should throw api exception if given order has a completed radiology report */ @Authorized(RadiologyPrivileges.ADD_RADIOLOGY_REPORTS) public RadiologyReport createRadiologyReport(RadiologyOrder radiologyOrder); @@ -68,12 +68,12 @@ public interface RadiologyReportService extends OpenmrsService { * @throws APIException if radiologyReport is completed * @throws APIException if radiologyReport is voided * @throws APIException if radiologyReport.radiologyOrder has a completed RadiologyReport - * @should save existing radiology report to the database and return it - * @should throw illegal argument exception if given null - * @should throw illegal argument exception if given radiology report with reportId null - * @should throw api exception if radiology report is completed - * @should throw api exception if radiology report is voided - * @should throw api exception if given radiology reports order has a completed radiology report + * Should save existing radiology report to the database and return it + * Should throw illegal argument exception if given null + * Should throw illegal argument exception if given radiology report with reportId null + * Should throw api exception if radiology report is completed + * Should throw api exception if radiology report is voided + * Should throw api exception if given radiology reports order has a completed radiology report */ @Authorized(RadiologyPrivileges.EDIT_RADIOLOGY_REPORTS) public RadiologyReport saveRadiologyReportDraft(RadiologyReport radiologyReport); @@ -88,11 +88,11 @@ public interface RadiologyReportService extends OpenmrsService { * @throws IllegalArgumentException if radiologyReport reportId is null * @throws IllegalArgumentException if voidReason is null or contains only whitespaces * @throws APIException if radiologyReport is completed - * @should void the given radiology report - * @should throw illegal argument exception if given radiology report is null - * @should throw illegal argument exception if given radiology report with reportId null - * @should throw illegal argument exception if given void reason is null or contains only whitespaces - * @should throw api exception if radiology report is completed + * Should void the given radiology report + * Should throw illegal argument exception if given radiology report is null + * Should throw illegal argument exception if given radiology report with reportId null + * Should throw illegal argument exception if given void reason is null or contains only whitespaces + * Should throw api exception if radiology report is completed */ @Authorized(RadiologyPrivileges.DELETE_RADIOLOGY_REPORTS) public RadiologyReport voidRadiologyReport(RadiologyReport radiologyReport, String voidReason); @@ -108,14 +108,14 @@ public interface RadiologyReportService extends OpenmrsService { * @throws APIException if radiologyReport is completed * @throws APIException if radiologyReport is voided * @throws APIException if radiologyReport is not valid - * @should set the report date of the radiology report to the day the radiology report was completed - * @should set the radiology report status to complete - * @should throw illegal argument exception if given radiology report is null - * @should throw illegal argument exception if given radiology report with reportId null - * @should throw illegal argument exception if given radiology report with status null - * @should throw api exception if radiology report is completed - * @should throw api exception if radiology report is voided - * @should throw api exception if radiology report is not valid + * Should set the report date of the radiology report to the day the radiology report was completed + * Should set the radiology report status to complete + * Should throw illegal argument exception if given radiology report is null + * Should throw illegal argument exception if given radiology report with reportId null + * Should throw illegal argument exception if given radiology report with status null + * Should throw api exception if radiology report is completed + * Should throw api exception if radiology report is voided + * Should throw api exception if radiology report is not valid */ @Authorized(RadiologyPrivileges.EDIT_RADIOLOGY_REPORTS) public RadiologyReport saveRadiologyReport(RadiologyReport radiologyReport); @@ -126,9 +126,9 @@ public interface RadiologyReportService extends OpenmrsService { * @param reportId the report id of the wanted radiology report * @return the radiology report matching given report id * @throws IllegalArgumentException if given null - * @should return radiology report matching given report id - * @should return null if no match was found - * @should throw illegal argument exception if given null + * Should return radiology report matching given report id + * Should return null if no match was found + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_REPORTS) public RadiologyReport getRadiologyReport(Integer reportId); @@ -139,9 +139,9 @@ public interface RadiologyReportService extends OpenmrsService { * @param uuid the uuid of the radiology report * @return the radiology report matching given uuid * @throws IllegalArgumentException if given null - * @should return radiology report matching given uuid - * @should return null if no match was found - * @should throw illegal argument exception if given null + * Should return radiology report matching given uuid + * Should return null if no match was found + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_REPORTS) public RadiologyReport getRadiologyReportByUuid(String uuid); @@ -152,9 +152,9 @@ public interface RadiologyReportService extends OpenmrsService { * @param radiologyOrder the radiology order which should be checked for a claimed report * @return true if the radiology order has a claimed report and false otherwise * @throws IllegalArgumentException if given null - * @should return true if given radiology order has a claimed radiology report that is not voided - * @should return false if given radiology order has no claimed radiology report that is not voided - * @should throw illegal argument exception if given null + * Should return true if given radiology order has a claimed radiology report that is not voided + * Should return false if given radiology order has no claimed radiology report that is not voided + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_REPORTS) public boolean hasRadiologyOrderClaimedRadiologyReport(RadiologyOrder radiologyOrder); @@ -165,9 +165,9 @@ public interface RadiologyReportService extends OpenmrsService { * @param radiologyOrder the radiology order which should be checked for a completed report * @return true if the radiology order has a completed report and false otherwise * @throws IllegalArgumentException if given null - * @should return true if given radiology order has a completed radiology report - * @should return false if given radiology order has no completed radiology report - * @should throw illegal argument exception if given null + * Should return true if given radiology order has a completed radiology report + * Should return false if given radiology order has no completed radiology report + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_REPORTS) public boolean hasRadiologyOrderCompletedRadiologyReport(RadiologyOrder radiologyOrder); @@ -178,10 +178,10 @@ public interface RadiologyReportService extends OpenmrsService { * @param radiologyOrder the radiology order for which an active report should be returned * @return the active radiology report associated with given radiology order * @throws IllegalArgumentException if given null - * @should return a radiology report if given radiology order is associated with a report with status claimed - * @should return a radiology report if given radiology order is associated with a report with status completed - * @should return null if given radiology order is only associated with a voided report - * @should throw illegal argument exception if given null + * Should return a radiology report if given radiology order is associated with a report with status claimed + * Should return a radiology report if given radiology order is associated with a report with status completed + * Should return null if given radiology order is only associated with a voided report + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_REPORTS) public RadiologyReport getActiveRadiologyReportByRadiologyOrder(RadiologyOrder radiologyOrder); @@ -193,17 +193,17 @@ public interface RadiologyReportService extends OpenmrsService { * @param radiologyReportSearchCriteria the object containing search parameters * @return the radiology reports matching given criteria ordered by increasing report date * @throws IllegalArgumentException if given null - * @should return all radiology reports (including voided) matching the search query if include voided is set - * @should return all radiology reports within given date range if date to and date from are specified - * @should return all radiology reports with report date after or equal to from date if only date from is specified - * @should return all radiology reports with report date before or equal to to date if only date to is specified - * @should return empty list if from date after to date - * @should return empty search result if no report is in date range - * @should return all radiology reports for given principal results interpreter - * @should return empty search result if no report exists for principal results interpreter - * @should return all radiology reports with given status - * @should return empty search result if no report exists for given status - * @should throw illegal argument exception if given null + * Should return all radiology reports (including voided) matching the search query if include voided is set + * Should return all radiology reports within given date range if date to and date from are specified + * Should return all radiology reports with report date after or equal to from date if only date from is specified + * Should return all radiology reports with report date before or equal to to date if only date to is specified + * Should return empty list if from date after to date + * Should return empty search result if no report is in date range + * Should return all radiology reports for given principal results interpreter + * Should return empty search result if no report exists for principal results interpreter + * Should return all radiology reports with given status + * Should return empty search result if no report exists for given status + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_REPORTS) public List getRadiologyReports(RadiologyReportSearchCriteria radiologyReportSearchCriteria); diff --git a/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportValidator.java b/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportValidator.java index 07866646e..f7feed3ac 100644 --- a/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportValidator.java +++ b/api/src/main/java/org/openmrs/module/radiology/report/RadiologyReportValidator.java @@ -31,8 +31,8 @@ public class RadiologyReportValidator implements Validator { * Determines if the command object being submitted is a valid type * * @see org.springframework.validation.Validator#supports(java.lang.Class) - * @should return true for radiology report objects - * @should return false for other object types + * Should return true for radiology report objects + * Should return false for other object types */ @Override public boolean supports(Class clazz) { @@ -43,10 +43,10 @@ public boolean supports(Class clazz) { * Checks the form object for any inconsistencies/errors * * @see org.springframework.validation.Validator#validate(Object, Errors) - * @should fail validation if radiology report is null - * @should fail validation if principal results interpreter is null or empty or whitespaces only - * @should fail validation if report body is null or empty or whitespaces only - * @should pass validation if all fields are correct + * Should fail validation if radiology report is null + * Should fail validation if principal results interpreter is null or empty or whitespaces only + * Should fail validation if report body is null or empty or whitespaces only + * Should pass validation if all fields are correct */ @Override public void validate(Object obj, Errors errors) { diff --git a/api/src/main/java/org/openmrs/module/radiology/report/template/MetaTagsValidationEngine.java b/api/src/main/java/org/openmrs/module/radiology/report/template/MetaTagsValidationEngine.java index 6591826f7..e9f254dfb 100644 --- a/api/src/main/java/org/openmrs/module/radiology/report/template/MetaTagsValidationEngine.java +++ b/api/src/main/java/org/openmrs/module/radiology/report/template/MetaTagsValidationEngine.java @@ -39,10 +39,10 @@ public MetaTagsValidationEngine() { /** * @see org.openmrs.module.radiology.report.template.ValidationEngine#run(Object) - * @should return validation result with no errors if subject passes all checks - * @should return validation result with error for meta element charset attribute if not present in subject - * @should return validation result with error for meta element charset attribute if present more than once in subject - * @should return validation result with error for meta element dublin core if no meta element with name attribute is present in subject + * Should return validation result with no errors if subject passes all checks + * Should return validation result with error for meta element charset attribute if not present in subject + * Should return validation result with error for meta element charset attribute if present more than once in subject + * Should return validation result with error for meta element dublin core if no meta element with name attribute is present in subject */ @Override public ValidationResult run(Elements subject) { diff --git a/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateEditor.java b/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateEditor.java index 0b13feb6a..98d017039 100644 --- a/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateEditor.java +++ b/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateEditor.java @@ -31,10 +31,10 @@ public class MrrtReportTemplateEditor extends PropertyEditorSupport { private final Logger log = LoggerFactory.getLogger(this.getClass()); /** - * @should set value to mrrt report template whos id matches given text - * @should set value to mrrt report template whos uuid matches given text - * @should throw illegal argument exception for mrrt report template not found - * @should return null for empty text + * Should set value to mrrt report template whos id matches given text + * Should set value to mrrt report template whos uuid matches given text + * Should throw illegal argument exception for mrrt report template not found + * Should return null for empty text * * @see java.beans.PropertyEditorSupport#setAsText(java.lang.String) */ @@ -58,8 +58,8 @@ public void setAsText(String text) throws IllegalArgumentException { } /** - * @should return empty string if value does not contain a mrrt report template - * @should return mrrt report template id if value does contain a mrrt report template + * Should return empty string if value does not contain a mrrt report template + * Should return mrrt report template id if value does contain a mrrt report template * * @see java.beans.PropertyEditorSupport#getAsText() */ diff --git a/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateFileParser.java b/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateFileParser.java index 456bb7b70..884cc5511 100644 --- a/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateFileParser.java +++ b/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateFileParser.java @@ -23,10 +23,10 @@ public interface MrrtReportTemplateFileParser { * @param mrrtTemplate the mrrt template to parse * @return the mrrt report template * @throws IOException if one is thrown during validation - * @should return an mrrt template object if given template is valid - * @should store terms element in template object if they match a concept reference term in openmrs - * @should skip terms element in template file if no corresponding concept reference term was found - * @should ignore case when searching for a matching concept source + * Should return an mrrt template object if given template is valid + * Should store terms element in template object if they match a concept reference term in openmrs + * Should skip terms element in template file if no corresponding concept reference term was found + * Should ignore case when searching for a matching concept source */ public MrrtReportTemplate parse(String mrrtTemplate) throws IOException; } diff --git a/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateSearchCriteria.java b/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateSearchCriteria.java index 488bc0979..22f17c9b1 100644 --- a/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateSearchCriteria.java +++ b/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateSearchCriteria.java @@ -106,10 +106,10 @@ public Builder withCreator(String creator) { * Creates an {@code MrrtReportTemplateSearchCriteria} with properties of this builder instance. * * @return a new search criteria instance - * @should create an mrrt report template search criteria instance with title if title is set - * @should create an mrrt report template search criteria instance with publisher if publisher is set - * @should create an mrrt report template search criteria instance with license if license is set - * @should create an mrrt report template search criteria instance with creator if creator is set + * Should create an mrrt report template search criteria instance with title if title is set + * Should create an mrrt report template search criteria instance with publisher if publisher is set + * Should create an mrrt report template search criteria instance with license if license is set + * Should create an mrrt report template search criteria instance with creator if creator is set */ public MrrtReportTemplateSearchCriteria build() { return new MrrtReportTemplateSearchCriteria(this); diff --git a/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateService.java b/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateService.java index 0c8751c50..d78a80030 100644 --- a/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateService.java +++ b/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateService.java @@ -32,10 +32,10 @@ public interface MrrtReportTemplateService extends OpenmrsService { * @return the saved template * @throws IllegalArgumentException if given null * @throws APIException if saving an already saved template - * @should throw illegal argument exception if given null - * @should save given template - * @should throw api exception if saving template that already exists - * @should save template object with terms if matching concept reference term was found + * Should throw illegal argument exception if given null + * Should save given template + * Should throw api exception if saving template that already exists + * Should save template object with terms if matching concept reference term was found */ @Authorized(RadiologyPrivileges.ADD_RADIOLOGY_REPORT_TEMPLATES) public MrrtReportTemplate saveMrrtReportTemplate(MrrtReportTemplate template); @@ -51,8 +51,8 @@ public interface MrrtReportTemplateService extends OpenmrsService { * @return the saved mrrt template * @throws IOException if one is thrown during parsing, validation or if FileUtils.writeStringToFile throws one * @throws APIException if importing an invalid template - * @should create mrrt report template in the database and on the file system - * @should not create an mrrt report template in the database and store the template as file if given template is invalid + * Should create mrrt report template in the database and on the file system + * Should not create an mrrt report template in the database and store the template as file if given template is invalid */ @Authorized(RadiologyPrivileges.ADD_RADIOLOGY_REPORT_TEMPLATES) public MrrtReportTemplate importMrrtReportTemplate(String mrrtTemplate) throws IOException; @@ -62,9 +62,9 @@ public interface MrrtReportTemplateService extends OpenmrsService { * * @param template the mrrt report template that is been deleted * @throws IllegalArgumentException if given null - * @should delete report template from database and also delete template file from the system - * @should throw illegal argument exception if given null - * @should catch file not found exception when the file been deleted is missing + * Should delete report template from database and also delete template file from the system + * Should throw illegal argument exception if given null + * Should catch file not found exception when the file been deleted is missing */ @Authorized(RadiologyPrivileges.DELETE_RADIOLOGY_REPORT_TEMPLATES) public void purgeMrrtReportTemplate(MrrtReportTemplate template); @@ -75,9 +75,9 @@ public interface MrrtReportTemplateService extends OpenmrsService { * @param id the mrrt report template id * @return the mrrt report template with given id * @throws IllegalArgumentException if given null - * @should get template with given id - * @should return null if no match was found - * @should throw illegal argument exception if given null + * Should get template with given id + * Should return null if no match was found + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_REPORT_TEMPLATES) public MrrtReportTemplate getMrrtReportTemplate(Integer id); @@ -88,9 +88,9 @@ public interface MrrtReportTemplateService extends OpenmrsService { * @param uuid the UUID of the mrrt report template * @return the template mrrt report template object or null if no template UUID found * @throws IllegalArgumentException if given null - * @should find object given existing uuid - * @should return null if no object found with given uuid - * @should throw illegal argument exception if given null + * Should find object given existing uuid + * Should return null if no object found with given uuid + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_REPORT_TEMPLATES) public MrrtReportTemplate getMrrtReportTemplateByUuid(String uuid); @@ -101,9 +101,9 @@ public interface MrrtReportTemplateService extends OpenmrsService { * @param identifier the dublin core identifier for mrrt report template * @return the template mrrt report template object or null if no template found with given identifier * @throws IllegalArgumentException if given null - * @should find object with given identifier - * @should return null if no object found with given identifier - * @should throw illegal argument exception if given null + * Should find object with given identifier + * Should return null if no object found with given identifier + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_REPORT_TEMPLATES) public MrrtReportTemplate getMrrtReportTemplateByIdentifier(String identifier); @@ -115,15 +115,15 @@ public interface MrrtReportTemplateService extends OpenmrsService { * @param mrrtReportTemplateSearchCriteria the object containing search parameters * @return the mrrt report templates matching the given criteria * @throws IllegalArgumentException if given null - * @should return all mrrt report templates that match given title search query if title is specified - * @should return an empty list if no match for title was found - * @should throw illegal argument exception if given null - * @should return all mrrt report templates that match given publisher anywhere in dcterms publisher insensitive to case - * @should return an empty list if no match for publisher was found - * @should return all mrrt report templates that match given license anywhere in dcterms license insensitive to case - * @should return an empty list if no match for license was found - * @should return all mrrt report templates that match given creator anywhere in dcterms creator insensitive to case - * @should return an empty list if no match for creator was found + * Should return all mrrt report templates that match given title search query if title is specified + * Should return an empty list if no match for title was found + * Should throw illegal argument exception if given null + * Should return all mrrt report templates that match given publisher anywhere in dcterms publisher insensitive to case + * Should return an empty list if no match for publisher was found + * Should return all mrrt report templates that match given license anywhere in dcterms license insensitive to case + * Should return an empty list if no match for license was found + * Should return all mrrt report templates that match given creator anywhere in dcterms creator insensitive to case + * Should return an empty list if no match for creator was found */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_REPORT_TEMPLATES) public List @@ -135,8 +135,8 @@ public interface MrrtReportTemplateService extends OpenmrsService { * @param mrrtReportTemplate the mrrt report template for which we want to get its html body content * @return the body content of the mrrt report template file * @throws IOException if one is thrown while reading the file - * @should return the body content of the mrrt report template file - * @should throw illegal argument exception if given null + * Should return the body content of the mrrt report template file + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.VIEW_RADIOLOGY_REPORT_TEMPLATES) public String getMrrtReportTemplateHtmlBody(MrrtReportTemplate mrrtReportTemplate) throws IOException; diff --git a/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateValidator.java b/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateValidator.java index 84810fcfe..7137b592a 100644 --- a/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateValidator.java +++ b/api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateValidator.java @@ -27,29 +27,29 @@ public interface MrrtReportTemplateValidator { * @param mrrtTemplate the mrrt report template to be validated * @throws IOException * @throws APIException if the mrrt template fails validation - * @should pass if template template follows mrrt standards - * @should throw api exception if template does not have an html element - * @should throw api exception if template has more than one html element - * @should throw api exception if html element does not have a head element - * @should throw api exception if html element has more than one head element - * @should throw api exception if head element does not have a title element - * @should throw api exception if head element has more than one title element - * @should throw api exception if head element does not have a meta element with charset attribute - * @should throw api exception if head element has more than one meta element with charset attribute - * @should throw api exception if head element does not have one or more meta elements denoting dublin core attributes - * @should throw api exception if head element does not have script element - * @should throw api exception if head element has more than one script element - * @should throw api exception if script element does not have a template attributes element - * @should throw api exception if script element has more than one template attributes element - * @should throw api exception if coding schemes element does not have at least one coding scheme element - * @should throw api exception if term element does not have a code element - * @should throw api exception if term element has more than one code element - * @should throw api exception if code element lacks one of meaning scheme or value attribute - * @should throw api exception if template attributes element does not have a coded content element - * @should throw api exception if template attributes element has more than one coded content element - * @should throw api exception if html element does not have a body element - * @should throw api exception if html element has more than one body element - * @should catch all violation errors and throw an mrrt report template exception + * Should pass if template template follows mrrt standards + * Should throw api exception if template does not have an html element + * Should throw api exception if template has more than one html element + * Should throw api exception if html element does not have a head element + * Should throw api exception if html element has more than one head element + * Should throw api exception if head element does not have a title element + * Should throw api exception if head element has more than one title element + * Should throw api exception if head element does not have a meta element with charset attribute + * Should throw api exception if head element has more than one meta element with charset attribute + * Should throw api exception if head element does not have one or more meta elements denoting dublin core attributes + * Should throw api exception if head element does not have script element + * Should throw api exception if head element has more than one script element + * Should throw api exception if script element does not have a template attributes element + * Should throw api exception if script element has more than one template attributes element + * Should throw api exception if coding schemes element does not have at least one coding scheme element + * Should throw api exception if term element does not have a code element + * Should throw api exception if term element has more than one code element + * Should throw api exception if code element lacks one of meaning scheme or value attribute + * Should throw api exception if template attributes element does not have a coded content element + * Should throw api exception if template attributes element has more than one coded content element + * Should throw api exception if html element does not have a body element + * Should throw api exception if html element has more than one body element + * Should catch all violation errors and throw an mrrt report template exception */ public void validate(String mrrtTemplate) throws IOException; } diff --git a/api/src/main/java/org/openmrs/module/radiology/report/template/ValidationResult.java b/api/src/main/java/org/openmrs/module/radiology/report/template/ValidationResult.java index 4994dd56b..b1b2cb77c 100644 --- a/api/src/main/java/org/openmrs/module/radiology/report/template/ValidationResult.java +++ b/api/src/main/java/org/openmrs/module/radiology/report/template/ValidationResult.java @@ -32,7 +32,7 @@ public List getErrors() { /** * Creates a new instance of {@link ValidationResult}. - * @should create a new validation result initializing errors + * Should create a new validation result initializing errors */ public ValidationResult() { errors = new ArrayList<>(); @@ -43,7 +43,7 @@ public ValidationResult() { * * @param description the error description * @param messageCode the message code of the error - * @should add new error with given parameters + * Should add new error with given parameters */ public void addError(String description, String messageCode) { ValidationError error = new ValidationError(description, messageCode); @@ -54,7 +54,7 @@ public void addError(String description, String messageCode) { * Add an error to this validation result. * * @param validationError the validation error - * @should add given validation error to errors + * Should add given validation error to errors */ public void addError(ValidationError validationError) { errors.add(validationError); @@ -64,8 +64,8 @@ public void addError(ValidationError validationError) { * Assert that this validation result has no errors and throw an exception if it does. * * @see MrrtReportTemplateValidationException - * @should throw a validation exception if validation has errors - * @should not throw a validation exception if validation has errors + * Should throw a validation exception if validation has errors + * Should not throw a validation exception if validation has errors */ public void assertOk() { if (hasErrors()) { @@ -77,8 +77,8 @@ public void assertOk() { * Check if this validation result has errors. * * @return true if this result has errors and false otherwise - * @should return true if validation has errors - * @should return false if validation has no errors + * Should return true if validation has errors + * Should return false if validation has no errors */ public boolean hasErrors() { return !errors.isEmpty(); @@ -86,8 +86,8 @@ public boolean hasErrors() { /** * @see Object#toString() - * @should return ok if validation has no errors - * @should return error strings if validation has errors + * Should return ok if validation has no errors + * Should return error strings if validation has errors */ @Override public String toString() { diff --git a/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudy.java b/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudy.java index 5eb733b59..0c1c2abdc 100644 --- a/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudy.java +++ b/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudy.java @@ -63,9 +63,9 @@ public String getStudyInstanceUid() { * Returns true when this RadiologyStudy's performedStatus is in progress and false otherwise. * * @return true on performedStatus in progress and false otherwise - * @should return false if performed status is null - * @should return false if performed status is not in progress - * @should return true if performed status is in progress + * Should return false if performed status is null + * Should return false if performed status is not in progress + * Should return true if performed status is in progress */ public boolean isInProgress() { return performedStatus == PerformedProcedureStepStatus.IN_PROGRESS; @@ -75,9 +75,9 @@ public boolean isInProgress() { * Returns true when this RadiologyStudy's performedStatus is completed and false otherwise. * * @return true on performedStatus completed and false otherwise - * @should return false if performedStatus is null - * @should return false if performedStatus is not completed - * @should return true if performedStatus is completed + * Should return false if performedStatus is null + * Should return false if performedStatus is not completed + * Should return true if performedStatus is completed */ public boolean isCompleted() { return performedStatus == PerformedProcedureStepStatus.COMPLETED; @@ -87,8 +87,8 @@ public boolean isCompleted() { * Returns true when this Study's performedStatus is null and false otherwise. * * @return true on performedStatus null and false otherwise - * @should return true if performedStatus is null - * @should return false if performedStatus is not null + * Should return true if performedStatus is null + * Should return false if performedStatus is not null */ public boolean isScheduleable() { return performedStatus == null; @@ -129,8 +129,8 @@ public void setStudyInstanceUid(String studyInstanceUid) { /** * @see Object#toString() * @return String of Study - * @should return string of study with null for members that are null - * @should return string of study + * Should return string of study with null for members that are null + * Should return string of study */ @Override public String toString() { diff --git a/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyEditor.java b/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyEditor.java index 9dfe27a22..a04293b48 100644 --- a/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyEditor.java +++ b/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyEditor.java @@ -29,10 +29,10 @@ public class RadiologyStudyEditor extends PropertyEditorSupport { private final Logger log = LoggerFactory.getLogger(this.getClass()); /** - * @should set value to radiology study whos id matches given text - * @should set value to radiology study whos uuid matches given text - * @should throw illegal argument exception for radiology study not found - * @should return null for empty text + * Should set value to radiology study whos id matches given text + * Should set value to radiology study whos uuid matches given text + * Should throw illegal argument exception for radiology study not found + * Should return null for empty text * * @see java.beans.PropertyEditorSupport#setAsText(java.lang.String) */ @@ -56,8 +56,8 @@ public void setAsText(String text) throws IllegalArgumentException { } /** - * @should return empty string if value does not contain a radiology study - * @should return radiology study id if value does contain a radiology study + * Should return empty string if value does not contain a radiology study + * Should return radiology study id if value does contain a radiology study * * @see java.beans.PropertyEditorSupport#getAsText() */ diff --git a/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyService.java b/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyService.java index 278d2bee5..46dec3023 100644 --- a/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyService.java +++ b/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyService.java @@ -33,12 +33,12 @@ public interface RadiologyStudyService extends OpenmrsService { * @throws IllegalArgumentException if global property DICOM UID org root is not a valid UID * @throws IllegalArgumentException if global property DICOM UID org root exceeds the maximum length * @throws APIException on saving an existing radiology study - * @should create new radiology study from given radiology study - * @should set the study instance uid of given radiology study to a valid dicom uid if null - * @should set the study instance uid of given radiology study to a valid dicom uid if only containing whitespaces - * @should not set the study instance uid of given radiology study if contains non whitespace characters - * @should throw illegal argument exception if given null - * @should throw api exception on saving an existing radiology study + * Should create new radiology study from given radiology study + * Should set the study instance uid of given radiology study to a valid dicom uid if null + * Should set the study instance uid of given radiology study to a valid dicom uid if only containing whitespaces + * Should not set the study instance uid of given radiology study if contains non whitespace characters + * Should throw illegal argument exception if given null + * Should throw api exception on saving an existing radiology study */ @Authorized(RadiologyPrivileges.ADD_RADIOLOGY_STUDIES) public RadiologyStudy saveRadiologyStudy(RadiologyStudy radiologyStudy); @@ -49,9 +49,9 @@ public interface RadiologyStudyService extends OpenmrsService { * @param studyId the study id of the wanted study * @return the radiology study matching given study id * @throws IllegalArgumentException if given null - * @should return radiology study matching given study id - * @should return null if no match was found - * @should throw illegal argument exception if given null + * Should return radiology study matching given study id + * Should return null if no match was found + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_STUDIES) public RadiologyStudy getRadiologyStudy(Integer studyId); @@ -62,9 +62,9 @@ public interface RadiologyStudyService extends OpenmrsService { * @param uuid the uuid of the radiology study * @return the radiology study matching given uuid * @throws IllegalArgumentException if given null - * @should return radiology study matching given uuid - * @should return null if no match was found - * @should throw illegal argument exception if given null + * Should return radiology study matching given uuid + * Should return null if no match was found + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_STUDIES) public RadiologyStudy getRadiologyStudyByUuid(String uuid); @@ -75,9 +75,9 @@ public interface RadiologyStudyService extends OpenmrsService { * @param studyInstanceUid the study instance uid of wanted radiology study * @return the radiology study exactly matching given study instance uid * @throws IllegalArgumentException if given null - * @should return radiology study exactly matching given study instance uid - * @should return null if no match was found - * @should throw illegal argument exception if given null + * Should return radiology study exactly matching given study instance uid + * Should return null if no match was found + * Should throw illegal argument exception if given null */ @Authorized(RadiologyPrivileges.GET_RADIOLOGY_STUDIES) public RadiologyStudy getRadiologyStudyByStudyInstanceUid(String studyInstanceUid); diff --git a/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyServiceImpl.java b/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyServiceImpl.java index 2d3454cee..21a19f43c 100644 --- a/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyServiceImpl.java @@ -69,9 +69,9 @@ public RadiologyStudy saveRadiologyStudy(RadiologyStudy radiologyStudy) { * @throws IllegalArgumentException if global property DICOM UID org root is empty * @throws IllegalArgumentException if global property DICOM UID org root is not a valid UID * @throws IllegalArgumentException if global property DICOM UID org root exceeds the maximum length - * @should set the study instance uid of given radiology study to a valid dicom uid if null - * @should set the study instance uid of given radiology study to a valid dicom uid if only containing whitespaces - * @should not set the study instance uid of given radiology study if contains non whitespace characters + * Should set the study instance uid of given radiology study to a valid dicom uid if null + * Should set the study instance uid of given radiology study to a valid dicom uid if only containing whitespaces + * Should not set the study instance uid of given radiology study if contains non whitespace characters */ private void setStudyInstanceUidIfBlank(RadiologyStudy radiologyStudy) { diff --git a/api/src/main/java/org/openmrs/module/radiology/util/DecimalUuid.java b/api/src/main/java/org/openmrs/module/radiology/util/DecimalUuid.java index d7276ae66..d872431be 100644 --- a/api/src/main/java/org/openmrs/module/radiology/util/DecimalUuid.java +++ b/api/src/main/java/org/openmrs/module/radiology/util/DecimalUuid.java @@ -48,7 +48,7 @@ public BigInteger getDecimalUuid() { * * @param uuid UUID to translate into BigInteger * @return big integer representation of uuid - * @should translate given uuid into a big integer + * Should translate given uuid into a big integer */ private static BigInteger getBigIntegerFromUuid(UUID uuid) { diff --git a/checkstyle.xml b/checkstyle.xml index d48ef01a5..d2ade1a58 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -137,7 +137,7 @@ + value="@param, @return, @throws, @deprecated, Should" /> diff --git a/omod/src/main/java/org/openmrs/module/radiology/modality/web/RadiologyDashboardModalitiesTabController.java b/omod/src/main/java/org/openmrs/module/radiology/modality/web/RadiologyDashboardModalitiesTabController.java index d2b4f6dba..332ff18b9 100755 --- a/omod/src/main/java/org/openmrs/module/radiology/modality/web/RadiologyDashboardModalitiesTabController.java +++ b/omod/src/main/java/org/openmrs/module/radiology/modality/web/RadiologyDashboardModalitiesTabController.java @@ -34,7 +34,7 @@ public class RadiologyDashboardModalitiesTabController { * Handles get requests for radiology modalities tab page. * * @return model and view of the radiology modalities tab page - * @should return model and view of the radiology modalities tab page and set tab session attribute to radiology modalities tab page + * Should return model and view of the radiology modalities tab page and set tab session attribute to radiology modalities tab page */ @RequestMapping(method = RequestMethod.GET) protected ModelAndView getRadiologyModalitiesTab(HttpServletRequest request) { diff --git a/omod/src/main/java/org/openmrs/module/radiology/modality/web/RadiologyModalityFormController.java b/omod/src/main/java/org/openmrs/module/radiology/modality/web/RadiologyModalityFormController.java index 0fb0215c0..38b89a6fb 100644 --- a/omod/src/main/java/org/openmrs/module/radiology/modality/web/RadiologyModalityFormController.java +++ b/omod/src/main/java/org/openmrs/module/radiology/modality/web/RadiologyModalityFormController.java @@ -47,7 +47,7 @@ public class RadiologyModalityFormController { * Handles requests for a new {@code RadiologyModality}. * * @return model and view containing new radiology modality - * @should populate model and view with new radiology modality + * Should populate model and view with new radiology modality */ @RequestMapping(method = RequestMethod.GET) protected ModelAndView getRadiologyModality() { @@ -62,7 +62,7 @@ protected ModelAndView getRadiologyModality() { * * @param radiologyModality the existing radiology modality which should be returned * @return model and view containing radiology modality - * @should populate model and view with given radiology modality + * Should populate model and view with given radiology modality */ @RequestMapping(method = RequestMethod.GET, params = "modalityId") protected ModelAndView getRadiologyModality(@RequestParam("modalityId") RadiologyModality radiologyModality) { @@ -80,10 +80,10 @@ protected ModelAndView getRadiologyModality(@RequestParam("modalityId") Radiolog * @param resultRadiologyModality the binding result for given radiology modality * @return the model and view for the radiology modality form containing binding result errors if given radiology modality is * not valid - * @should save given radiology modality if valid and set http session attribute openmrs message to modality saved and redirect + * Should save given radiology modality if valid and set http session attribute openmrs message to modality saved and redirect * to the new radiology modality - * @should not save given radiology modality if it is not valid and not redirect - * @should not redirect and set session attribute with openmrs error if api exception is thrown by save radiology modality + * Should not save given radiology modality if it is not valid and not redirect + * Should not redirect and set session attribute with openmrs error if api exception is thrown by save radiology modality */ @RequestMapping(method = RequestMethod.POST, params = "saveRadiologyModality") protected ModelAndView saveRadiologyModality(HttpServletRequest request, @@ -122,10 +122,10 @@ protected ModelAndView saveRadiologyModality(HttpServletRequest request, * @param resultRadiologyModality the binding result for given radiology modality * @return the model and view for the radiology modality form containing binding result errors if given radiology modality is * not valid - * @should retire given radiology modality if valid and set http session attribute openmrs message to modality retired and redirect + * Should retire given radiology modality if valid and set http session attribute openmrs message to modality retired and redirect * to the radiology modality - * @should not retire given radiology modality if it is not valid and not redirect - * @should not redirect and set session attribute with openmrs error if api exception is thrown by retire radiology modality + * Should not retire given radiology modality if it is not valid and not redirect + * Should not redirect and set session attribute with openmrs error if api exception is thrown by retire radiology modality */ @RequestMapping(method = RequestMethod.POST, params = "retireRadiologyModality") protected ModelAndView retireRadiologyModality(HttpServletRequest request, diff --git a/omod/src/main/java/org/openmrs/module/radiology/modality/web/resource/RadiologyModalityResource.java b/omod/src/main/java/org/openmrs/module/radiology/modality/web/resource/RadiologyModalityResource.java index 4614ab33b..54e5e8e80 100644 --- a/omod/src/main/java/org/openmrs/module/radiology/modality/web/resource/RadiologyModalityResource.java +++ b/omod/src/main/java/org/openmrs/module/radiology/modality/web/resource/RadiologyModalityResource.java @@ -36,7 +36,7 @@ public class RadiologyModalityResource extends MetadataDelegatingCrudResourceShould return supported resource version */ @Override public String getResourceVersion() { @@ -46,9 +46,9 @@ public String getResourceVersion() { /** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#getRepresentationDescription(org.openmrs.module.webservices.rest.web.representation.Representation) - * @should return default representation given instance of defaultrepresentation - * @should return full representation given instance of fullrepresentation - * @should return null for representation other then default or full + * Should return default representation given instance of defaultrepresentation + * Should return full representation given instance of fullrepresentation + * Should return null for representation other then default or full */ @Override public DelegatingResourceDescription getRepresentationDescription(Representation rep) { @@ -87,7 +87,7 @@ public DelegatingResourceDescription getCreatableProperties() { * * @param delegate the radiology modality of which the display string shall be returned * @return the ae title of given radiology order - * @should return ae title of given radiology modality + * Should return ae title of given radiology modality */ @PropertyGetter("display") public String getDisplayString(RadiologyModality delegate) { @@ -96,7 +96,7 @@ public String getDisplayString(RadiologyModality delegate) { /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getByUniqueId(String) - * @should return radiology modality given its uuid + * Should return radiology modality given its uuid */ @Override public RadiologyModality getByUniqueId(String uniqueId) { @@ -114,7 +114,7 @@ public RadiologyModality newDelegate() { /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#save(Object) - * @should save given radiology modality + * Should save given radiology modality */ @Override public RadiologyModality save(RadiologyModality delegate) { @@ -124,7 +124,7 @@ public RadiologyModality save(RadiologyModality delegate) { /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#delete(Object, String, RequestContext) - * @should retire given radiology modality + * Should retire given radiology modality */ @Override public void delete(RadiologyModality delegate, String reason, RequestContext context) throws ResponseException { @@ -134,7 +134,7 @@ public void delete(RadiologyModality delegate, String reason, RequestContext con /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#purge(Object, RequestContext) - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override public void purge(RadiologyModality delegate, RequestContext context) throws ResponseException { @@ -143,8 +143,8 @@ public void purge(RadiologyModality delegate, RequestContext context) throws Res /** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doGetAll(RequestContext) - * @should return radiology modalities including retired ones if include all is true - * @should return radiology modalities excluding retired ones if include all is false + * Should return radiology modalities including retired ones if include all is true + * Should return radiology modalities excluding retired ones if include all is false */ @Override protected NeedsPaging doGetAll(RequestContext context) { diff --git a/omod/src/main/java/org/openmrs/module/radiology/order/web/DiscontinuationOrderRequestValidator.java b/omod/src/main/java/org/openmrs/module/radiology/order/web/DiscontinuationOrderRequestValidator.java index fb0041ea9..1252eb00f 100644 --- a/omod/src/main/java/org/openmrs/module/radiology/order/web/DiscontinuationOrderRequestValidator.java +++ b/omod/src/main/java/org/openmrs/module/radiology/order/web/DiscontinuationOrderRequestValidator.java @@ -30,8 +30,8 @@ public class DiscontinuationOrderRequestValidator implements Validator { * Determines if the command object being submitted is a valid type * * @see org.springframework.validation.Validator#supports(java.lang.Class) - * @should return true only for discontinuation order request objects - * @should return false for other object types + * Should return true only for discontinuation order request objects + * Should return false for other object types */ @Override public boolean supports(Class clazz) { @@ -42,10 +42,10 @@ public boolean supports(Class clazz) { * Checks the form object for any inconsistencies/errors * * @see org.springframework.validation.Validator#validate(java.lang.Object, org.springframework.validation.Errors) - * @should fail validation if discontinuation order request is null - * @should fail validation if orderer is null or empty or whitespaces only - * @should fail validation if reason non coded is null or empty or whitespaces only - * @should pass validation if all fields are correct + * Should fail validation if discontinuation order request is null + * Should fail validation if orderer is null or empty or whitespaces only + * Should fail validation if reason non coded is null or empty or whitespaces only + * Should pass validation if all fields are correct */ @Override public void validate(Object obj, Errors errors) { diff --git a/omod/src/main/java/org/openmrs/module/radiology/order/web/RadiologyDashboardOrdersTabController.java b/omod/src/main/java/org/openmrs/module/radiology/order/web/RadiologyDashboardOrdersTabController.java index ff442797b..275ae721d 100755 --- a/omod/src/main/java/org/openmrs/module/radiology/order/web/RadiologyDashboardOrdersTabController.java +++ b/omod/src/main/java/org/openmrs/module/radiology/order/web/RadiologyDashboardOrdersTabController.java @@ -40,9 +40,9 @@ public class RadiologyDashboardOrdersTabController { * Handles get requests for radiology orders tab page. * * @return model and view of the radiology orders tab page - * @should return model and view of the radiology orders tab page and set tab session attribute to radiology orders tab page if not already set - * @should not redirect to dashboard tab page given from tab session attribute and set tab session attribute to radiology orders tab page if switch tab is set - * @should redirect to dashboard tab page given from tab session attribute if switch tab is not set + * Should return model and view of the radiology orders tab page and set tab session attribute to radiology orders tab page if not already set + * Should not redirect to dashboard tab page given from tab session attribute and set tab session attribute to radiology orders tab page if switch tab is set + * Should redirect to dashboard tab page given from tab session attribute if switch tab is not set */ @RequestMapping(method = RequestMethod.GET) protected ModelAndView getRadiologyOrdersTab(HttpServletRequest request, @@ -69,7 +69,7 @@ protected ModelAndView getRadiologyOrdersTab(HttpServletRequest request, * Returns entries for urgency select element to filter radiology orders. * * @return a map containing all urgency values and an entry to select all urgencies - * @should return a map containing all urgency values and an entry to select all urgencies + * Should return a map containing all urgency values and an entry to select all urgencies */ @ModelAttribute("urgencies") protected Map getUrgenciesList() { diff --git a/omod/src/main/java/org/openmrs/module/radiology/order/web/RadiologyOrderDetailsPortletController.java b/omod/src/main/java/org/openmrs/module/radiology/order/web/RadiologyOrderDetailsPortletController.java index e16844139..284595d27 100755 --- a/omod/src/main/java/org/openmrs/module/radiology/order/web/RadiologyOrderDetailsPortletController.java +++ b/omod/src/main/java/org/openmrs/module/radiology/order/web/RadiologyOrderDetailsPortletController.java @@ -39,12 +39,12 @@ public class RadiologyOrderDetailsPortletController extends PortletController { /** * @see org.openmrs.web.controller.PortletController#populateModel(javax.servlet.http.HttpServletRequest, * java.util.Map) - * @should populate model with radiology order if given order uuid model entry matches a radiology order and dicom viewer + * Should populate model with radiology order if given order uuid model entry matches a radiology order and dicom viewer * url if radiology order is completed - * @should populate model with radiology order if given order uuid model entry matches a radiology order and no dicom + * Should populate model with radiology order if given order uuid model entry matches a radiology order and no dicom * viewer url if radiology order is not completed - * @should not populate model with radiology order and dicom viewer url if no radiology order was found - * @should not populate model with radiology order and dicom viewer url if model has no entry for order uuid + * Should not populate model with radiology order and dicom viewer url if no radiology order was found + * Should not populate model with radiology order and dicom viewer url if model has no entry for order uuid */ @Override protected void populateModel(HttpServletRequest request, Map model) { diff --git a/omod/src/main/java/org/openmrs/module/radiology/order/web/RadiologyOrderFormController.java b/omod/src/main/java/org/openmrs/module/radiology/order/web/RadiologyOrderFormController.java index 513a37b0e..12a0ce1ff 100644 --- a/omod/src/main/java/org/openmrs/module/radiology/order/web/RadiologyOrderFormController.java +++ b/omod/src/main/java/org/openmrs/module/radiology/order/web/RadiologyOrderFormController.java @@ -85,7 +85,7 @@ protected void initBinderDiscontinuationOrderRequest(WebDataBinder webDataBinder * Handles requests for a new {@code RadiologyOrder}. * * @return model and view containing new radiology order - * @should populate model and view with new radiology order + * Should populate model and view with new radiology order */ @RequestMapping(method = RequestMethod.GET) protected ModelAndView getRadiologyOrderFormWithNewRadiologyOrder() { @@ -105,7 +105,7 @@ protected ModelAndView getRadiologyOrderFormWithNewRadiologyOrder() { * @param patient the existing patient which should be associated with a new radiology order * returned in the model and view * @return model and view containing new radiology order - * @should populate model and view with new radiology order prefilled with given patient + * Should populate model and view with new radiology order prefilled with given patient */ @RequestMapping(method = RequestMethod.GET, params = "patientId") protected ModelAndView @@ -124,11 +124,11 @@ protected ModelAndView getRadiologyOrderFormWithNewRadiologyOrder() { * * @param order the order of an existing radiology order which should be returned * @return model and view containing radiology order - * @should populate model and view with existing radiology order if given order id matches a + * Should populate model and view with existing radiology order if given order id matches a * radiology order and no dicom viewer url if order is not completed - * @should populate model and view with existing radiology order if given order id matches a + * Should populate model and view with existing radiology order if given order id matches a * radiology order and dicom viewer url if order completed - * @should populate model and view with existing order if given order id only matches an order + * Should populate model and view with existing order if given order id only matches an order * and not a radiology order */ @RequestMapping(method = RequestMethod.GET, params = "orderId") @@ -162,10 +162,10 @@ protected ModelAndView getRadiologyOrderFormWithExistingRadiologyOrder(@RequestP * @param resultRadiologyOrder the binding result for given radiology order * @return the model and view for the radiology order form containing binding result errors if given radiology order is * not valid - * @should save given radiology order if valid and set http session attribute openmrs message to order saved and redirect + * Should save given radiology order if valid and set http session attribute openmrs message to order saved and redirect * to the new radiology order - * @should not save given radiology order if it is not valid and not redirect - * @should not redirect and set session attribute with openmrs error if api exception is thrown by place radiology + * Should not save given radiology order if it is not valid and not redirect + * Should not redirect and set session attribute with openmrs error if api exception is thrown by place radiology * order */ @RequestMapping(method = RequestMethod.POST, params = "saveRadiologyOrder") @@ -208,9 +208,9 @@ protected ModelAndView saveRadiologyOrder(HttpServletRequest request, @ModelAttr * @param resultDiscontinuationOrderRequest the binding result for given discontinuation order request * @return the model and view populated with discontinuation order * @throws Exception - * @should discontinue non discontinued radiology order and redirect to discontinuation order - * @should not discontinue given radiology order and not redirect if discontinuation order request is not valid - * @should not redirect and set session attribute with openmrs error if api exception is thrown by discontinue radiology + * Should discontinue non discontinued radiology order and redirect to discontinuation order + * Should not discontinue given radiology order and not redirect if discontinuation order request is not valid + * Should not redirect and set session attribute with openmrs error if api exception is thrown by discontinue radiology * order */ @RequestMapping(method = RequestMethod.POST, params = "discontinueOrder") @@ -253,11 +253,11 @@ protected ModelAndView discontinueRadiologyOrder(HttpServletRequest request, * @param modelAndView the model and view to which an object indicating if a report needs to be created is added * @param order the order to be checked for the need of a radiology report * @return true if a radiology report needs to be created and false otherwise - * @should return false if order is not a radiology order - * @should return false if radiology order is not completed - * @should return false if radiology order is completed but has a claimed report - * @should return false if radiology order is completed but has a completed report - * @should return true if radiology order is completed and has no claimed report + * Should return false if order is not a radiology order + * Should return false if radiology order is not completed + * Should return false if radiology order is completed but has a claimed report + * Should return false if radiology order is completed but has a completed report + * Should return true if radiology order is completed and has no claimed report */ private boolean radiologyReportNeedsToBeCreated(ModelAndView modelAndView, Order order) { diff --git a/omod/src/main/java/org/openmrs/module/radiology/order/web/resource/RadiologyOrderResource.java b/omod/src/main/java/org/openmrs/module/radiology/order/web/resource/RadiologyOrderResource.java index 79507220c..1fe0f2207 100644 --- a/omod/src/main/java/org/openmrs/module/radiology/order/web/resource/RadiologyOrderResource.java +++ b/omod/src/main/java/org/openmrs/module/radiology/order/web/resource/RadiologyOrderResource.java @@ -34,9 +34,9 @@ public class RadiologyOrderResource extends DataDelegatingCrudResourceShould return default representation given instance of defaultrepresentation + * Should return full representation given instance of fullrepresentation + * Should return null for representation other then default or full */ @Override public DelegatingResourceDescription getRepresentationDescription(Representation rep) { @@ -97,7 +97,7 @@ public DelegatingResourceDescription getRepresentationDescription(Representation /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getResourceVersion() - * @should return supported resource version + * Should return supported resource version */ @Override public String getResourceVersion() { @@ -107,7 +107,7 @@ public String getResourceVersion() { /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getByUniqueId(java.lang.String) - * @should return radiology order given its uuid + * Should return radiology order given its uuid */ @Override public RadiologyOrder getByUniqueId(String uniqueId) { @@ -121,8 +121,8 @@ public RadiologyOrder getByUniqueId(String uniqueId) { * * @param radiologyOrder the radiology order of which the display string shall be returned * @return the accession number and the concept name of given radiology order - * @should return accession number and concept name of given radiology order - * @should return no concept string if given radiologyOrders concept is null + * Should return accession number and concept name of given radiology order + * Should return no concept string if given radiologyOrders concept is null */ @PropertyGetter("display") public String getDisplayString(RadiologyOrder radiologyOrder) { @@ -138,7 +138,7 @@ public String getDisplayString(RadiologyOrder radiologyOrder) { /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#newDelegate() - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override public RadiologyOrder newDelegate() throws ResourceDoesNotSupportOperationException { @@ -148,7 +148,7 @@ public RadiologyOrder newDelegate() throws ResourceDoesNotSupportOperationExcept /** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceHandler#save(java.lang.Object) - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override public RadiologyOrder save(RadiologyOrder delegate) throws ResourceDoesNotSupportOperationException { @@ -159,7 +159,7 @@ public RadiologyOrder save(RadiologyOrder delegate) throws ResourceDoesNotSuppor /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#delete(java.lang.Object, * java.lang.String, org.openmrs.module.webservices.rest.web.RequestContext) - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override protected void delete(RadiologyOrder delegate, String reason, RequestContext context) @@ -171,7 +171,7 @@ protected void delete(RadiologyOrder delegate, String reason, RequestContext con /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#purge(java.lang.Object, * org.openmrs.module.webservices.rest.web.RequestContext) - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override public void purge(RadiologyOrder delegate, RequestContext context) throws ResourceDoesNotSupportOperationException { diff --git a/omod/src/main/java/org/openmrs/module/radiology/order/web/search/RadiologyOrderSearchHandler.java b/omod/src/main/java/org/openmrs/module/radiology/order/web/search/RadiologyOrderSearchHandler.java index a974a08a8..806f0dfdd 100644 --- a/omod/src/main/java/org/openmrs/module/radiology/order/web/search/RadiologyOrderSearchHandler.java +++ b/omod/src/main/java/org/openmrs/module/radiology/order/web/search/RadiologyOrderSearchHandler.java @@ -77,19 +77,19 @@ public SearchConfig getSearchConfig() { /** * @see org.openmrs.module.webservices.rest.web.resource.api.SearchHandler#search(RequestContext) - * @should return all radiology orders for given accession number - * @should return empty search result if no radiology order exists for given accession number - * @should return all radiology orders for given patient - * @should return empty search result if patient cannot be found - * @should return empty search result if patient has no radiology orders - * @should return all radiology orders with effective order start date in given date range if to date and from date are specified - * @should return all radiology orders with effective order start date after or equal to from date if only from date is specified - * @should return all radiology orders with effective order start date before or equal to to date if only to date is specified - * @should return empty search result if no effective order start is in date range - * @should return all radiology orders for given urgency - * @should return empty search result if no radiology order exists for given urgency - * @should throw illegal argument exception if urgency doesn't exist - * @should return all radiology orders matching the search query and totalCount if + * Should return all radiology orders for given accession number + * Should return empty search result if no radiology order exists for given accession number + * Should return all radiology orders for given patient + * Should return empty search result if patient cannot be found + * Should return empty search result if patient has no radiology orders + * Should return all radiology orders with effective order start date in given date range if to date and from date are specified + * Should return all radiology orders with effective order start date after or equal to from date if only from date is specified + * Should return all radiology orders with effective order start date before or equal to to date if only to date is specified + * Should return empty search result if no effective order start is in date range + * Should return all radiology orders for given urgency + * Should return empty search result if no radiology order exists for given urgency + * Should throw illegal argument exception if urgency doesn't exist + * Should return all radiology orders matching the search query and totalCount if * requested */ @Override diff --git a/omod/src/main/java/org/openmrs/module/radiology/report/template/web/MrrtReportTemplateFormController.java b/omod/src/main/java/org/openmrs/module/radiology/report/template/web/MrrtReportTemplateFormController.java index dffc1f1d3..a4d854497 100644 --- a/omod/src/main/java/org/openmrs/module/radiology/report/template/web/MrrtReportTemplateFormController.java +++ b/omod/src/main/java/org/openmrs/module/radiology/report/template/web/MrrtReportTemplateFormController.java @@ -46,8 +46,8 @@ public class MrrtReportTemplateFormController { * @param mrrtReportTemplate * the MrrtReportTemplate being requested * @return modelAndView of the report template form page containing the body content of template inside a model object - * @should return the model and view of the report template form page containing template body in model object - * @should return the model and view of the radiology dashboard page with error message if io exception is thrown + * Should return the model and view of the report template form page containing template body in model object + * Should return the model and view of the radiology dashboard page with error message if io exception is thrown */ @RequestMapping(method = RequestMethod.GET, params = "templateId") public ModelAndView displayMrrtReportTemplate(HttpServletRequest request, diff --git a/omod/src/main/java/org/openmrs/module/radiology/report/template/web/RadiologyDashboardReportTemplatesTabController.java b/omod/src/main/java/org/openmrs/module/radiology/report/template/web/RadiologyDashboardReportTemplatesTabController.java index d3df65d0d..edff501db 100644 --- a/omod/src/main/java/org/openmrs/module/radiology/report/template/web/RadiologyDashboardReportTemplatesTabController.java +++ b/omod/src/main/java/org/openmrs/module/radiology/report/template/web/RadiologyDashboardReportTemplatesTabController.java @@ -49,7 +49,7 @@ public class RadiologyDashboardReportTemplatesTabController { * Handles get requests for radiology report templates tab. * * @return model and view of the radiology report templates tab page - * @should return model and view of the radiology report templates tab page and set tab session attribute to radiology reports tab page + * Should return model and view of the radiology report templates tab page and set tab session attribute to radiology reports tab page */ @RequestMapping(method = RequestMethod.GET) protected ModelAndView getRadiologyReportTemplatesTab(HttpServletRequest request) { @@ -69,11 +69,11 @@ protected ModelAndView getRadiologyReportTemplatesTab(HttpServletRequest request * @return model and view of the radiology dashboard report templates page with success or failure message in session * attribute * @throws IOException when templateFile could not be read or is invalid - * @should give error message when template file is empty - * @should set error message in session when mrrt report template validation exception is thrown - * @should set error message in session when api exception is thrown - * @should set error message in session when io exception is thrown - * @should give success message when import was successful + * Should give error message when template file is empty + * Should set error message in session when mrrt report template validation exception is thrown + * Should set error message in session when api exception is thrown + * Should set error message in session when io exception is thrown + * Should give success message when import was successful */ @RequestMapping(method = RequestMethod.POST, params = "uploadReportTemplate") protected ModelAndView uploadReportTemplate(HttpServletRequest request, @RequestParam MultipartFile templateFile) @@ -120,8 +120,8 @@ protected ModelAndView uploadReportTemplate(HttpServletRequest request, @Request * @param mrrtReportTemplate the MrrtReportTemplate to be deleted * @return model and view of the radiology dashboard report templates page with success or failure message in session * attribute - * @should return a model and view of the radiology dashboard report templates page with a status message - * @should catch api exception and set error message in session + * Should return a model and view of the radiology dashboard report templates page with a status message + * Should catch api exception and set error message in session */ @RequestMapping(method = RequestMethod.GET, params = "templateId") public ModelAndView deleteMrrtReportTemplate(HttpServletRequest request, diff --git a/omod/src/main/java/org/openmrs/module/radiology/report/template/web/resource/MrrtReportTemplateResource.java b/omod/src/main/java/org/openmrs/module/radiology/report/template/web/resource/MrrtReportTemplateResource.java index da4408b40..b9541a385 100644 --- a/omod/src/main/java/org/openmrs/module/radiology/report/template/web/resource/MrrtReportTemplateResource.java +++ b/omod/src/main/java/org/openmrs/module/radiology/report/template/web/resource/MrrtReportTemplateResource.java @@ -37,9 +37,9 @@ public class MrrtReportTemplateResource extends DataDelegatingCrudResourceShould return default representation given instance of defaultrepresentation + * Should return full representation given instance of fullrepresentation + * Should return null for representation other then default or full */ @Override public DelegatingResourceDescription getRepresentationDescription(Representation rep) { @@ -94,7 +94,7 @@ public List getPropertiesToExposeAsSubResources() { /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getByUniqueId(java.lang.String) - * @should return radiology order given its uuid + * Should return radiology order given its uuid */ @Override public MrrtReportTemplate getByUniqueId(String uuid) { @@ -107,7 +107,7 @@ public MrrtReportTemplate getByUniqueId(String uuid) { * * @param mrrtReportTemplate MrrtReportTemplate of which display string shall be returned * @return templateIdentifier/title of given mrrtReportTemplate - * @should return templateIdentifier + * Should return templateIdentifier */ @PropertyGetter("display") public String getDisplayString(MrrtReportTemplate mrrtReportTemplate) { @@ -117,7 +117,7 @@ public String getDisplayString(MrrtReportTemplate mrrtReportTemplate) { /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#delete(java.lang.Object, * java.lang.String, org.openmrs.module.webservices.rest.web.RequestContext) - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override protected void delete(MrrtReportTemplate mrrtReportTemplate, String s, RequestContext requestContext) @@ -128,7 +128,7 @@ protected void delete(MrrtReportTemplate mrrtReportTemplate, String s, RequestCo /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#purge(java.lang.Object, * org.openmrs.module.webservices.rest.web.RequestContext) - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override public void purge(MrrtReportTemplate mrrtReportTemplate, RequestContext requestContext) @@ -138,7 +138,7 @@ public void purge(MrrtReportTemplate mrrtReportTemplate, RequestContext requestC /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#newDelegate() - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override public MrrtReportTemplate newDelegate() throws ResourceDoesNotSupportOperationException { @@ -147,7 +147,7 @@ public MrrtReportTemplate newDelegate() throws ResourceDoesNotSupportOperationEx /** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceHandler#save(java.lang.Object) - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override public MrrtReportTemplate save(MrrtReportTemplate mrrtReportTemplate) { @@ -156,7 +156,7 @@ public MrrtReportTemplate save(MrrtReportTemplate mrrtReportTemplate) { /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getResourceVersion() - * @should return supported resource version + * Should return supported resource version */ @Override public String getResourceVersion() { diff --git a/omod/src/main/java/org/openmrs/module/radiology/report/template/web/search/MrrtReportTemplateSearchHandler.java b/omod/src/main/java/org/openmrs/module/radiology/report/template/web/search/MrrtReportTemplateSearchHandler.java index ac6afd861..237282b0b 100644 --- a/omod/src/main/java/org/openmrs/module/radiology/report/template/web/search/MrrtReportTemplateSearchHandler.java +++ b/omod/src/main/java/org/openmrs/module/radiology/report/template/web/search/MrrtReportTemplateSearchHandler.java @@ -65,15 +65,15 @@ public SearchConfig getSearchConfig() { /** * @see org.openmrs.module.webservices.rest.web.resource.api.SearchHandler#getSearchConfig() - * @should return all report templates that match given title - * @should return empty search result if title does not exist - * @should return all mrrt templates that match given title and totalCount if requested - * @should return all report templates by given publisher - * @should return empty search result if publisher does not exist - * @should return all report templates that match given license - * @should return empty search result if license does not exist - * @should return all report templates that match given creator - * @should return empty search result if creator does not exist + * Should return all report templates that match given title + * Should return empty search result if title does not exist + * Should return all mrrt templates that match given title and totalCount if requested + * Should return all report templates by given publisher + * Should return empty search result if publisher does not exist + * Should return all report templates that match given license + * Should return empty search result if license does not exist + * Should return all report templates that match given creator + * Should return empty search result if creator does not exist */ @Override public PageableResult search(RequestContext context) throws ResponseException { diff --git a/omod/src/main/java/org/openmrs/module/radiology/report/web/RadiologyDashboardReportsTabController.java b/omod/src/main/java/org/openmrs/module/radiology/report/web/RadiologyDashboardReportsTabController.java index 8391606a5..df9728d66 100755 --- a/omod/src/main/java/org/openmrs/module/radiology/report/web/RadiologyDashboardReportsTabController.java +++ b/omod/src/main/java/org/openmrs/module/radiology/report/web/RadiologyDashboardReportsTabController.java @@ -38,7 +38,7 @@ public class RadiologyDashboardReportsTabController { * Handles get requests for radiology reports tab page. * * @return model and view of the radiology reports tab page - * @should return model and view of the radiology reports tab page and set tab session attribute to radiology reports tab page + * Should return model and view of the radiology reports tab page and set tab session attribute to radiology reports tab page */ @RequestMapping(method = RequestMethod.GET) protected ModelAndView getRadiologyReportsTab(HttpServletRequest request) { @@ -54,7 +54,7 @@ protected ModelAndView getRadiologyReportsTab(HttpServletRequest request) { * Returns entries for report status select element to filter radiology reports. * * @return a map containing all report status values and an entry to select all report statuses - * @should return a map containing all report status values and an entry to select all report statuses + * Should return a map containing all report status values and an entry to select all report statuses */ @ModelAttribute("reportStatuses") protected Map getReportStatusList() { diff --git a/omod/src/main/java/org/openmrs/module/radiology/report/web/RadiologyReportFormController.java b/omod/src/main/java/org/openmrs/module/radiology/report/web/RadiologyReportFormController.java index daeae9160..f32c34ede 100644 --- a/omod/src/main/java/org/openmrs/module/radiology/report/web/RadiologyReportFormController.java +++ b/omod/src/main/java/org/openmrs/module/radiology/report/web/RadiologyReportFormController.java @@ -65,7 +65,7 @@ protected void initBinderVoidRadiologyReportRequest(WebDataBinder webDataBinder) * * @param radiologyOrder the radiology order for which a radiology report will be created * @return the model and view redirecting to the newly created radiology report - * @should create a new radiology report for given radiology order and redirect to its radiology report form + * Should create a new radiology report for given radiology order and redirect to its radiology report form */ @RequestMapping(method = RequestMethod.GET, params = "orderId") protected ModelAndView createRadiologyReport(@RequestParam("orderId") RadiologyOrder radiologyOrder) { @@ -80,7 +80,7 @@ protected ModelAndView createRadiologyReport(@RequestParam("orderId") RadiologyO * * @param radiologyReport the radiology report which is requested * @return the model and view containing radiology report for given radiology report id - * @should populate model and view with given radiology report + * Should populate model and view with given radiology report */ @RequestMapping(method = RequestMethod.GET, params = "reportId") protected ModelAndView @@ -98,9 +98,9 @@ protected ModelAndView createRadiologyReport(@RequestParam("orderId") RadiologyO * @param request the http servlet request * @param radiologyReport the radiology report to be saved * @return the model and view containing saved radiology report draft - * @should save given radiology report and set http session attribute openmrs message to report draft saved and redirect + * Should save given radiology report and set http session attribute openmrs message to report draft saved and redirect * to its report form - * @should not redirect and set session attribute with openmrs error if api exception is thrown by save radiology + * Should not redirect and set session attribute with openmrs error if api exception is thrown by save radiology * report draft */ @RequestMapping(method = RequestMethod.POST, params = "saveRadiologyReportDraft") @@ -136,10 +136,10 @@ protected ModelAndView saveRadiologyReportDraft(HttpServletRequest request, * @param bindingResult the binding result for the void radiology report request * @return the model and view with redirect to report form if voiding was successful, otherwise the * model and view contains binding result errors - * @should void given radiology report and set http session attribute openmrs message to report voided and redirect + * Should void given radiology report and set http session attribute openmrs message to report voided and redirect * to its report form - * @should not void and not redirect given invalid void radiology report request - * @should not redirect and set session attribute with openmrs error if api exception is thrown by void radiology + * Should not void and not redirect given invalid void radiology report request + * Should not redirect and set session attribute with openmrs error if api exception is thrown by void radiology * report */ @RequestMapping(method = RequestMethod.POST, params = "voidRadiologyReport") @@ -179,10 +179,10 @@ protected ModelAndView voidRadiologyReport(HttpServletRequest request, * @param bindingResult the binding result for the radiology report * @return the model and view with redirect to report form if complete was successful, otherwise the * model and view contains binding result errors - * @should complete given radiology report if valid and set http session attribute openmrs message to report completed and redirect + * Should complete given radiology report if valid and set http session attribute openmrs message to report completed and redirect * to its report form - * @should not complete and redirect given invalid radiology report - * @should not redirect and set session attribute with openmrs error if api exception is thrown by complete radiology + * Should not complete and redirect given invalid radiology report + * Should not redirect and set session attribute with openmrs error if api exception is thrown by complete radiology * report */ @RequestMapping(method = RequestMethod.POST, params = "completeRadiologyReport") diff --git a/omod/src/main/java/org/openmrs/module/radiology/report/web/VoidRadiologyReportRequestValidator.java b/omod/src/main/java/org/openmrs/module/radiology/report/web/VoidRadiologyReportRequestValidator.java index 6f2f58243..c4b05e971 100644 --- a/omod/src/main/java/org/openmrs/module/radiology/report/web/VoidRadiologyReportRequestValidator.java +++ b/omod/src/main/java/org/openmrs/module/radiology/report/web/VoidRadiologyReportRequestValidator.java @@ -30,8 +30,8 @@ public class VoidRadiologyReportRequestValidator implements Validator { * Determines if the command object being submitted is a valid type * * @see Validator#supports(Class) - * @should return true only for void radiology report request objects - * @should return false for other object types + * Should return true only for void radiology report request objects + * Should return false for other object types */ @Override public boolean supports(Class clazz) { @@ -42,8 +42,8 @@ public boolean supports(Class clazz) { * Checks the form object for any inconsistencies/errors * * @see Validator#validate(Object, Errors) - * @should fail validation if void reason is null or empty or whitespaces only - * @should pass validation if all fields are correct + * Should fail validation if void reason is null or empty or whitespaces only + * Should pass validation if all fields are correct */ @Override public void validate(Object obj, Errors errors) { diff --git a/omod/src/main/java/org/openmrs/module/radiology/report/web/resource/RadiologyReportResource.java b/omod/src/main/java/org/openmrs/module/radiology/report/web/resource/RadiologyReportResource.java index 41af57097..121f16d5c 100755 --- a/omod/src/main/java/org/openmrs/module/radiology/report/web/resource/RadiologyReportResource.java +++ b/omod/src/main/java/org/openmrs/module/radiology/report/web/resource/RadiologyReportResource.java @@ -34,9 +34,9 @@ public class RadiologyReportResource extends DataDelegatingCrudResourceShould return default representation given instance of defaultrepresentation + * Should return full representation given instance of fullrepresentation + * Should return null for representation other then default or full */ @Override public DelegatingResourceDescription getRepresentationDescription(Representation rep) { @@ -72,7 +72,7 @@ private void addDefaultProperties(DelegatingResourceDescription description) { /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getResourceVersion() - * @should return supported resource version + * Should return supported resource version */ @Override public String getResourceVersion() { @@ -85,7 +85,7 @@ public String getResourceVersion() { * * @param radiologyReport RadiologyReport of which display string shall be returned * @return order number and report status string of given radiologyReport - * @should return order number and report status string of given radiologyReport + * Should return order number and report status string of given radiologyReport */ @PropertyGetter("display") public String getDisplayString(RadiologyReport radiologyReport) { @@ -98,7 +98,7 @@ public String getDisplayString(RadiologyReport radiologyReport) { /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getByUniqueId(java.lang.String) - * @should return radiology report given its uuid + * Should return radiology report given its uuid */ @Override public RadiologyReport getByUniqueId(String uniqueId) { @@ -109,7 +109,7 @@ public RadiologyReport getByUniqueId(String uniqueId) { /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#newDelegate() - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override public RadiologyReport newDelegate() throws ResourceDoesNotSupportOperationException { @@ -119,7 +119,7 @@ public RadiologyReport newDelegate() throws ResourceDoesNotSupportOperationExcep /** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceHandler#save(java.lang.Object) - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override public RadiologyReport save(RadiologyReport delegate) throws ResourceDoesNotSupportOperationException { @@ -130,7 +130,7 @@ public RadiologyReport save(RadiologyReport delegate) throws ResourceDoesNotSupp /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#delete(java.lang.Object, * java.lang.String, org.openmrs.module.webservices.rest.web.RequestContext) - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override protected void delete(RadiologyReport delegate, String reason, RequestContext context) @@ -142,7 +142,7 @@ protected void delete(RadiologyReport delegate, String reason, RequestContext co /** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#purge(java.lang.Object, * org.openmrs.module.webservices.rest.web.RequestContext) - * @should throw ResourceDoesNotSupportOperationException + * Should throw ResourceDoesNotSupportOperationException */ @Override public void purge(RadiologyReport delegate, RequestContext context) throws ResourceDoesNotSupportOperationException { diff --git a/omod/src/main/java/org/openmrs/module/radiology/report/web/search/RadiologyReportSearchHandler.java b/omod/src/main/java/org/openmrs/module/radiology/report/web/search/RadiologyReportSearchHandler.java index b1fd6dff1..25aa99183 100755 --- a/omod/src/main/java/org/openmrs/module/radiology/report/web/search/RadiologyReportSearchHandler.java +++ b/omod/src/main/java/org/openmrs/module/radiology/report/web/search/RadiologyReportSearchHandler.java @@ -79,18 +79,18 @@ public SearchConfig getSearchConfig() { /** * @see org.openmrs.module.webservices.rest.web.resource.api.SearchHandler#search(RequestContext) * @throws IllegalArgumentException if report status doesn't exist - * @should return all radiology reports (including voided) matching the search query if include all is set - * @should return all radiology reports within given date range if date to and date from are specified - * @should return all radiology reports with report date after or equal to from date if only date from is specified - * @should return all radiology reports with report date before or equal to to date if only date to is specified - * @should return empty search result if no report is in date range - * @should return all radiology reports for given principal results interpreter - * @should return empty search result if no report exists for principal results interpreter - * @should return empty search result if principal results interpreter cannot be found - * @should return all radiology reports with given status - * @should return empty search result if no report exists for given status - * @should throw illegal argument exception if report status doesn't exist - * @should return all radiology reports matching the search query and totalCount if requested + * Should return all radiology reports (including voided) matching the search query if include all is set + * Should return all radiology reports within given date range if date to and date from are specified + * Should return all radiology reports with report date after or equal to from date if only date from is specified + * Should return all radiology reports with report date before or equal to to date if only date to is specified + * Should return empty search result if no report is in date range + * Should return all radiology reports for given principal results interpreter + * Should return empty search result if no report exists for principal results interpreter + * Should return empty search result if principal results interpreter cannot be found + * Should return all radiology reports with given status + * Should return empty search result if no report exists for given status + * Should throw illegal argument exception if report status doesn't exist + * Should return all radiology reports matching the search query and totalCount if requested */ @Override public PageableResult search(RequestContext context) throws ResponseException {