-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new import tool #3182
Merged
Merged
new import tool #3182
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
77776c7
new import tool
v-mserdar c46774d
revised app.config
v-mserdar ab6f61a
Revised based on code review
v-mserdar b952211
revisions to handle oss; code cleanup
v-mserdar 495031b
updated readme to assist oss usage; added config setting for delay wh…
v-mserdar a91df5c
revisions from code review
v-mserdar a4bc7ea
final code review revisions
v-mserdar 22a7dbc
changes from code review
v-mserdar d346461
Adding one additional comment for clarify
v-mserdar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<!-- | ||
This code allows to import resources from a storage container to a FHIR service. | ||
Input data must be provided in ndjson format in one container in Azure blobs storage. | ||
--> | ||
<appSettings> | ||
<!-- Azure blob storage parameters --> | ||
<add key="ConnectionString" value="{Add your BlobServiceClient connection string here}" /> | ||
<add key="ContainerName" value="{Add your container}" /> | ||
<!-- | ||
the type of files it'll search for in the container | ||
do not add a file extension as ndjson is assumed and added to the ResourceType automatically | ||
--> | ||
<add key="ResourceType" value="Observation" /> | ||
<!-- | ||
the number we want to import at a time | ||
of course this can be a much larger value than 20 so adjust as needed | ||
--> | ||
<add key="NumberOfBlobsForImport" value="20" /> | ||
<add key="FhirEndpoint" value="{add your FHIR endpoint}" /> | ||
|
||
<!-- the following are for getting a token --> | ||
<add key="TokenEndpoint" value="{add login url to your oauth2/token endpoint}" /> | ||
<add key="grant_type" value="Client_Credentials" /> | ||
<add key="client_id" value="{add your client id}" /> | ||
<add key="client_secret" value="{add your client secret}" /> | ||
<add key="resource" value="{add your FHIR endpoint}" /> | ||
</appSettings> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// ------------------------------------------------------------------------------------------------- | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. | ||
// ------------------------------------------------------------------------------------------------- | ||
|
||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Microsoft.Health.Fhir.ImporterV2 | ||
{ | ||
#pragma warning disable CA1812 // Avoid uninstantiated internal classes | ||
internal sealed class ImportResponse | ||
{ | ||
[JsonPropertyName("error")] | ||
public List<Json> Error { get; set; } = new(); | ||
|
||
[JsonPropertyName("output")] | ||
public List<Json> Output { get; set; } = new(); | ||
|
||
public sealed class Json | ||
{ | ||
[JsonPropertyName("type")] | ||
public string Type { get; set; } = string.Empty; | ||
|
||
[JsonPropertyName("count")] | ||
public int Count { get; set; } | ||
|
||
[JsonPropertyName("inputUrl")] | ||
public string InputUrl { get; set; } = string.Empty; | ||
} | ||
} | ||
#pragma warning disable CA1812 // Avoid uninstantiated internal classes | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it is not jus a connection string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It uses the connection string for getting the blob container and lines 25-28 in the app.config for getting the auth token needed for $import status. Please let me know if I'm misunderstanding your question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it work the same way for OSS FHIR?