<commit_before># GCP VM Setup for medical_claims_tools

This documentation details how to setup a standard GCP Debian VM to build and
run `bcda_fetch` from source. It also details how to configure the VM service
account to have the ability to upload to FHIR store.

1.  Create a
    [new linux virtual machine](https://cloud.google.com/compute/docs/instances/create-start-instance).
    To ensure `bcda_fetch` running on this VM has permission to upload to FHIR
    store:
    *   While creating the virtual machine, you will need to ensure that the
        default service account on the VM has access to write to the FHIR store.
        This setting can be found under "Identity and API access" when creating
        a VM and you can either set access per-API for FHIR store or set "Allow
        full access to all Cloud APIs." The "Allow default access" setting will
        not work, as it sets read-only access.
    *   After creating the virtual machine, ensure the VM service account has
        "Healthcare FHIR Resource Editor" permission on the relevant datastore.<commit_msg>Add more documentation around verifying/adding service account permissions.<commit_after># GCP VM Setup for medical_claims_tools

This documentation details how to setup a standard GCP Debian VM to build and
run `bcda_fetch` from source. It also details how to configure the VM service
account to have the ability to upload to FHIR store.

1.  Create a
    [new linux virtual machine](https://cloud.google.com/compute/docs/instances/create-start-instance).
    To ensure `bcda_fetch` running on this VM has permission to upload to FHIR
    store:
    *   While creating the virtual machine, you will need to ensure that the
        default service account on the VM has access to write to the FHIR store.
        This setting can be found under "Identity and API access" when creating
        a VM and you can either set access per-API for FHIR store or set "Allow
        full access to all Cloud APIs." The "Allow default access" setting will
        not work, as it sets read-only access.
    *   After creating the virtual machine, ensure the VM service account has
        "Healthcare FHIR Resource Editor" permission on the relevant datastore.
        *   Your default service account should be of the form: `PROJECT_NUMBER-compute@developer.<EMAIL>`.
        *   To verify that that service account has the "Healthcare FHIR Resource Editor" permission, navigate to `Google Cloud > Healthcare > Browser` and select the dataset of interest/ create one if none exists. Select the datastore of interest/ create one if none exists. The on the `PERMISSIONS` section (on the right hand side) expand the "Healthcare FHIR Resource Editor" tab and if you see your default service account then your permissions are setup properly.
        *   If you do not see your service account, you can add it by clicking on `ADD PRINCIPAL`, adding your service account into the `New principals` section and selecting "Healthcare FHIR Resource Editor" in the `Select a role` section and clicking `SAVE`.
{'fraction_non_alphanumeric': 0.04521795705920625, 'fraction_numerical': 0.0006506180871828237, 'mean_word_length': 3.5220588235294117, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1263705', 'n_tokens_mistral': 760, 'n_tokens_neox': 732, 'n_words': 440}