Skip to content
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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Add documentation and getSchema function #1

wants to merge 12 commits into from

Conversation

sh1l0n
Copy link

@sh1l0n sh1l0n commented Oct 30, 2024

  • Setup FVM
  • Added documentation to README
  • Added getSchema** function

@sh1l0n sh1l0n added the enhancement New feature or request label Oct 30, 2024
@sh1l0n sh1l0n self-assigned this Oct 30, 2024
@sh1l0n sh1l0n changed the title Add documenation and getSchema function Add documentation and getSchema function Oct 30, 2024
@sh1l0n sh1l0n marked this pull request as ready for review October 30, 2024 19:25
@sh1l0n sh1l0n requested a review from tigloo October 30, 2024 19:25
.fvmrc Outdated
@@ -0,0 +1,3 @@
{
Copy link
Contributor

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,13 @@
{
Copy link
Contributor

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,3 @@
{
Copy link
Contributor

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

Copy link
Author

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)
Copy link
Contributor

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

Copy link
Author

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(
Copy link
Contributor

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -9,6 +9,32 @@ class FhirRestClient {

FhirRestClient({required this.dio, required this.baseUrl});

Future<List<String>> getSchema() async {
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final data = response.data as Map<String, dynamic>;
final resources = data['rest'][0]['resource'] as List<dynamic>;

final schema = resources
Copy link
Contributor

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sh1l0n sh1l0n requested a review from tigloo November 6, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants