Skip to content

Commit

Permalink
Minor fixes and cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
preston committed Dec 10, 2016
1 parent a2500fd commit ad2a4e5
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 74 deletions.
5 changes: 0 additions & 5 deletions src/app/components/action_group.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ export class ActionGroupComponent extends ActionComponent {
@Input() knart: Knart;
@Input() actionGroup: ActionGroup;

constructor() {
super();
console.log("ActionGroupComponent has been initialized.");
}

canDelete() {
return this.knart.actionGroup != this.actionGroup;
}
Expand Down
6 changes: 0 additions & 6 deletions src/app/components/api.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,8 @@ import {Component} from '@angular/core';
})
export class ApiComponent {


verses: Object[] = [];

constructor() {
console.log("ApiComponent has been initialized.");
}


stringify(obj: any): string {
return JSON.stringify(obj, null, "\t").trim();
}
Expand Down
4 changes: 0 additions & 4 deletions src/app/components/conditions.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ export class ConditionsComponent {

@Input() knart: Knart;

constructor() {
console.log("ConditionsComponent has been initialized.");
}


createCondition() {
let c = new Condition();
Expand Down
5 changes: 0 additions & 5 deletions src/app/components/contributions.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ export class ContributionsComponent extends BaseComponent {

@Input() knart: Knart;

constructor() {
super();
console.log("ContributionsComponent has been initialized.");
}

contributorTypes(): Array<string> {
return ["Person"];
}
Expand Down
8 changes: 3 additions & 5 deletions src/app/components/coverages.component.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import {Component, Input} from '@angular/core';

import {BaseComponent} from './base.component';

import {Knart} from '../models/knart';
import {Coverage} from '../models/coverage';

@Component({
selector: 'coverages',
templateUrl: '/coverages.html'
})
export class CoveragesComponent {
export class CoveragesComponent extends BaseComponent {

@Input() knart: Knart;

constructor() {
console.log("CoveragesComponent has been initialized.");
}

createCoverage() {
let c = new Coverage();
this.knart.coverages.push(c);
Expand Down
4 changes: 0 additions & 4 deletions src/app/components/export.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ export class ExportComponent {

@Input() knart: Knart;

constructor() {
console.log("ExportComponent has been initialized.");
}

}
4 changes: 0 additions & 4 deletions src/app/components/expressions.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ export class ExpressionsComponent {

@Input() knart: Knart;

constructor() {
console.log("ExpressionsComponent has been initialized.");
}

createExpression() {
let c = new Expression();
this.knart.expressions.push(c);
Expand Down
4 changes: 0 additions & 4 deletions src/app/components/external_data.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ export class ExternalDataComponent {

@Input() knart: Knart;

constructor() {
console.log("ExternalDataComponent has been initialized.");
}

createExternalData() {
let ed = new ExternalData();
this.knart.externalData.push(ed);
Expand Down
4 changes: 0 additions & 4 deletions src/app/components/history.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ export class HistoryComponent extends BaseComponent {

@Input() knart: Knart;

// constructor() {
// console.log("HistoryComponent has been initialized.");
// }

lifeCycleEventTypes(): Array<string> {
return LifeCycleEvent.TYPES;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class HomeComponent {
originalFileName: string;

constructor( @Inject('Window') private window: Window, public toasterService: ToasterService, private xmlLoader: XmlLoaderService, private xmlExporter: XmlExporterService) {
console.log("HomeComponent has been initialized.");
// console.log("HomeComponent has been initialized.");
this.reset();

// To always start with a new document.
Expand Down
5 changes: 0 additions & 5 deletions src/app/components/metadata.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ export class MetadataComponent extends BaseComponent {

@Input() knart: Knart;

constructor() {
super();
console.log("MetadataComponent has been initialized.");
}

createIdentifier() {
let i = new Identifier();
this.knart.identifiers.push(i);
Expand Down
8 changes: 3 additions & 5 deletions src/app/components/model_references.component.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import {Component, Input} from '@angular/core';

import {BaseComponent} from './base.component';

import {Knart} from '../models/knart';
import {ModelReference} from '../models/model_reference';

@Component({
selector: 'model_references',
templateUrl: '/model_references.html'
})
export class ModelReferencesComponent {
export class ModelReferencesComponent extends BaseComponent {

@Input() knart: Knart;

constructor() {
console.log("ModelReferencesComponent has been initialized.");
}

createModelReference() {
let mr = new ModelReference();
this.knart.modelReferences.push(mr);
Expand Down
4 changes: 0 additions & 4 deletions src/app/components/preview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ export class PreviewComponent {

@Input() knart: Knart;

constructor() {
console.log("PreviewComponent has been initialized.");
}

relationshipLabelForCode(code: string): string {
return Relationship.fromCode(code).label;
}
Expand Down
5 changes: 0 additions & 5 deletions src/app/components/related_resources.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ export class RelatedResourcesComponent extends BaseComponent {

@Input() knart: Knart;

constructor() {
super();
console.log("RelatedResourcesComponent has been initialized.");
}

relationshipTypes(): Array<Relationship> {
return Relationship.ALL
}
Expand Down
4 changes: 0 additions & 4 deletions src/app/components/supporting_evidence.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ export class SupportingEvidenceComponent {

@Input() knart: Knart;

constructor() {
console.log("SupportingEvidenceComponent has been initialized.");
}

createSupportingEvidence() {
let se = new SupportingEvidence();
this.knart.supportingEvidence.push(se);
Expand Down
1 change: 0 additions & 1 deletion src/app/services/xml_exporter.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export class XmlExporterService {
private serializer: XMLSerializer = new XMLSerializer();

constructor( @Inject('Window') private window: Window, private http: Http) {
console.log("HomeComponent has been initialized. PROBABLY DELETE THIS CLASS");
}

createXMLDocumentFrom(knart: Knart): Document {
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/xml_loader.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export class XmlLoaderService {
private serializer: XMLSerializer = new XMLSerializer();

constructor(private http: Http) {
console.log("HomeComponent has been initialized.");
}

loadXMLFromURL(url: string): Observable<Response> {
return this.http.get(url); //.map(res => res.responseText);
}
Expand Down
4 changes: 4 additions & 0 deletions src/app/views/coverages.pug
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#coverages("*ngIf"="knart.coverages.length > 0")
.coverage.well("*ngFor"="let c of knart.coverages")
.btn-group.pull-right
a.btn.btn-small.btn-primary("(click)"="moveUp(c, knart.coverages)" "*ngIf"="canMoveUp(c, knart.coverages)")
span.glyphicon.glyphicon-chevron-up
a.btn.btn-small.btn-primary("(click)"="moveDown(c, knart.coverages)" "*ngIf"="canMoveDown(c, knart.coverages)")
span.glyphicon.glyphicon-chevron-down
a.btn.btn-small.btn-danger("(click)"="deleteCoverage(c)")
span.glyphicon.glyphicon-trash
.clearfix
Expand Down
1 change: 0 additions & 1 deletion src/app/views/history.pug
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
span.glyphicon.glyphicon-chevron-up
a.btn.btn-small.btn-primary("(click)"="moveDown(e, knart.lifeCycleEvents)" "*ngIf"="canMoveDown(e, knart.lifeCycleEvents)")
span.glyphicon.glyphicon-chevron-down

a.btn.btn-small.btn-danger("(click)"="deleteLifeCycleEvent(e)")
span.glyphicon.glyphicon-trash
.clearfix
Expand Down
12 changes: 6 additions & 6 deletions src/app/views/layout/navigation.pug
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ nav.navbar.navbar-default("*ngIf"="knart")
| KNART
span.text-info work
//- | ::
span.subtitle community knowledge artifact editor
span.subtitle knowledge artifact editor

div.collapse.navbar-collapse#navbar-collapse-1
ul.nav.navbar-nav
Expand Down Expand Up @@ -55,23 +55,23 @@ nav.navbar.navbar-default("*ngIf"="knart")
| HL7 FHIR Clinical Reasoning
li.divider
li
a("(click)"="loadRemoteFile('https://raw.githubusercontent.com/cqframework/knartwork/master/examples/hl7-cds-ka-r1.3/FLACC_DocTemplate.xml')")
a(href="#" "(click)"="loadRemoteFile('https://raw.githubusercontent.com/cqframework/knartwork/master/examples/hl7-cds-ka-r1.3/FLACC_DocTemplate.xml')")
span.glyphicon.glyphicon-folder-open
| Example: Documentation Template: FLACC
li
a("(click)"="loadRemoteFile('https://raw.githubusercontent.com/cqframework/knartwork/master/examples/hl7-cds-ka-r1.3/UTI_DocTemplate.xml')")
a(href="#" "(click)"="loadRemoteFile('https://raw.githubusercontent.com/cqframework/knartwork/master/examples/hl7-cds-ka-r1.3/UTI_DocTemplate.xml')")
span.glyphicon.glyphicon-folder-open
| Example: Documentation Template: UTI
li
a("(click)"="loadRemoteFile('https://raw.githubusercontent.com/cqframework/knartwork/master/examples/hl7-cds-ka-r1.3/PHQ9_DocTemplateWithAssessment.xml')")
a(href="#" "(click)"="loadRemoteFile('https://raw.githubusercontent.com/cqframework/knartwork/master/examples/hl7-cds-ka-r1.3/PHQ9_DocTemplateWithAssessment.xml')")
span.glyphicon.glyphicon-folder-open
| Example: Documentation Template: PHQ-9 Assessment
li
a("(click)"="loadRemoteFile('https://raw.githubusercontent.com/cqframework/knartwork/master/examples/hl7-cds-ka-r1.3/NQF0024A_NQF0421.xml')")
a(href="#" "(click)"="loadRemoteFile('https://raw.githubusercontent.com/cqframework/knartwork/master/examples/hl7-cds-ka-r1.3/NQF0024A_NQF0421.xml')")
span.glyphicon.glyphicon-folder-open
| Example: Rule: Weight Assessment and Counseling
li
a("(click)"="loadRemoteFile('https://raw.githubusercontent.com/cqframework/knartwork/master/examples/hl7-cds-ka-r1.3/newMentor_HeD_NQF0068_ECArule_example.xml')")
a(href="#" "(click)"="loadRemoteFile('https://raw.githubusercontent.com/cqframework/knartwork/master/examples/hl7-cds-ka-r1.3/newMentor_HeD_NQF0068_ECArule_example.xml')")
span.glyphicon.glyphicon-folder-open
| Example: Rule: Ischemic Vascular Disease

Expand Down
4 changes: 4 additions & 0 deletions src/app/views/model_references.pug
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#modelReferences("*ngIf"="knart.modelReferences.length > 0")
.modelReference.well("*ngFor"="let mr of knart.modelReferences")
.btn-group.pull-right
a.btn.btn-small.btn-primary("(click)"="moveUp(mr, knart.modelReferences)" "*ngIf"="canMoveUp(mr, knart.modelReferences)")
span.glyphicon.glyphicon-chevron-up
a.btn.btn-small.btn-primary("(click)"="moveDown(mr, knart.modelReferences)" "*ngIf"="canMoveDown(mr, knart.modelReferences)")
span.glyphicon.glyphicon-chevron-down
a.btn.btn-small.btn-danger("(click)"="deleteModelReference(mr)")
span.glyphicon.glyphicon-trash
.clearfix
Expand Down

0 comments on commit ad2a4e5

Please sign in to comment.