Created
September 30, 2020 18:56
-
-
Save joecastelo/8a793789d32d239a8ff6a9f220add916 to your computer and use it in GitHub Desktop.
Script Template for PD Scripting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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