Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeline based Manual Entry form #330

Merged
merged 52 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
8be16ba
update Nav css
AnalogJ Nov 26, 2023
6400f5e
When clicking attachment icon, we should open a modal allowing the us…
AnalogJ Nov 26, 2023
6a49ed0
added deprecation tags to components that should be removed once time…
AnalogJ Nov 26, 2023
ac1e63d
adding standalone wizard popup modals.
AnalogJ Nov 27, 2023
74a13ac
adding modals for new attachment & new organizations.
AnalogJ Nov 27, 2023
3b07b96
fixing modal zindex, so that stacked modals work correcly.
AnalogJ Nov 27, 2023
03515d6
adding help text for Lab results section.
AnalogJ Nov 27, 2023
cd0422b
adding reset logic to forms.
AnalogJ Nov 27, 2023
1d5939a
adding submission validation to wizard secondary modals.
AnalogJ Nov 27, 2023
62bb970
trying to fix organization, location and practitioner popups.
AnalogJ Nov 27, 2023
0629c01
enable debug mode
AnalogJ Nov 27, 2023
fba1d0e
passing existing encounter to Medical Record Wizard.
AnalogJ Nov 27, 2023
fd8ca58
moving all fhir resources into their own module (for clarity and easi…
AnalogJ Nov 27, 2023
ce69df5
adding encounter component.
AnalogJ Nov 27, 2023
72ad167
moved warning messages about Fasten Table View into the generic resou…
AnalogJ Nov 28, 2023
302a43a
move list/datatable resource components into their own module.
AnalogJ Nov 28, 2023
b872eb8
make the add wizards large
AnalogJ Nov 28, 2023
f199ffa
add organization moved button group to the top.
AnalogJ Nov 28, 2023
c95c462
provide a mechanism to bubble up selection from fhir-datatable.
AnalogJ Nov 28, 2023
1ed0ae2
renamed fhir-resource to fhir-card for consistency.
AnalogJ Nov 28, 2023
a09149d
renamed list-resource to fhir-datatable for consistency.
AnalogJ Nov 28, 2023
eb3daaf
making sure the fhir-card can be collapsed at init.
AnalogJ Nov 28, 2023
3310cb5
adding search icon and create icon in button group.
AnalogJ Nov 28, 2023
af1bd98
fix the color of datatable selected rows
AnalogJ Nov 28, 2023
ea082e2
make sure resource information is associated with datatable row.
AnalogJ Nov 29, 2023
7e4f41f
if the app redirects to the login screen, we should close any active …
AnalogJ Nov 29, 2023
277bbc2
replacing practitioner modal with find + create functionality.
AnalogJ Nov 29, 2023
69eeed9
providing a mechanism to display newly created organizations and prac…
AnalogJ Nov 29, 2023
601214e
make sure that practitioner drop down lists existing practitioners as…
AnalogJ Nov 29, 2023
dc900f7
make sure that the organization dropdown lists show existing organiza…
AnalogJ Nov 29, 2023
ffce6de
fix human name parsing in fhir-datatable (some providers dont include…
AnalogJ Nov 29, 2023
f763a9f
make sure we can use the wizard in situations where the encounter is …
AnalogJ Nov 30, 2023
3f68afc
correctly convert manually created encounter to display model.
AnalogJ Nov 30, 2023
4174081
fixing tests.
AnalogJ Nov 30, 2023
061adbe
fixing tests.
AnalogJ Nov 30, 2023
a1b6cff
fixing tests.
AnalogJ Nov 30, 2023
96b059d
working on tests.
AnalogJ Dec 1, 2023
a7a427b
adding tests.
AnalogJ Dec 1, 2023
3ab5093
adding stories for components.
AnalogJ Dec 1, 2023
4ebe875
make sure nlm typeahead makes network requests.
AnalogJ Dec 1, 2023
550e17e
make sure we set the encounter data when it's passed in during init.
AnalogJ Dec 1, 2023
dce0a32
provide a mechanism to disable selection of practitioners and organiz…
AnalogJ Dec 1, 2023
c92b543
fixing breakpoints for menu.
AnalogJ Dec 1, 2023
9a97a66
adding under construction message to lab results.
AnalogJ Dec 1, 2023
0830b58
fixed issue where clearing the typeahead would break model updates.
AnalogJ Dec 1, 2023
922a004
fix tests.
AnalogJ Dec 1, 2023
cfff2b2
make sure that a Fasten source credential is created when a new user …
AnalogJ Dec 1, 2023
0e0c7ab
make sure we can generate NDJSON like list of resources to create/add…
AnalogJ Dec 2, 2023
68b5f1d
provide a mechanism to link resources across sources - used by fasten…
AnalogJ Dec 2, 2023
df8fc04
better UpsertRawResourceAssociation method.
AnalogJ Dec 3, 2023
afe29f0
addign code folding to large gorm_common.go file.
AnalogJ Dec 4, 2023
a3c364e
fix tests
AnalogJ Dec 4, 2023
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
Prev Previous commit
Next Next commit
providing a mechanism to display newly created organizations and prac…
…itioners as fhir-cards.
  • Loading branch information
AnalogJ committed Nov 29, 2023
commit 69eeed9dc2a826a2e05e868770a840c1bbb65610
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"ngx-highlightjs": "^7.0.1",
"ngx-infinite-scroll": "^14.0.0",
"ngx-moment": "^6.0.2",
"parse-full-name": "^1.2.6",
"rxjs": "~6.5.4",
"tslib": "^2.0.0",
"uuid": "^9.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {GlossaryLookupComponent} from '../../../glossary-lookup/glossary-lookup.
@Component({
standalone: true,
imports: [NgbCollapseModule, CommonModule, BadgeComponent, TableComponent, RouterModule, BinaryComponent, GlossaryLookupComponent],
selector: 'app-diagnostic-report',
selector: 'fhir-diagnostic-report',
templateUrl: './diagnostic-report.component.html',
styleUrls: ['./diagnostic-report.component.scss']
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {GlossaryLookupComponent} from '../../../glossary-lookup/glossary-lookup.
@Component({
standalone: true,
imports: [NgbCollapseModule, CommonModule, BadgeComponent, TableComponent, RouterModule, BinaryComponent],
selector: 'app-document-reference',
selector: 'fhir-document-reference',
templateUrl: './document-reference.component.html',
styleUrls: ['./document-reference.component.scss']
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
<div>
<h6 class="card-title">{{displayModel?.name}}</h6>
</div>
<!-- <div class="btn-group">-->
<!-- <button class="btn active">Day</button>-->
<!-- <button class="btn">Week</button>-->
<!-- <button class="btn">Month</button>-->
<!-- </div>-->
<ng-content select="[header]"></ng-content>
</div>
<div #collapse="ngbCollapse" [(ngbCollapse)]="isCollapsed" class="card-body">
<p class="az-content-text mg-b-20">A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
<h6 class="card-title">{{displayModel?.sort_title || displayModel?.name?.[0]?.displayName}}</h6>
<p class="card-text tx-gray-400" *ngIf="displayModel?.sort_date"><strong>Date</strong>{{displayModel?.sort_date}}</p>
</div>
<fhir-ui-badge class="float-right" [status]="displayModel?.status">{{displayModel?.status}}</fhir-ui-badge>
<!-- <div class="btn-group">-->
<!-- <button class="btn active">Day</button>-->
<!-- <button class="btn">Week</button>-->
<!-- <button class="btn">Month</button>-->
<!-- </div>-->
<div>
<fhir-ui-badge [status]="displayModel?.status">{{displayModel?.status}}</fhir-ui-badge>
<ng-content select="[header]"></ng-content>
</div>
</div>
<div #collapse="ngbCollapse" [(ngbCollapse)]="isCollapsed" class="card-body">
<p class="az-content-text mg-b-20">A person who is directly or indirectly involved in the provisioning of healthcare.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {TableComponent} from "../../common/table/table.component";
@Component({
standalone: true,
imports: [NgbCollapseModule, CommonModule, BadgeComponent, TableComponent, RouterModule],
selector: 'app-practitioner',
selector: 'fhir-practitioner',
templateUrl: './practitioner.component.html',
styleUrls: ['./practitioner.component.scss']
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,13 @@ <h4 class="modal-title" id="modal-location">Add Location</h4>
<div [ngbNavOutlet]="nav" class="ms-4"></div>
</div>
<div class="modal-footer">
<button [ngClass]="{
'btn-outline-dark': !debugMode,
'text-dark': !debugMode,
'btn-dark':debugMode,
'text-white':debugMode
}" type="button" class="btn float-left" (click)="debugMode = !debugMode">
<i class="fas fa-bug"></i>
</button>
<button type="button" [class.disabled]="!submitEnabled" class="btn btn-az-primary" (click)="submit()">Add Location</button>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,13 @@ <h4 class="modal-title" id="modal-practitioner">New Practitioner</h4>

</div>
<div class="modal-footer">
<button [ngClass]="{
'btn-outline-dark': !debugMode,
'text-dark': !debugMode,
'btn-dark':debugMode,
'text-white':debugMode
}" type="button" class="btn float-left" (click)="debugMode = !debugMode">
<i class="fas fa-bug"></i>
</button>
<button type="button" [class.disabled]="!submitEnabled" class="btn btn-az-primary" (click)="submit()">Add Practitioner</button>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {AddressModel} from '../../../lib/models/datatypes/address-model';
import {CodableConceptModel} from '../../../lib/models/datatypes/codable-concept-model';
import {uuidV4} from '../../../lib/utils/uuid';
import {PractitionerModel} from '../../../lib/models/resources/practitioner-model';
import {parseFullName} from 'parse-full-name'

@Component({
standalone: true,
Expand Down Expand Up @@ -113,7 +114,7 @@ export class MedicalRecordWizardAddPractitionerComponent implements OnInit {
let model = new PractitionerModel({})
model.source_resource_id = form.get('id').value
model.identifier = form.get('identifier').value
model.name = form.get('name').value
model.name = []
model.address = address
model.telecom = []
model.qualification = []
Expand Down Expand Up @@ -141,6 +142,17 @@ export class MedicalRecordWizardAddPractitionerComponent implements OnInit {
if(form.get('profession').value) {
model.qualification = [form.get('profession').value.identifier]
}
if(form.get('name').value) {
let nameParts = parseFullName(form.get('name').value)
model.name.push({
givenName: nameParts.first,
familyName: nameParts.last,
suffix: nameParts.suffix,
textName: form.get('name').value,
use: 'work',
displayName: form.get('name').value,
})
}

if(!model.source_resource_id){
console.warn("No source_resource_id set for Organization, generating one")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h4 class="modal-title"> Medical Record Wizard</h4>

<div>
<div class="d-flex">
<div ngbNav #nav="ngbNav" [(activeId)]="active" class="nav-pills flex-column col-lg-2 col-md-4 bg-gray-200 pd-20" orientation="vertical">
<div ngbNav #nav="ngbNav" [(activeId)]="active" class="nav-pills flex-column col-xl-2 col-lg-3 col-md-4 bg-gray-200 pd-20" orientation="vertical">
<ng-container ngbNavItem="encounter">
<a class="nav-link" ngbNavLink>Encounter</a>
<ng-template ngbNavContent>
Expand Down Expand Up @@ -224,46 +224,20 @@ <h6 class="card-title">Medical Practitioners</h6>
<fhir-card *ngFor="let practitioner of existingEncounter?.related_resources?.['Practitioner']" [showDetails]="false" [displayModel]="practitioner" [isCollapsed]="true"></fhir-card>

<ng-container formArrayName="practitioners">
<div class="card mg-t-10 pd-20" [formGroup]="practitionerGroup" *ngFor="let practitionerGroup of practitioners.controls; let i = index">
<ng-container *ngFor="let practitionerGroup of practitioners.controls; let i = index">
<div *ngIf="debugMode" class="alert alert-warning">
<strong>Practitioner Status: {{practitionerGroup.status}}</strong>
</div>
<div class="tx-right">
<span class="cursor-pointer" (click)="deletePractitioner(i)" aria-hidden="true"><i class="fas fa-trash"></i></span>
</div>
<fhir-practitioner class="fhir-card-callout-warning" [formGroup]="practitionerGroup" [showDetails]="false" [displayModel]="practitionerGroup.controls.data.value" [isCollapsed]="true">
<div header>
<span class="cursor-pointer float-right" (click)="deletePractitioner(i)" aria-hidden="true"><i class="fas fa-trash"></i></span>
</div>
</fhir-practitioner>
</ng-container>
</ng-container>

<div class="row row-sm">
<input formControlName="id" class="form-control" type="hidden">

<div class="col-lg-6 mg-t-10 mg-lg-t-0">
<p class="mg-b-10">Name<span ngbTooltip="required" class="text-danger">*</span></p>
<input formControlName="name" class="form-control" readonly placeholder="Input box" type="text">
</div><!-- col -->
<div class="col-lg-6 mg-t-10 mg-lg-t-0">
<p class="mg-b-10">Type<span ngbTooltip="required" class="text-danger">*</span></p>
<app-nlm-typeahead formControlName="profession" searchType="MedicalContactIndividualProfession" [debugMode]="debugMode"></app-nlm-typeahead>
</div><!-- col -->
<div class="col-lg mg-t-10 mg-lg-t-0">
<p class="mg-b-10">Telephone</p>
<input formControlName="phone" class="form-control" placeholder="(123) 456-7890" type="text">
</div><!-- col -->
<div class="col-lg mg-t-10 mg-lg-t-0">
<p class="mg-b-10">Fax</p>
<input formControlName="fax" class="form-control" placeholder="(123) 456-7890" type="text">
</div><!-- col -->
<div class="col-lg mg-t-10 mg-lg-t-0">
<p class="mg-b-10">Email</p>
<input formControlName="email" class="form-control" placeholder="email@example.com" type="text">
</div><!-- col -->
<div class="col-lg mg-t-10 mg-lg-t-0">
<p class="mg-b-10">Address</p>
<input formControlName="address" class="form-control" placeholder="Input box" type="text">
</div><!-- col -->

</div><!-- row -->

</div>
</ng-container>

<div class="row pt-2">
<div class="col-lg-4 col-md-4">
Expand All @@ -285,17 +259,16 @@ <h6 class="card-title">Medical Location/Organizations</h6>
<fhir-card *ngFor="let organization of existingEncounter?.related_resources?.['Organization']" [showDetails]="false" [displayModel]="organization" [isCollapsed]="true"></fhir-card>

<ng-container formArrayName="organizations">
<div class="bd-callout-warning card card-fhir-resource" [formGroup]="organizationGroup" *ngFor="let organizationGroup of organizations.controls; let i = index">
<ng-container *ngFor="let organizationGroup of organizations.controls; let i = index">
<div *ngIf="debugMode" class="alert alert-warning">
<strong>Organization Status: {{organizationGroup.status}}</strong>
</div>
<div class="card-header">
<div>
<h6 class="card-title">{{organizationGroup.controls.name.value}}</h6>
<fhir-organization class="fhir-card-callout-warning" [formGroup]="organizationGroup" [showDetails]="false" [displayModel]="organizationGroup.controls.data.value" [isCollapsed]="true">
<div header>
<span class="cursor-pointer float-right" (click)="deleteOrganization(i)" aria-hidden="true"><i class="fas fa-trash"></i></span>
</div>
<span class="cursor-pointer float-right" (click)="deleteOrganization(i)" aria-hidden="true"><i class="fas fa-trash"></i></span>
</div>
</div>
</fhir-organization>
</ng-container>
</ng-container>

<div class="row pt-2">
Expand Down Expand Up @@ -375,7 +348,7 @@ <h6 class="card-title">Notes & Attachments</h6>
</ng-template>
</ng-container>
</div>
<div [ngbNavOutlet]="nav" class="col-lg-10 col-md-8"></div>
<div [ngbNavOutlet]="nav" class="col-xl-10 col-lg-9 col-md-8"></div>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,29 +162,15 @@ export class MedicalRecordWizardComponent implements OnInit {
addPractitioner(openPractitionerResult: { data:PractitionerModel, action: 'find'|'create' }){
let practitioner = openPractitionerResult.data;
const practitionerGroup = new FormGroup({
source_id: new FormControl(practitioner.source_id),
id: new FormControl(practitioner.source_resource_id, Validators.required),
identifier: new FormControl(practitioner.identifier || []),
telecom: new FormControl(practitioner.telecom || []),
name: new FormControl(practitioner.name, Validators.required),
profession: new FormControl(practitioner.qualification, Validators.required),
address: new FormControl(practitioner.address),
data: new FormControl(practitioner),
});

this.practitioners.push(practitionerGroup);
}
addOrganization(openOrganizationResult: { data:OrganizationModel, action: 'find'|'create' }) {
let organization = openOrganizationResult.data;
const organizationGroup = new FormGroup({
source_id: new FormControl(organization.source_id),
id: new FormControl(organization.source_resource_id, Validators.required),
identifier: new FormControl(organization.identifier || []),
telecom: new FormControl(organization.telecom || []),
name: new FormControl(organization.name, Validators.required),
type: new FormControl(organization.type),
address: new FormControl(organization.addresses?.[0]),
data: new FormControl(organization),
});

this.organizations.push(organizationGroup);
}
addAttachment(attachment: ResourceCreateAttachment){
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ app-medical-sources-filter > .az-content-left-components:hover{
h4 { color: $color; }
}

.bd-callout-success { @include bs-callout-variant($green); }
.bd-callout-info { @include bs-callout-variant($cyan); }
.bd-callout-warning { @include bs-callout-variant($yellow); }
.bd-callout-danger { @include bs-callout-variant($red); }
.fhir-card-callout-success .card, .bd-callout-success { @include bs-callout-variant($green); }
.fhir-card-callout-info .card, .bd-callout-info { @include bs-callout-variant($cyan); }
.fhir-card-callout-warning .card, .bd-callout-warning { @include bs-callout-variant($yellow); }
.fhir-card-callout-danger .card, .bd-callout-danger { @include bs-callout-variant($red); }

5 changes: 5 additions & 0 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9574,6 +9574,11 @@ parent-module@^1.0.0:
dependencies:
callsites "^3.0.0"

parse-full-name@^1.2.6:
version "1.2.6"
resolved "https://registry.npmjs.org/parse-full-name/-/parse-full-name-1.2.6.tgz#97e2643c0167b79ca404dab254ea79e89b025704"
integrity sha512-uIaENXJFmZfzulBndhHJayi7ZEifJ1bXKaWYmySa04EmMX7eIcsufiAgWTYiJqWRa/Sq7JWPGtCIXFAoUfF7gw==

parse-json@^5.0.0:
version "5.2.0"
resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd"
Expand Down