Skip to content
Draft
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
8 changes: 4 additions & 4 deletions ehr/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ehr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@labkey/api": "1.44.0",
"@labkey/components": "6.72.1",
"@labkey/ehr": "0.0.4"
"@labkey/ehr": "0.0.4-fb-ehr-hist-id-search.1"
},
"devDependencies": {
"@labkey/build": "8.7.0",
Expand Down
9 changes: 9 additions & 0 deletions ehr/resources/queries/study/aliasIdMatches.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

SELECT
a.Id as resolvedId,
a.alias as inputId,
'alias' as resolvedBy,
a.category as aliasType,
LOWER(a.alias) as lowerAliasForMatching
FROM study.alias a
INNER JOIN study.demographics d ON a.Id = d.Id
8 changes: 8 additions & 0 deletions ehr/resources/queries/study/directIdMatches.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

SELECT
Id as resolvedId,
Id as inputId,
'direct' as resolvedBy,
NULL as aliasType,
LOWER(Id) as lowerIdForMatching
FROM study.demographics
104 changes: 52 additions & 52 deletions ehr/resources/reports/reports.tsv

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion labkey-ui-ehr/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules
/dist
/dist
/coverage
24 changes: 22 additions & 2 deletions labkey-ui-ehr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,31 @@ To install using npm
```
npm install @labkey/ehr
```
You can then import `@labkey/ehr` in your application as follows:

## Usage

### ParticipantHistory Module

The `participanthistory` export provides the `ParticipantReports` component for displaying animal history data with search, filtering, and reporting capabilities.

```js
import { TestComponent } from '@labkey/ehr';
import { ParticipantReports } from '@labkey/ehr/participanthistory';

export const AnimalHistoryPage = () => {
return (
<div>
<ParticipantReports />
</div>
);
};
```

**Features:**
- Multi-mode filtering (ID Search, All Animals, Alive at Center, URL Params)
- ID and alias resolution
- Tabbed report interface with category grouping
- URL-based state persistence for shareable links

## Development

### Getting Started
Expand Down
3 changes: 3 additions & 0 deletions labkey-ui-ehr/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@ module.exports = {
transformIgnorePatterns: [
'node_modules/(?!(lib0|y-protocols))'
],
moduleNameMapper: {
'\\.(css|scss|sass)$': '<rootDir>/src/test/styleMock.js'
},
};
4 changes: 2 additions & 2 deletions labkey-ui-ehr/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion labkey-ui-ehr/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@labkey/ehr",
"version": "0.0.4",
"version": "0.0.4-fb-ehr-hist-id-search.1",
"description": "Components, models, actions, and utility functions for LabKey EHR applications and pages",
"sideEffects": false,
"files": [
Expand Down Expand Up @@ -31,6 +31,7 @@
"prepublishOnly": "npm install --legacy-peer-deps && cross-env WEBPACK_STATS=errors-only npm run build",
"test": "cross-env NODE_ENV=test jest --maxWorkers=6 --silent",
"test-ci": "cross-env NODE_ENV=test jest --ci --silent",
"test-coverage": "cross-env NODE_ENV=test jest --maxWorkers=6 --coverage",
"lint": "npx eslint",
"lint-fix": "npx eslint --fix",
"lint-precommit": "node lint.diff.mjs",
Expand Down
Loading