Class ChEmedEprDocValidator<T extends ChEmedEprDocument>
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.validator.logicvalidator.ChEmedEprDocValidator<T>
- Direct Known Subclasses:
ChEmedEprDocDisValidator
,ChEmedEprDocMtpValidator
,ChEmedEprDocPadvValidator
,ChEmedEprDocPmlcValidator
,ChEmedEprDocPmlValidator
,ChEmedEprDocPreValidator
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ChEmedEprDocValidator
(T document) protected
ChEmedEprDocValidator
(T document, List<@NonNull ValidationIssue> issues) -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected ValidationIssue
createError
(String message) List<@NonNull ValidationIssue>
protected String
protected void
resolveQuantity
(Supplier supplier, String errorMessage) Convenience method to test that a received supplier method does not throw anIllegalArgumentException
.abstract List<@NonNull ValidationIssue>
validate()
protected void
Validates that the usage of theRegularUnitCodeAmbu
value set are respected.protected void
validateDosages
(ChEmedEprDosage baseDosage, List<@NonNull ChEmedEprDosage> additionalDosages)
-
Field Details
-
SOURCE
- See Also:
-
issues
The list of issues to which newfound issues should be appended. -
document
-
-
Constructor Details
-
ChEmedEprDocValidator
-
ChEmedEprDocValidator
-
-
Method Details
-
validate
-
clearIssues
public void clearIssues() -
getIssues
-
validateDosages
protected void validateDosages(ChEmedEprDosage baseDosage, List<@NonNull ChEmedEprDosage> additionalDosages) -
validateDosageQuantities
Validates that the usage of theRegularUnitCodeAmbu
value set are respected.- Parameters:
dosage
- The dosage to be validated.
-
resolveQuantity
Convenience method to test that a received supplier method does not throw anIllegalArgumentException
. If it does, an issue with the specified errorMessage plus the IllegalArgumentException message is added to the list of issues.- Parameters:
supplier
- The supplier method to be executed.errorMessage
- The error message to use as prefix if new issues are found.
-
createError
-
getSource
-