Skip to content

Commit

Permalink
Updated source code...
Browse files Browse the repository at this point in the history
  • Loading branch information
svalluripalli committed Jan 15, 2023
1 parent 70a4c11 commit 064091d
Show file tree
Hide file tree
Showing 292 changed files with 420 additions and 89,776 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
.idea/*
.nyc_output
build
node_modules
test
source/**.js
coverage
*.log
yarn.lock
e-care-common-data-services-1.0.0.tgz

source/.DS_Store
71 changes: 64 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@

Common data service for mcc-provider and mcc-care-planner

## Npm installation

```sh
npm i e-care-common-data-services
```

## How to work with this locally
Install dependencies
```sh
npm ci
npm i
```

Build typescript
Expand All @@ -28,3 +22,66 @@ Run this on mcc-provider or mcc-care-planner app directory
```sh
npm link e-care-common-data-services
```

## How to work with this in the future
- Remove `build` from .gitignore file
- Host this repository in a git provider e.g github
- Release a tag, e.g `v1.0.0`
- in mcc-provider or mcc-care-planner app, run
```
npm i [email protected]:chronic-care/e-care-common-data-services.git#v1.0.0
```

## Code structure explanation

### Root

#### tsconfig.json
This is the typescript rules and compile options -> required to run the app

#### .prettierrc
This is used to do auto code fix on save during deployment, lets say you forget semicolon, or you forget indentation, prettier will help you add those when you save the file it will run automatically

#### .eslintrc
This is used to enforce strict js/ts convention when writing code to avoid any unforeseen bugs -> required to run the app

#### .editorconfig
This is used to standardised IDE (VSCode/IntelliJ) theme and configuration when we load this project to any IDE

### source

#### constants
This is where we put our global constant variables that is reused in modules

#### lib
This is where we store our modules, inside will be having each module, e.g `observation` and it will have
- observation.ts
This is where we put our logic
- observation.util.ts
This is where we put helper function specific to observation
- observation.spec.ts
This is where we put testing specific to observation

#### mapping
This is where we put resource mapping from fhir localised to our module, e.g on `vital-mapping` when we get `ckd`, we will try to query data for
- Cognitive Status (MoCA)
- Fatigue (PROMIS T-score)
- Functional Status (PROMIS raw score)
- Pain Interference (PROMIS T-score)
- Pain Severity (Wong-Baker FACES)
- PHQ9

#### query
This is where we handle logic on how we query from local json files from /resources folder

### resources
This is where we store all of the manual resource data intended for mapping

#### types
This is where we store typing for common interface

#### utils
This is where we create a global method that is reused in all modules

#### index.ts
This is the central entrypoint when building the app
6 changes: 0 additions & 6 deletions build/main/constants/mode.d.ts

This file was deleted.

10 changes: 0 additions & 10 deletions build/main/constants/mode.js

This file was deleted.

3 changes: 0 additions & 3 deletions build/main/index.d.ts

This file was deleted.

20 changes: 0 additions & 20 deletions build/main/index.js

This file was deleted.

2 changes: 0 additions & 2 deletions build/main/lib/authorize.d.ts

This file was deleted.

140 changes: 0 additions & 140 deletions build/main/lib/authorize.js

This file was deleted.

1 change: 0 additions & 1 deletion build/main/lib/authorize.spec.js

This file was deleted.

2 changes: 0 additions & 2 deletions build/main/lib/authorize/authorize.d.ts

This file was deleted.

25 changes: 0 additions & 25 deletions build/main/lib/authorize/authorize.js

This file was deleted.

Empty file.
2 changes: 0 additions & 2 deletions build/main/lib/authorize/authorize.spec.js

This file was deleted.

Empty file.
2 changes: 0 additions & 2 deletions build/main/lib/authorize/authorize.util.js

This file was deleted.

1 change: 0 additions & 1 deletion build/main/lib/authorize/index.d.ts

This file was deleted.

18 changes: 0 additions & 18 deletions build/main/lib/authorize/index.js

This file was deleted.

7 changes: 0 additions & 7 deletions build/main/lib/observation.d.ts

This file was deleted.

Loading

0 comments on commit 064091d

Please sign in to comment.