diff --git a/package-lock.json b/package-lock.json index caedeed..0a790a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5662,7 +5662,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -6077,7 +6078,8 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -6133,6 +6135,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6176,12 +6179,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -8574,6 +8579,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", "dev": true, + "optional": true, "requires": { "delayed-stream": "~1.0.0" } @@ -8638,13 +8644,15 @@ "version": "1.37.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", - "dev": true + "dev": true, + "optional": true }, "mime-types": { "version": "2.1.21", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", "dev": true, + "optional": true, "requires": { "mime-db": "~1.37.0" } @@ -9610,7 +9618,7 @@ "moment": "^2.23.0", "ngx-bootstrap": "^3.1.3", "ngx-cookie": "^4.0.2", - "ngx-file-uploader": "git+https://github.com/Ampath/ngx-file-uploader.git#b5e509fbff949f6ae0f1cd5dabc71eae53e33412", + "ngx-file-uploader": "git+https://github.com/Ampath/ngx-file-uploader.git#0.0.9", "reflect-metadata": "^0.1.9", "rxjs": "^6.3.3", "rxjs-compat": "^6.2.1", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index d729d33..e9b0061 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -8,12 +8,14 @@ import { SaveFormsGuardService } from './Services/route-guards/save-forms-guard. import {AuthGuardService} from './Services/route-guards/auth-guard.service'; import {UpdateFormsComponent} from './form-editor/update-forms/update-forms.component'; import {UpdateFormsWizardComponent } from './form-editor/update-forms-wizard/update-forms-wizard.component'; +import { ConceptSearchComponent } from './concept-search/concept-search.component'; const appRoutes: Routes = [ {path: '', redirectTo: 'forms', pathMatch: 'full'}, {path: 'login', component: LoginComponent}, {path: 'forms', component: ViewFormsComponent, canActivate: [AuthGuardService]}, {path: 'edit/:uuid', component: FormEditorComponent, canDeactivate: [SaveFormsGuardService]}, {path: 'update/:oldUuid/:newUuid', component: UpdateFormsComponent, canActivate: [AuthGuardService]}, + {path: 'concept-search', component: ConceptSearchComponent} ]; @NgModule({ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index c499d49..96724ed 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -26,6 +26,7 @@ import { FormBuilderComponent } from './app-entry-point/form-builder.component'; import { Str2Num } from './pipes/string_to_number.pipe'; import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { FormBuilderHttpInteceptor } from './Services/http-interceptor.service'; +import { ConceptSearchComponent } from './concept-search/concept-search.component'; @@ -42,7 +43,8 @@ import { FormBuilderHttpInteceptor } from './Services/http-interceptor.service'; SaveSnackbarComponent, FormBuilderComponent, ViewFormsComponent, - NotificationComponent + NotificationComponent, + ConceptSearchComponent ], diff --git a/src/app/concept-search/concept-search.component.css b/src/app/concept-search/concept-search.component.css new file mode 100644 index 0000000..5f214f2 --- /dev/null +++ b/src/app/concept-search/concept-search.component.css @@ -0,0 +1,145 @@ +.panel{ + background-color:#fff; + box-shadow:0px 2px 2px #aaa; + border-color:lightgray; + +} +.panel-table .panel-body{ + padding:0; + /* background-color:#fff; + box-shadow:0px 2px 2px #aaa; */ + } + + .panel-table .panel-body .table-bordered{ + border-style: none; + margin:0; + } + + .panel-table .panel-body .table-bordered > thead > tr > th:first-of-type { + text-align:center; + width: 100px; + } + + .panel-table .panel-body .table-bordered > thead > tr > th:last-of-type, + .panel-table .panel-body .table-bordered > tbody > tr > td:last-of-type { + border-right: 0px; + } + + .panel-table .panel-body .table-bordered > thead > tr > th:first-of-type, + .panel-table .panel-body .table-bordered > tbody > tr > td:first-of-type { + border-left: 0px; + } + + .panel-table .panel-body .table-bordered > tbody > tr:first-of-type > td{ + border-bottom: 0px; + } + + .panel-table .panel-body .table-bordered > thead > tr:first-of-type > th{ + border-top: 0px; + } + + .panel-table .panel-footer .pagination{ + margin:0; + } + + .panel-primary>.panel-heading { + color: #fff; + background-color: #3f51b5; + border-color: #808080; +} + + /* + used to vertically center elements, may need modification if you're not using default sizes. + */ + .panel-table .panel-footer .col{ + line-height: 34px; + height: 34px; + } + + .panel-table .panel-heading .col h3{ + line-height: 30px; + height: 30px; + } + + .panel-table .panel-body .table-bordered > tbody > tr > td{ + line-height: 34px; + } + + .formName{ + font-size:14px; + } + + +.stylish-input-group .input-group-addon{ + background: white !important; +} +.stylish-input-group .form-control{ + border-right:0; + box-shadow:0 0 0; + border-color:#ccc; +} +.stylish-input-group button{ + border:0; + background:transparent; +} +.material-icons.edit{ + color:green; +} +.navbar-btn{ + margin: 5px 5px 0px 5px; +} + +.btn.btn-circle { border-radius: 5px; } +.btn-create{ color: #1AC91A} +/* .navbar-nav.navbar-right .btn:not(.collapsed) { + background-color: rgb(111, 84, 153); + border-color: rgb(111, 84, 153); + color: rgb(255, 255, 255); +} */ +a:hover{ + text-decoration: none; +} +.panel-title{ + color:black; +} +.restoreMsg{ + margin-top:10px; + padding-left: 30px; + padding-right: 30px; +} + +.menuItem{ + font-weight:500; + color:white; + font-family:'Roboto'; + font-size:14px; +} + +.name{ + font-size:18px; + color:white; + font-weight:600; + +} +.space{ + margin-left:50px; +} +mat-card{ + + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; + margin: 5px 5px 5px 50px; + +} +.fill{ + flex: 1 1 auto; +} +.dropdown-menu{ + color: black; + font-family: 'Roboto'; + font-weight: 500; +} +.dropdown-menu>li { + margin-left:5px; +} \ No newline at end of file diff --git a/src/app/concept-search/concept-search.component.html b/src/app/concept-search/concept-search.component.html new file mode 100644 index 0000000..4b7fa2e --- /dev/null +++ b/src/app/concept-search/concept-search.component.html @@ -0,0 +1,185 @@ + + + Form Builder + + + + + + + +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+

Viewing Concept {{concept?.display}}

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
UUID{{concept?.uuid}}
Fully Specified Name{{concept?.name?.name}}
Synonyms +
{{name.display}}
Description +
{{desc.display}}
Class{{concept?.conceptClass?.name}}
Datatype{{concept?.datatype.display}}
Answers +
{{answer.display}} ({{answer?.mappings[0]?.display}})
Numeric +
Absolute High : {{concept?.hiAbsolute}}
Critical High : {{concept?.hiCritical}}
Normal High : {{concept?.hiNormal}}
Normal Low: {{concept?.lowNormal}}
Critical Low : {{concept?.lowCritical}}
Absolute Low : {{concept?.lowAbsolute}}
Units : {{concept?.units}}
Allow Decimal : {{concept?.allowDecimal}}
Display Precision : {{concept?.displayPrecision}}
Set Members +
{{member?.display}}
Mappings + + + + + + + + + + + +
RelationshipSource : CodeName
{{map?.conceptMapType?.display}}{{map?.display}}
+
Version{{concept?.version}}
Created By{{concept?.auditInfo.creator?.display}} : {{concept?.auditInfo?.dateCreated}}
Changed By{{concept?.auditInfo.changedBy?.display}} : {{concept?.auditInfo.dateChanged}}
+
+ +
+ +
+ +
+
+
diff --git a/src/app/concept-search/concept-search.component.ts b/src/app/concept-search/concept-search.component.ts new file mode 100644 index 0000000..be3ccf6 --- /dev/null +++ b/src/app/concept-search/concept-search.component.ts @@ -0,0 +1,41 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; + +import { ConceptService } from './../Services/openmrs-api/concept.service'; +@Component({ + selector: 'app-concept-search', + templateUrl: './concept-search.component.html', + styleUrls: ['./concept-search.component.css'] +}) +export class ConceptSearchComponent implements OnInit { + + public searchValue = ''; + public concept: any; + + constructor(private conceptService: ConceptService, private router: Router) { + } + + + ngOnInit() { + } + + public searchConcept(){ + const conceptUuid = this.searchValue; + this.conceptService.searchConceptByUUID(conceptUuid) + .subscribe((result) => { + console.log('concept result', result); + this.concept = result; + }); + } + + public reset(){ + this.searchValue = ''; + } + public navigateToForms(){ + this.router.navigate(['./']); + + } + + + +} diff --git a/src/app/view-forms/view-forms.component.html b/src/app/view-forms/view-forms.component.html index d8a098c..1182802 100644 --- a/src/app/view-forms/view-forms.component.html +++ b/src/app/view-forms/view-forms.component.html @@ -8,6 +8,15 @@ --> + + + +