コード例 #1
0
        public static string GetSpecimenBarcode(Bundle orderResponse)
        {
            var component = orderResponse.Entry.FirstOrDefault(x => x.Resource is Order);

            var order           = (Order)component.Resource;
            var diagnosticOrder = FhirResourceHelper.Read <DiagnosticOrder>(order.Detail.FirstOrDefault().Reference);
            var specRef         = diagnosticOrder.Specimen.FirstOrDefault().With(x => x.Reference);
            var spec            = FhirResourceHelper.Read <Specimen>(specRef);

            return(spec.Container.FirstOrDefault().Identifier.FirstOrDefault().Value);
        }
コード例 #2
0
        public static List <Tuple <string, string> > GetOrderCodes(Bundle orderResponse)
        {
            var barcode      = GetSpecimenBarcode(orderResponse);
            var order        = GetOrderByBarcode(barcode);
            var organizarion = FhirResourceHelper.Read <Organization>(order.Target.Reference);

            return(new List <Tuple <string, string> >
            {
                new Tuple <string, string>(organizarion.Identifier.First().Value, barcode),
            });
        }
コード例 #3
0
        public static Tuple <string, string> GetResultCodes(Order order)
        {
            var orderMisId = order.Identifier
                             .FirstOrDefault()
                             .If(x => x.System == "http://netrika.ru")
                             .With(x => x.Value);

            var targetOrganization = FhirResourceHelper.Read <Organization>(order.Target.Reference);
            var targetCode         = targetOrganization.Identifier.First().Value;

            return(new Tuple <string, string>(targetCode, orderMisId));
        }