Beispiel #1
0
        public static Order GetOrderByDiagnosticOrder(DiagnosticOrder diagnosticOrder)
        {
            var result = FhirClient.Search <Order>(new[] { string.Format("detail={0}", FhirHelper.CreateReference(diagnosticOrder).Reference) });

            Assert.That(result, Is.Not.Null);
            Assert.That(result.Entry, Is.Not.Null);
            Assert.That(result.Entry.Count, Is.GreaterThanOrEqualTo(1));

            return((Order)result.Entry.First().Resource);
        }
Beispiel #2
0
        public ExporterResult ShowExporter(fi6000NS.SDK.Export.IExporterHost host, int auto_logout_time)
        {
            DiagnosticOrder form = new DiagnosticOrder(host, auto_logout_time);
            //SampleTop form = new SampleTop(host, auto_logout_time);
            if(form.ShowDialog()==DialogResult.Cancel)
            {
                return ExporterResult.AutoLogout;
            }

            return ExporterResult.OK;
        }
Beispiel #3
0
        public static DiagnosticOrder GetDiagnosticOrder(Patient patient, Practitioner diagnosticOrderPractitioner,
                                                         Encounter encounter,
                                                         Observation observation, Observation observation1,
                                                         Specimen specimen, Specimen specimen1)
        {
            var diagnosticOrder = new DiagnosticOrder
            {
                Id                    = Guid.NewGuid().ToString(),
                Subject               = FhirHelper.CreateReference(patient),
                Orderer               = FhirHelper.CreateReference(diagnosticOrderPractitioner),
                Encounter             = FhirHelper.CreateReference(encounter),
                SupportingInformation = new List <ResourceReference>
                {
                    FhirHelper.CreateBundleReference(observation),
                    FhirHelper.CreateBundleReference(observation1),
                },
                Specimen = new List <ResourceReference>
                {
                    FhirHelper.CreateBundleReference(specimen),
                    FhirHelper.CreateBundleReference(specimen1)
                },
                Status = DiagnosticOrder.DiagnosticOrderStatus.Requested,
                Item   = new List <DiagnosticOrder.DiagnosticOrderItemComponent>
                {
                    new DiagnosticOrder.DiagnosticOrderItemComponent
                    {
                        Code = new CodeableConcept
                        {
                            Text   = "Услуга 1",
                            Coding = new List <Coding>
                            {
                                new Coding(Systems.DIAGNOSTIC_ORDER_CODE, Systems.DIAGNOSTIC_ORDER_CODE),
                            },
                            Extension = new List <Extension>
                            {
                                new Extension(Systems.DIAGNOSTIC_ORDER_FINANCIAL_EXTENSION, new CodeableConcept(Systems.FINANCIAL, GetCodeBySystem(Systems.FINANCIAL))),
                                new Extension(Systems.DIAGNOSTIC_ORDER_INSURANCE_EXTENSION, new ResourceReference {
                                    Reference = Guid.NewGuid().ToString()
                                })
                            }
                        },
                    },
                    new DiagnosticOrder.DiagnosticOrderItemComponent
                    {
                        Code = new CodeableConcept
                        {
                            Text   = "Услуга 2",
                            Coding = new List <Coding>
                            {
                                new Coding(Systems.DIAGNOSTIC_ORDER_CODE, Guid.NewGuid().ToString()),
                            },
                            Extension = new List <Extension>
                            {
                                new Extension(Systems.DIAGNOSTIC_ORDER_FINANCIAL_EXTENSION, new CodeableConcept(Systems.FINANCIAL, GetCodeBySystem(Systems.FINANCIAL))),
                                new Extension(Systems.DIAGNOSTIC_ORDER_INSURANCE_EXTENSION, new ResourceReference {
                                    Reference = Guid.NewGuid().ToString()
                                })
                            }
                        },
                    }
                }
            };

            return(diagnosticOrder);
        }