Class RepeatComponentTranslatorAdapterR5
java.lang.Object
io.github.jy95.fds.r5.utils.adapters.RepeatComponentTranslatorAdapterR5
- All Implemented Interfaces:
Translator<org.hl7.fhir.r5.model.Dosage>
public class RepeatComponentTranslatorAdapterR5
extends Object
implements Translator<org.hl7.fhir.r5.model.Dosage>
Adapter that allows a TimingRepeatComponent Translator to be used as a Dosage Translator.
It handles the required navigation and extraction: Dosage -> Timing -> Repeat.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RepeatComponentTranslatorAdapterR5
public RepeatComponentTranslatorAdapterR5()
-
-
Method Details
-
convert
Converts a field into a human-readable string representation asynchronously.- Specified by:
convertin interfaceTranslator<org.hl7.fhir.r5.model.Dosage>- Parameters:
dosage- the fhir element containing field to be converted- Returns:
- a
CompletableFuturethat will complete with the human-readable string
-
isPresent
public boolean isPresent(org.hl7.fhir.r5.model.Dosage dosage) Checks whether a field is present and can be converted to a string.- Specified by:
isPresentin interfaceTranslator<org.hl7.fhir.r5.model.Dosage>- Parameters:
dosage- the fhir element containing field to check- Returns:
trueif the field is present,falseotherwise
-