Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Commit Compliance

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
commitlint:
runs-on: ubuntu-latest

steps:
- name: Checkout code with submodule
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
submodules: true
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm ci --legacy-peer-deps

- name: Run commitlint on PR
run: |
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix the npx invocation in the commit-msg hook.

The current npx --no -- commitlint --edit $1 may not behave as intended. Use the recommended Husky pattern with a shebang, source Husky, and invoke Commitlint without the invalid --no flag:

+#!/usr/bin/env sh
+. "$(dirname "$0")/_/husky.sh"
-npx --no -- commitlint --edit $1
+npx --no-install commitlint --edit "$1"
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
npx --no -- commitlint --edit $1
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install commitlint --edit "$1"

1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
134 changes: 73 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,78 @@
# AMRIT - Early Childhood Developemnt (ECD) Service

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
![Build Status](https://github.com/PSMRI/ECD-API/actions/workflows/sast-and-package.yml/badge.svg)

The Early Childhood Development (ECD) Initiative by the Ministry of Health and Family Welfare (MoHFW) aims to nurture the cognitive capital of the country by enabling young children to attain their fullest potential. The initiative focuses on the critical period of brain development, which includes the 270 days of pregnancy and the first two years of the child's life, also known as the first 1,000 days.

## Features of Early Childhood Developemnt (ECD)

- **Focus on the first 1,000 days:** Recognize the critical period of brain development and emphasize the importance of interventions during this period to promote physical, cognitive, social, and emotional development.

- **Communicate with mothers and families:** Acknowledge the vital role of mothers in the holistic development of their children. Develop simple, effective, and personalized messages to communicate with mothers and other family members, highlighting their significant impact on the child's overall development.

- **Reinforce messages through multiple channels:** Establish a unified approach by involving other health providers like ASHA, ANM, and medical officers to reiterate the same messages to caregivers. Consistent information is essential to ensure that parents receive comprehensive guidance.

- **Provide credible advice:** Train resources in the field of early childhood development to deliver information and counseling through the ECD Call Centre. The trained personnel will provide credible advice, enhancing the caregivers' trust in the information provided.

- **Offer personalized advice:** Utilize the interactive platform of the ECD Call Centre to provide personalized advice to parents based on their specific needs and their child's requirements. Building on existing positive practices, suggest additional actions that caregivers can take to promote their child's development.

- **Enhance caregivers' knowledge:** Emphasize the importance of caregivers' knowledge about early childhood development. Provide them with information and resources to better understand their child's developmental needs and milestones.

- **Boost caregivers' confidence:** Empower caregivers to feel confident in their abilities to support their child's development. Encourage them to take simple but meaningful actions that contribute positively to their child's growth.

- **Collaborate with other initiatives:** Complement existing initiatives such as LaQshya, Homebased Care for Young Child, and the Comprehensive New Born Screening under RBSK. By working collaboratively, ensure a comprehensive and integrated approach to early childhood development.

- **Foster a nature-friendly environment:** Promote the importance of creating a stimulating, loving, and protective care environment for children. Encourage activities that connect children with nature and promote their overall well-being.

- **Continuously evaluate and improve:** Regularly assess the effectiveness of the ECD initiative and the ECD Call Centre. Seek feedback from parents and caregivers to identify areas for improvement and refine the messages and services provided.

## Building From Source

This microservice is built using Java and the Spring Boot framework, with MySQL as the underlying database. Before building the ECD module, ensure you have the following prerequisites:

- JDK 17
- Maven
- Redis
- Spring Boot V2
- MySQL

To build the ECD module from source, follow these steps:

1. Clone the repository to your local machine.
2. Install the required dependencies and build the module using the following command:
- Execute the following command:
```
mvn clean install
```
3. You can copy `ecd_example.properties` to `ecd_local.properties` and edit the file accordingly. The file is under `src/main/environment` folder.
4. Run the spring server with local configuration `mvn spring-boot:run -DENV_VAR=local`

- Open your browser and navigate to http://localhost:8080/swagger-ui.html#!/
# AMRIT - ECD Service
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ![branch parameter](https://github.com/PSMRI/ECD-API/actions/workflows/sast.yml/badge.svg)
ECD (Fast Healthcare Interoperability Resources) standard defines how healthcare information can be exchanged between different computer systems regardless of how it is stored in those systems. ECD provides a means for representing and sharing information among clinicians and organizations in a standard way regardless of the ways local EHRs represent or store the data. ECD combines the best features of previous standards into a common specification, while being flexible enough to meet needs of a wide variety of use cases within the healthcare ecosystem. Resources are the basis for all exchangeable ECD content. Each resource includes a standard definition and human-readable descriptions about how to use the resource. Each resource also has a set of common and resource-specific metadata (attributes) to allow its use clearly and unambiguously. ECD Resources can store and/or exchange many types of clinical and administrative data.
In AMRIT, currently we have developed 9 resources out of 27 resources. Contributors are working on developing rest of the 18 resources which will make AMRIT to be compliant with ABDM guidelines. ECD R4 is the latest version which we are migrating from HL7 V2.0 current version of AMRIT application.
### Key APIs in ECD service
* Care Context Services
* e-Aushadhi
* ABHA Card Services
* OP Consultation Record Sharing
* Diagnostic Report Record Sharing
* Prescription Record Sharing
* Higher Health Facility
## Environment and Setup
For setting up the development environment, please refer to the [Developer Guide](https://piramal-swasthya.gitbook.io/amrit/developer-guide/development-environment-setup) .
## API Guide
Detailed information on API endpoints can be found in the [API Guide](https://piramal-swasthya.gitbook.io/amrit/architecture/api-guide).

## Usage
All features have been exposed as REST endpoints. Refer to the SWAGGER API specification for details.

## Setting Up Commit Hooks

This project uses Git hooks to enforce consistent code quality and commit message standards. Even though this is a Java project, the hooks are powered by Node.js. Follow these steps to set up the hooks locally:

### Prerequisites
- Node.js (v14 or later)
- npm (comes with Node.js)

### Setup Steps

1. **Install Node.js and npm**
- Download and install from [nodejs.org](https://nodejs.org/)
- Verify installation with:
```
node --version
npm --version
```
2. **Install dependencies**
- From the project root directory, run:
```
npm ci
```
- This will install all required dependencies including Husky and commitlint
3. **Verify hooks installation**
- The hooks should be automatically installed by Husky
- You can verify by checking if the `.husky` directory contains executable hooks
### Commit Message Convention
This project follows a specific commit message format:
- Format: `type(scope): subject`
- Example: `feat(login): add remember me functionality`
Types include:
- `feat`: A new feature
- `fix`: A bug fix
- `docs`: Documentation changes
- `style`: Code style changes (formatting, etc.)
- `refactor`: Code changes that neither fix bugs nor add features
- `perf`: Performance improvements
- `test`: Adding or fixing tests
- `build`: Changes to build process or tools
- `ci`: Changes to CI configuration
- `chore`: Other changes (e.g., maintenance tasks, dependencies)
Your commit messages will be automatically validated when you commit, ensuring project consistency.
## Filing Issues

If you encounter any issues, bugs, or have feature requests, please file them in the [main AMRIT repository](https://github.com/PSMRI/AMRIT/issues). Centralizing all feedback helps us streamline improvements and address concerns efficiently.

If you encounter any issues, bugs, or have feature requests, please file them in the [main AMRIT repository](https://github.com/PSMRI/AMRIT/issues). Centralizing all feedback helps us streamline improvements and address concerns efficiently.
## Join Our Community

We’d love to have you join our community discussions and get real-time support!
Join our [Discord server](https://discord.gg/FVQWsf5ENS) to connect with contributors, ask questions, and stay updated.

## Usage

All the features of the ECD module have been exposed as REST endpoints. For detailed information on how to use the service, refer to the SWAGGER API specification.





With the ECD module, you can efficiently manage all aspects of your telemedicine application, ensuring seamless remote healthcare services for patients and collaboration among healthcare professionals.

Expand Down



We’d love to have you join our community discussions and get real-time support!
Join our [Discord server](https://discord.gg/FVQWsf5ENS) to connect with contributors, ask questions, and stay updated
43 changes: 43 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 100],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
'wip'
],
],
'scope-enum': [
2,
'always',
['api', 'core', 'docs', 'config', 'git-hooks'] // Added git-hooks scope
]
},
};
Loading