Skip to content

Instantly share code, notes, and snippets.

@joecastelo
Created September 30, 2020 18:56
Show Gist options
  • Save joecastelo/8a793789d32d239a8ff6a9f220add916 to your computer and use it in GitHub Desktop.
Save joecastelo/8a793789d32d239a8ff6a9f220add916 to your computer and use it in GitHub Desktop.
Script Template for PD Scripting
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using VMS.CA.Scripting;
using VMS.DV.PD.Scripting;
namespace PDQuery
{
class Program
{
[STAThread]
static void Main(string[] args)
{
try
{
Console.ReadLine();
using (Application app = Application.CreateApplication())
{
Execute(app);
}
}
catch (Exception)
{
throw;
}
}
static void Execute(Application app)
{
Patient p = app.OpenPatientById("ID");
foreach (PDPlanSetup pdPlans in p.PDPlanSetups)
{
// Code here
}
Console.ReadLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment