コード例 #1
0
    def __init__(self, dialog_id: str = None):
        super(RiskCountrySelectionDialog,
              self).__init__(dialog_id or RiskCountrySelectionDialog.__name__)

        self.RISK_COUNTRIES_SELECTED = "value-symptomsSelected"
        self.RISK_COUNTRIES_DATES = "value-symptomsDates"
        self.DONE_OPTION = "**Keine**"

        self.riskcountry_options = [
            "Ägypten",
            "Hubei (China)",
            "Region Grand Est (Frankreich)",
            "Iran",
            "Italien",
            "Tirol (Österreich)",
            "Madrid (Spanien)",
            "Gyeongsangbuk-do (Südkorea)",
            "Kalifornien, Washington oder New York (USA)",
        ]
        choice = ChoicePrompt(ChoicePrompt.__name__)
        choice.recognizer_options = FindChoicesOptions(
            allow_partial_matches=True)
        self.add_dialog(choice)
        self.add_dialog(
            WaterfallDialog(
                WaterfallDialog.__name__,
                [self.selection_step, self.loop_step, self.save_step]))

        self.add_dialog(DateTimePrompt(DateTimePrompt.__name__))

        self.initial_dialog_id = WaterfallDialog.__name__
コード例 #2
0
    def __init__(self, dialog_id: str = None):
        super(SymptomsSelectionDialog, self).__init__(
            dialog_id or SymptomsSelectionDialog.__name__
        )

        self.SYMPTOMS_SELECTED = "value-symptomsSelected"
        self.SYMPTOMS_DATES = "value-symptomsDates"
        self.DONE_OPTION = "Keins"

        self.symptom_options = [
            "Husten",
            "Fieber",
            "Schnupfen",
            "Kopfschmerzen",
            "Lungenentzündung",
        ]

        choice = ChoicePrompt(ChoicePrompt.__name__)
        choice.recognizer_options = FindChoicesOptions(allow_partial_matches=True)
        self.add_dialog(choice)
        self.add_dialog(
            WaterfallDialog(
                WaterfallDialog.__name__, [self.selection_step, self.loop_step, self.save_step]
            )
        )
        self.add_dialog(DateTimePrompt(DateTimePrompt.__name__))

        self.initial_dialog_id = WaterfallDialog.__name__