Skip to content

Commit

Permalink
Merge pull request #36 from chronic-care/develop
Browse files Browse the repository at this point in the history
Updates for 3.1.4
  • Loading branch information
swmuir authored Jun 3, 2024
2 parents 18e689b + 6bd639d commit 80d4aa7
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 19 deletions.
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
services:
ecareplanner:
image: chroniccare/mccprovider:latest
image: chroniccare/ecareplanner:latest
container_name: ecareplanner${MELD_SANDBOX_NAME}
domainname: ecareplanner${MELD_SANDBOX_NAME}
network_mode: default
environment:
- CLIENT_ID=${MELD_SANDBOX_CLIENT_ID}
- LOG_END_POINT_URI=https://log-mccecare-dev.ohsu.edu
- HHS_WARNING=false
ports:
- "80:80"
restart: always
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ecareplanner",
"version": "3.1.3",
"version": "3.1.4",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down Expand Up @@ -46,7 +46,7 @@
"rxjs": "~6.6.3",
"tslib": "^2.0.0",
"zone.js": "~0.10.2",
"e-care-common-data-services": "^1.2.6"
"e-care-common-data-services": "^1.2.8"
},
"devDependencies": {
"@angular-devkit/architect": "^0.1001.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<!-- Date -->
<ng-container matColumnDef="firstOnset">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Date of Initial Diagnosis</th>
<td mat-cell *matCellDef="let condition">{{condition.firstOnset | nullCheck }}</td>
<td mat-cell *matCellDef="let condition">{{condition.firstOnsetAsText | nullCheck }}</td>
</ng-container>
<ng-container matColumnDef="firstRecorded">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Diagnosis First Recorded</th>
Expand Down
3 changes: 1 addition & 2 deletions src/app/generated-data-api/models/ConditionSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ export type ConditionSummary = {
categories?: string;
history: Array<ConditionHistory>;
profileId?: string;
firstRecorded?: string;
firstRecordedAsText?: string;
firstOnset?: string;
firstOnsetAsText?: string;
clinicalStatus?: string;
verificationStatus?: string;
}
22 changes: 22 additions & 0 deletions src/app/util/utility-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,29 @@ export function formatEffectiveDateNew(ef: string): string {
}
}

export function displayDate(dateString?: string): string | undefined {
if (dateString === undefined || dateString === null) {
return undefined
}
else {
// If time is not included, then parse only Year Month Day parts
// In JavaScript, January is 0. Subtract 1 from month Int.
const parts = dateString!.split('-');
const jsDate: Date = (dateString?.includes('T'))
? new Date(dateString!)
: new Date(parseInt(parts[0]), parseInt(parts[1]) - 1, parseInt(parts[2]))

return jsDate.toLocaleDateString("en-US", {
year: "numeric",
month: "short",
day: "2-digit"
})
}
}


export function formatEffectiveDate(ef: Effective): string {
return displayDate(ef.dateTime.date);
if (!ef) {
return "";
}
Expand Down
3 changes: 1 addition & 2 deletions src/app/warning-popup/warning-popup.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div *ngIf="showModal" class="modal-overlay">
<div *ngIf="this.checkModalStatus()" class="modal-overlay">
<div class="modal">
<span class="close-btn" (click)="closeModal()">X</span>
<div class="modal-content">
Expand All @@ -15,4 +15,3 @@
</div>
</div>
</div>

25 changes: 14 additions & 11 deletions src/app/warning-popup/warning-popup.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@ import { environment } from 'src/environments/environment';
styleUrls: ['./warning-popup.component.css'],
})
export class WarningPopupComponent implements OnInit {
showModal: boolean = environment.hhsWarning;
showModal: boolean = false;

ngOnInit() {
// Check if the user has seen the modal before

if (environment.hhsWarning === 'true') {
console.debug('Showing hhsWarning ' + environment.hhsWarning)
const hasSeenModal = sessionStorage.getItem('hasSeenModal')
if (!hasSeenModal) {
this.showModal = true;
}
} else {
console.debug('Not Showing hhsWarning ' + environment.hhsWarning)
this.showModal = false;
}
}

const hasSeenModal = sessionStorage.getItem('hasSeenModal');

// If the user hasn't seen the modal, show it
// if (!hasSeenModal) {
// this.showModal = true;
// // Mark the modal as seen for this session
// sessionStorage.setItem('hasSeenModal', 'true');
// }
checkModalStatus() {
return this.showModal;
}

closeModal() {
// Mark the modal as seen for this session
sessionStorage.setItem('hasSeenModal', 'true');
Expand Down
1 change: 1 addition & 0 deletions src/assets/env.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(function(window){
window["env"] = window["env"] || {};
window["env"]["authdebug"] = "false";
window["env"]["hhsWarning"] = true;
window["env"]["clientId"] = '02c55695-e7b6-4628-8329-6ea1cc67abb3';
window['env']['logEndpointUri'] = 'http://localhost:8085';
window['env']['logApiKey'] = 'dd9761de-dc5e-4132-a159-51421fc43e07';
Expand Down

0 comments on commit 80d4aa7

Please sign in to comment.