-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add documentation and getSchema function #1
base: main
Are you sure you want to change the base?
Conversation
sh1l0n
commented
Oct 30, 2024
•
edited
Loading
edited
- Setup FVM
- Added documentation to README
- Added getSchema** function
…is because we configured it wrong in upper layers
.fvmrc
Outdated
@@ -0,0 +1,3 @@ | |||
{ |
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.
since this is a package, we can remove this file - the package will never be run from an IDE or independently
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.
.vscode/launch.json
Outdated
@@ -0,0 +1,13 @@ | |||
{ |
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.
since this is a package, we can remove this file - the package will never be run from an IDE or independently
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.
.vscode/settings.json
Outdated
@@ -0,0 +1,3 @@ | |||
{ |
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.
since this is a package, we can remove this file - the package will never be run from an IDE or independently
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.
README.md
Outdated
|
||
This package helps developers to retrieve and manipulate FHIR data with REST client. | ||
|
||
This package does not manage authentication into a fhir server, for this feature exists [Azure Identity](https://pub.dev/packages/azure_identity) |
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.
would remove this sentence - Azure Identity is a valid system to use, but could also use no authentication, OAuth, etc
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.
README.md
Outdated
## Example | ||
|
||
``` | ||
final fhirRestclient = FhirRestClient( |
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.
to uplevel the package with more pubspec point, would be great to have this as example/example.dart (please look up the exact location, I don't remember). But putting an example file into the expected place helps improve the pubspec score
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.
lib/src/fhir_rest_client.dart
Outdated
@@ -9,6 +9,32 @@ class FhirRestClient { | |||
|
|||
FhirRestClient({required this.dio, required this.baseUrl}); | |||
|
|||
Future<List<String>> getSchema() async { |
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.
I would renamed this function to Future<Map<String,dynamic>> getCapabilityStatement() and have the schema extraction in the caller, then it is something that can be re-used across applications.
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.
lib/src/fhir_rest_client.dart
Outdated
final data = response.data as Map<String, dynamic>; | ||
final resources = data['rest'][0]['resource'] as List<dynamic>; | ||
|
||
final schema = resources |
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.
line 26-33 should be upstream in the caller
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.