private static void PlaceRandomOrderForPatient(PatientProfileSummary patientProfile, EnumValueInfo informationAuthority) { // find a random active visit, or create one var randomVisit = GetActiveVisitForPatient(patientProfile.PatientRef, informationAuthority) ?? RandomUtils.CreateVisit(patientProfile, informationAuthority, 0); // create the order RandomUtils.RandomOrder(randomVisit, informationAuthority, null, 0); }