Exemple #1
0
        public ServerFhirResponse GetMetadataResponse(Entry entry, IKey key = null)
        {
            if (entry == null)
            {
                return(Respond.NotFound(key));
            }
            else if (entry.IsDeleted())
            {
                return(Respond.Gone(entry));
            }

            return(Respond.WithMeta(entry));
        }
Exemple #2
0
        public FhirResponse AddMeta(Key key, Parameters parameters)
        {
            Entry entry = fhirStore.Get(key);

            if (entry == null)
            {
                return(Respond.NotFound(key));
            }
            else if (entry.IsDeleted())
            {
                return(Respond.Gone(entry));
            }

            entry.Resource.AffixTags(parameters);
            Store(entry);

            return(Respond.WithMeta(entry));
        }
Exemple #3
0
        public FhirResponse AddMeta(Key key, Parameters parameters)
        {
            Interaction interaction = fhirStore.Get(key);

            if (interaction == null)
            {
                return(Respond.NotFound(key));
            }
            else if (interaction.IsDeleted())
            {
                return(Respond.Gone(interaction));
            }

            interaction.Resource.AffixTags(parameters);
            Store(interaction);

            return(Respond.WithMeta(interaction));
        }
Exemple #4
0
        public FhirResponse ReadMeta(Key key)
        {
            _log.ServiceMethodCalled("readmeta");

            ValidateKey(key);

            Entry entry = fhirStore.Get(key);

            if (entry == null)
            {
                return(Respond.NotFound(key));
            }
            else if (entry.IsDeleted())
            {
                return(Respond.Gone(entry));
            }

            return(Respond.WithMeta(entry));
        }
Exemple #5
0
        public FhirResponse ReadMeta(Key key)
        {
            _log.ServiceMethodCalled("readmeta");

            ValidateKey(key);

            Interaction interaction = fhirStore.Get(key);

            if (interaction == null)
            {
                return(Respond.NotFound(key));
            }
            else if (interaction.IsDeleted())
            {
                return(Respond.Gone(interaction));
            }

            return(Respond.WithMeta(interaction));
        }
Exemple #6
0
        public FhirResponse ReadMeta(Key key)
        {
            Validate.HasTypeName(key);
            Validate.HasResourceId(key);
            Validate.HasNoVersion(key);
            Validate.Key(key);

            Interaction interaction = store.Get(key);

            if (interaction == null)
            {
                return(Respond.NotFound(key));
            }
            else if (interaction.IsDeleted())
            {
                return(Respond.Gone(interaction));
            }

            return(Respond.WithMeta(interaction));
        }