Class DoseQuantityR4

java.lang.Object
io.github.jy95.fds.r4.translators.DoseQuantityR4
All Implemented Interfaces:
DoseQuantity<FDSConfigR4,org.hl7.fhir.r4.model.Dosage>, Translator<FDSConfigR4,org.hl7.fhir.r4.model.Dosage>

public class DoseQuantityR4 extends Object implements DoseQuantity<FDSConfigR4,org.hl7.fhir.r4.model.Dosage>
R4 class for translating "doseAndRate.doseQuantity"
Author:
jy95
  • Field Details

    • doseQuantityMsg

      protected final com.ibm.icu.text.MessageFormat doseQuantityMsg
      MessageFormat instance used for "doseQuantity" translation.
  • Constructor Details

    • DoseQuantityR4

      public DoseQuantityR4(FDSConfigR4 config, ResourceBundle bundle)
      Constructor for DoseQuantityR4.
      Parameters:
      config - The configuration object used for translation.
      bundle - a ResourceBundle object
  • Method Details

    • convert

      public CompletableFuture<String> convert(org.hl7.fhir.r4.model.Dosage dosage)
      Converts a dosage field into a human-readable string representation asynchronously.
      Specified by:
      convert in interface Translator<FDSConfigR4,org.hl7.fhir.r4.model.Dosage>
      Parameters:
      dosage - the dosage field to be converted
      Returns:
      a CompletableFuture that will complete with the human-readable string
    • isPresent

      public boolean isPresent(org.hl7.fhir.r4.model.Dosage dosage)
      Checks whether a dosage field is present and can be converted to a string.
      Specified by:
      isPresent in interface Translator<FDSConfigR4,org.hl7.fhir.r4.model.Dosage>
      Parameters:
      dosage - the dosage field to check
      Returns:
      true if the dosage field is present, false otherwise