├── .dockerignore ├── .editorconfig ├── .gitignore ├── .prettierignore ├── .prettierrc ├── .travis.yml ├── .vscode └── launch.json ├── Dockerfile ├── README.md ├── angular.json ├── docker-compose.yaml ├── e2e ├── app.e2e-spec.ts ├── app.po.ts └── tsconfig.e2e.json ├── karma.conf.js ├── nginx └── nginx.conf.template ├── package-lock.json ├── package.json ├── protractor.conf.js ├── proxy.conf.js ├── replace.build.js ├── src ├── app │ ├── Services │ │ ├── authentication │ │ │ ├── authentication.module.ts │ │ │ ├── authentication.service.spec.ts │ │ │ └── authentication.service.ts │ │ ├── constants.ts │ │ ├── element-editor.service.spec.ts │ │ ├── element-editor.service.ts │ │ ├── form-list.service.ts │ │ ├── http-interceptor.service.ts │ │ ├── navigator.service.spec.ts │ │ ├── navigator.service.ts │ │ ├── openmrs-api │ │ │ ├── concept.service.spec.ts │ │ │ ├── concept.service.ts │ │ │ ├── encounter-type.service.spec.ts │ │ │ ├── encounter-type.service.ts │ │ │ ├── encounters.service.ts │ │ │ ├── fetch-all-forms.service.spec.ts │ │ │ ├── fetch-all-forms.service.ts │ │ │ ├── fetch-form-detail.service.spec.ts │ │ │ ├── fetch-form-detail.service.ts │ │ │ ├── location-resource.service.ts │ │ │ ├── patient-resource.service.ts │ │ │ └── save-form.service.ts │ │ ├── order.service.spec.ts │ │ ├── order.service.ts │ │ ├── question-control.service.spec.ts │ │ ├── question-control.service.ts │ │ ├── question-id.service.spec.ts │ │ ├── question-id.service.ts │ │ ├── route-guards │ │ │ ├── auth-guard.service.spec.ts │ │ │ ├── auth-guard.service.ts │ │ │ ├── save-forms-guard.service.spec.ts │ │ │ └── save-forms-guard.service.ts │ │ ├── schema-compiler.service.ts │ │ ├── storage │ │ │ ├── local-storage.service.ts │ │ │ ├── session-storage.service.ts │ │ │ └── session.service.ts │ │ ├── update-component.service.spec.ts │ │ └── update-component.service.ts │ ├── app-entry-point │ │ ├── form-builder.component.css │ │ ├── form-builder.component.html │ │ ├── form-builder.component.spec.ts │ │ └── form-builder.component.ts │ ├── app-material-module.ts │ ├── app-routing.module.ts │ ├── app.component.css │ ├── app.component.html │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── app.module.ts │ ├── build-version-footer │ │ ├── build-version-footer.component.css │ │ ├── build-version-footer.component.html │ │ ├── build-version-footer.component.spec.ts │ │ └── build-version-footer.component.ts │ ├── collections │ │ └── linked-list.ts │ ├── form-editor │ │ ├── audit-info │ │ │ ├── audit-info.component.css │ │ │ ├── audit-info.component.html │ │ │ ├── audit-info.component.spec.ts │ │ │ └── audit-info.component.ts │ │ ├── concept │ │ │ ├── concept.component.css │ │ │ ├── concept.component.html │ │ │ ├── concept.component.spec.ts │ │ │ └── concept.component.ts │ │ ├── element-editor │ │ │ ├── dynamic-question │ │ │ │ ├── dynamic-question.component.css │ │ │ │ ├── dynamic-question.component.html │ │ │ │ ├── dynamic-question.component.spec.ts │ │ │ │ └── dynamic-question.component.ts │ │ │ ├── element-editor.component.css │ │ │ ├── element-editor.component.html │ │ │ ├── element-editor.component.spec.ts │ │ │ └── element-editor.component.ts │ │ ├── form-editor │ │ │ ├── assets │ │ │ │ ├── ampath-logo.png │ │ │ │ └── loader.gif │ │ │ ├── form-editor-menu.component.ts │ │ │ ├── form-editor-menu.html │ │ │ ├── form-editor.component.css │ │ │ ├── form-editor.component.html │ │ │ ├── form-editor.component.spec.ts │ │ │ ├── form-editor.component.ts │ │ │ └── form-editor.module.ts │ │ ├── form-elements │ │ │ ├── Form.ts │ │ │ ├── FormElement.ts │ │ │ ├── Page.ts │ │ │ ├── Question.ts │ │ │ ├── Section.ts │ │ │ ├── form-element-factory.spec.ts │ │ │ ├── form-element-factory.ts │ │ │ ├── form-factory.service.spec.ts │ │ │ └── form-factory.service.ts │ │ ├── form-renderer │ │ │ ├── form-renderer.component.css │ │ │ ├── form-renderer.component.html │ │ │ ├── form-renderer.component.spec.ts │ │ │ ├── form-renderer.component.ts │ │ │ ├── mock-data-source.service.ts │ │ │ └── mock-obs.ts │ │ ├── models │ │ │ ├── properties.ts │ │ │ ├── property-factory.spec.ts │ │ │ ├── property-factory.ts │ │ │ ├── property-model.ts │ │ │ ├── searchbox-property.ts │ │ │ ├── select-property.ts │ │ │ ├── textarea-property.ts │ │ │ └── textbox-property.ts │ │ ├── navigator │ │ │ ├── navigator.component.css │ │ │ ├── navigator.component.html │ │ │ ├── navigator.component.spec.ts │ │ │ └── navigator.component.ts │ │ ├── order │ │ │ ├── order.component.css │ │ │ ├── order.component.html │ │ │ ├── order.component.spec.ts │ │ │ └── order.component.ts │ │ ├── reference-forms │ │ │ ├── reference-form-model.ts │ │ │ ├── reference-forms.component.css │ │ │ ├── reference-forms.component.html │ │ │ ├── reference-forms.component.spec.ts │ │ │ └── reference-forms.component.ts │ │ ├── schema-editor │ │ │ ├── schema-editor.component.css │ │ │ ├── schema-editor.component.html │ │ │ ├── schema-editor.component.spec.ts │ │ │ └── schema-editor.component.ts │ │ ├── snackbar │ │ │ ├── notification-toast.ts │ │ │ ├── saved-snackbar.ts │ │ │ └── snackbar.component.ts │ │ ├── update-forms-wizard │ │ │ ├── update-forms-wizard.component.css │ │ │ ├── update-forms-wizard.component.html │ │ │ ├── update-forms-wizard.component.spec.ts │ │ │ └── update-forms-wizard.component.ts │ │ └── update-forms │ │ │ ├── update-forms.component.css │ │ │ ├── update-forms.component.html │ │ │ ├── update-forms.component.spec.ts │ │ │ └── update-forms.component.ts │ ├── login │ │ ├── login.component.css │ │ ├── login.component.html │ │ ├── login.component.spec.ts │ │ └── login.component.ts │ ├── modals │ │ ├── alert.component.ts │ │ ├── answers-modal │ │ │ ├── answers-modal.css │ │ │ ├── answers-modal.html │ │ │ └── answers.modal.ts │ │ ├── concept.modal.ts │ │ ├── confirm.component.ts │ │ ├── encounter-details.modal.ts │ │ ├── encounter-viewer-modal.ts │ │ ├── insert-reference-form-modal │ │ │ ├── insert-reference-forms.modal.css │ │ │ ├── insert-reference-forms.modal.html │ │ │ └── insert-reference-forms.modal.ts │ │ ├── modals-module.ts │ │ ├── navigator.modal.ts │ │ ├── prompt.component.ts │ │ ├── reference-form-modal │ │ │ ├── reference-form.madal.css │ │ │ ├── reference-form.modal.html │ │ │ └── reference-form.modal.ts │ │ ├── save-form-modal │ │ │ ├── save-form-modal.css │ │ │ ├── save-form-modal.html │ │ │ └── save-form-modal.ts │ │ ├── schema-editor.modal.ts │ │ ├── set-members-modal │ │ │ ├── set-members-modal.component.css │ │ │ ├── set-members-modal.component.html │ │ │ ├── set-members-modal.component.spec.ts │ │ │ └── set-members-modal.component.ts │ │ └── update-forms-wizard-modal │ │ │ ├── update-forms-wizard-modal.component.css │ │ │ ├── update-forms-wizard-modal.component.html │ │ │ ├── update-forms-wizard-modal.component.spec.ts │ │ │ └── update-forms-wizard-modal.component.ts │ ├── pipes │ │ ├── filter.pipe.spec.ts │ │ ├── filter.pipe.ts │ │ ├── search-form-filter.pipe.spec.ts │ │ ├── search-form-filter.pipe.ts │ │ └── string_to_number.pipe.ts │ ├── shared-module.ts │ └── view-forms │ │ ├── view-forms.component.css │ │ ├── view-forms.component.html │ │ ├── view-forms.component.spec.ts │ │ └── view-forms.component.ts ├── assets │ ├── .gitkeep │ ├── ampath-forms-logo.svg │ ├── ampath-logo.svg │ ├── inter.woff │ ├── loader.gif │ ├── logo.svg │ ├── roboto-mono.woff │ ├── screen.png │ └── select.svg ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── main.ts ├── polyfills.ts ├── styles.scss ├── test.ts ├── tsconfig.app.json ├── tsconfig.spec.json ├── typings.d.ts └── version.json ├── tsconfig.json └── tslint.json /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | .c9/ 16 | *.launch 17 | .settings/ 18 | *.sublime-workspace 19 | .editorconfig 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | testem.log 35 | /typings 36 | 37 | # e2e 38 | /e2e/*.js 39 | /e2e/*.map 40 | 41 | # System Files 42 | .DS_Store 43 | Thumbs.db 44 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | .c9/ 16 | *.launch 17 | .settings/ 18 | *.sublime-workspace 19 | 20 | # IDE - VSCode 21 | .vscode/* 22 | !.vscode/settings.json 23 | !.vscode/tasks.json 24 | !.vscode/launch.json 25 | !.vscode/extensions.json 26 | 27 | # misc 28 | /.sass-cache 29 | /connect.lock 30 | /coverage 31 | /libpeerconnection.log 32 | npm-debug.log 33 | yarn-error.log 34 | testem.log 35 | /typings 36 | 37 | # System Files 38 | .DS_Store 39 | Thumbs.db 40 | ./package-lock.json 41 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "none", 3 | "singleQuote": true, 4 | "tabWidth": 2, 5 | "semi": true 6 | } 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | dist: xenial 3 | node_js: 4 | - '10' 5 | services: 6 | - docker 7 | - xvfb 8 | before_install: 9 | - npm i -g brfs 10 | script: 11 | - npm run build 12 | sudo: required 13 | addons: 14 | apt: 15 | packages: 16 | - sshpass 17 | - google-chrome-stable 18 | after_success: 19 | - mv dist "fb-${TRAVIS_BRANCH}" 20 | - tar -czf build.tgz "fb-${TRAVIS_BRANCH}" 21 | - export SSHPASS=$DEPLOY_PASS 22 | - sshpass -e scp -o stricthostkeychecking=no build.tgz $DEPLOY_USER@$DEPLOY_HOST:./ 23 | - sshpass -e ssh -o stricthostkeychecking=no $DEPLOY_USER@$DEPLOY_HOST ./deploy-build.sh 24 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "type": "chrome", 6 | "request": "launch", 7 | "name": "Launch Chrome against localhost", 8 | "url": "http://localhost:4200", 9 | "webRoot": "${workspaceRoot}" 10 | }, 11 | { 12 | "type": "chrome", 13 | "request": "attach", 14 | "name": "Attach to Chrome", 15 | "port": 9222, 16 | "webRoot": "${workspaceRoot}" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:12 as build-step 2 | RUN mkdir -p /app 3 | WORKDIR /app 4 | COPY package.json package-lock.json /app/ 5 | RUN npm install 6 | COPY . /app 7 | RUN npm run build --prod 8 | 9 | FROM nginx:1.19.2-alpine 10 | COPY ./nginx/nginx.conf.template /etc/nginx/templates/default.conf.template 11 | COPY --from=build-step /app/dist /usr/share/nginx/html -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
7 |
8 |