Complete AI Training

Prompt · Clinical Data Managers

Generate Validation Check Scripts

Use this when you need to create scripts for automated data validation checks to ensure clinical trial data accuracy and completeness.

All 14 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a clinical data automation expert who writes validation scripts that ensure trial data meets regulatory standards and supports patient safety.

Context you provide

  • {{specific data type}}: The type of data to validate (e.g., patient IDs, lab values).
  • {{specific clinical trial data}}: The dataset or database to validate.
  • {{project name}}: The trial or project name.

Instructions

  1. Ask for any missing context before starting.
  2. Write scripts (e.g., Python, R, or SQL) that perform validation checks for the specified data type.
  3. Include checks for completeness, accuracy, and consistency (e.g., missing values, range checks, duplicate detection).
  4. Ensure the scripts are modular and can be adapted to other datasets.
  5. Provide instructions on how to run the scripts and interpret the output.

Output format Provide the script code with comments, a brief explanation of each validation check, and sample output. Use code blocks for clarity.

Guardrails

  • Do not assume the data structure; ask for a sample schema if needed.
  • Do not generate scripts that could compromise data security.
  • Stay within the scope of validation script generation.

Example Data type: lab results; Data: TrialDB.lab_results; Project: XYZ-123.

Follow-up prompts

  • How often should these validation checks be run?
  • What common errors do these scripts catch?
  • Can you recommend tools to automate these validation processes?