Class GemFaker

java.lang.Object
de.gematik.test.erezept.fhir.builder.GemFaker

public class GemFaker extends Object
  • Method Details

    • getFaker

      public static com.github.javafaker.Faker getFaker()
    • fakerDrugName

      public static String fakerDrugName()
    • fakerLotNumber

      public static String fakerLotNumber()
    • fakerFutureExpirationDate

      public static Date fakerFutureExpirationDate()
    • fakerTelematikId

      public static String fakerTelematikId()
    • fakerName

      public static String fakerName()
    • fakerFirstName

      public static String fakerFirstName()
    • fakerLastName

      public static String fakerLastName()
    • fakerBirthday

      public static Date fakerBirthday()
    • fakerBirthdayAsString

      public static String fakerBirthdayAsString()
    • insuranceName

      public static String insuranceName(Wop wop)
      builds a combination of HEALTH_INSURANCE_NAMES and Wop with max 45 digits uses randomElement(HEALTH_INSURANCE_NAMES) uses wop.getDisplay()
      Parameters:
      wop - from Wop.class
      Returns:
      StingCombination with max size of 45
    • insuranceName

      public static String insuranceName()
      generate combination from HEALTH_INSURANCE_NAMES and wop.getDisplay()
      Returns:
      StingCombination with max size of 45
    • pharmacyName

      public static String pharmacyName()
    • fakerBsnr

      public static String fakerBsnr()
      Betriebsstättennummer
      Returns:
      String (BSNR generated by original format)
      See Also:
      • BSNR first and second digits as region number (Wop)
    • fakerLanr

      public static String fakerLanr()
      Lebenslage Arztnummer uses method generateControlNo(int docID)
      Returns:
      a random valid LANR as a String
      See Also:
      • Wikipedia LANR
      • invalid input: '<a href="https://wiki.hl7.de/index.php?title=LANR_und_BSNR>HL7 Wiki</a>'
    • generateControlNo

      public static int generateControlNo(String docId)
      generate a controlNumber by multiply each first digit with 4 and each second digit with 9 until reached last digit (6) result = 10 - ( sum() -> "% 10" );
      Parameters:
      docId - with 6 digits as String
      Returns:
      1 digit int
    • generateControlNo

      public static int generateControlNo(int docID)
      generate a controlNumber by multiply each first digit with 4 and each second digit with 9 until reached last digit (6) result = 10 - ( sum() -> "% 10" );
      Parameters:
      docID - with 6 digits
      Returns:
      1 digit int
    • fakerZanr

      public static String fakerZanr()
      Zahnarztnummer* possible: use ZANR.random() instead

      uses method generateControlNo(int docID)

      Returns:
      a random valid ZANR as a String
      See Also:
    • fakerPrescriptionId

      public static PrescriptionId fakerPrescriptionId()
    • fakerPrescriptionId

      public static PrescriptionId fakerPrescriptionId(PrescriptionFlowType flowType)
      Build a fake PrescriptionID with valid checking number
      Returns:
      a valid randomly generated Prescription ID
      See Also:
    • fakerAccessCode

      public static AccessCode fakerAccessCode()
    • fakerSecret

      public static String fakerSecret()
    • fakerAmount

      public static int fakerAmount()
    • fakerAmount

      public static int fakerAmount(int min, int max)
    • fakerBool

      public static boolean fakerBool()
    • fakerDosage

      public static String fakerDosage()
    • fakerPhone

      public static String fakerPhone()
    • fakerEMail

      public static String fakerEMail()
    • eMail

      public static String eMail(String firstName, String lasName)
    • eMail

      public static String eMail(String localPart)
    • fakerCity

      public static String fakerCity()
    • fakerZipCode

      public static String fakerZipCode()
    • fullStreetName

      public static String fullStreetName()
      Attention: this might include a secondary appendix to the street name which might be an invalid address in FHIR resources
      Returns:
      a street name
    • fullStreetName

      public static String fullStreetName(boolean withSecondary)
      Attention: use with caution, if withSecondary argument is set to true, the street might be invalid for certain FHIR profiles
      Parameters:
      withSecondary - defines if a secondary appendix should be added to the address
      Returns:
      a street name
    • fakerStreetName

      public static String fakerStreetName()
    • buildingNumber

      public static String buildingNumber()
    • fakerCountry

      public static de.gematik.bbriccs.fhir.de.valueset.Country fakerCountry()
    • fakerQualificationType

      public static QualificationType fakerQualificationType()
    • fakerProfession

      public static String fakerProfession()
    • fakerDoctorProfessionAsString

      public static String fakerDoctorProfessionAsString()
    • fakerDoctorProfession

      public static DoctorProfession fakerDoctorProfession()
    • fakerCommunicationInfoReqMessage

      public static String fakerCommunicationInfoReqMessage()
    • fakerCommunicationDispReqMessage

      public static String fakerCommunicationDispReqMessage()
    • fakerCommunicationReplyMessage

      public static String fakerCommunicationReplyMessage()
    • fakerCommunicationRepresentativeMessage

      public static String fakerCommunicationRepresentativeMessage()
    • fakerCommunicationChargeItemChangeRequest

      public static String fakerCommunicationChargeItemChangeRequest()
    • fakerCommunicationChargeItemChangeReply

      public static String fakerCommunicationChargeItemChangeReply()
    • fakerCommunicationMessage

      public static String fakerCommunicationMessage(CommunicationType type)
    • fakerChargeItemCommunicationMessage

      public static String fakerChargeItemCommunicationMessage(ChargeItemCommunicationType type)
    • mvo

      public static MultiplePrescriptionExtension mvo()
    • mvo

      public static MultiplePrescriptionExtension mvo(boolean isMultiple)
    • vatRate

      public static float vatRate()
    • vatRate

      public static float vatRate(float min, float max)
    • cost

      public static float cost()
    • cost

      public static float cost(float min)
    • cost

      public static float cost(float min, float max)
    • fakerValueSet

      public static <V extends Enum<?>> V fakerValueSet(Class<V> valueSet)
      Get a random value from a given Enum
      Type Parameters:
      V - is the type of the
      Parameters:
      valueSet - is the class of the Enum
      Returns:
      a random choice
    • fakerValueSet

      public static <V extends Enum<?>> V fakerValueSet(Class<V> valueSet, V exclude)
    • fakerValueSet

      public static <V extends Enum<?>> V fakerValueSet(Class<V> valueSet, List<V> exclude)
    • randomElement

      @SafeVarargs public static <T> T randomElement(T... elements)
    • randomElement

      public static <T> T randomElement(List<T> list)