diff --git a/importer/config.py b/importer/config.py index e69de29b..93b64111 100644 --- a/importer/config.py +++ b/importer/config.py @@ -0,0 +1,7 @@ +client_id = 'fhir-core-client' +client_secret = '1528b638-9344-4409-9cbf-10680b4ca5f5' +username = 'demo' +password = 'Amani123' +access_token_url = 'https://keycloak-stage.smartregister.org/auth/realms/FHIR_Android/protocol/openid-connect/token' +fhir_base_url = 'https://fhir.labs.smartregister.org/fhir' +keycloak_url = 'https://keycloak-stage.smartregister.org/auth/admin/realms/FHIR_Android' diff --git a/importer/main.py b/importer/main.py index 7c2903d2..374396e6 100644 --- a/importer/main.py +++ b/importer/main.py @@ -19,7 +19,6 @@ global_access_token = "" - # This function takes in a csv file # reads it and returns a list of strings/lines # It ignores the first line (assumes headers) @@ -968,8 +967,8 @@ def export_resources_to_csv(resource_type, parameter, value, limit): logging.info("No Resources Found") else: logging.error(f"Failed to retrieve resource. Status code: {response[1]} response: {response[0]}") - - + + class ResponseFilter(logging.Filter): def __init__(self, param=None): self.param = param @@ -1024,6 +1023,7 @@ def main( csv_file, export_resources, parameter, value, limit, access_token, resource_type, assign, setup, group, roles_max, cascade_delete, + only_response, log_level ): if log_level == "DEBUG": diff --git a/importer/test_main.py b/importer/test_main.py index 87e3857d..4ed8bdd0 100644 --- a/importer/test_main.py +++ b/importer/test_main.py @@ -492,4 +492,4 @@ def test_export_resource_to_csv( if __name__ == "__main__": - unittest.main() + unittest.main() \ No newline at end of file