Example #1
0
        public static Bundle CreateRandomLabOrder()
        {
            var patient = FhirResourceHelper.CreatePatient();

            var orderOrganization           = FhirResourceHelper.CreateOrganization();
            var diagnosticOrderOrganization = FhirResourceHelper.CreateOrganization();

            var orderPractitioner           = FhirResourceHelper.CreatePractitioner(orderOrganization);
            var diagnosticOrderPractitioner = FhirResourceHelper.CreatePractitioner(diagnosticOrderOrganization);

            var specimen  = FhirResourceHelper.GetSpecimen(patient, orderOrganization);
            var specimen1 = FhirResourceHelper.GetSpecimen(patient, orderOrganization);

            var condition = FhirResourceHelper.GetCondition(patient);

            var encounter = FhirResourceHelper.CreateEncounter(patient, condition, orderOrganization);

            var observation  = FhirResourceHelper.GetObservation();
            var observation1 = FhirResourceHelper.GetObservation();

            var diagnosticOrder = FhirResourceHelper.GetDiagnosticOrder(patient, diagnosticOrderPractitioner, encounter,
                                                                        observation, observation1, specimen, specimen1);
            var order          = FhirResourceHelper.GetOrder(patient, orderPractitioner, orderOrganization, diagnosticOrder);
            var lisOrderBundle = FhirResourceHelper.GetLisOrderBundle(order, diagnosticOrder, condition,
                                                                      new List <Specimen> {
                specimen, specimen1
            },
                                                                      new List <Observation> {
                observation, observation1
            });

            return(lisOrderBundle);
        }