Skip to content

Commit

Permalink
Merge branch 'master' into purposeDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
bmamlin committed Nov 27, 2019
2 parents 230c058 + 58b166c commit fbca1c6
Show file tree
Hide file tree
Showing 5 changed files with 411 additions and 0 deletions.
103 changes: 103 additions & 0 deletions Concepts/concept_map_type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Concept Map Type

## Overview

* Concept Mappings are added to facilitate managing concept dictionaries and point to other concepts which have the same meaning.
Mappings are useful when you need to receive or send information to external systems, letting you define how your system's
concepts relate to external concepts such as standardized medical vocabularies (e.g., ICD, LOINC, SNOMED).

* For example, add a mapping to a concept in the MCL dictionary. You can save the concept now and create some answers.

* Repeat the steps and create the concepts PLANNING PREGNANCY and CURRENTLY PREGNANT of Class Finding and Datatype Boolean.
The last possible answer will be OTHER of Class Misc and Datatype N/A. After creating three new concepts, you can edit
ANTENATAL VISIT REASON and add them as answers.

## Available operations.

1. [List concept mapping types](#list-concept-map-types)
2. [Create a concept mapping type](#create-a-concept-map-type)
3. [Update a concept mapping typee](#update-a-concept-map-type)
4. [Delete a concept mapping type](#delete-a-concept-map-type)


### List concept map types

* #### List all non-retired concept map types.

Quickly filter concept map types with a given search query.Returns a `404 Not Found` status if concept map type not exists.
If user not logged in to perform this action,a `401 Unauthorized` status returned.

##### Query Parameters

Parameter | Type | Description
--- | --- | ---
*q* | `String` | Full or partial name search term. Search is case insensitive.

```console
GET /conceptmaptype?q="same"
```

* #### List concept map type by UUID.

Retrieve a concept map type by its UUID. Returns a `404 Not Found` status if concept map type not exists. If user not logged
in to perform this action, a `401 Unauthorized` status returned.

```console
GET /conceptmaptype/:target_concept_map_type_uuid
```

### Create a concept map type

* To Create a concept map type you need to specify below attributes in the request body. If you are not logged in to perform this action,
a `401 Unauthorized` status returned.

#### Attributes

Parameter | Type | Description
--- | --- | ---
*name* | `String` | Name of the concept mapping type (Required)
*description* | `String` | A brief description of the concept mapping type
*isHidden* | `Boolean` | State to record concept map is hidden or not
```console
POST /conceptmaptype
{
"name": "SAME-AS",
"isHidden": false
}
```
### Update a concept map type

* Update a target concept map type with given UUID, this method only modifies properties in the request. Returns a `404 Not Found`
status if concept map not exists. If user not logged in to perform this action, a `401 Unauthorized` status returned.

#### Attributes

Parameter | Type | Description
--- | --- | ---
*name* | `String` | Name of the concept mapping type (Required)
*description* | `String` | A brief description of the concept mapping type
*isHidden* | `Boolean` | State to record concept map is hidden or not
```console
POST /conceptmaptype
{
"name": "SAME-AS",
"isHidden": true
}
```

### Delete a concept map type

* Delete or Retire a target concept map type by its UUID. Returns a `404 Not Found` status if concept map not exists.If user not logged
in to perform this action, a `401 Unauthorized` status returned.

#### Query Parameters

Parameter | Type | Description
--- | --- | ---
*purge* | `Boolean` | The resource will be voided/retired unless purge = ‘true’

```console
DELETE /conceptmaptype/:target_concept_map_type_uuid?purge=true
```
103 changes: 103 additions & 0 deletions Concepts/concept_reference_term_type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Concept Reference Term

## Overview

* Concept reference terms represent terms within external vocabularies (typically standardized
terminologies like SNOMED, ICD, LOINC, etc.). OpenMRS concept can be mapped to these
reference terms through [concept mappings](concept_mapping.md).

## Available operations.
1. [List concept reference terms](#list-concept-reference-terms)
2. [Create a concept reference term](#create-a-concept-reference-term)
3. [Update a concept reference term](#update-a-concept-reference-term)
4. [Delete a concept reference term](#delete-a-concept-reference-term)

### List concept reference terms

* #### List all concepts reference terms.

Quickly filter concept reference term with given query parameters.Returns a `404 Not Found` status if concept
reference term type not exists. If user not logged in to perform this action,a `401 Unauthorized` status returned.

##### Query Parameters

Parameter | Type | Description
--- | --- | ---
*codeOrName* | `String` | Represents a name from a standard medical code
*source* | `String` | A concept can have any number of mappings to any number of other vocabularies. Other vocabularies are called "concept sources" in OpenMRS (ie. LOINC, SNOMED, ICD-9, ICD10, RxNORM, etc), but the concept source can also be a custom (ie. org.openmrs.module.mdrtb, PIH, AMPATH, MVP, etc.). Every concept can define a string for its mapping in any "concept source" defined in the database

```console
GET /conceptreferenceterm?
codeOrName=274663001
```

* #### Query concept reference term by UUID.

Retrieve an concept reference term by its UUID. Returns a `404 Not Found` status if concept reference term not
exists. If user not logged in to perform this action, a `401 Unauthorized` status returned.

```console
GET /conceptreferenceterm/:target_concept_reference_term_type_uuid
```

### Create a concept reference term

* To Create an concept reference term you need to specify below attributes in the request body.If you are not logged in to perform this action,
a `401 Unauthorized` status returned.

#### Attributes

Parameter | Type | Description
--- | --- | ---
*names* | `String` | Name for the concept reference term
*description* | `String` | A concept datatype prescribes the structured format by which you desire the data to be represented. In simple terms, the datatype defines the type of data that the concept is intended to collect
*code* | `String` | Represents a name from a standard medical code (required)
*conceptSource* | `target_concept_source_UUID` | A concept can have any number of mappings to any number of other vocabularies. Other vocabularies are called "concept sources" in OpenMRS (ie. LOINC, SNOMED, ICD-9, ICD10, RxNORM, etc), but the concept source can also be a custom (ie. org.openmrs.module.mdrtb, PIH, AMPATH, MVP, etc.). Every concept can define a string for its mapping in any "concept source" defined in the database (required)
*version* | `String` | A method to keep track of the number of updates applied to a specific concept reference term type

```console
POST /conceptreferenceterm
{
"code": "274663001",
"conceptSource": "1ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD",
"version": "1.0.0"
}
```
### Update a concept reference term

* Update a target concept reference term with given UUID, this method only modifies properties in the request. Returns a `404 Not Found`
status if concept reference term not exists. If user not logged in to perform this action, a `401 Unauthorized` status returned.

#### Attributes

Parameter | Type | Description
--- | --- | ---
*names* | `String` | Name for the concept reference term
*description* | `String` | A concept datatype prescribes the structured format by which you desire the data to be represented. In simple terms, the datatype defines the type of data that the concept is intended to collect
*code* | `String` | Represents a name from a standard medical code (required)
*conceptSource* | `target_concept_source_UUID` | A concept can have any number of mappings to any number of other vocabularies. Other vocabularies are called "concept sources" in OpenMRS (ie. LOINC, SNOMED, ICD-9, ICD10, RxNORM, etc), but the concept source can also be a custom (ie. org.openmrs.module.mdrtb, PIH, AMPATH, MVP, etc.). Every concept can define a string for its mapping in any "concept source" defined in the database (required)
*version* | `String` | A method to keep track of the number of updates applied to a specific concept reference term type

```console
POST /conceptreferenceterm/:target_concept_reference_term_type_uuid
{
"code": "274663001",
"conceptSource": "1ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD",
"version": "1.0.1"
}
```

### Delete a concept reference term

* Delete or retire a target concept reference term by its UUID. Returns a `404 Not Found` status if concept reference
term not exists.If user not logged in to perform this action, a `401 Unauthorized` status returned.

#### Query Parameters

Parameter | Type | Description
--- | --- | ---
*purge* | `Boolean` | The resource will be retired unless purge = ‘true’

```console
DELETE /conceptreferenceterm/:target_concept_reference_term_type_uuid?purge=true
```
90 changes: 90 additions & 0 deletions Concepts/concepts_class.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Concept Class

## Overview

* The concept's class provides a useful way to narrow down the scope of the information that the concept is intended to capture.
In this way, the class is helpful for data extraction. This classification details how a concept will be represented
(i.e. as a question or an answer) when the information is stored. OpenMRS contains several default classes to use when
defining concepts, but implementation sites may also create additional custom concept classes for use.

## Available operations.

1. [List concept classes](#list-concept-classes)
2. [Create a concept class](#create-a-concept-class)
3. [Update a concept class](#update-a-concept-class)
4. [Delete a concept class](#delete-a-concept-class)


### List concept classes

* #### List all non-retired concept classes.

List all concept classes with a given search query.Returns a `404 Not Found` status if concept classes not exists.
If user not logged in to perform this action,a `401 Unauthorized` status returned.

```console
GET /conceptclass"
```

* #### List concept class type by UUID.

Retrieve a concept class by its UUID. Returns a `404 Not Found` status if concept class type not exists. If user not logged
in to perform this action, a `401 Unauthorized` status returned.

```console
GET /conceptclass/:target_concept_class_uuid
```

### Create a concept class

* To Create a concept class you need to specify below attributes in the request body. If you are not logged in to perform this action,
a `401 Unauthorized` status returned.

#### Attributes

Parameter | Type | Description
--- | --- | ---
*name* | `String` | Name of the concept class (Required)
*description* | `String` | Description

```console
POST /conceptclass
{
"name": "Procedure",
"description": "Describes a clinical procedure"
}
```
### Update a concept class

* Update a target concept class with given UUID, this method only modifies properties in the request. Returns a `404 Not Found`
status if concept class not exists. If user not logged in to perform this action, a `401 Unauthorized` status returned.

#### Attributes

Parameter | Type | Description
--- | --- | ---
*name* | `String` | Name of the concept class (Required)
*description* | `String` | Description

```console
POST /conceptclass
{
"name": "Procedure",
"description": "Describes a clinical procedure"
}
```

### Delete a concept class

* Delete or Retire a target concept class by its UUID. Returns a `404 Not Found` status if concept class not exists.If user not logged
in to perform this action, a `401 Unauthorized` status returned.

#### Query Parameters

Parameter | Type | Description
--- | --- | ---
*purge* | `Boolean` | The resource will be voided/retired unless purge = ‘true’

```console
DELETE /conceptclass/:target_concept_class_uuid?purge=true
```
84 changes: 84 additions & 0 deletions source/includes/User/privileges.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Privilege

## Overview

A **Privilege** is an authorization to perform a particular action in the system. The list of available privileges are defined by the core system and by add-on modules (for example, **Delete Patients** and **Manage Encounter Types**), but you need to configure which roles have which privileges while you are configuring your system.

## Available operations.

1. [List privilege](#list-privileges)
2. [Create a privilege](#create-a-privilege)
3. [Update a privilege](#update-a-privilege)
4. [Delete a privilege](#delete-a-privilege)


### List privilege

* Fetch all privileges that match any specified parameters otherwise fetch all privileges. Returns a `200 OK` status with the privilege response. If not authenticated or authenticated user does not have sufficient privileges, a `401 Unauthorized`
status is returned.

```console
GET /privilege
```

* #### Get privilege by UUID

Retrieve a privilege by its UUID. Returns a `404 Not Found` status if the privilege not exists. If not authenticated or authenticated user does not have sufficient privileges, a `401 Unauthorized`
status is returned.

```console
GET /privilege/:target_privilege_uuid
```

### Create a privilege

* To create a privilege you need to specify below attributes in the request body. If not authenticated or authenticated user does not have sufficient privileges, a `401 Unauthorized` status is returned.

#### Attributes

Parameter | Type | Description
--- | --- | ---
*name* | `String` | Name of the privilege(Required)
*description* | `String` | Description of the privilege(Required)

```console
POST /privilege
{
"name": "Delete Patients",
"description": "A privilege or permission to delete patients"
}
```

### Update a privilege

* Update a privilege with given UUID, this method only modifies properties in the request. Returns a `404 Not Found`
status if the privilege deos not exists. If not authenticated or authenticated user does not have sufficient privileges, a `401 Unauthorized` status is returned. Attempting to update a privilege's name will fail with the error code `400 Bad Request`.

#### Attributes

Parameter | Type | Description
--- | --- | ---
*description* | `String` | Description of the privilege (Required)

```console
POST /privilege/:target_privilege_uuid
{
"description": "A user who can delete all the encounter types"
}
```

### Delete a privilege

* Delete a privilege by its UUID. Returns a `404 Not Found` status if the privilege not
exists. If not authenticated or authenticated user does not have sufficient privileges, a `401 Unauthorized`
status is returned.

#### Query Parameters

Parameter | Type | Description
--- | --- | ---
*purge* | `Boolean` | `true` to delete the privilege from the system; if `false`, the request will have no effect

```console
DELETE /privilege/:target_privilege_uuid?purge=true
```
Loading

0 comments on commit fbca1c6

Please sign in to comment.