コード例 #1
0
        public string[] IndexAllResources()
        {
            var indexAllResourcesResult = FHIRbase.Call("fhir.index_all_resources")
                                          .Cast <string[]>();

            return(indexAllResourcesResult);
        }
コード例 #2
0
        public long DropAllResourceIndexes()
        {
            var dropAllResourceIndexesResult = FHIRbase.Call("fhir.drop_all_resource_indexes")
                                               .Cast <long>();

            return(dropAllResourceIndexesResult);
        }
コード例 #3
0
        /// <summary>
        /// Generate tables for DSTU2 resources
        /// </summary>
        /// <returns></returns>
        public string GenerateTables()
        {
            var result = FHIRbase.Call("fhir.generate_tables")
                         .Cast <string>();

            return(result);
        }
コード例 #4
0
 public bool IsExists(string resourceName, string id)
 {
     return(FHIRbase.Call("fhir.is_exists")
            .WithText(resourceName)
            .WithText(id)
            .Cast <bool>());
 }
コード例 #5
0
 public bool IsDeleted(ResourceKey key)
 {
     return(FHIRbase.Call("fhir.is_deleted")
            .WithText(key.TypeName)
            .WithText(key.ResourceId)
            .Cast <bool>());
 }
コード例 #6
0
        public string AdminDiskUsageTop(int limit)
        {
            var adminDiskUsageTopResult = FHIRbase.Call("fhir.admin_disk_usage_top")
                                          .WithInt(limit)
                                          .Cast <string>();

            return(adminDiskUsageTopResult);
        }
コード例 #7
0
        /// <summary>
        /// Generate tables for resources
        /// </summary>
        /// <param name="resources"></param>
        /// <returns></returns>
        public string GenerateTables(params string[] resources)
        {
            var result = FHIRbase.Call("fhir.generate_tables")
                         .WithTextArray(resources)
                         .Cast <string>();

            return(result);
        }
コード例 #8
0
        public string[] IndexResource(string resource)
        {
            var indexResiurceResult = FHIRbase.Call("fhir.index_resource")
                                      .WithText(resource)
                                      .Cast <string[]>();

            return(indexResiurceResult);
        }
コード例 #9
0
        /// <summary>
        /// Create FHIR-conformance
        /// </summary>
        /// <param name="cfg"></param>
        /// <returns>JSON with conformance</returns>
        public Conformance Conformance(string cfg = "{}")
        {
            var conformanceResult = FHIRbase.Call("fhir.conformance")
                                    .WithJsonb(cfg)
                                    .Cast <string>();

            return((Conformance)FHIRbaseHelper.JsonToFhirResource(conformanceResult));
        }
コード例 #10
0
        public long DropResourceIndexes(string resource)
        {
            var dropResourceIndexesResult = FHIRbase.Call("fhir.drop_resource_indexes")
                                            .WithText(resource)
                                            .Cast <long>();

            return(dropResourceIndexesResult);
        }
コード例 #11
0
        public Resource Create(Resource entry)
        {
            var resourceJson = FHIRbaseHelper.FhirResourceToJson(entry);
            var resource     = FHIRbase.Call("fhir.create")
                               .WithJsonb(resourceJson)
                               .Cast <string>();

            return(FHIRbaseHelper.JsonToFhirResource(resource));
        }
コード例 #12
0
        public long DropIndexSearchParams(string resource, string name)
        {
            var dropIndexSearchParamsResult = FHIRbase.Call("fhir.drop_index_search_param")
                                              .WithText(resource)
                                              .WithText(name)
                                              .Cast <long>();

            return(dropIndexSearchParamsResult);
        }
コード例 #13
0
        public string IndexSearchParam(string resource, string name)
        {
            var indexSearchParamsResult = FHIRbase.Call("fhir.index_search_param")
                                          .WithText(resource)
                                          .WithText(name)
                                          .Cast <string>();

            return(indexSearchParamsResult);
        }
コード例 #14
0
        public Bundle Transaction(Bundle bundle)
        {
            var transactionJson = FHIRbaseHelper.FhirResourceToJson(bundle);
            var fhirbaseResult  = FHIRbase.Call("fhir.transaction")
                                  .WithJsonb(transactionJson)
                                  .Cast <string>();

            return(FHIRbaseHelper.JsonToBundle(fhirbaseResult));
        }
コード例 #15
0
        public StructureDefinition StructureDefinition(string resourceName, string cfg = "{}")
        {
            var sdResult = FHIRbase.Call("fhir.structuredefinition")
                           .WithJsonb(cfg)
                           .WithText(resourceName)
                           .Cast <string>();

            return((StructureDefinition)FHIRbaseHelper.JsonToFhirResource(sdResult));
        }
コード例 #16
0
        public Resource Read(ResourceKey key)
        {
            var readedResponse = FHIRbase.Call("fhir.read")
                                 .WithText(key.TypeName)
                                 .WithText(key.ResourceId)
                                 .Cast <string>();

            return(FHIRbaseHelper.JsonToFhirResource(readedResponse));
        }
コード例 #17
0
        public Resource Update(Resource resource)
        {
            var resourceJson   = FHIRbaseHelper.FhirResourceToJson(resource);
            var updateResponse = FHIRbase.Call("fhir.update")
                                 .WithJsonb(resourceJson)
                                 .Cast <string>();

            return(FHIRbaseHelper.JsonToFhirResource(updateResponse));
        }
コード例 #18
0
        public Resource Delete(ResourceKey key)
        {
            var deletedResponse = FHIRbase.Call("fhir.delete")
                                  .WithText(key.TypeName)
                                  .WithText(key.ResourceId)
                                  .Cast <string>();

            return(FHIRbaseHelper.JsonToFhirResource(deletedResponse));
        }
コード例 #19
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);
        }
コード例 #20
0
        public Bundle History(HistoryParameters parameters = null)
        {
            if (parameters == null)
            {
                parameters = new HistoryParameters();
            }

            var historyResponse = FHIRbase.Call("fhir.history")
                                  .WithText(parameters.ToString())
                                  .Cast <string>();

            return(FHIRbaseHelper.JsonToBundle(historyResponse));
        }
コード例 #21
0
        public Bundle Search(string resource, SearchParameters parameters)
        {
            if (parameters == null)
            {
                parameters = new SearchParameters();
            }

            var searchQuery  = parameters.ToString();
            var searchResult = FHIRbase.Call("fhir.search")
                               .WithText(resource)
                               .WithText(searchQuery)
                               .Cast <string>();

            return(FHIRbaseHelper.JsonToBundle(searchResult));
        }