示例#1
0
        public Resource Delete(ResourceKey key)
        {
            var deletedResponse = FHIRbase.Call("fhir.delete")
                .WithText(key.TypeName)
                .WithText(key.ResourceId)
                .Cast<string>();

            return FHIRbaseHelper.JsonToFhirResource(deletedResponse);
        }
示例#2
0
        public Resource VRead(ResourceKey key)
        {
            var readedResponse = FHIRbase.Call("fhir.vread")
                .WithText(key.TypeName)
                .WithText(key.VersionId)
                .Cast<string>();

            return FHIRbaseHelper.JsonToFhirResource(readedResponse);
        }
示例#3
0
        public Resource ReadLastVersion(ResourceKey key)
        {
            var lastVersion = History(key.TypeName, key.ResourceId)
                .With(x => x.Entry)
                .Select(x => x.Resource)
                .Where(x => x.HasVersionId)
                .OrderBy(x => x.Meta.LastUpdated)
                .LastOrDefault();

            return lastVersion;
        }
示例#4
0
        public bool IsLatest(ResourceKey key)
        {
            var result = FHIRbase.Call("fhir.is_latest")
               .WithText(key.TypeName)
               .WithText(key.ResourceId)
               .WithText(key.VersionId)
               .Cast<bool>();

            return result;
        }
示例#5
0
 public bool IsExists(ResourceKey key)
 {
     return IsExists(key.TypeName, key.ResourceId);
 }
示例#6
0
 public bool IsDeleted(ResourceKey key)
 {
     return FHIRbase.Call("fhir.is_deleted")
         .WithText(key.TypeName)
         .WithText(key.ResourceId)
         .Cast<bool>();
 }