|
| 1 | +<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/> |
| 2 | + |
| 3 | +# Cloud Healthcare API Node.js FHIR store and FHIR resource example |
| 4 | + |
| 5 | +This sample app demonstrates FHIR store and FHIR resource management for the Cloud Healthcare API. |
| 6 | + |
| 7 | +# Setup |
| 8 | + |
| 9 | +Run the following command to install the library dependencies for Node.js: |
| 10 | + |
| 11 | + npm install |
| 12 | + |
| 13 | +# Running the samples |
| 14 | + |
| 15 | +## FHIR stores |
| 16 | + |
| 17 | + fhir_stores.js <command> |
| 18 | + |
| 19 | + Commands: |
| 20 | + fhir_stores.js createFhirStore <datasetId> <fhirStoreId> Creates a new FHIR store within the parent dataset. |
| 21 | + fhir_stores.js deleteFhirStore <datasetId> <fhirStoreId> Deletes the FHIR store and removes all resources that |
| 22 | + are contained within it. |
| 23 | + fhir_stores.js getFhirStore <datasetId> <fhirStoreId> Gets the specified FHIR store or returns NOT_FOUND if it |
| 24 | + doesn't exist. |
| 25 | + fhir_stores.js listFhirStores <datasetId> Lists the FHIR stores in the given dataset. |
| 26 | + fhir_stores.js patchFhirStore <datasetId> <fhirStoreId> Updates the FHIR store. |
| 27 | + <pubsubTopic> |
| 28 | + fhir_stores.js getMetadata <datasetId> <fhirStoreId> Gets the capabilities statement for the FHIR store. |
| 29 | + |
| 30 | + Options: |
| 31 | + --version Show version number [boolean] |
| 32 | + --apiKey, -a The API key used for discovering the API. |
| 33 | + [string] |
| 34 | + --cloudRegion, -c [string] [default: "us-central1"] |
| 35 | + --projectId, -p The Project ID to use. Defaults to the value of the GCLOUD_PROJECT or GOOGLE_CLOUD_PROJECT |
| 36 | + environment variables. [string] |
| 37 | + --serviceAccount, -s The path to your service credentials JSON. |
| 38 | + [string] |
| 39 | + --help Show help [boolean] |
| 40 | + |
| 41 | + |
| 42 | +## FHIR resources |
| 43 | + |
| 44 | + Commands: |
| 45 | + fhir_resources.js createResource <datasetId> <fhirStoreId> Creates a new resource in a FHIR store. |
| 46 | + <resourceType> |
| 47 | + fhir_resources.js updateResource <datasetId> <fhirStoreId> Updates an existing resource in a FHIR store. |
| 48 | + <resourceType> <resourceId> |
| 49 | + fhir_resources.js patchResource <datasetId> <fhirStoreId> Patches an existing resource in a FHIR store. |
| 50 | + <resourceType> <resourceId> |
| 51 | + fhir_resources.js deleteResource <datasetId> <fhirStoreId> Deletes a FHIR resource or returns NOT_FOUND if it |
| 52 | + <resourceType> <resourceId> doesn't exist. |
| 53 | + fhir_resources.js getResource <datasetId> <fhirStoreId> Gets a FHIR resource. |
| 54 | + <resourceType> <resourceId> |
| 55 | + fhir_resources.js searchResourcesGet <datasetId> Searches resources in the given FHIR store using the |
| 56 | + <fhirStoreId> <resourceType> searchResources GET method. |
| 57 | + fhir_resources.js searchResourcesPost <datasetId> Searches resources in the given FHIR store using the |
| 58 | + <fhirStoreId> <resourceType> _search POST method. |
| 59 | + fhir_resources.js getPatientEverything <datasetId> Gets all the resources in the patient compartment. |
| 60 | + <fhirStoreId> <resourceId> |
| 61 | + |
| 62 | + Options: |
| 63 | + --version Show version number [boolean] |
| 64 | + --cloudRegion, -c [string] [default: "us-central1"] |
| 65 | + --projectId, -p The Project ID to use. Defaults to the value of the GCLOUD_PROJECT or GOOGLE_CLOUD_PROJECT |
| 66 | + environment variables. [string] |
| 67 | + --serviceAccount, -s The path to your service credentials JSON. |
| 68 | + [string] |
| 69 | + --help Show help [boolean] |
| 70 | + |
| 71 | +For more information, see https://cloud.google.com/healthcare/docs |
0 commit comments