예제 #1
0
        // These should eventually be Interaction! = FhirRequests. Not Entries.
        public FhirResponse Transaction(IList <Entry> interactions)
        {
            transfer.Internalize(interactions);

            var resources = new List <Resource>();

            foreach (Entry interaction in interactions)
            {
                FhirResponse response = HandleInteraction(interaction);

                if (!response.IsValid)
                {
                    return(response);
                }
                resources.Add(response.Resource);
            }

            transfer.Externalize(interactions);

            Bundle bundle = localhost.CreateBundle(Bundle.BundleType.TransactionResponse).Append(interactions);

            return(Respond.WithBundle(bundle));
        }
예제 #2
0
        public FhirResponse GetFhirResponse(IList <Entry> interactions, Bundle.BundleType bundleType)
        {
            Bundle bundle = localhost.CreateBundle(bundleType).Append(interactions);

            return(Respond.WithBundle(bundle));
        }