Skip to content

Commit

Permalink
from 07027da75c303e799a3e0893ae6e5874b8774021
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-prins committed Dec 2, 2024
1 parent a4c784f commit 029d2fd
Show file tree
Hide file tree
Showing 15 changed files with 97 additions and 8 deletions.
6 changes: 3 additions & 3 deletions content/docs/developer/front_end_plugins.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = "Front-End Plugins"
description = "Open mSupply Integrations with DHIS."
description = "Extending the system with Open mSupply front-end plugins"
date = 2024-06-27T18:20:00+00:00
updated = 2024-06-27T18:20:00+00:00
draft = false
Expand All @@ -15,13 +15,13 @@ toc = true
We intend to build a separate developer documentation web site, but we wanted to make this information findable until we do that, so it lives here:

## Why Plugins?
Plugins allow you to add functionality to Open mSupply without having to modify the main code base.

Plugins allow you to add functionality to Open mSupply without having to modify the main code base.

## Documentation

Our Github repository has a full explanation of how to make front-end plugins [here](https://github.com/msupply-foundation/open-mfoundsupply/blob/develop/client/packages/plugins/README.md)

## Examples

Example plugins can be found in the examples folder [here](https://github.com/msupply-foundation/open-msupply-plugins)
Example plugins can be found in the examples folder [here](https://github.com/msupply-foundation/open-msupply-plugins)
72 changes: 72 additions & 0 deletions content/docs/developer/graphql_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
+++
title = "GraphQL API"
description = "Integrating with Open mSupply using the GraphQL API"
date = 2024-06-27T18:20:00+00:00
updated = 2024-06-27T18:20:00+00:00
draft = false
weight = 7
sort_by = "weight"
template = "docs/page.html"

[extra]
toc = true
+++

<style>
img.d { display: none }
body.dark img.l { display: none }
body.dark img.d { display: block }
</style>

## GraphQL

Internally we are making use of [GraphQL](https://graphql.org/) as the API layer. This provides for great flexibility and allows a developer to craft specific queries without requiring development of the core product.

For details about GraphQL itself, see the link above.

## Documentation

Our API is internally documented. You can browse to your local server instance with the URL `/graphql` to view and interact with the API. Alternatively, the [demo server](https://demo-open.msupply.org/graphql) is available to explore if you do not have a local instance.

To open the documentation panel, click the 'docs' button:

<p>
<img alt="Docs button" src="/docs/developer/images/api_docs_button_dark.png" class="d" />
<img alt="Docs button"src="/docs/developer/images/api_docs_button.png" class="l" />
</p>

This will open the panel, allowing you to explore further the available endpoints and structures:

<p>
<img alt="Docs" src="/docs/developer/images/api_docs_dark.png" class="d" />
<img alt="Docs" src="/docs/developer/images/api_docs.png" class="l" />
</p>

Using the local instance will use a bundled version of the GraphiQL playground. You can use alternative tools, such as the [online graphiql explorer](https://graphiql-online.com/) by entering in the server URL.

## Getting started

The API will require you to be logged in. This process has been simplified for you, in the test environment. You can click the login button:

<p>
<img alt="Login button" src="/docs/developer/images/api_login_button_dark.png" class="d" />
<img alt="Login button" src="/docs/developer/images/api_login_button.png" class="l" />
</p>

to show the login form:

<p>
<img alt="Login form" src="/docs/developer/images/api_login_form_dark.png" class="d" />
<img alt="Login form" src="/docs/developer/images/api_login_form.png" class="l" />
</p>

Once you've entered details and logged in, you are able to use other API methods - limited by the permissions of the user which you've logged in as.

To help you, queries can be created using the _explorer_ function. Click the explorer button get started:

<p>
<img alt="Explorer button" src="/docs/developer/images/api_explorer_button_dark.png" class="d" />
<img alt="Explorer button" src="/docs/developer/images/api_explorer_button.png" class="l" />
</p>

From here, you can add queries and mutations and enter values to create and execute on the server. Try it out and start exploring!
10 changes: 10 additions & 0 deletions content/docs/developer/images/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
+++
title = "Developer"
description = "Open mSupply Developer Documentation"
date = 2025-05-01T18:00:00+00:00
updated = 2021-05-01T18:00:00+00:00
template = "docs/section.html"
sort_by = "weight"
weight = 6
draft = false
+++
Binary file added content/docs/developer/images/api_docs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/docs/developer/images/api_docs_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/docs/developer/images/api_docs_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/docs/developer/images/api_login_form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions content/docs/programs/program_indicators.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ toc = true
top = false
+++

Program Indicators are essentially sets of configurable survey questions that can be answered as part of a program requisition. They are recorded against the period that the program requisition is created for and used in reporting.
The term 'Program Indicators' refers to a set of configurable survey questions which can be answered as part of a program requisition. They are recorded against the period of the program requisition and used for reporting purposes.

## Enabling Program Indicators

Program Indicators are configured on the mSupply Primary Server, following the documenation [here](https://docs.msupply.org.nz/items:programs#adding_indicators_to_a_program).
Program Indicators are configured on the mSupply central server, following the documentation [here](https://docs.msupply.org.nz/items:programs#adding_indicators_to_a_program).

## Manual Customer Requisitions

Manual Customer Requisitions can be made to other stores as a fallback if device that store is meant to be active on is no longer operational.
Manual Customer Requisitions can be made to other stores as a fallback if the Open mSupply store is not able to create a requisition itself (e.g. if
the tablet or laptop used by that store is no longer operational).

The process of entering program indicators is as follows:

1. Create a manual requisition to another store as described [here](/docs/distribution/requisitions/#manual-requisition)
2. Click on the Indicators tab
Expand All @@ -37,4 +40,4 @@ HIV is only available on Programs where "HIV" has been enabled.

![Indicators edit](/docs/programs/images/indicators_edit.png)

From here you can enter in the data entry configured for each indicator configured for this program.
From here you can enter in the data, as configured for each indicator of this program.
6 changes: 5 additions & 1 deletion content/docs/programs/requisitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,13 @@ items manually to the Requisition.

#### Extra Requisition Fields

In manual requisitions it is possible to collect many additional columns of data for reporting and forcasting purposes. To enable these columns you need to configure store permissions to enable these extra columns as documenting in mSupply Desktop documentation [here](https://docs.msupply.org.nz/other_stuff:virtual_stores#preferences_tab). For quick reference this is the preference your logged in store requires:
In manual requisitions it is possible to collect many additional columns of data for reporting and forecasting purposes. To enable these columns you need to configure store preferences to enable these extra columns as described in the [mSupply Desktop documentation](https://docs.msupply.org.nz/other_stuff:virtual_stores#preferences_tab).

For quick reference this is the preference your logged-in store requires:
![Show extra fields on requisitions preference](/docs/programs/images/show_extra_fields_on_requisitions.png)

This is how the extra columns look within a requisition:

![Program Requisition Detail
View](/docs/programs/images/program_requisition_detail_view.gif)

Expand Down

0 comments on commit 029d2fd

Please sign in to comment.