How to configure Gen AI in app and dev studio

Hi

I have a requirement in healthcare application where citizens are filling the details related to their health like symptoms , ellergies, covid vaccinated and travel history , based on these details system (GEN AI) predicts potential health issue and scheduled automated appointments.

how to do this , please help with step by step implementation

@SoumyaG82 please carry out a PSC key word search.

First question is to check that you are licensed to use GenAI.

The questions found via the search will help you locate the required documentation to help you configure your system once you have the relevant license.

Here’s a comprehensive implementation guide:

1. Set Up Pega GenAI in Your Environment

  1. Enable Pega GenAI:
    • If you’re a Pega Cloud customer, request GenAI enablement through your account team
    • If you’re an on-premises customer, consult with your account team about GenAI options
    • Once enabled, connect your application to the GenAI provider in App Studio
  2. Configure GenAI Settings:
    • Navigate to Dev Studio > Records > Integration > GenAI
    • Set up authentication for the GenAI service
    • Configure GenAI models appropriate for healthcare prediction use cases

2. Create the Data Model for Health Information

  1. Define Case Type:
    • Create a healthcare assessment case type (e.g., “Health Screening”)
    • Set up stages for data collection, analysis, and appointment scheduling
  2. Create Data Fields:
    • In Dev Studio, navigate to the case type
    • On the Data Model tab, click “Add field” for each category:
      • Symptoms: Create a list or multi-select field for common symptoms
      • Allergies: Create a list field for various allergies
      • COVID Vaccination: Create fields for vaccination status, dates, and vaccine type
      • Travel History: Create fields for recent travel locations and dates
      • Patient Details: Create fields for patient demographics
  3. Set Field Properties:
    • Mark critical fields as “Required”
    • Add validation rules (e.g., ensure valid dates for vaccination)
    • Add tooltip help text for each field to guide users

3. Design the Data Collection Forms

  1. Create UI Sections:
    • In Dev Studio, navigate to the case type’s form
    • Create separate sections for symptoms, allergies, vaccination status, and travel history
    • Use Live UI to arrange and style the sections
  2. Configure Form Validation:
    • Set up client-side validation for input fields
    • Create validation rules to ensure data quality
    • Add conditional logic to show/hide fields based on answers
  3. Create a User-Friendly Interface:
    • Design an intuitive flow for data entry
    • Add descriptive labels and help text
    • Implement a progress indicator for multi-step forms

4. Configure the Prediction Model

  1. Create a Predictive Model:
    • Navigate to Prediction Studio
    • Click “Create” > “Prediction”
    • Select “Case Outcome” as the prediction type
    • Name it appropriately (e.g., “HealthRiskPrediction”)
  2. Configure Model Parameters:
    • Define the outcome you want to predict (e.g., “Potential Health Issue”)
    • Select input fields as predictors (symptoms, allergies, vaccination status, travel history)
    • Configure model training settings
  3. Train the Prediction Model:
    • Provide sample data to train the model initially
    • Configure adaptive model settings to learn from ongoing case data
    • Set up model monitoring to ensure prediction quality
  4. Integrate GenAI with Prediction Model:
    • Use GenAI to enhance prediction accuracy by analyzing unstructured symptom descriptions
    • Configure GenAI to process symptom patterns and correlate with known medical conditions
    • Set up knowledge sources for the GenAI model to reference medical information

5. Configure the Decision Rules

  1. Create Decision Strategy:
    • Navigate to Dev Studio > Decision Management
    • Create a decision strategy for health risk assessment
    • Define decision conditions based on prediction outcomes
  2. Set Up Risk Categories:
    • Define different risk levels (e.g., Low, Medium, High)
    • Configure threshold values for each risk category
    • Map conditions to specific actions
  3. Configure Decision Table:
    • Create a decision table mapping health conditions to appointment types
    • Define rules for urgency based on risk level
    • Set up appropriate next actions for each scenario

6. Implement Automated Appointment Scheduling

  1. Create Appointment Scheduling Case Type:
    • Design a sub-case type for appointment scheduling
    • Define fields for appointment details (date, time, provider, reason)
    • Set up integration with calendar systems if needed
  2. Configure Workflow Automation:
    • Create a flow action that triggers when a health risk is identified
    • Configure the action to create an appointment case based on risk level
    • Set up routing rules to assign appointments to appropriate providers
  3. Set Up Notifications:
    • Configure email or SMS notifications for scheduled appointments
    • Create notification templates with dynamic content
    • Set up reminder workflows for upcoming appointments

7. Test and Deploy

  1. Unit Testing:
    • Test each form component individually
    • Verify data validation rules
    • Ensure GenAI integration works properly
  2. Integration Testing:
    • Test the end-to-end process flow
    • Verify prediction model accuracy with test data
    • Ensure appointment scheduling works correctly
  3. User Acceptance Testing:
    • Have actual users test the application
    • Collect feedback on usability and accuracy
    • Make necessary adjustments based on feedback
  4. Deployment:
    • Deploy the application to your production environment
    • Monitor performance and adjust as needed
    • Continue training the AI model with actual user data

8. Ongoing Maintenance and Improvement

  1. Monitor Model Performance:
    • Regularly review prediction accuracy
    • Adjust model parameters as needed
    • Update knowledge sources for GenAI
  2. Update Health Parameters:
    • Add new symptoms or health conditions as needed
    • Update COVID-related fields as guidelines change
    • Refresh travel risk assessments based on current global health situations

This implementation leverages Pega’s AI capabilities to create an intelligent healthcare application that can analyze patient-provided information, make predictions about potential health issues, and take proactive action by scheduling appropriate appointments.

References:
Pega GenAI in Pega Care Management
Data Integration for Healthcare Applications
Creating Predictions for Case Management
Working with Dev Studio Forms
Self-Optimized Workflows