├── .gitattributes ├── go.bat ├── conceptpropose ├── api │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── messages_fr.properties │ │ │ ├── messages_es.properties │ │ │ └── messages.properties │ │ └── java │ │ │ └── org │ │ │ └── openmrs │ │ │ └── module │ │ │ └── conceptpropose │ │ │ ├── ConceptProposalConsts.java │ │ │ └── api │ │ │ └── db │ │ │ └── ProposedConceptPackageDAO.java │ │ └── test │ │ ├── resources │ │ ├── cpm-hibernate.cfg.xml │ │ └── TestingApplicationContext.xml │ │ └── java │ │ └── org │ │ └── openmrs │ │ └── module │ │ └── conceptpropose │ │ └── test │ │ └── CpmBaseContextSensitive.java ├── omod │ ├── src │ │ ├── main │ │ │ ├── webapp │ │ │ │ ├── resources │ │ │ │ │ ├── components │ │ │ │ │ │ ├── jasmine │ │ │ │ │ │ │ ├── .rspec │ │ │ │ │ │ │ ├── jasmine_dev.thor │ │ │ │ │ │ │ ├── .gitmodules │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ ├── jasmine-core │ │ │ │ │ │ │ │ │ └── version.rb │ │ │ │ │ │ │ │ └── jasmine-core.rb │ │ │ │ │ │ │ ├── images │ │ │ │ │ │ │ │ └── jasmine_favicon.png │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── Gemfile │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── .bower.json │ │ │ │ │ │ │ ├── config.rb │ │ │ │ │ │ │ ├── MIT.LICENSE │ │ │ │ │ │ │ ├── README.markdown │ │ │ │ │ │ │ └── jasmine-core.gemspec │ │ │ │ │ │ ├── underscore │ │ │ │ │ │ │ ├── CNAME │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── favicon.ico │ │ │ │ │ │ │ ├── Rakefile │ │ │ │ │ │ │ ├── .bower.json │ │ │ │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ └── README.md │ │ │ │ │ │ ├── jquery │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── component.json │ │ │ │ │ │ │ ├── .bower.json │ │ │ │ │ │ │ └── composer.json │ │ │ │ │ │ ├── angular-mocks │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── bower.json │ │ │ │ │ │ │ └── .bower.json │ │ │ │ │ │ ├── angular-resource │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── bower.json │ │ │ │ │ │ │ └── .bower.json │ │ │ │ │ │ ├── angular │ │ │ │ │ │ │ ├── bower.json │ │ │ │ │ │ │ └── .bower.json │ │ │ │ │ │ ├── requirejs-domready │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── .bower.json │ │ │ │ │ │ │ └── README.md │ │ │ │ │ │ ├── requirejs │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── testBaseUrl.js │ │ │ │ │ │ │ ├── .bower.json │ │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ │ └── tasks.txt │ │ │ │ │ │ └── jquery-ui │ │ │ │ │ │ │ ├── component.json │ │ │ │ │ │ │ ├── .bower.json │ │ │ │ │ │ │ ├── AUTHORS.txt │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ └── MIT-LICENSE.txt │ │ │ │ │ ├── js │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── cpmMenu.js │ │ │ │ │ │ │ ├── searchConceptDialog.js │ │ │ │ │ │ │ └── jqueryUiDialog.js │ │ │ │ │ │ ├── filters │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── boolToYesOrNo.js │ │ │ │ │ │ │ ├── dashOnNull.js │ │ │ │ │ │ │ ├── proposalStatus.js │ │ │ │ │ │ │ └── proposalReviewStatus.js │ │ │ │ │ │ ├── main.js │ │ │ │ │ │ ├── services │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── settings.js │ │ │ │ │ │ │ ├── searchConcept.js │ │ │ │ │ │ │ ├── alerts.js │ │ │ │ │ │ │ ├── proposals.js │ │ │ │ │ │ │ └── menu.js │ │ │ │ │ │ ├── controllers │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── SettingsCtrl.js │ │ │ │ │ │ ├── impl.js │ │ │ │ │ │ ├── app.js │ │ │ │ │ │ ├── bootstrap.js │ │ │ │ │ │ ├── routes.js │ │ │ │ │ │ └── requireJS-config.js │ │ │ │ │ ├── partials │ │ │ │ │ │ ├── ListIncomingProposals.html │ │ │ │ │ │ ├── ReviewProposal.html │ │ │ │ │ │ └── ListProposals.html │ │ │ │ │ └── css │ │ │ │ │ │ └── cpm.css │ │ │ │ └── proposals.jsp │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── openmrs │ │ │ │ └── module │ │ │ │ └── conceptpropose │ │ │ │ └── web │ │ │ │ ├── common │ │ │ │ └── CpmConstants.java │ │ │ │ ├── service │ │ │ │ └── ConceptProposeMapperService.java │ │ │ │ └── authentication │ │ │ │ └── factory │ │ │ │ └── AuthHttpHeaderFactory.java │ │ └── test │ │ │ └── webapp │ │ │ ├── unit │ │ │ ├── filters │ │ │ │ └── proposalStatusSpec.js │ │ │ └── directives │ │ │ │ ├── jqueryUiDialogSpec.js │ │ │ │ └── cpmMenuSpec.js │ │ │ ├── test-main.js │ │ │ └── karma.conf.js │ ├── build.gradle │ ├── app.build.js │ └── .project ├── package.json ├── Gruntfile.js └── build.gradle ├── conceptreview ├── omod │ ├── src │ │ ├── main │ │ │ ├── webapp │ │ │ │ ├── resources │ │ │ │ │ ├── components │ │ │ │ │ │ ├── jasmine │ │ │ │ │ │ │ ├── .rspec │ │ │ │ │ │ │ ├── jasmine_dev.thor │ │ │ │ │ │ │ ├── .gitmodules │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ ├── jasmine-core │ │ │ │ │ │ │ │ │ └── version.rb │ │ │ │ │ │ │ │ └── jasmine-core.rb │ │ │ │ │ │ │ ├── images │ │ │ │ │ │ │ │ └── jasmine_favicon.png │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── Gemfile │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── .bower.json │ │ │ │ │ │ │ ├── config.rb │ │ │ │ │ │ │ ├── MIT.LICENSE │ │ │ │ │ │ │ ├── README.markdown │ │ │ │ │ │ │ └── jasmine-core.gemspec │ │ │ │ │ │ ├── underscore │ │ │ │ │ │ │ ├── CNAME │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── favicon.ico │ │ │ │ │ │ │ ├── Rakefile │ │ │ │ │ │ │ ├── .bower.json │ │ │ │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ └── README.md │ │ │ │ │ │ ├── jquery │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── component.json │ │ │ │ │ │ │ ├── .bower.json │ │ │ │ │ │ │ └── composer.json │ │ │ │ │ │ ├── angular-mocks │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── bower.json │ │ │ │ │ │ │ └── .bower.json │ │ │ │ │ │ ├── angular-resource │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── bower.json │ │ │ │ │ │ │ └── .bower.json │ │ │ │ │ │ ├── angular │ │ │ │ │ │ │ ├── bower.json │ │ │ │ │ │ │ └── .bower.json │ │ │ │ │ │ ├── requirejs-domready │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── .bower.json │ │ │ │ │ │ │ └── README.md │ │ │ │ │ │ ├── requirejs │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── testBaseUrl.js │ │ │ │ │ │ │ ├── .bower.json │ │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ │ └── tasks.txt │ │ │ │ │ │ └── jquery-ui │ │ │ │ │ │ │ ├── component.json │ │ │ │ │ │ │ ├── .bower.json │ │ │ │ │ │ │ ├── AUTHORS.txt │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ └── MIT-LICENSE.txt │ │ │ │ │ ├── js │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── conceptreviewMenu.js │ │ │ │ │ │ │ ├── searchConceptDialog.js │ │ │ │ │ │ │ └── jqueryUiDialog.js │ │ │ │ │ │ ├── filters │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── boolToYesOrNo.js │ │ │ │ │ │ │ ├── dashOnNull.js │ │ │ │ │ │ │ ├── proposalStatus.js │ │ │ │ │ │ │ └── proposalReviewStatus.js │ │ │ │ │ │ ├── main.js │ │ │ │ │ │ ├── services │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── searchConcept.js │ │ │ │ │ │ │ ├── proposalReviews.js │ │ │ │ │ │ │ ├── deletedProposalReviews.js │ │ │ │ │ │ │ ├── completedProposalReviews.js │ │ │ │ │ │ │ ├── proposalReviewConcepts.js │ │ │ │ │ │ │ ├── deletedProposalReviewConcepts.js │ │ │ │ │ │ │ ├── alerts.js │ │ │ │ │ │ │ └── menu.js │ │ │ │ │ │ ├── controllers │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── ListDeletedProposalsCtrl.js │ │ │ │ │ │ │ ├── ListCompletedProposalsCtrl.js │ │ │ │ │ │ │ ├── ReviewDeletedProposalCtrl.js │ │ │ │ │ │ │ ├── ListIncomingProposalsCtrl.js │ │ │ │ │ │ │ ├── ReviewProposalCtrl.js │ │ │ │ │ │ │ └── ReviewConceptOfDeletedProposalCtrl.js │ │ │ │ │ │ ├── bootstrap.js │ │ │ │ │ │ ├── impl.js │ │ │ │ │ │ ├── app.js │ │ │ │ │ │ ├── requireJS-config.js │ │ │ │ │ │ └── routes.js │ │ │ │ │ ├── partials │ │ │ │ │ │ ├── ListCompletedProposals.html │ │ │ │ │ │ ├── ListDeletedProposals.html │ │ │ │ │ │ ├── ListIncomingProposals.html │ │ │ │ │ │ ├── ReviewDeletedProposal.html │ │ │ │ │ │ └── ReviewProposal.html │ │ │ │ │ └── css │ │ │ │ │ │ └── cpm.css │ │ │ │ └── proposalReview.jsp │ │ │ ├── resources │ │ │ │ ├── messages.properties │ │ │ │ └── config.xml │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── openmrs │ │ │ │ └── module │ │ │ │ └── conceptreview │ │ │ │ └── web │ │ │ │ └── service │ │ │ │ └── ConceptReviewMapperService.java │ │ └── test │ │ │ └── webapp │ │ │ ├── test-main.js │ │ │ ├── unit │ │ │ ├── filters │ │ │ │ └── proposalStatusSpec.js │ │ │ ├── controllers │ │ │ │ ├── ListIncomingProposalsCtrlSpec.js │ │ │ │ └── ReviewProposalCtrlSpec.js │ │ │ └── directives │ │ │ │ └── conceptreviewMenuSpec.js │ │ │ └── karma.conf.js │ └── build.gradle ├── api │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── openmrs │ │ │ └── module │ │ │ └── conceptreview │ │ │ ├── ConceptReviewConsts.java │ │ │ ├── ProposedConceptReviewDescription.java │ │ │ └── api │ │ │ └── db │ │ │ └── ProposedConceptPackageReviewDAO.java │ │ └── test │ │ └── resources │ │ ├── conceptreview-test-hibernate.cfg.xml │ │ └── TestingApplicationContext.xml ├── package.json ├── Gruntfile.js └── build.gradle ├── .travis.yml ├── common ├── build.gradle └── src │ └── main │ └── java │ └── org │ └── openmrs │ └── module │ └── conceptpropose │ ├── ProposalRole.java │ ├── SubmissionResponseStatus.java │ ├── ProposalStatus.java │ ├── PackageStatus.java │ ├── web │ ├── dto │ │ ├── SubmissionStatusDto.java │ │ ├── concept │ │ │ ├── DescriptionDto.java │ │ │ ├── SearchConceptResultDto.java │ │ │ ├── NameDto.java │ │ │ └── AnswerDto.java │ │ ├── UserDto.java │ │ ├── SubmissionResponseDto.java │ │ ├── Settings.java │ │ ├── factory │ │ │ ├── NameDtoFactory.java │ │ │ ├── DescriptionDtoFactory.java │ │ │ └── AnswerDtoFactory.java │ │ ├── ProposedConceptDto.java │ │ ├── ProposedConceptPackageDto.java │ │ ├── SubmissionDto.java │ │ ├── ProposedConceptReviewDto.java │ │ └── ProposedConceptReviewPackageDto.java │ └── converter │ │ ├── DatatypeConverter.java │ │ ├── ConceptClassConverter.java │ │ └── ConceptConverter.java │ └── ShareableComment.java ├── .bowerrc ├── go ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── functional-tests ├── src │ └── test │ │ ├── resources │ │ ├── config.properties │ │ ├── proposal-no-concepts.json │ │ ├── org │ │ │ └── openmrs │ │ │ │ └── module │ │ │ │ ├── conceptpropose │ │ │ │ └── functionaltest │ │ │ │ │ ├── AddNewDraftProposal.feature │ │ │ │ │ ├── Settings.feature │ │ │ │ │ ├── EditingDraftProposal.feature │ │ │ │ │ ├── AddConcept.feature │ │ │ │ │ ├── EditConcept.feature │ │ │ │ │ ├── SubmitDraftProposal.feature │ │ │ │ │ ├── DeleteDraftProposal.feature │ │ │ │ │ ├── DeleteConcept.feature │ │ │ │ │ └── ViewManageProposals.feature │ │ │ │ └── conceptreview │ │ │ │ └── functionaltest │ │ │ │ ├── ReviewProposals.feature │ │ │ │ └── ConceptDiscussion.feature │ │ └── proposal-with-concepts.json │ │ └── java │ │ └── org │ │ └── openmrs │ │ └── module │ │ ├── RunCukesTest.java │ │ ├── conceptreview │ │ ├── functionaltest │ │ │ └── steps │ │ │ │ └── SeleniumDriver.java │ │ └── pagemodel │ │ │ └── ReviewProposalPage.java │ │ └── conceptpropose │ │ └── functionaltest │ │ └── steps │ │ └── SeleniumDriver.java └── build.gradle ├── settings.gradle ├── publish.sh ├── publish-vagrant.sh ├── .project ├── bower.json ├── publish-standalone.sh ├── .jshintrc └── .gitignore /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /go.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | gradlew.bat %1 -------------------------------------------------------------------------------- /conceptpropose/api/src/main/resources/messages_fr.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /conceptpropose/api/src/main/resources/messages_es.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/underscore/CNAME: -------------------------------------------------------------------------------- 1 | underscorejs.org 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | script: "./gradlew :conceptpropose:check :conceptreview:check" 3 | -------------------------------------------------------------------------------- /common/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | dependencies { 3 | compile 'com.google.guava:guava:13.0.1' 4 | } 5 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/underscore/CNAME: -------------------------------------------------------------------------------- 1 | underscorejs.org 2 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/resources/messages.properties: -------------------------------------------------------------------------------- 1 | conceptreview.title=Concept Review Module -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/underscore/.gitignore: -------------------------------------------------------------------------------- 1 | raw 2 | node_modules 3 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/underscore/.gitignore: -------------------------------------------------------------------------------- 1 | raw 2 | node_modules 3 | -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "omod/src/main/webapp/resources/components", 3 | "json": "bower.json" 4 | } -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jquery/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | vendor 3 | components 4 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jquery/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | vendor 3 | components 4 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/underscore/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./underscore'); 2 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/underscore/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./underscore'); 2 | -------------------------------------------------------------------------------- /go: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SOURCE="${BASH_SOURCE[0]}" 4 | DIR="$( dirname "$SOURCE" )" 5 | ${DIR}/gradlew ${*} 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gavia/openmrs-cpm/master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /functional-tests/src/test/resources/config.properties: -------------------------------------------------------------------------------- 1 | username = admin 2 | password = Admin123 3 | openmrsUrl = http://192.168.33.10:8080/openmrs -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/jasmine_dev.thor: -------------------------------------------------------------------------------- 1 | require "#{File.expand_path(File.dirname(__FILE__))}/tasks/jasmine_dev" -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jquery/README.md: -------------------------------------------------------------------------------- 1 | jQuery Component 2 | ================ 3 | 4 | Shim repository for jQuery. 5 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/jasmine_dev.thor: -------------------------------------------------------------------------------- 1 | require "#{File.expand_path(File.dirname(__FILE__))}/tasks/jasmine_dev" -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jquery/README.md: -------------------------------------------------------------------------------- 1 | jQuery Component 2 | ================ 3 | 4 | Shim repository for jQuery. 5 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/underscore/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | Rakefile 3 | docs/ 4 | raw/ 5 | index.html 6 | underscore-min.js 7 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/underscore/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | Rakefile 3 | docs/ 4 | raw/ 5 | index.html 6 | underscore-min.js 7 | -------------------------------------------------------------------------------- /functional-tests/src/test/resources/proposal-no-concepts.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "email": "test@test.com", 4 | "description": "rar" 5 | } -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/angular-mocks/README.md: -------------------------------------------------------------------------------- 1 | bower-angular-mocks 2 | =================== 3 | 4 | angular-mocks.js bower repo -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/angular-mocks/README.md: -------------------------------------------------------------------------------- 1 | bower-angular-mocks 2 | =================== 3 | 4 | angular-mocks.js bower repo -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/underscore/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | notifications: 5 | email: false 6 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "pages"] 2 | path = pages 3 | url = https://github.com/pivotal/jasmine.git 4 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/underscore/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | notifications: 5 | email: false 6 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/angular-resource/README.md: -------------------------------------------------------------------------------- 1 | bower-angular-resource 2 | ====================== 3 | 4 | angular-resource bower repo -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "pages"] 2 | path = pages 3 | url = https://github.com/pivotal/jasmine.git 4 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/angular-resource/README.md: -------------------------------------------------------------------------------- 1 | bower-angular-resource 2 | ====================== 3 | 4 | angular-resource bower repo -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/lib/jasmine-core/version.rb: -------------------------------------------------------------------------------- 1 | module Jasmine 2 | module Core 3 | VERSION = "1.3.1" 4 | end 5 | end 6 | 7 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/lib/jasmine-core/version.rb: -------------------------------------------------------------------------------- 1 | module Jasmine 2 | module Core 3 | VERSION = "1.3.1" 4 | end 5 | end 6 | 7 | -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/ProposalRole.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose; 2 | 3 | 4 | public enum ProposalRole { 5 | PROPOSER, 6 | REVIEWER 7 | } 8 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/angular/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.0.7", 4 | "main": "./angular.js", 5 | "dependencies": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/angular/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.0.7", 4 | "main": "./angular.js", 5 | "dependencies": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include 'common', 2 | 'conceptpropose:api', 3 | 'conceptpropose:omod', 4 | 'conceptreview:api', 5 | 'conceptreview:omod', 6 | 'functional-tests' 7 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/requirejs-domready/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "volo": { 3 | "url": "https://raw.github.com/requirejs/domReady/{version}/domReady.js" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/underscore/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gavia/openmrs-cpm/master/conceptpropose/omod/src/main/webapp/resources/components/underscore/favicon.ico -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/requirejs-domready/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "volo": { 3 | "url": "https://raw.github.com/requirejs/domReady/{version}/domReady.js" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/underscore/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gavia/openmrs-cpm/master/conceptreview/omod/src/main/webapp/resources/components/underscore/favicon.ico -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/directives/index.js: -------------------------------------------------------------------------------- 1 | define(['angular'], 2 | function (angular) { 3 | 'use strict'; 4 | 5 | return angular.module('conceptreview.directives', []); 6 | } 7 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/filters/index.js: -------------------------------------------------------------------------------- 1 | define(['angular'], 2 | function (angular) { 3 | 4 | 'use strict'; 5 | 6 | return angular.module('conceptreview.filters', []); 7 | } 8 | ); -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/SubmissionResponseStatus.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose; 2 | 3 | 4 | public enum SubmissionResponseStatus { 5 | SUCCESS, 6 | FAILURE; 7 | } 8 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/directives/index.js: -------------------------------------------------------------------------------- 1 | define(['angular'], 2 | function (angular) { 3 | 'use strict'; 4 | 5 | return angular.module('conceptpropose.directives', []); 6 | } 7 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/filters/index.js: -------------------------------------------------------------------------------- 1 | define(['angular'], 2 | function (angular) { 3 | 4 | 'use strict'; 5 | 6 | return angular.module('conceptpropose.filters', []); 7 | } 8 | ); -------------------------------------------------------------------------------- /conceptpropose/api/src/main/resources/messages.properties: -------------------------------------------------------------------------------- 1 | conceptpropose.title=Concept Proposal Module 2 | conceptpropose.create.title = Submit Concepts for Proposal 3 | conceptpropose.monitor.title = Monitor Submitted Proposals 4 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/requirejs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "volo": { 3 | "url": "https://raw.github.com/jrburke/requirejs/{version}/require.js" 4 | }, 5 | "main": "require.js" 6 | } 7 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/requirejs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "volo": { 3 | "url": "https://raw.github.com/jrburke/requirejs/{version}/require.js" 4 | }, 5 | "main": "require.js" 6 | } 7 | -------------------------------------------------------------------------------- /publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MODULE_PATH=../openmrs-core/webapp/src/main/webapp/WEB-INF/bundledModules 4 | 5 | rm -rf $MODULE_PATH/cpm*.omod 6 | cp ./omod/target/*.omod $MODULE_PATH 7 | echo Published omod to $MODULE_PATH 8 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/images/jasmine_favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gavia/openmrs-cpm/master/conceptpropose/omod/src/main/webapp/resources/components/jasmine/images/jasmine_favicon.png -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jquery-ui/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-ui", 3 | "version": "1.8.23", 4 | "main": "./jquery-ui.js", 5 | "dependencies": { 6 | "jquery": "~1.8.1" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/images/jasmine_favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gavia/openmrs-cpm/master/conceptreview/omod/src/main/webapp/resources/components/jasmine/images/jasmine_favicon.png -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jquery-ui/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-ui", 3 | "version": "1.8.23", 4 | "main": "./jquery-ui.js", 5 | "dependencies": { 6 | "jquery": "~1.8.1" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/angular-mocks/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-mocks", 3 | "version": "1.0.7", 4 | "main": "./angular-mocks.js", 5 | "dependencies": { 6 | "angular": "1.0.7" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jquery/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "components-jquery", 3 | "version": "1.8.3", 4 | "description": "jQuery component", 5 | "keywords": ["jquery"], 6 | "main": "./jquery.js" 7 | } 8 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/angular-mocks/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-mocks", 3 | "version": "1.0.7", 4 | "main": "./angular-mocks.js", 5 | "dependencies": { 6 | "angular": "1.0.7" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jquery/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "components-jquery", 3 | "version": "1.8.3", 4 | "description": "jQuery component", 5 | "keywords": ["jquery"], 6 | "main": "./jquery.js" 7 | } 8 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/angular-resource/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-resource", 3 | "version": "1.0.7", 4 | "main": "./angular-resource.js", 5 | "dependencies": { 6 | "angular": "1.0.7" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/angular-resource/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-resource", 3 | "version": "1.0.7", 4 | "main": "./angular-resource.js", 5 | "dependencies": { 6 | "angular": "1.0.7" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .svn/ 3 | .DS_Store 4 | site/ 5 | .bundle/ 6 | .pairs 7 | .rvmrc 8 | *.gem 9 | .bundle 10 | tags 11 | Gemfile.lock 12 | pkg/* 13 | .sass-cache/* 14 | src/html/.sass-cache/* -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .svn/ 3 | .DS_Store 4 | site/ 5 | .bundle/ 6 | .pairs 7 | .rvmrc 8 | *.gem 9 | .bundle 10 | tags 11 | Gemfile.lock 12 | pkg/* 13 | .sass-cache/* 14 | src/html/.sass-cache/* -------------------------------------------------------------------------------- /functional-tests/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | dependencies { 3 | 4 | compile 'org.seleniumhq.selenium:selenium-java:2.43.1' 5 | compile 'junit:junit:4.10' 6 | 7 | testCompile 'info.cukes:cucumber-junit:1.1.5' 8 | testCompile 'info.cukes:cucumber-java:1.1.5' 9 | } -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/ProposalStatus.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose; 2 | 3 | 4 | public enum ProposalStatus { 5 | DRAFT, 6 | SUBMITTED, 7 | RECEIVED, 8 | CLOSED_REJECTED, 9 | CLOSED_NEW, 10 | CLOSED_EXISTING 11 | } 12 | -------------------------------------------------------------------------------- /conceptpropose/omod/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | dependencies { 3 | 4 | compile project(':conceptpropose:api') 5 | 6 | compile 'org.apache.httpcomponents:httpclient:4.2.3' 7 | compile 'com.google.guava:guava:13.0.1' 8 | compile 'joda-time:joda-time:2.2' 9 | 10 | } 11 | -------------------------------------------------------------------------------- /conceptreview/omod/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | dependencies { 3 | 4 | compile project(':conceptreview:api') 5 | 6 | compile 'org.apache.httpcomponents:httpclient:4.2.3' 7 | compile 'com.google.guava:guava:13.0.1' 8 | compile 'joda-time:joda-time:2.2' 9 | 10 | } 11 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/main.js: -------------------------------------------------------------------------------- 1 | require([ 2 | 'requireJS-config' 3 | ], 4 | function() { 5 | 6 | 'use strict'; 7 | 8 | require(['js/bootstrap'], function () { 9 | // nothing to do here - see bootstrap.js 10 | }); 11 | } 12 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/services/index.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'angular-resource' 4 | ], 5 | 6 | function (angular) { 7 | 8 | 'use strict'; 9 | 10 | return angular.module('conceptreview.services', ['ngResource']); 11 | } 12 | ); -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/PackageStatus.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose; 2 | 3 | 4 | public enum PackageStatus { 5 | DRAFT, 6 | TBS, 7 | PENDING, 8 | SUBMITTED, 9 | RECEIVED, 10 | CLOSED, 11 | DELETED, 12 | DOESNOTEXIST 13 | } 14 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/main.js: -------------------------------------------------------------------------------- 1 | require([ 2 | 'requireJS-config' 3 | ], 4 | function() { 5 | 6 | 'use strict'; 7 | 8 | require(['js/bootstrap'], function () { 9 | // nothing to do here - see bootstrap.js 10 | }); 11 | } 12 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/services/index.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'angular-resource' 4 | ], 5 | 6 | function (angular) { 7 | 8 | 'use strict'; 9 | 10 | return angular.module('conceptpropose.services', ['ngResource']); 11 | } 12 | ); -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Apr 15 18:53:42 EST 2014 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip 7 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/Gemfile: -------------------------------------------------------------------------------- 1 | source :rubygems 2 | gem "rake" 3 | gem "jasmine", git: 'https://github.com/pivotal/jasmine-gem.git' 4 | 5 | unless ENV["TRAVIS"] 6 | group :debug do 7 | gem 'debugger' 8 | end 9 | end 10 | 11 | gemspec 12 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/Gemfile: -------------------------------------------------------------------------------- 1 | source :rubygems 2 | gem "rake" 3 | gem "jasmine", git: 'https://github.com/pivotal/jasmine-gem.git' 4 | 5 | unless ENV["TRAVIS"] 6 | group :debug do 7 | gem 'debugger' 8 | end 9 | end 10 | 11 | gemspec 12 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/requirejs/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | docs/jquery-require-sample/webapp-build/ 3 | docs/jquery-require-sample/dist 4 | dist/dist-site/ 5 | dist/dist-build/ 6 | shrinktest.sh 7 | tests/layers/allplugins-require.js 8 | tests/packages/optimizing/built/ 9 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/requirejs/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | docs/jquery-require-sample/webapp-build/ 3 | docs/jquery-require-sample/dist 4 | dist/dist-site/ 5 | dist/dist-build/ 6 | shrinktest.sh 7 | tests/layers/allplugins-require.js 8 | tests/packages/optimizing/built/ 9 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/controllers/index.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'js/services/index' 4 | ], 5 | function (angular) { 6 | 7 | 'use strict'; 8 | 9 | return angular.module('conceptpropose.controllers', ['conceptpropose.services']); 10 | } 11 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/controllers/index.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'js/services/index' 4 | ], 5 | function (angular) { 6 | 7 | 'use strict'; 8 | 9 | return angular.module('conceptreview.controllers', ['conceptreview.services']); 10 | } 11 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/requirejs/testBaseUrl.js: -------------------------------------------------------------------------------- 1 | define([], function() { 2 | doh.register( 3 | "testBaseUrl", 4 | [ 5 | function testBaseUrl(t){ 6 | t.is(true, true); 7 | } 8 | ] 9 | ); 10 | doh.run(); 11 | }); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/requirejs/testBaseUrl.js: -------------------------------------------------------------------------------- 1 | define([], function() { 2 | doh.register( 3 | "testBaseUrl", 4 | [ 5 | function testBaseUrl(t){ 6 | t.is(true, true); 7 | } 8 | ] 9 | ); 10 | doh.run(); 11 | }); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/.travis.yml: -------------------------------------------------------------------------------- 1 | # before_script: 2 | # - "sh -e /etc/init.d/xvfb start" 3 | before_install: 4 | - "export DISPLAY=:99.0" 5 | - "sh -e /etc/init.d/xvfb start"# 6 | script: "DISPLAY=:99.0 bundle exec rake jasmine_core_spec" 7 | 8 | rvm: 9 | - "1.9.3" 10 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jquery/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "1.8.3", 4 | "description": "jQuery component", 5 | "keywords": [ 6 | "jquery", 7 | "component" 8 | ], 9 | "scripts": [ 10 | "jquery.js" 11 | ], 12 | "license": "MIT" 13 | } 14 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/filters/boolToYesOrNo.js: -------------------------------------------------------------------------------- 1 | define(['./index'], 2 | function(filters) { 3 | 4 | 'use strict'; 5 | 6 | filters.filter('boolToYesOrNo', function() { 7 | return function(input) { 8 | return input ? 'Yes' : 'No'; 9 | }; 10 | }); 11 | } 12 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/.travis.yml: -------------------------------------------------------------------------------- 1 | # before_script: 2 | # - "sh -e /etc/init.d/xvfb start" 3 | before_install: 4 | - "export DISPLAY=:99.0" 5 | - "sh -e /etc/init.d/xvfb start"# 6 | script: "DISPLAY=:99.0 bundle exec rake jasmine_core_spec" 7 | 8 | rvm: 9 | - "1.9.3" 10 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jquery/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "1.8.3", 4 | "description": "jQuery component", 5 | "keywords": [ 6 | "jquery", 7 | "component" 8 | ], 9 | "scripts": [ 10 | "jquery.js" 11 | ], 12 | "license": "MIT" 13 | } 14 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/filters/boolToYesOrNo.js: -------------------------------------------------------------------------------- 1 | define(['./index'], 2 | function(filters) { 3 | 4 | 'use strict'; 5 | 6 | filters.filter('boolToYesOrNo', function() { 7 | return function(input) { 8 | return input ? 'Yes' : 'No'; 9 | }; 10 | }); 11 | } 12 | ); -------------------------------------------------------------------------------- /publish-vagrant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MODULE_PATH=/var/lib/tomcat6/webapps/openmrs/WEB-INF/bundledModules 4 | 5 | sudo rm -rf $MODULE_PATH/openmrs-module-concept*.omod 6 | sudo cp ./conceptpropose/build/libs/*.omod $MODULE_PATH 7 | sudo cp ./conceptreview/build/libs/*.omod $MODULE_PATH 8 | sudo /etc/init.d/tomcat6 restart 9 | echo Published omod to $MODULE_PATH 10 | -------------------------------------------------------------------------------- /functional-tests/src/test/java/org/openmrs/module/RunCukesTest.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module; 2 | 3 | import cucumber.api.junit.Cucumber; 4 | import org.junit.runner.RunWith; 5 | 6 | @Cucumber.Options(format = {"pretty", "html:target/cucumber-html-report", "json:target/cucumber-report.json"}) 7 | @RunWith(Cucumber.class) 8 | public class RunCukesTest { 9 | } 10 | 11 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/underscore/Rakefile: -------------------------------------------------------------------------------- 1 | desc "Use Uglify JS to compress Underscore.js" 2 | task :build do 3 | sh "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m --source-map underscore-min.map -o underscore-min.js" 4 | end 5 | 6 | desc "Build the docco documentation" 7 | task :doc do 8 | sh "docco underscore.js" 9 | end 10 | 11 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/underscore/Rakefile: -------------------------------------------------------------------------------- 1 | desc "Use Uglify JS to compress Underscore.js" 2 | task :build do 3 | sh "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m --source-map underscore-min.map -o underscore-min.js" 4 | end 5 | 6 | desc "Build the docco documentation" 7 | task :doc do 8 | sh "docco underscore.js" 9 | end 10 | 11 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/services/settings.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | './index' 5 | ], 6 | function(angular, config) { 7 | 8 | 'use strict'; 9 | 10 | angular.module('conceptpropose.services').factory('Settings', 11 | function($resource) { 12 | return $resource(config.contextPath + '/ws/conceptpropose/settings'); 13 | } 14 | ); 15 | } 16 | ); -------------------------------------------------------------------------------- /functional-tests/src/test/resources/org/openmrs/module/conceptpropose/functionaltest/AddNewDraftProposal.feature: -------------------------------------------------------------------------------- 1 | Feature: Add New Draft Proposal 2 | As an administrator 3 | I want to save a draft proposal 4 | So that I can review and edit it 5 | 6 | @Selenium 7 | Scenario: Save Draft Proposal 8 | Given I have a new proposal with all necessary details 9 | When I save 10 | Then the proposal is stored with the details -------------------------------------------------------------------------------- /conceptpropose/omod/app.build.js: -------------------------------------------------------------------------------- 1 | ({ 2 | appDir: "./src/main/webapp/resources", 3 | baseUrl: ".", 4 | dir: "./src/main/webapp/build", 5 | optimizeCss: "none", 6 | modules: [ 7 | { 8 | name: "app" 9 | } 10 | ], 11 | shim: { 12 | 'jquery-ui': ['lib/jquery'], 13 | 'angular': { 14 | deps: ['lib/jquery'], 15 | exports: 'angular' 16 | }, 17 | 'angular-resource': ['angular'] 18 | } 19 | }) 20 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | cpm 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/filters/dashOnNull.js: -------------------------------------------------------------------------------- 1 | define(['./index'], 2 | function(filters) { 3 | 4 | 'use strict'; 5 | 6 | filters.filter('dashOnNull', function() { 7 | return function(input) { 8 | if (typeof input === 'undefined' || input === '' || input === null) { 9 | return '\u2013'; 10 | } 11 | else { 12 | return input; 13 | } 14 | }; 15 | }); 16 | } 17 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/filters/dashOnNull.js: -------------------------------------------------------------------------------- 1 | define(['./index'], 2 | function(filters) { 3 | 4 | 'use strict'; 5 | 6 | filters.filter('dashOnNull', function() { 7 | return function(input) { 8 | if (typeof input === 'undefined' || input === '' || input === null) { 9 | return '\u2013'; 10 | } 11 | else { 12 | return input; 13 | } 14 | }; 15 | }); 16 | } 17 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jasmine", 3 | "homepage": "https://github.com/pivotal/jasmine", 4 | "version": "1.3.1", 5 | "_release": "1.3.1", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "v1.3.1", 9 | "commit": "fadd494cab99b75c2885f4e9becee582b11b6fcc" 10 | }, 11 | "_source": "git://github.com/pivotal/jasmine.git", 12 | "_target": "~1.3.1", 13 | "_direct": true 14 | } -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jasmine", 3 | "homepage": "https://github.com/pivotal/jasmine", 4 | "version": "1.3.1", 5 | "_release": "1.3.1", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "v1.3.1", 9 | "commit": "fadd494cab99b75c2885f4e9becee582b11b6fcc" 10 | }, 11 | "_source": "git://github.com/pivotal/jasmine.git", 12 | "_target": "~1.3.1", 13 | "_direct": true 14 | } -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/requirejs/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "requirejs", 3 | "homepage": "https://github.com/jrburke/requirejs", 4 | "version": "2.1.8", 5 | "_release": "2.1.8", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "2.1.8", 9 | "commit": "2b083dbb358e8c1876b059434d4b571d8f87534a" 10 | }, 11 | "_source": "git://github.com/jrburke/requirejs.git", 12 | "_target": "~2.1.8", 13 | "_direct": true 14 | } -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/requirejs/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "requirejs", 3 | "homepage": "https://github.com/jrburke/requirejs", 4 | "version": "2.1.8", 5 | "_release": "2.1.8", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "2.1.8", 9 | "commit": "2b083dbb358e8c1876b059434d4b571d8f87534a" 10 | }, 11 | "_source": "git://github.com/jrburke/requirejs.git", 12 | "_target": "~2.1.8", 13 | "_direct": true 14 | } -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/impl.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'js/controllers/EditProposalCtrl', 3 | 'js/controllers/ListProposalsCtrl', 4 | 'js/controllers/SearchConceptDialogCtrl', 5 | 'js/controllers/SettingsCtrl', 6 | 'js/directives/cpmMenu', 7 | 'js/directives/jqueryUiDialog', 8 | 'js/directives/searchConceptDialog', 9 | 'js/filters/proposalStatus', 10 | 'js/services/menu' 11 | ], 12 | function () { 13 | 'use strict'; 14 | } 15 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/underscore/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "underscore", 3 | "homepage": "https://github.com/documentcloud/underscore", 4 | "version": "1.5.1", 5 | "_release": "1.5.1", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "1.5.1", 9 | "commit": "edbf2952c2b71f81c6449aef384bdf233a0d63bc" 10 | }, 11 | "_source": "git://github.com/documentcloud/underscore.git", 12 | "_target": "~1.5.1", 13 | "_direct": true 14 | } -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/requirejs-domready/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "requirejs-domready", 3 | "homepage": "https://github.com/requirejs/domReady", 4 | "version": "2.0.1", 5 | "_release": "2.0.1", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "2.0.1", 9 | "commit": "850d9c92541afac5d9c64506736272cdbf7a3ae5" 10 | }, 11 | "_source": "git://github.com/requirejs/domReady.git", 12 | "_target": "~2.0.1", 13 | "_direct": true 14 | } -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/underscore/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "underscore", 3 | "homepage": "https://github.com/documentcloud/underscore", 4 | "version": "1.5.1", 5 | "_release": "1.5.1", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "1.5.1", 9 | "commit": "edbf2952c2b71f81c6449aef384bdf233a0d63bc" 10 | }, 11 | "_source": "git://github.com/documentcloud/underscore.git", 12 | "_target": "~1.5.1", 13 | "_direct": true 14 | } -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/requirejs-domready/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "requirejs-domready", 3 | "homepage": "https://github.com/requirejs/domReady", 4 | "version": "2.0.1", 5 | "_release": "2.0.1", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "2.0.1", 9 | "commit": "850d9c92541afac5d9c64506736272cdbf7a3ae5" 10 | }, 11 | "_source": "git://github.com/requirejs/domReady.git", 12 | "_target": "~2.0.1", 13 | "_direct": true 14 | } -------------------------------------------------------------------------------- /conceptpropose/api/src/main/java/org/openmrs/module/conceptpropose/ConceptProposalConsts.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose; 2 | 3 | 4 | public class ConceptProposalConsts { 5 | 6 | public static final String MODULE_ID = "conceptproposal"; 7 | 8 | public static final String MODULE_SERVICE = "conceptProposalService"; 9 | 10 | public static final String MODULE_PRIVILEGE = "Concept Proposal"; 11 | 12 | public static final String MODULE_PATH = "/module/" + MODULE_ID; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /functional-tests/src/test/resources/org/openmrs/module/conceptpropose/functionaltest/Settings.feature: -------------------------------------------------------------------------------- 1 | Feature: Settings Page 2 | As an administrator 3 | I want to set the central repository's URL 4 | So that proposals may be sent to a specified dictionary 5 | 6 | @Selenium 7 | Scenario: Saves central dictionary settings 8 | Given I'm on the Concept Proposal Settings page 9 | When I enter the settings for a dictionary 10 | And I refresh the page 11 | Then those settings should still be there -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/services/searchConcept.js: -------------------------------------------------------------------------------- 1 | define([ 2 | './index', 3 | 'config' 4 | ], 5 | function(services, config) { 6 | 7 | 'use strict'; 8 | 9 | services.service('SearchConcept', function($http) { 10 | this.runQuery = function(searchTerm, currReqNum) { 11 | return $http.get(config.contextPath + '/ws/conceptpropose/concepts?query=' + 12 | encodeURIComponent(searchTerm) + '&requestNum=' + currReqNum); 13 | }; 14 | }); 15 | } 16 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/services/searchConcept.js: -------------------------------------------------------------------------------- 1 | define([ 2 | './index', 3 | 'config' 4 | ], 5 | function(services, config) { 6 | 7 | 'use strict'; 8 | 9 | services.service('SearchConcept', function($http) { 10 | this.runQuery = function(searchTerm, currReqNum) { 11 | return $http.get(config.contextPath + '/ws/conceptpropose/concepts?query=' + 12 | encodeURIComponent(searchTerm) + '&requestNum=' + currReqNum); 13 | }; 14 | }); 15 | } 16 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/angular/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.0.7", 4 | "main": "./angular.js", 5 | "dependencies": {}, 6 | "homepage": "https://github.com/angular/bower-angular", 7 | "_release": "1.0.7", 8 | "_resolution": { 9 | "type": "version", 10 | "tag": "v1.0.7", 11 | "commit": "6c0e81da2073f3831e32ed486d5aabe17bfc915f" 12 | }, 13 | "_source": "git://github.com/angular/bower-angular.git", 14 | "_target": "~1.0.7", 15 | "_direct": true 16 | } -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/services/alerts.js: -------------------------------------------------------------------------------- 1 | define([ 2 | './index', 3 | 'config' 4 | ], 5 | function(services) { 6 | 7 | 'use strict'; 8 | 9 | var alerts = []; 10 | 11 | services.service('Alerts', function() { 12 | this.queue = function(alert) { 13 | alerts.push(alert); 14 | }; 15 | 16 | this.dequeue = function() { 17 | var alertsToReturn = alerts; 18 | alerts = []; 19 | return alertsToReturn; 20 | }; 21 | }); 22 | } 23 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/angular/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.0.7", 4 | "main": "./angular.js", 5 | "dependencies": {}, 6 | "homepage": "https://github.com/angular/bower-angular", 7 | "_release": "1.0.7", 8 | "_resolution": { 9 | "type": "version", 10 | "tag": "v1.0.7", 11 | "commit": "6c0e81da2073f3831e32ed486d5aabe17bfc915f" 12 | }, 13 | "_source": "git://github.com/angular/bower-angular.git", 14 | "_target": "~1.0.7", 15 | "_direct": true 16 | } -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jquery-ui/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-ui", 3 | "version": "1.8.23", 4 | "main": "./jquery-ui.js", 5 | "dependencies": { 6 | "jquery": "~1.8.1" 7 | }, 8 | "homepage": "https://github.com/components/jqueryui", 9 | "_release": "1.8.23", 10 | "_resolution": { 11 | "type": "version", 12 | "tag": "1.8.23", 13 | "commit": "794e14e6409156cca20fdabb77efe810475e3276" 14 | }, 15 | "_source": "git://github.com/components/jqueryui.git", 16 | "_target": "~1.8.23" 17 | } -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jquery-ui/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-ui", 3 | "version": "1.8.23", 4 | "main": "./jquery-ui.js", 5 | "dependencies": { 6 | "jquery": "~1.8.1" 7 | }, 8 | "homepage": "https://github.com/components/jqueryui", 9 | "_release": "1.8.23", 10 | "_resolution": { 11 | "type": "version", 12 | "tag": "1.8.23", 13 | "commit": "794e14e6409156cca20fdabb77efe810475e3276" 14 | }, 15 | "_source": "git://github.com/components/jqueryui.git", 16 | "_target": "~1.8.23" 17 | } -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/services/proposals.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | './index' 5 | ], 6 | function(angular, config) { 7 | 8 | 'use strict'; 9 | 10 | angular.module('conceptpropose.services').factory('Proposals', 11 | function($resource) { 12 | return $resource( 13 | config.contextPath + '/ws/conceptpropose/proposals/:proposalId', 14 | { proposalId:'@id' }, 15 | { update: {method: 'PUT'} } 16 | ); 17 | } 18 | ); 19 | } 20 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/services/proposalReviews.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | './index' 5 | ], 6 | function(services, config) { 7 | 8 | 'use strict'; 9 | 10 | angular.module('conceptreview.services').factory('ProposalReviews', 11 | function($resource) { 12 | return $resource( 13 | config.contextPath + '/ws/conceptreview/proposalReviews/:proposalId', 14 | {proposalId: '@id'}, 15 | {update: {method: 'PUT'}}); 16 | } 17 | ); 18 | } 19 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/app.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | 'require', 5 | 'underscore', 6 | 'js/controllers/index', 7 | 'js/directives/index', 8 | 'js/filters/index', 9 | 'js/services/index' 10 | ], 11 | function(angular) { 12 | 13 | 'use strict'; 14 | 15 | return angular.module('conceptpropose', [ 16 | 'conceptpropose.services', 17 | 'conceptpropose.controllers', 18 | 'conceptpropose.filters', 19 | 'conceptpropose.directives' 20 | ]); 21 | } 22 | ); -------------------------------------------------------------------------------- /conceptreview/api/src/main/java/org/openmrs/module/conceptreview/ConceptReviewConsts.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptreview; 2 | 3 | 4 | // Why is this an exact duplicate of ConceptProposalConsts??? 5 | public class ConceptReviewConsts { 6 | 7 | public static final String MODULE_ID = "conceptproposal"; 8 | 9 | public static final String MODULE_SERVICE = "conceptProposalService"; 10 | 11 | public static final String MODULE_PRIVILEGE = "Concept Proposal"; 12 | 13 | public static final String MODULE_PATH = "/module/" + MODULE_ID; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "openmrs-cpm", 3 | "version": "1.0.0", 4 | "ignore": [ 5 | "**/.*", 6 | "node_modules", 7 | "bower_components", 8 | "test", 9 | "tests" 10 | ], 11 | "dependencies": { 12 | "angular": "~1.0.7", 13 | "angular-resource": "~1.0.7", 14 | "underscore": "~1.5.1", 15 | "requirejs": "~2.1.8", 16 | "requirejs-domready": "~2.0.1", 17 | "jquery": "~1.8.3", 18 | "jquery-ui": "~1.8.23" 19 | }, 20 | "devDependencies": { 21 | "angular-mocks": "~1.0.7", 22 | "jasmine": "~1.3.1" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/services/deletedProposalReviews.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | './index' 5 | ], 6 | function(services, config) { 7 | 8 | 'use strict'; 9 | 10 | angular.module('conceptreview.services').factory('DeletedProposalReviews', 11 | function($resource) { 12 | return $resource( 13 | config.contextPath + '/ws/conceptreview/deletedProposalReviews/:proposalId', 14 | {proposalId: '@id'}, 15 | {update: {method: 'PUT'}}); 16 | } 17 | ); 18 | } 19 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/services/completedProposalReviews.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | './index' 5 | ], 6 | function(services, config) { 7 | 8 | 'use strict'; 9 | 10 | angular.module('conceptreview.services').factory('CompletedProposalReviews', 11 | function($resource) { 12 | return $resource( 13 | config.contextPath + '/ws/conceptreview/completedProposalReviews/:proposalId', 14 | {proposalId: '@id'}, 15 | {update: {method: 'PUT'}}); 16 | } 17 | ); 18 | } 19 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/services/proposalReviewConcepts.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | './index' 5 | ], 6 | function(angular, config) { 7 | 8 | 'use strict'; 9 | 10 | angular.module('conceptreview.services').factory('ProposalReviewConcepts', 11 | function($resource) { 12 | return $resource( 13 | config.contextPath + '/ws/conceptreview/proposalReviews/:proposalId/concepts/:conceptId', 14 | {conceptId: '@id'}, 15 | {update: {method: 'PUT'}}); 16 | } 17 | ); 18 | } 19 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'require', 3 | 'angular', 4 | 'js/app', 5 | 'js/routes', 6 | 'js/impl' 7 | ], 8 | function (require, angular) { 9 | 10 | 'use strict'; 11 | 12 | /* place operations that need to initialize prior to app start here 13 | * using the `run` function on the top-level module 14 | */ 15 | 16 | require( 17 | ['domReady!'], 18 | function (document) { 19 | return angular.bootstrap(document, ['conceptpropose']); 20 | } 21 | ); 22 | } 23 | ); 24 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'require', 3 | 'angular', 4 | 'js/app', 5 | 'js/routes', 6 | 'js/impl' 7 | ], 8 | 9 | function (require, angular) { 10 | 11 | 'use strict'; 12 | 13 | /* place operations that need to initialize prior to app start here 14 | * using the `run` function on the top-level module 15 | */ 16 | 17 | require( 18 | ['domReady!'], 19 | function (document) { 20 | return angular.bootstrap(document, ['conceptreview']); 21 | } 22 | ); 23 | } 24 | ); 25 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/angular-mocks/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-mocks", 3 | "version": "1.0.7", 4 | "main": "./angular-mocks.js", 5 | "dependencies": { 6 | "angular": "1.0.7" 7 | }, 8 | "homepage": "https://github.com/angular/bower-angular-mocks", 9 | "_release": "1.0.7", 10 | "_resolution": { 11 | "type": "version", 12 | "tag": "v1.0.7", 13 | "commit": "73ba0b247c919472906ac3fbbe8fa5cce6a853cd" 14 | }, 15 | "_source": "git://github.com/angular/bower-angular-mocks.git", 16 | "_target": "~1.0.7", 17 | "_direct": true 18 | } -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/angular-mocks/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-mocks", 3 | "version": "1.0.7", 4 | "main": "./angular-mocks.js", 5 | "dependencies": { 6 | "angular": "1.0.7" 7 | }, 8 | "homepage": "https://github.com/angular/bower-angular-mocks", 9 | "_release": "1.0.7", 10 | "_resolution": { 11 | "type": "version", 12 | "tag": "v1.0.7", 13 | "commit": "73ba0b247c919472906ac3fbbe8fa5cce6a853cd" 14 | }, 15 | "_source": "git://github.com/angular/bower-angular-mocks.git", 16 | "_target": "~1.0.7", 17 | "_direct": true 18 | } -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/services/deletedProposalReviewConcepts.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | './index' 5 | ], 6 | function(angular, config) { 7 | 8 | 'use strict'; 9 | 10 | angular.module('conceptreview.services').factory('DeletedProposalReviewConcepts', 11 | function($resource) { 12 | return $resource( 13 | config.contextPath + '/ws/conceptreview/deletedProposalReviews/:proposalId/concepts/:conceptId', 14 | {conceptId: '@id'}, 15 | {update: {method: 'PUT'}}); 16 | } 17 | ); 18 | } 19 | ); -------------------------------------------------------------------------------- /conceptpropose/api/src/test/resources/cpm-hibernate.cfg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/angular-resource/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-resource", 3 | "version": "1.0.7", 4 | "main": "./angular-resource.js", 5 | "dependencies": { 6 | "angular": "1.0.7" 7 | }, 8 | "homepage": "https://github.com/angular/bower-angular-resource", 9 | "_release": "1.0.7", 10 | "_resolution": { 11 | "type": "version", 12 | "tag": "v1.0.7", 13 | "commit": "7c5fc02fce95425e4ca9e95ebff0d28b1438ded9" 14 | }, 15 | "_source": "git://github.com/angular/bower-angular-resource.git", 16 | "_target": "~1.0.7", 17 | "_direct": true 18 | } -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/angular-resource/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-resource", 3 | "version": "1.0.7", 4 | "main": "./angular-resource.js", 5 | "dependencies": { 6 | "angular": "1.0.7" 7 | }, 8 | "homepage": "https://github.com/angular/bower-angular-resource", 9 | "_release": "1.0.7", 10 | "_resolution": { 11 | "type": "version", 12 | "tag": "v1.0.7", 13 | "commit": "7c5fc02fce95425e4ca9e95ebff0d28b1438ded9" 14 | }, 15 | "_source": "git://github.com/angular/bower-angular-resource.git", 16 | "_target": "~1.0.7", 17 | "_direct": true 18 | } -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/SubmissionStatusDto.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto; 2 | 3 | import org.openmrs.module.conceptpropose.PackageStatus; 4 | 5 | public class SubmissionStatusDto { 6 | 7 | private PackageStatus status; 8 | 9 | public SubmissionStatusDto() {} 10 | 11 | public SubmissionStatusDto(final PackageStatus status) { 12 | this.status = status; 13 | } 14 | 15 | public PackageStatus getStatus() { 16 | return status; 17 | } 18 | 19 | public void setStatus(final PackageStatus status) { 20 | this.status = status; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/concept/DescriptionDto.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto.concept; 2 | 3 | public class DescriptionDto { 4 | 5 | private String description; 6 | 7 | private String locale; 8 | 9 | public String getDescription() { 10 | return description; 11 | } 12 | 13 | public void setDescription(final String description) { 14 | this.description = description; 15 | } 16 | 17 | public String getLocale() { 18 | return locale; 19 | } 20 | 21 | public void setLocale(final String locale) { 22 | this.locale = locale; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/services/alerts.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | './index' 5 | ], 6 | function(angular) { 7 | 8 | 'use strict'; 9 | 10 | var alerts = []; 11 | 12 | angular.module('conceptreview.services').service('Alerts', 13 | function() { 14 | this.queue = function(alert) { 15 | alerts.push(alert); 16 | }; 17 | 18 | this.dequeue = function() { 19 | var alertsToReturn = alerts; 20 | alerts = []; 21 | return alertsToReturn; 22 | }; 23 | } 24 | ); 25 | } 26 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "1.8.3", 4 | "description": "jQuery component", 5 | "keywords": [ 6 | "jquery", 7 | "component" 8 | ], 9 | "scripts": [ 10 | "jquery.js" 11 | ], 12 | "license": "MIT", 13 | "homepage": "https://github.com/components/jquery", 14 | "_release": "1.8.3", 15 | "_resolution": { 16 | "type": "version", 17 | "tag": "1.8.3", 18 | "commit": "a94bf4baa9955613937d4f4c083c9d95ad0564fb" 19 | }, 20 | "_source": "git://github.com/components/jquery.git", 21 | "_target": "~1.8.3" 22 | } -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "1.8.3", 4 | "description": "jQuery component", 5 | "keywords": [ 6 | "jquery", 7 | "component" 8 | ], 9 | "scripts": [ 10 | "jquery.js" 11 | ], 12 | "license": "MIT", 13 | "homepage": "https://github.com/components/jquery", 14 | "_release": "1.8.3", 15 | "_resolution": { 16 | "type": "version", 17 | "tag": "1.8.3", 18 | "commit": "a94bf4baa9955613937d4f4c083c9d95ad0564fb" 19 | }, 20 | "_source": "git://github.com/components/jquery.git", 21 | "_target": "~1.8.3" 22 | } -------------------------------------------------------------------------------- /functional-tests/src/test/resources/org/openmrs/module/conceptpropose/functionaltest/EditingDraftProposal.feature: -------------------------------------------------------------------------------- 1 | Feature: Edit Draft Proposal 2 | As an administrator 3 | I want to edit a draft proposal 4 | So that I can change the details 5 | 6 | @Selenium 7 | Scenario: Save Draft Proposal 8 | Given I have a new proposal with all necessary details 9 | When I save 10 | Then the proposal is stored with the details 11 | 12 | @Selenium 13 | Scenario: Edit Draft Proposal 14 | Given I have a saved draft proposal 15 | When I change the details and save 16 | Then the proposal is stored with the new details -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/converter/DatatypeConverter.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.converter; 2 | 3 | import org.dozer.CustomConverter; 4 | import org.openmrs.ConceptDatatype; 5 | import org.openmrs.api.context.Context; 6 | 7 | public class DatatypeConverter implements CustomConverter { 8 | 9 | @Override 10 | public Object convert(Object dest, Object source, Class destClass, Class sourceClass) { 11 | 12 | if (source instanceof String) { 13 | return Context.getConceptService().getConceptDatatypeByUuid((String) source); 14 | } 15 | 16 | return null; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/directives/cpmMenu.js: -------------------------------------------------------------------------------- 1 | define(['./index'], 2 | function(directives) { 3 | 4 | 'use strict'; 5 | 6 | directives.directive('cpmMenu', function() { 7 | return { 8 | restrict: 'E', 9 | replace: true, 10 | scope: { 11 | menu: '=' 12 | }, 13 | template: '' 18 | }; 19 | }); 20 | } 21 | ); -------------------------------------------------------------------------------- /conceptpropose/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "openmrs-module-conceptpropose", 3 | "version": "1.0.2", 4 | "devDependencies": { 5 | "bower": "~0.10.0", 6 | "grunt": "~0.4.1", 7 | "grunt-contrib-jshint": "~0.6.3", 8 | "karma-firefox-launcher": "~0.1.0", 9 | "karma-html2js-preprocessor": "~0.1.0", 10 | "karma-script-launcher": "~0.1.0", 11 | "karma-chrome-launcher": "~0.1.0", 12 | "karma-requirejs": "~0.1.0", 13 | "karma-jasmine": "~0.1.0", 14 | "karma-coffee-preprocessor": "~0.1.0", 15 | "karma-phantomjs-launcher": "~0.1.0", 16 | "karma": "~0.10.1", 17 | "grunt-karma": "~0.6.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/impl.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'js/controllers/ListIncomingProposalsCtrl', 3 | 'js/controllers/ListCompletedProposalsCtrl', 4 | 'js/controllers/ListDeletedProposalsCtrl', 5 | 'js/controllers/ReviewProposalCtrl', 6 | 'js/controllers/ReviewConceptCtrl', 7 | 'js/controllers/ReviewConceptOfDeletedProposalCtrl', 8 | 'js/controllers/ReviewDeletedProposalCtrl', 9 | 'js/directives/conceptreviewMenu', 10 | 'js/filters/proposalReviewStatus', 11 | 'js/filters/dashOnNull', 12 | 'js/filters/boolToYesOrNo' 13 | ], 14 | function () { 15 | 'use strict'; 16 | } 17 | ); 18 | -------------------------------------------------------------------------------- /conceptreview/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "openmrs-module-conceptreview", 3 | "version": "1.0.2", 4 | "devDependencies": { 5 | "bower": "~0.10.0", 6 | "grunt": "~0.4.1", 7 | "grunt-contrib-jshint": "~0.6.3", 8 | "karma-firefox-launcher": "~0.1.0", 9 | "karma-html2js-preprocessor": "~0.1.0", 10 | "karma-script-launcher": "~0.1.0", 11 | "karma-chrome-launcher": "~0.1.0", 12 | "karma-requirejs": "~0.1.0", 13 | "karma-jasmine": "~0.1.0", 14 | "karma-coffee-preprocessor": "~0.1.0", 15 | "karma-phantomjs-launcher": "~0.1.0", 16 | "karma": "~0.10.1", 17 | "grunt-karma": "~0.6.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/directives/conceptreviewMenu.js: -------------------------------------------------------------------------------- 1 | define(['./index'], 2 | function(directives) { 3 | 4 | 'use strict'; 5 | 6 | directives.directive('conceptreviewMenu', function() { 7 | return { 8 | restrict: 'E', 9 | replace: true, 10 | scope: { 11 | menu: '=' 12 | }, 13 | template: '' 18 | }; 19 | }); 20 | } 21 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | conceptpropose-omod 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/filters/proposalStatus.js: -------------------------------------------------------------------------------- 1 | define([ 2 | './index', 3 | 'config' 4 | ], 5 | function(filters) { 6 | 7 | 'use strict'; 8 | 9 | filters.filter('proposalStatus', function() { 10 | return function(input) { 11 | switch (input) { 12 | 13 | case 'DRAFT': 14 | return 'Draft'; 15 | 16 | case 'SUBMITTED': 17 | return 'Submitted'; 18 | 19 | case 'RECEIVED': 20 | return 'Open'; 21 | 22 | case 'CLOSED': 23 | return 'Closed'; 24 | 25 | default: 26 | return ''; 27 | } 28 | }; 29 | }); 30 | } 31 | ); -------------------------------------------------------------------------------- /functional-tests/src/test/resources/org/openmrs/module/conceptpropose/functionaltest/AddConcept.feature: -------------------------------------------------------------------------------- 1 | Feature: Add Concept to Draft Proposal 2 | As an administrator 3 | I want to add a concept to a draft proposal 4 | So that I can change the details 5 | 6 | @Selenium 7 | Scenario: Save Draft Proposal 8 | Given I have a new proposal with all necessary details 9 | When I save 10 | Then the proposal is stored with the details 11 | 12 | @Selenium 13 | Scenario: Add Concept to Draft Proposal 14 | Given I have a saved draft proposal with zero concepts 15 | When I add a concept and save 16 | Then the proposal is stored with the added concept details -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/converter/ConceptClassConverter.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.converter; 2 | 3 | import org.dozer.CustomConverter; 4 | import org.openmrs.ConceptClass; 5 | import org.openmrs.api.context.Context; 6 | 7 | public class ConceptClassConverter implements CustomConverter { 8 | 9 | @Override 10 | public Object convert(Object dest, Object source, Class destClass, Class sourceClass) { 11 | 12 | if (source instanceof String) { 13 | final ConceptClass conceptClass = Context.getConceptService().getConceptClassByUuid((String) source); 14 | return conceptClass; 15 | } 16 | 17 | return null; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/UserDto.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto; 2 | 3 | public class UserDto { 4 | 5 | private String name; 6 | 7 | private String email; 8 | 9 | public UserDto(String name, String email){ 10 | this.name = name; 11 | this.email = email; 12 | } 13 | 14 | public String getName() { 15 | return name; 16 | } 17 | 18 | public void setName(String name) { 19 | this.name = name; 20 | } 21 | 22 | public String getEmail() { 23 | return email; 24 | } 25 | 26 | public void setEmail(String email) { 27 | this.email = email; 28 | } 29 | } -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/java/org/openmrs/module/conceptpropose/web/common/CpmConstants.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.common; 2 | 3 | import org.apache.commons.codec.CharEncoding; 4 | 5 | public interface CpmConstants { 6 | 7 | String SETTINGS_USER_NAME_PROPERTY = "conceptpropose.username"; 8 | 9 | String SETTINGS_PASSWORD_PROPERTY = "conceptpropose.password"; 10 | 11 | String SETTINGS_URL_PROPERTY = "conceptpropose.url"; 12 | 13 | String LIST_PROPOSAL_URL = "/module/conceptpropose/proposals"; 14 | 15 | String AUTH_DATA_DELIMITER = ":"; 16 | 17 | String AUTH_CHAR_SET = CharEncoding.UTF_8; 18 | 19 | String AUTH_TYPE = "Basic"; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * loads sub modules and wraps them up into the main module 3 | * this should be used for top-level module definitions only 4 | */ 5 | 6 | define([ 7 | 'angular', 8 | 'config', 9 | 'require', 10 | 'underscore', 11 | 'js/controllers/index', 12 | 'js/directives/index', 13 | 'js/filters/index', 14 | 'js/services/index' 15 | ], 16 | function(angular) { 17 | 18 | 'use strict'; 19 | 20 | return angular.module('conceptreview', [ 21 | 'conceptreview.services', 22 | 'conceptreview.controllers', 23 | 'conceptreview.filters', 24 | 'conceptreview.directives' 25 | ]); 26 | } 27 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/test/webapp/unit/filters/proposalStatusSpec.js: -------------------------------------------------------------------------------- 1 | define(['angular-mocks', 'js/filters/proposalStatus'], function() { 2 | 'use strict'; 3 | 4 | describe('proposalStatusFilter Spec', function() { 5 | 6 | var filter; 7 | 8 | beforeEach(module('conceptpropose.filters')); 9 | 10 | beforeEach(inject(function(_proposalStatusFilter_) { 11 | filter = _proposalStatusFilter_; 12 | })); 13 | 14 | 15 | it('should convert DRAFT to Draft', function() { 16 | expect(filter('DRAFT')).toBe('Draft'); 17 | }); 18 | 19 | it('should convert SUBMITTED to Submitted', function() { 20 | expect(filter('SUBMITTED')).toBe('Submitted'); 21 | }); 22 | 23 | }); 24 | }); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/underscore/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## How to contribute to Underscore.js 2 | 3 | * Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/underscore/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. 4 | 5 | * Before sending a pull request for a feature, be sure to have [tests](http://underscorejs.org/test/). 6 | 7 | * Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/underscore/blob/master/underscore.js). 8 | 9 | * In your pull request, do not add documentation or re-build the minified `underscore-min.js` file. We'll do those things before cutting a new release. 10 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/underscore/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## How to contribute to Underscore.js 2 | 3 | * Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/underscore/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. 4 | 5 | * Before sending a pull request for a feature, be sure to have [tests](http://underscorejs.org/test/). 6 | 7 | * Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/underscore/blob/master/underscore.js). 8 | 9 | * In your pull request, do not add documentation or re-build the minified `underscore-min.js` file. We'll do those things before cutting a new release. 10 | -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/concept/SearchConceptResultDto.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto.concept; 2 | 3 | import java.util.List; 4 | 5 | public class SearchConceptResultDto { 6 | 7 | private String requestNum; 8 | 9 | private List concepts; 10 | 11 | public String getRequestNum() { 12 | return requestNum; 13 | } 14 | 15 | public void setRequestNum(String requestNum) { 16 | this.requestNum = requestNum; 17 | } 18 | 19 | public List getConcepts() { 20 | return concepts; 21 | } 22 | 23 | public void setConcepts(List concepts) { 24 | this.concepts = concepts; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /functional-tests/src/test/java/org/openmrs/module/conceptreview/functionaltest/steps/SeleniumDriver.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptreview.functionaltest.steps; 2 | 3 | import cucumber.api.java.After; 4 | import cucumber.api.java.Before; 5 | import org.openqa.selenium.firefox.FirefoxDriver; 6 | 7 | public class SeleniumDriver { 8 | 9 | private static FirefoxDriver driver = null; 10 | 11 | @Before("@Selenium") 12 | public void startScenario() { 13 | driver = new FirefoxDriver(); 14 | } 15 | 16 | public static synchronized FirefoxDriver getDriver() { 17 | return driver; 18 | } 19 | 20 | @After("@Selenium") 21 | public static void endScenario() { 22 | driver.quit(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /functional-tests/src/test/java/org/openmrs/module/conceptpropose/functionaltest/steps/SeleniumDriver.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.functionaltest.steps; 2 | 3 | import cucumber.api.java.After; 4 | import cucumber.api.java.Before; 5 | import org.openqa.selenium.firefox.FirefoxDriver; 6 | 7 | public class SeleniumDriver { 8 | 9 | private static FirefoxDriver driver = null; 10 | 11 | @Before("@Selenium") 12 | public void startScenario() { 13 | driver = new FirefoxDriver(); 14 | } 15 | 16 | public static synchronized FirefoxDriver getDriver() { 17 | return driver; 18 | } 19 | 20 | @After("@Selenium") 21 | public static void endScenario() { 22 | driver.quit(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/filters/proposalStatus.js: -------------------------------------------------------------------------------- 1 | define([ 2 | './index', 3 | 'config' 4 | ], 5 | function(filters) { 6 | 7 | 'use strict'; 8 | 9 | filters.filter('proposalStatus', function() { 10 | return function(input) { 11 | switch (input) { 12 | 13 | case 'DRAFT': 14 | return 'Draft'; 15 | 16 | case 'SUBMITTED': 17 | return 'Submitted'; 18 | 19 | case 'CLOSED': 20 | return 'Closed'; 21 | 22 | case 'DELETED': 23 | return 'Deleted'; 24 | 25 | case 'DOESNOTEXIST': 26 | return 'Does not exist in reviewer database'; 27 | 28 | default: 29 | return ''; 30 | } 31 | }; 32 | }); 33 | } 34 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/underscore/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "underscore", 3 | "description" : "JavaScript's functional programming helper library.", 4 | "homepage" : "http://underscorejs.org", 5 | "keywords" : ["util", "functional", "server", "client", "browser"], 6 | "author" : "Jeremy Ashkenas ", 7 | "repository" : {"type": "git", "url": "git://github.com/jashkenas/underscore.git"}, 8 | "main" : "underscore.js", 9 | "version" : "1.5.1", 10 | "devDependencies": { 11 | "phantomjs": "1.9.0-1" 12 | }, 13 | "scripts": { 14 | "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true" 15 | }, 16 | "license" : "MIT" 17 | } 18 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/underscore/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "underscore", 3 | "description" : "JavaScript's functional programming helper library.", 4 | "homepage" : "http://underscorejs.org", 5 | "keywords" : ["util", "functional", "server", "client", "browser"], 6 | "author" : "Jeremy Ashkenas ", 7 | "repository" : {"type": "git", "url": "git://github.com/jashkenas/underscore.git"}, 8 | "main" : "underscore.js", 9 | "version" : "1.5.1", 10 | "devDependencies": { 11 | "phantomjs": "1.9.0-1" 12 | }, 13 | "scripts": { 14 | "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true" 15 | }, 16 | "license" : "MIT" 17 | } 18 | -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/concept/NameDto.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto.concept; 2 | 3 | import org.openmrs.api.ConceptNameType; 4 | 5 | public class NameDto { 6 | 7 | private String name; 8 | 9 | private ConceptNameType type; 10 | 11 | private String locale; 12 | 13 | public String getName() { 14 | return name; 15 | } 16 | 17 | public void setName(final String name) { 18 | this.name = name; 19 | } 20 | 21 | public ConceptNameType getType() { 22 | return type; 23 | } 24 | 25 | public void setType(final ConceptNameType type) { 26 | this.type = type; 27 | } 28 | 29 | public String getLocale() { 30 | return locale; 31 | } 32 | 33 | public void setLocale(final String locale) { 34 | this.locale = locale; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /publish-standalone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #not sure which folder level the user has extracted the standalone zip 4 | #find the standalone openmrs modules folder 5 | STANDALONE_MOD_PATH=`find ./openmrs-standalone/ -type d -name modules | grep appdata\/modules` 6 | STANDALONE_TOMCAT_PATH=$STANDALONE_MOD_PATH/../../tomcat 7 | 8 | if [ -z "$STANDALONE_MOD_PATH" ]; then 9 | echo "Cant find openrms-standalone modules folder. Have you extractd the openrms-standalone modules??" 10 | exit 11 | fi 12 | 13 | 14 | #Replaced the existing omod in the standalone module folder with the 15 | #newly built omod from the target folder 16 | rm -rf $STANDALONE_MOD_PATH/cpm*.omod 17 | rm -rf $STANDALONE_TOMCAT_PATH/webapps/openmrs-standalone 18 | cp ./omod/target/*.omod $STANDALONE_MOD_PATH 19 | echo Published omod to $STANDALONE_MOD_PATH 20 | 21 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/requirejs-domready/README.md: -------------------------------------------------------------------------------- 1 | # text 2 | 3 | An AMD loader plugin for detecting DOM ready. 4 | 5 | Known to work in RequireJS, but should work in other 6 | AMD loaders that support the same loader plugin API. 7 | 8 | ## Docs 9 | 10 | See the [RequireJS API text section](http://requirejs.org/docs/api.html#pageload). 11 | 12 | ## Latest release 13 | 14 | The latest release will be available from the "latest" tag. 15 | 16 | ## License 17 | 18 | Dual-licensed -- new BSD or MIT. 19 | 20 | ## Where are the tests? 21 | 22 | They are in the [requirejs](https://github.com/jrburke/requirejs) and 23 | [r.js](https://github.com/jrburke/r.js) repos. 24 | 25 | ## History 26 | 27 | This plugin was in the [requirejs repo](https://github.com/jrburke/requirejs) 28 | up until the requirejs 2.0 release. 29 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/requirejs-domready/README.md: -------------------------------------------------------------------------------- 1 | # text 2 | 3 | An AMD loader plugin for detecting DOM ready. 4 | 5 | Known to work in RequireJS, but should work in other 6 | AMD loaders that support the same loader plugin API. 7 | 8 | ## Docs 9 | 10 | See the [RequireJS API text section](http://requirejs.org/docs/api.html#pageload). 11 | 12 | ## Latest release 13 | 14 | The latest release will be available from the "latest" tag. 15 | 16 | ## License 17 | 18 | Dual-licensed -- new BSD or MIT. 19 | 20 | ## Where are the tests? 21 | 22 | They are in the [requirejs](https://github.com/jrburke/requirejs) and 23 | [r.js](https://github.com/jrburke/r.js) repos. 24 | 25 | ## History 26 | 27 | This plugin was in the [requirejs repo](https://github.com/jrburke/requirejs) 28 | up until the requirejs 2.0 release. 29 | -------------------------------------------------------------------------------- /functional-tests/src/test/resources/org/openmrs/module/conceptpropose/functionaltest/EditConcept.feature: -------------------------------------------------------------------------------- 1 | Feature: Edit Concept 2 | As an administrator 3 | I want to edit a concept comment 4 | So that I can change the details 5 | 6 | @Selenium 7 | Scenario: Save Draft Proposal 8 | Given I have a new proposal with all necessary details 9 | When I save 10 | Then the proposal is stored with the details 11 | 12 | @Selenium 13 | Scenario: Add Concept to Draft Proposal 14 | Given I have a saved draft proposal with zero concepts 15 | When I add a concept and save 16 | Then the proposal is stored with the added concept details 17 | 18 | @Selenium 19 | Scenario: Edit Concept 20 | Given I have a saved draft proposal with at least 1 concept 21 | When I change the first concept comment 22 | Then the concept comment is saved -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/converter/ConceptConverter.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.converter; 2 | 3 | import org.dozer.CustomConverter; 4 | import org.openmrs.Concept; 5 | import org.openmrs.api.context.Context; 6 | 7 | public class ConceptConverter implements CustomConverter { 8 | 9 | @Override 10 | public Object convert(Object existing, Object source, Class destinationClass, Class sourceClass) { 11 | 12 | if (source instanceof Concept) { 13 | 14 | if (destinationClass == String.class) { 15 | return ((Concept) source).getName().getName(); 16 | } else { 17 | return ((Concept) source).getConceptId(); 18 | } 19 | 20 | } else if (source instanceof Integer) { 21 | return Context.getConceptService().getConcept(String.valueOf(source)); 22 | } 23 | 24 | return null; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/directives/searchConceptDialog.js: -------------------------------------------------------------------------------- 1 | define(['./index', 'config', 'js/controllers/SearchConceptDialogCtrl', './jqueryUiDialog'], 2 | function(directives, config) { 3 | 'use strict'; 4 | directives.directive('searchConceptDialog', function() { 5 | return { 6 | restrict: 'E', 7 | replace: true, 8 | scope: { 9 | isMultiple: '=isMultiple', 10 | onAcceptFn: '=onAcceptFn' 11 | }, 12 | require: '^jqueryUiDialog', 13 | templateUrl: config.resourceLocation + '/partials/SearchConceptDialog.html', 14 | controller: 'SearchConceptDialogCtrl', 15 | link: function($scope, ele, attr, jqueryUiDialog) { 16 | $scope.cancel = function() { 17 | jqueryUiDialog.closeDialog(); 18 | }; 19 | } 20 | }; 21 | }); 22 | }); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/directives/searchConceptDialog.js: -------------------------------------------------------------------------------- 1 | define(['./index', 'config', 'js/controllers/SearchConceptDialogCtrl', './jqueryUiDialog'], 2 | function(directives, config) { 3 | 'use strict'; 4 | directives.directive('searchConceptDialog', function() { 5 | return { 6 | restrict: 'E', 7 | replace: true, 8 | scope: { 9 | isMultiple: '=isMultiple', 10 | onAcceptFn: '=onAcceptFn' 11 | }, 12 | require: '^jqueryUiDialog', 13 | templateUrl: config.resourceLocation + '/partials/SearchConceptDialog.html', 14 | controller: 'SearchConceptDialogCtrl', 15 | link: function($scope, ele, attr, jqueryUiDialog) { 16 | $scope.cancel = function() { 17 | jqueryUiDialog.closeDialog(); 18 | }; 19 | } 20 | }; 21 | }); 22 | }); -------------------------------------------------------------------------------- /functional-tests/src/test/resources/proposal-with-concepts.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "email": "test@test.com", 4 | "description": "rar", 5 | "concepts": [ 6 | { 7 | "names": [ 8 | { 9 | "name": "New concept", 10 | "type": "FULLY_SPECIFIED", 11 | "locale": "en" 12 | } 13 | ], 14 | "synonyms": "Some synonym", 15 | "datatype": "N/A", 16 | "descriptions": [ 17 | { 18 | "description": "This new drug is required in the concept dictionary", 19 | "locale": "en" 20 | } 21 | ], 22 | "uuid": "blah-blah-blah-blah", 23 | "comments": "Some comment related to the submission process" 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/services/menu.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | './index' 5 | ], 6 | 7 | function(angular, config) { 8 | 9 | 'use strict'; 10 | 11 | angular.module('conceptreview.services').service('Menu', 12 | function() { 13 | this.getMenu = function(activeIndex) { 14 | var menuItems = [{ 15 | 'link': config.contextPath + '/admin', 16 | 'text': 'Admin' 17 | }, 18 | { 19 | 'link': config.contextPath + '/module/conceptreview/proposalReview.list', 20 | 'text': 'Review Proposals' 21 | } 22 | ]; 23 | 24 | if (activeIndex !== undefined && menuItems.length > activeIndex) { 25 | menuItems[activeIndex].active = true; 26 | } 27 | 28 | return menuItems; 29 | }; 30 | }); 31 | } 32 | ); -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "browser": true, 4 | "predef": [ 5 | "define", 6 | "require", 7 | "_", 8 | "$", 9 | "requirejs" 10 | ], 11 | "es5": false, 12 | "esnext": true, 13 | "bitwise": true, 14 | "camelcase": false, 15 | "curly": true, 16 | "eqeqeq": true, 17 | "immed": true, 18 | "indent": 2, 19 | "latedef": true, 20 | "newcap": true, 21 | "noarg": true, 22 | "quotmark": "single", 23 | "regexp": true, 24 | "undef": true, 25 | "unused": true, 26 | "strict": true, 27 | "trailing": true, 28 | "smarttabs": true, 29 | "globals": { 30 | "afterEach": false, 31 | "angular": false, 32 | "beforeEach": false, 33 | "describe": false, 34 | "expect": false, 35 | "inject": false, 36 | "it": false, 37 | "jasmine": false, 38 | "persist": false, 39 | "respond": false, 40 | "spyOn": false 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/test/webapp/test-main.js: -------------------------------------------------------------------------------- 1 | // to run karma: 2 | // $ karma start 3 | 4 | var config = { 5 | resourceLocation: '/base/main/webapp/resources', 6 | contextPath: '/openmrs' 7 | }; 8 | 9 | define('config', [], function() { 'use strict'; return config; }); 10 | 11 | require([ 12 | 'base/main/webapp/resources/js/requireJS-config' 13 | ], 14 | 15 | function() { 16 | 17 | 'use strict'; 18 | 19 | var tests = Object.keys(window.__karma__.files).filter(function (file) { 20 | return (/Spec\.js$/).test(file); 21 | }); 22 | 23 | require.config({ 24 | baseUrl: config.resourceLocation, 25 | paths: { 26 | 'angular-mocks': 'components/angular-mocks/angular-mocks' 27 | }, 28 | shim: { 29 | 'angular-mocks': ['angular'] 30 | }, 31 | deps: tests, 32 | callback: window.__karma__.start 33 | }); 34 | } 35 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/test/webapp/test-main.js: -------------------------------------------------------------------------------- 1 | // to run karma: 2 | // $ karma start 3 | 4 | var config = { 5 | resourceLocation: '/base/main/webapp/resources', 6 | contextPath: '/openmrs' 7 | }; 8 | 9 | define('config', [], function() { 'use strict'; return config; }); 10 | 11 | require([ 12 | 'base/main/webapp/resources/js/requireJS-config' 13 | ], 14 | 15 | function() { 16 | 17 | 'use strict'; 18 | 19 | var tests = Object.keys(window.__karma__.files).filter(function (file) { 20 | return (/Spec\.js$/).test(file); 21 | }); 22 | 23 | require.config({ 24 | baseUrl: config.resourceLocation, 25 | paths: { 26 | 'angular-mocks': 'components/angular-mocks/angular-mocks' 27 | }, 28 | shim: { 29 | 'angular-mocks': ['angular'] 30 | }, 31 | deps: tests, 32 | callback: window.__karma__.start 33 | }); 34 | } 35 | ); -------------------------------------------------------------------------------- /functional-tests/src/test/resources/org/openmrs/module/conceptpropose/functionaltest/SubmitDraftProposal.feature: -------------------------------------------------------------------------------- 1 | Feature: Submit Draft Proposal 2 | As an administrator 3 | I want to submit a draft proposal 4 | So that the dictionary manager receives the proposal 5 | 6 | @Selenium 7 | Scenario: Save Draft Proposal 8 | Given I have a new proposal with all necessary details 9 | When I save 10 | Then the proposal is stored with the details 11 | 12 | @Selenium 13 | Scenario: Add Concept to Draft Proposal 14 | Given I have a saved draft proposal with zero concepts 15 | When I add a concept and save 16 | Then the proposal is stored with the added concept details 17 | 18 | @Selenium 19 | Scenario: Submit Draft Proposal 20 | Given I have a saved draft proposal with at least 1 concept 21 | When I submit the proposal 22 | Then the proposal is sent to the dictionary manager 23 | 24 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jquery/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "components/jquery", 3 | "description": "jQuery JavaScript Library", 4 | "type": "component", 5 | "homepage": "http://jquery.com", 6 | "license": "MIT", 7 | "support": { 8 | "irc": "irc://irc.freenode.org/jquery", 9 | "issues": "http://bugs.jquery.com", 10 | "forum": "http://forum.jquery.com", 11 | "wiki": "http://docs.jquery.com/", 12 | "source": "https://github.com/jquery/jquery" 13 | }, 14 | "authors": [ 15 | { 16 | "name": "John Resig", 17 | "email": "jeresig@gmail.com" 18 | } 19 | ], 20 | "require": { 21 | "robloach/component-installer": "*" 22 | }, 23 | "extra": { 24 | "component": { 25 | "scripts": [ 26 | "jquery.js" 27 | ] 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jquery/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "components/jquery", 3 | "description": "jQuery JavaScript Library", 4 | "type": "component", 5 | "homepage": "http://jquery.com", 6 | "license": "MIT", 7 | "support": { 8 | "irc": "irc://irc.freenode.org/jquery", 9 | "issues": "http://bugs.jquery.com", 10 | "forum": "http://forum.jquery.com", 11 | "wiki": "http://docs.jquery.com/", 12 | "source": "https://github.com/jquery/jquery" 13 | }, 14 | "authors": [ 15 | { 16 | "name": "John Resig", 17 | "email": "jeresig@gmail.com" 18 | } 19 | ], 20 | "require": { 21 | "robloach/component-installer": "*" 22 | }, 23 | "extra": { 24 | "component": { 25 | "scripts": [ 26 | "jquery.js" 27 | ] 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/requirejs/index.html: -------------------------------------------------------------------------------- 1 |
2 |

/* ---

3 | 4 |

RequireJS is a JavaScript file and module loader. It is optimized for 5 | in-browser use, but it can be used in other JavaScript environments, 6 | like Rhino and Node. Using 7 | a modular script loader like RequireJS will improve the speed and 8 | quality of your code.

9 | 10 |

11 | IE 6+ .......... compatible ✔
12 | Firefox 2+ ..... compatible ✔
13 | Safari 3.2+ .... compatible ✔
14 | Chrome 3+ ...... compatible ✔
15 | Opera 10+ ...... compatible ✔ 16 |

17 | 18 |

Get started then check out the API.

19 | 20 |

--- */

21 |
22 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/requirejs/index.html: -------------------------------------------------------------------------------- 1 |
2 |

/* ---

3 | 4 |

RequireJS is a JavaScript file and module loader. It is optimized for 5 | in-browser use, but it can be used in other JavaScript environments, 6 | like Rhino and Node. Using 7 | a modular script loader like RequireJS will improve the speed and 8 | quality of your code.

9 | 10 |

11 | IE 6+ .......... compatible ✔
12 | Firefox 2+ ..... compatible ✔
13 | Safari 3.2+ .... compatible ✔
14 | Chrome 3+ ...... compatible ✔
15 | Opera 10+ ...... compatible ✔ 16 |

17 | 18 |

Get started then check out the API.

19 | 20 |

--- */

21 |
22 | -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/SubmissionResponseDto.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto; 2 | 3 | import org.openmrs.module.conceptpropose.SubmissionResponseStatus; 4 | 5 | public class SubmissionResponseDto { 6 | 7 | private Integer id; 8 | 9 | private SubmissionResponseStatus status; 10 | 11 | private String message; 12 | 13 | public Integer getId() { 14 | return id; 15 | } 16 | 17 | public void setId(Integer id) { 18 | this.id = id; 19 | } 20 | 21 | public SubmissionResponseStatus getStatus() { 22 | return status; 23 | } 24 | 25 | public void setStatus(SubmissionResponseStatus status) { 26 | this.status = status; 27 | } 28 | 29 | public String getMessage() { 30 | return message; 31 | } 32 | 33 | public void setMessage(String message) { 34 | this.message = message; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /functional-tests/src/test/resources/org/openmrs/module/conceptreview/functionaltest/ReviewProposals.feature: -------------------------------------------------------------------------------- 1 | Feature: Review page heading 2 | As Dictionary Manager 3 | I want the Incoming Proposals page to be labelled as Review Proposals 4 | So that the intention of this page is clear 5 | 6 | @Selenium 7 | Scenario: 8 | Given that I am logged in as Dictionary Manager 9 | When I am viewing the Admin page 10 | Then I see an option for Review Proposals to access incoming proposals 11 | 12 | # This functionality tests page labelling and is not resistant to localisation (the page label is 13 | # localisation-dependent). Furthermore, the functionality associated with this scenario is tested in 14 | # AcceptOrRejectProposals.feature. 15 | # @Selenium 16 | # Scenario: 17 | # Given that I am logged in as Dictionary Manager 18 | # When I view the page that is currently named Incoming Proposals 19 | # Then I see the page labelled as Review Proposals -------------------------------------------------------------------------------- /conceptreview/omod/src/test/webapp/unit/filters/proposalStatusSpec.js: -------------------------------------------------------------------------------- 1 | define(['angular-mocks', 'js/filters/proposalStatus'], function() { 2 | 'use strict'; 3 | 4 | describe('proposalStatusFilter Spec', function() { 5 | 6 | var filter; 7 | 8 | beforeEach(module('conceptreview.filters')); 9 | 10 | beforeEach(inject(function(_proposalStatusFilter_) { 11 | filter = _proposalStatusFilter_; 12 | })); 13 | 14 | 15 | it('should convert DRAFT to Draft', function() { 16 | expect(filter('DRAFT')).toBe('Draft'); 17 | }); 18 | 19 | it('should convert SUBMITTED to Submitted', function() { 20 | expect(filter('SUBMITTED')).toBe('Submitted'); 21 | }); 22 | 23 | it('should convert RECEIVED to Open', function() { 24 | expect(filter('RECEIVED')).toBe('Open'); 25 | }); 26 | 27 | it('should convert CLOSED to Closed', function() { 28 | expect(filter('CLOSED')).toBe('Closed'); 29 | }); 30 | 31 | }); 32 | }); -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/Settings.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto; 2 | 3 | public class Settings { 4 | 5 | private String url; 6 | 7 | private String username; 8 | 9 | private String password; 10 | 11 | private boolean urlInvalid; 12 | 13 | public String getUrl() { 14 | return url; 15 | } 16 | 17 | public void setUrl(final String url) { 18 | this.url = url; 19 | } 20 | 21 | public String getUsername() { 22 | return username; 23 | } 24 | 25 | public void setUsername(final String username) { 26 | this.username = username; 27 | } 28 | 29 | public String getPassword() { 30 | return password; 31 | } 32 | 33 | public void setPassword(final String password) { 34 | this.password = password; 35 | } 36 | 37 | public boolean getUrlInvalid() { 38 | return urlInvalid; 39 | } 40 | 41 | public void setUrlInvalid(boolean urlInvalid) { 42 | this.urlInvalid = urlInvalid; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/factory/NameDtoFactory.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto.factory; 2 | 3 | import com.google.common.collect.Lists; 4 | import org.openmrs.Concept; 5 | import org.openmrs.ConceptName; 6 | import org.openmrs.module.conceptpropose.web.dto.concept.NameDto; 7 | import org.springframework.stereotype.Component; 8 | 9 | import java.util.ArrayList; 10 | 11 | @Component 12 | public class NameDtoFactory { 13 | 14 | public ArrayList create(Concept concept) { 15 | ArrayList nameDtos = Lists.newArrayList(); 16 | for (ConceptName name: concept.getNames()) { 17 | NameDto nameDto = new NameDto(); 18 | nameDto.setName(name.getName()); 19 | nameDto.setType(name.getConceptNameType()); 20 | nameDto.setLocale(name.getLocale().toString()); 21 | nameDtos.add(nameDto); 22 | } 23 | return nameDtos; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/proposals.jsp: -------------------------------------------------------------------------------- 1 | <%@ include file="/WEB-INF/template/include.jsp" %> 2 | <%@ include file="/WEB-INF/template/header.jsp" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Loading...
11 | 12 | 20 | 21 | 22 | <%@ include file="/WEB-INF/template/footer.jsp" %> -------------------------------------------------------------------------------- /conceptreview/api/src/test/resources/conceptreview-test-hibernate.cfg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/proposalReview.jsp: -------------------------------------------------------------------------------- 1 | <%@ include file="/WEB-INF/template/include.jsp" %> 2 | <%@ include file="/WEB-INF/template/header.jsp" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Loading...
11 | 12 | 20 | 21 | <%@ include file="/WEB-INF/template/footer.jsp" %> -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/routes.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'js/app', 3 | 'config' 4 | ], 5 | function (conceptpropse, config) { 6 | 7 | 'use strict'; 8 | 9 | conceptpropse.config(function($routeProvider) { 10 | $routeProvider. 11 | when('/', { 12 | controller: 'ListProposalsCtrl', 13 | templateUrl: config.resourceLocation + '/partials/ListProposals.html' 14 | }). 15 | when('/edit', { 16 | controller: 'EditProposalCtrl', 17 | templateUrl: config.resourceLocation + '/partials/EditProposal.html' 18 | }). 19 | when('/edit/:proposalId', { 20 | controller: 'EditProposalCtrl', 21 | templateUrl: config.resourceLocation + '/partials/EditProposal.html' 22 | }). 23 | when('/settings', { 24 | controller: 'SettingsCtrl', 25 | templateUrl: config.resourceLocation + '/partials/Settings.html' 26 | }); 27 | }); 28 | } 29 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/requireJS-config.js: -------------------------------------------------------------------------------- 1 | require([ 2 | 'config' 3 | ], 4 | function(config) { 5 | 6 | 'use strict'; 7 | 8 | requirejs.config({ 9 | baseUrl: config.resourceLocation, 10 | paths: { 11 | 'angular': 'components/angular/angular', 12 | 'angular-resource': 'components/angular-resource/angular-resource', 13 | 'domReady': 'components/requirejs-domready/domReady', 14 | 'jquery': 'components/jquery/jquery', 15 | 'jquery-ui': 'components/jquery-ui/jquery-ui', 16 | 'require': 'components/requirejs/require', 17 | 'underscore': 'components/underscore/underscore' 18 | }, 19 | shim: { 20 | 'underscore': { 21 | exports: '_' 22 | }, 23 | 'jquery-ui': ['jquery'], 24 | 'angular': { 25 | deps: ['jquery'], 26 | exports: 'angular' 27 | }, 28 | 'angular-resource': ['angular'] 29 | } 30 | }); 31 | } 32 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/requireJS-config.js: -------------------------------------------------------------------------------- 1 | require([ 2 | 'config' 3 | ], 4 | function(config) { 5 | 6 | 'use strict'; 7 | 8 | requirejs.config({ 9 | baseUrl: config.resourceLocation, 10 | paths: { 11 | 'angular': 'components/angular/angular', 12 | 'angular-resource': 'components/angular-resource/angular-resource', 13 | 'domReady': 'components/requirejs-domready/domReady', 14 | 'jquery': 'components/jquery/jquery', 15 | 'jquery-ui': 'components/jquery-ui/jquery-ui', 16 | 'require': 'components/requirejs/require', 17 | 'underscore': 'components/underscore/underscore' 18 | }, 19 | shim: { 20 | 'underscore': { 21 | exports: '_' 22 | }, 23 | 'jquery-ui': ['jquery'], 24 | 'angular': { 25 | deps: ['jquery'], 26 | exports: 'angular' 27 | }, 28 | 'angular-resource': ['angular'] 29 | } 30 | }); 31 | } 32 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jquery-ui/AUTHORS.txt: -------------------------------------------------------------------------------- 1 | jQuery UI Authors (http://jqueryui.com/about) 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | and logs, available at http://github.com/jquery/jquery-ui 6 | 7 | Brandon Aaron 8 | Paul Bakaus (paulbakaus.com) 9 | David Bolter 10 | Rich Caloggero 11 | Chi Cheng (cloudream@gmail.com) 12 | Colin Clark (http://colin.atrc.utoronto.ca/) 13 | Michelle D'Souza 14 | Aaron Eisenberger (aaronchi@gmail.com) 15 | Ariel Flesler 16 | Bohdan Ganicky 17 | Scott González 18 | Marc Grabanski (m@marcgrabanski.com) 19 | Klaus Hartl (stilbuero.de) 20 | Scott Jehl 21 | Cody Lindley 22 | Eduardo Lundgren (eduardolundgren@gmail.com) 23 | Todd Parker 24 | John Resig 25 | Patty Toland 26 | Ca-Phun Ung (yelotofu.com) 27 | Keith Wood (kbwood@virginbroadband.com.au) 28 | Maggie Costello Wachs 29 | Richard D. Worth (rdworth.org) 30 | Jörn Zaefferer (bassistance.de) 31 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jquery-ui/AUTHORS.txt: -------------------------------------------------------------------------------- 1 | jQuery UI Authors (http://jqueryui.com/about) 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | and logs, available at http://github.com/jquery/jquery-ui 6 | 7 | Brandon Aaron 8 | Paul Bakaus (paulbakaus.com) 9 | David Bolter 10 | Rich Caloggero 11 | Chi Cheng (cloudream@gmail.com) 12 | Colin Clark (http://colin.atrc.utoronto.ca/) 13 | Michelle D'Souza 14 | Aaron Eisenberger (aaronchi@gmail.com) 15 | Ariel Flesler 16 | Bohdan Ganicky 17 | Scott González 18 | Marc Grabanski (m@marcgrabanski.com) 19 | Klaus Hartl (stilbuero.de) 20 | Scott Jehl 21 | Cody Lindley 22 | Eduardo Lundgren (eduardolundgren@gmail.com) 23 | Todd Parker 24 | John Resig 25 | Patty Toland 26 | Ca-Phun Ung (yelotofu.com) 27 | Keith Wood (kbwood@virginbroadband.com.au) 28 | Maggie Costello Wachs 29 | Richard D. Worth (rdworth.org) 30 | Jörn Zaefferer (bassistance.de) 31 | -------------------------------------------------------------------------------- /functional-tests/src/test/resources/org/openmrs/module/conceptreview/functionaltest/ConceptDiscussion.feature: -------------------------------------------------------------------------------- 1 | Feature: Concept Discussion 2 | As a Local Admin or Dictionary Manager 3 | I want to leave comments on a Concept Proposal 4 | so we can discuss the overall Proposal. 5 | 6 | # Scenario: Opening a pending concept proposal 7 | # Given that I am logged in as a Local Admin or Dictionary Manager 8 | # When I open a pending concept proposal's page 9 | # Then all comments are displayed in the order that they were made. 10 | @Selenium 11 | Scenario: Submitting a comment on a pending proposed concept 12 | Given that I am logged in as Dictionary Manager 13 | And that a proposal has just been submitted 14 | And I open the Review Proposals page 15 | And I click on a proposal to be reviewed 16 | When I click on a concept to be reviewed 17 | And I submit a comment 18 | Then my comment is displayed 19 | # And a timestamp is displayed And my user name is displayed with the comment -------------------------------------------------------------------------------- /conceptpropose/api/src/main/java/org/openmrs/module/conceptpropose/api/db/ProposedConceptPackageDAO.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.api.db; 2 | 3 | import java.util.List; 4 | 5 | import org.openmrs.module.conceptpropose.ProposedConceptPackage; 6 | 7 | /** 8 | * Service interface for the ProposedConceptPackage service data access objects. This interface is used by Spring to inject 9 | * transaction interceptors around the ProposedConceptPackageDAO implementations 10 | */ 11 | public interface ProposedConceptPackageDAO { 12 | 13 | List getAllConceptProposalPackages(); 14 | 15 | ProposedConceptPackage getConceptProposalPackageById(Integer id); 16 | 17 | ProposedConceptPackage getConceptProposalPackageByUuid(String uuid); 18 | 19 | ProposedConceptPackage saveConceptProposalPackage(ProposedConceptPackage conceptPackage); 20 | 21 | void deleteConceptProposalPackage(ProposedConceptPackage conceptPackage); 22 | 23 | ProposedConceptPackage getMostRecentConceptProposalPackage(); 24 | } 25 | -------------------------------------------------------------------------------- /functional-tests/src/test/resources/org/openmrs/module/conceptpropose/functionaltest/DeleteDraftProposal.feature: -------------------------------------------------------------------------------- 1 | Feature: Delete Draft Proposal 2 | As an administrator 3 | I want to delete draft proposal 4 | So that the proposal is no longer there 5 | 6 | @Selenium 7 | Scenario: Save Draft Proposal 8 | Given I have a new proposal with all necessary details 9 | When I save 10 | Then the proposal is stored with the details 11 | 12 | @Selenium 13 | Scenario: Start to Delete Draft Proposal and Cancel 14 | Given I have a saved draft proposal 15 | When I change the details and save 16 | And I have a saved draft proposal for deletion 17 | And I start to delete the proposal then cancel 18 | Then the proposal still exists 19 | 20 | @Selenium 21 | Scenario: Delete Draft Proposal 22 | Given I have a saved draft proposal 23 | When I change the details and save 24 | And I have a saved draft proposal for deletion 25 | And I delete the proposal 26 | Then the proposal is deleted 27 | 28 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/controllers/ListDeletedProposalsCtrl.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | 'js/services/deletedProposalReviews', 5 | './index' 6 | ], 7 | function(angular, config) { 8 | 9 | 'use strict'; 10 | 11 | angular.module('conceptreview.controllers') 12 | .controller('ListDeletedProposalsCtrl', 13 | function($scope, $location, DeletedProposalReviews, Menu) { 14 | 15 | document.title = 'Deleted Concept Proposals'; 16 | $scope.contextPath = config.contextPath; 17 | $scope.resourceLocation = config.resourceLocation; 18 | $scope.responseReceived = false; 19 | 20 | $scope.menu = Menu.getMenu(1); 21 | 22 | $scope.proposals = DeletedProposalReviews.query(function() { 23 | $scope.responseReceived = true; 24 | }); 25 | 26 | $scope.editProposal = function(proposalId) { 27 | $location.path('/deleted/' + proposalId); 28 | }; 29 | } 30 | ); 31 | } 32 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/filters/proposalReviewStatus.js: -------------------------------------------------------------------------------- 1 | define([ 2 | './index', 3 | 'config' 4 | ], 5 | function(filters, config) { 6 | 7 | 'use strict'; 8 | 9 | function getConceptLink(conceptId) { 10 | return '' + conceptId + ''; 11 | } 12 | 13 | filters.filter('proposalReviewStatus', function() { 14 | return function(proposal) { 15 | switch (proposal.status) { 16 | 17 | case 'RECEIVED': 18 | return 'Open'; 19 | 20 | case 'CLOSED_NEW': 21 | return 'New: ' + getConceptLink(proposal.conceptId); 22 | 23 | case 'CLOSED_EXISTING': 24 | return 'Existing: ' + getConceptLink(proposal.conceptId); 25 | 26 | case 'CLOSED_REJECTED': 27 | return 'Rejected'; 28 | 29 | default: 30 | return ''; 31 | } 32 | }; 33 | }); 34 | } 35 | ); -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/factory/DescriptionDtoFactory.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto.factory; 2 | 3 | import com.google.common.collect.Lists; 4 | import org.openmrs.Concept; 5 | import org.openmrs.ConceptDescription; 6 | import org.openmrs.module.conceptpropose.web.dto.concept.DescriptionDto; 7 | import org.springframework.stereotype.Component; 8 | 9 | import java.util.List; 10 | 11 | @Component 12 | public class DescriptionDtoFactory { 13 | 14 | public List create(final Concept concept) { 15 | List descriptionDtos = Lists.newArrayList(); 16 | for (ConceptDescription description: concept.getDescriptions()) { 17 | DescriptionDto descriptionDto = new DescriptionDto(); 18 | descriptionDto.setDescription(description.getDescription()); 19 | descriptionDto.setLocale(description.getLocale().toString()); 20 | descriptionDtos.add(descriptionDto); 21 | } 22 | return descriptionDtos; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/controllers/ListCompletedProposalsCtrl.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | 'js/services/completedProposalReviews', 5 | './index' 6 | ], 7 | function(angular, config) { 8 | 9 | 'use strict'; 10 | 11 | angular.module('conceptreview.controllers') 12 | .controller('ListCompletedProposalsCtrl', 13 | function($scope, $location, CompletedProposalReviews, Menu) { 14 | 15 | document.title = 'Review Compeleted Concept Proposals'; 16 | $scope.contextPath = config.contextPath; 17 | $scope.resourceLocation = config.resourceLocation; 18 | $scope.responseReceived = false; 19 | 20 | $scope.menu = Menu.getMenu(1); 21 | 22 | $scope.proposals = CompletedProposalReviews.query(function() { 23 | $scope.responseReceived = true; 24 | }); 25 | 26 | $scope.editProposal = function(proposalId) { 27 | $location.path('/edit/' + proposalId); 28 | }; 29 | } 30 | ); 31 | } 32 | ); -------------------------------------------------------------------------------- /conceptreview/Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 3 | 'use strict'; 4 | 5 | grunt.loadNpmTasks('grunt-contrib-jshint'); 6 | grunt.loadNpmTasks('grunt-karma'); 7 | 8 | grunt.initConfig({ 9 | pkg: grunt.file.readJSON('package.json'), 10 | srcDir: 'omod/src/main/webapp', 11 | testDir: 'omod/src/test/webapp', 12 | jshint: { 13 | options: { 14 | jshintrc: '../.jshintrc' 15 | }, 16 | all: [ 17 | 'Gruntfile.js', 18 | '<%= srcDir %>/resources/js/{,**/}*.js', 19 | '<%= testDir %>/{,**/}*.js' 20 | ] 21 | }, 22 | karma: { 23 | options: { 24 | configFile: '<%= testDir %>/karma.conf.js' 25 | }, 26 | unit: { 27 | runnerPort: 9101, 28 | background: true 29 | }, 30 | continuous: { 31 | singleRun: true, 32 | browsers: ['PhantomJS'] 33 | } 34 | } 35 | }); 36 | 37 | grunt.registerTask('build', [ 38 | 'jshint', 39 | 'karma:continuous' 40 | ]); 41 | 42 | grunt.registerTask('default', ['build']); 43 | }; -------------------------------------------------------------------------------- /conceptpropose/Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 3 | 'use strict'; 4 | 5 | grunt.loadNpmTasks('grunt-contrib-jshint'); 6 | grunt.loadNpmTasks('grunt-karma'); 7 | 8 | grunt.initConfig({ 9 | pkg: grunt.file.readJSON('package.json'), 10 | srcDir: 'omod/src/main/webapp', 11 | testDir: 'omod/src/test/webapp', 12 | jshint: { 13 | options: { 14 | jshintrc: '../.jshintrc' 15 | }, 16 | all: [ 17 | 'Gruntfile.js', 18 | '<%= srcDir %>/resources/js/{,**/}*.js', 19 | '<%= testDir %>/{,**/}*.js' 20 | ] 21 | }, 22 | karma: { 23 | options: { 24 | configFile: '<%= testDir %>/karma.conf.js' 25 | }, 26 | unit: { 27 | runnerPort: 9101, 28 | background: true 29 | }, 30 | continuous: { 31 | singleRun: true, 32 | browsers: ['PhantomJS'] 33 | } 34 | } 35 | }); 36 | 37 | grunt.registerTask('build', [ 38 | 'jshint', 39 | 'karma:continuous' 40 | ]); 41 | 42 | grunt.registerTask('default', ['build']); 43 | }; -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/lib/jasmine-core.rb: -------------------------------------------------------------------------------- 1 | module Jasmine 2 | module Core 3 | class << self 4 | def path 5 | File.join(File.dirname(__FILE__), "jasmine-core") 6 | end 7 | 8 | def js_files 9 | (["jasmine.js"] + Dir.glob(File.join(path, "*.js"))).map { |f| File.basename(f) }.uniq 10 | end 11 | 12 | SPEC_TYPES = ["core", "html", "node"] 13 | 14 | def core_spec_files 15 | spec_files("core") 16 | end 17 | 18 | def html_spec_files 19 | spec_files("html") 20 | end 21 | 22 | def node_spec_files 23 | spec_files("node") 24 | end 25 | 26 | def spec_files(type) 27 | raise ArgumentError.new("Unrecognized spec type") unless SPEC_TYPES.include?(type) 28 | (Dir.glob(File.join(path, "spec", type, "*.js"))).map { |f| File.join("spec", type, File.basename(f)) }.uniq 29 | end 30 | 31 | def css_files 32 | Dir.glob(File.join(path, "*.css")).map { |f| File.basename(f) } 33 | end 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/lib/jasmine-core.rb: -------------------------------------------------------------------------------- 1 | module Jasmine 2 | module Core 3 | class << self 4 | def path 5 | File.join(File.dirname(__FILE__), "jasmine-core") 6 | end 7 | 8 | def js_files 9 | (["jasmine.js"] + Dir.glob(File.join(path, "*.js"))).map { |f| File.basename(f) }.uniq 10 | end 11 | 12 | SPEC_TYPES = ["core", "html", "node"] 13 | 14 | def core_spec_files 15 | spec_files("core") 16 | end 17 | 18 | def html_spec_files 19 | spec_files("html") 20 | end 21 | 22 | def node_spec_files 23 | spec_files("node") 24 | end 25 | 26 | def spec_files(type) 27 | raise ArgumentError.new("Unrecognized spec type") unless SPEC_TYPES.include?(type) 28 | (Dir.glob(File.join(path, "spec", type, "*.js"))).map { |f| File.join("spec", type, File.basename(f)) }.uniq 29 | end 30 | 31 | def css_files 32 | Dir.glob(File.join(path, "*.css")).map { |f| File.basename(f) } 33 | end 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/filters/proposalReviewStatus.js: -------------------------------------------------------------------------------- 1 | define([ 2 | './index', 3 | 'config' 4 | ], 5 | function(filters, config) { 6 | 7 | 'use strict'; 8 | 9 | function getConceptLink(conceptId) { 10 | return '' + conceptId + ''; 11 | } 12 | 13 | filters.filter('proposalReviewStatus', function() { 14 | return function(proposal) { 15 | switch (proposal.status) { 16 | 17 | case 'RECEIVED': 18 | return 'Open'; 19 | 20 | case 'CLOSED_NEW': 21 | return 'New' + (proposal.id ? ': ' + getConceptLink(proposal.id) : ''); 22 | 23 | case 'CLOSED_EXISTING': 24 | return 'Existing' + (proposal.id ? ': ' + getConceptLink(proposal.id) : ''); 25 | 26 | case 'CLOSED_REJECTED': 27 | return 'Rejected'; 28 | 29 | default: 30 | return ''; 31 | } 32 | }; 33 | }); 34 | } 35 | ); 36 | -------------------------------------------------------------------------------- /functional-tests/src/test/resources/org/openmrs/module/conceptpropose/functionaltest/DeleteConcept.feature: -------------------------------------------------------------------------------- 1 | Feature: Delete Concept 2 | As an administrator 3 | I want to delete concept from a draft proposal 4 | So that the concept is no longer there 5 | 6 | @Selenium 7 | Scenario: Save Draft Proposal 8 | Given I have a new proposal with all necessary details 9 | When I save 10 | Then the proposal is stored with the details 11 | 12 | @Selenium 13 | Scenario: Add Concept to Draft Proposal 14 | Given I have a saved draft proposal with zero concepts 15 | When I add a concept and save 16 | Then the proposal is stored with the added concept details 17 | 18 | @Selenium 19 | Scenario: Start to Delete Concept and Cancel 20 | Given I have a saved draft proposal with at least 1 concept 21 | When I start to delete a concept then cancel 22 | Then the concept still exists in the proposal 23 | 24 | @Selenium 25 | Scenario: Delete Concept 26 | Given I have a saved draft proposal with at least 1 concept 27 | When I delete a concept 28 | Then the concept is deleted -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/concept/AnswerDto.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto.concept; 2 | 3 | public class AnswerDto { 4 | 5 | public String conceptUuid; 6 | 7 | public String answerConceptUuid; 8 | 9 | public String answerDrugUuid; 10 | 11 | private Double sortWeight; 12 | 13 | public String getAnswerConceptUuid() { 14 | return answerConceptUuid; 15 | } 16 | 17 | public void setAnswerConceptUuid(String answerConceptUuid) { 18 | this.answerConceptUuid = answerConceptUuid; 19 | } 20 | 21 | public String getConceptUuid() { 22 | return conceptUuid; 23 | } 24 | 25 | public void setConceptUuid(String conceptUuid) { 26 | this.conceptUuid = conceptUuid; 27 | } 28 | 29 | public String getAnswerDrugUuid() { 30 | return answerDrugUuid; 31 | } 32 | 33 | public void setAnswerDrugUuid(String answerDrugUuid) { 34 | this.answerDrugUuid = answerDrugUuid; 35 | } 36 | 37 | public Double getSortWeight() { 38 | return sortWeight; 39 | } 40 | 41 | public void setSortWeight(Double sortWeight) { 42 | this.sortWeight = sortWeight; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/config.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Compass configuration file - for building Jasmine's 'final CSS files 3 | # 4 | 5 | # Require any additional compass plugins here. 6 | 7 | # Set this to the root of your project when deployed: 8 | http_path = "/" 9 | css_dir = "src/html" 10 | sass_dir = "src/html" 11 | images_dir = "images" 12 | javascripts_dir = "javascripts" 13 | 14 | # You can select your preferred output style here (can be overridden via the command line): 15 | # output_style = :expanded or :nested or :compact or :compressed 16 | output_style = :compact 17 | 18 | # To enable relative paths to assets via compass helper functions. Uncomment: 19 | # relative_assets = true 20 | 21 | # To disable debugging comments that display the original location of your selectors. Uncomment: 22 | line_comments = false 23 | 24 | 25 | # If you prefer the indented syntax, you might want to regenerate this 26 | # project again passing --syntax sass, or you can uncomment this: 27 | # preferred_syntax = :sass 28 | # and then run: 29 | # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass 30 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/partials/ListIncomingProposals.html: -------------------------------------------------------------------------------- 1 | 2 |

Incoming Concept Proposals

3 | Open Concept Proposals 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
FromAge (days)Description# remaining
Loading...
No proposals found
{{proposal.email}}{{proposal.age}}{{proposal.description}}{{proposal.concepts.length}}
18 |

View completed proposals

-------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/config.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Compass configuration file - for building Jasmine's 'final CSS files 3 | # 4 | 5 | # Require any additional compass plugins here. 6 | 7 | # Set this to the root of your project when deployed: 8 | http_path = "/" 9 | css_dir = "src/html" 10 | sass_dir = "src/html" 11 | images_dir = "images" 12 | javascripts_dir = "javascripts" 13 | 14 | # You can select your preferred output style here (can be overridden via the command line): 15 | # output_style = :expanded or :nested or :compact or :compressed 16 | output_style = :compact 17 | 18 | # To enable relative paths to assets via compass helper functions. Uncomment: 19 | # relative_assets = true 20 | 21 | # To disable debugging comments that display the original location of your selectors. Uncomment: 22 | line_comments = false 23 | 24 | 25 | # If you prefer the indented syntax, you might want to regenerate this 26 | # project again passing --syntax sass, or you can uncomment this: 27 | # preferred_syntax = :sass 28 | # and then run: 29 | # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass 30 | -------------------------------------------------------------------------------- /conceptreview/omod/src/test/webapp/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | 3 | 'use strict'; 4 | 5 | config.set({ 6 | basePath: '../../', 7 | frameworks: ['jasmine', 'requirejs'], 8 | files: [ 9 | { pattern: 'main/webapp/resources/components/**/*.js', included: false, watched: true }, 10 | { pattern: 'main/webapp/resources/js/**/*.js', included: false, watched: true }, 11 | { pattern: 'test/webapp/unit/**/*Spec.js', included: false, watched: true }, 12 | 13 | 'test/webapp/test-main.js' 14 | ], 15 | exclude: [ 16 | 'main/webapp/resources/components/**/*Spec.js', 17 | 'main/webapp/resources/js/main' 18 | ], 19 | reporters: ['progress'], 20 | port: 9876, 21 | runnerPort: 9100, 22 | colors: true, 23 | autoWatch: true, 24 | 25 | // Start these browsers, currently available: 26 | // - Chrome 27 | // - ChromeCanary 28 | // - Firefox 29 | // - Opera 30 | // - Safari (only Mac) 31 | // - PhantomJS 32 | // - IE (only Windows) 33 | browsers: ['Chrome'], 34 | captureTimeout: 60000, 35 | singleRun: false 36 | }); 37 | }; -------------------------------------------------------------------------------- /conceptpropose/omod/src/test/webapp/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | 3 | 'use strict'; 4 | 5 | config.set({ 6 | basePath: '../../', 7 | frameworks: ['jasmine', 'requirejs'], 8 | files: [ 9 | { pattern: 'main/webapp/resources/components/**/*.js', included: false, watched: true }, 10 | { pattern: 'main/webapp/resources/js/**/*.js', included: false, watched: true }, 11 | { pattern: 'test/webapp/unit/**/*Spec.js', included: false, watched: true }, 12 | 13 | 'test/webapp/test-main.js' 14 | ], 15 | exclude: [ 16 | 'main/webapp/resources/components/**/*Spec.js', 17 | 'main/webapp/resources/js/cpm-main' 18 | ], 19 | reporters: ['progress'], 20 | port: 9876, 21 | runnerPort: 9100, 22 | colors: true, 23 | autoWatch: true, 24 | 25 | // Start these browsers, currently available: 26 | // - Chrome 27 | // - ChromeCanary 28 | // - Firefox 29 | // - Opera 30 | // - Safari (only Mac) 31 | // - PhantomJS 32 | // - IE (only Windows) 33 | browsers: ['Chrome'], 34 | captureTimeout: 60000, 35 | singleRun: false 36 | }); 37 | }; -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/controllers/ReviewDeletedProposalCtrl.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | 'js/services/deletedProposalReviews', 5 | 'js/filters/proposalStatus', 6 | './index' 7 | ], 8 | function(angular, config) { 9 | 10 | 'use strict'; 11 | 12 | angular.module('conceptreview.controllers').controller('ReviewDeletedProposalCtrl', 13 | function($scope, $routeParams, $location, $window, DeletedProposalReviews, Menu) { 14 | 15 | /* We need to add a status tag in this */ 16 | 17 | var proposalId = $routeParams.proposalId; 18 | $scope.isLoading = true; 19 | $scope.contextPath = config.contextPath; 20 | $scope.resourceLocation = config.resourceLocation; 21 | 22 | $scope.menu = Menu.getMenu(); 23 | 24 | $scope.proposal = DeletedProposalReviews.get({proposalId: proposalId}, function() { 25 | $scope.isLoading = false; 26 | }); 27 | 28 | $scope.showConcept = function(conceptId) { 29 | $location.path('/deleted/' + $scope.proposal.id + '/concept/' + conceptId); 30 | }; 31 | }); 32 | } 33 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/services/menu.js: -------------------------------------------------------------------------------- 1 | define([ 2 | './index', 3 | 'config' 4 | ], 5 | 6 | function(services, config) { 7 | 8 | 'use strict'; 9 | 10 | services.service('Menu', function() { 11 | this.getMenu = function(activeIndex) { 12 | var menuItems = [{ 13 | 'link': config.contextPath + '/admin', 14 | 'text': 'Admin' 15 | }, 16 | { 17 | 'link': config.contextPath + '/module/conceptpropose/proposals.list#edit', 18 | 'text': 'Create Proposal' 19 | }, 20 | { 21 | 'link': config.contextPath + '/module/conceptpropose/proposals.list', 22 | 'text': 'Monitor Proposals' 23 | }, 24 | { 25 | 'link': config.contextPath + '/module/conceptpropose/proposals.list#settings', 26 | 'text': 'Settings' 27 | } 28 | ]; 29 | 30 | if (activeIndex !== undefined && menuItems.length > activeIndex) { 31 | menuItems[activeIndex].active = true; 32 | } 33 | 34 | return menuItems; 35 | }; 36 | }); 37 | } 38 | ); -------------------------------------------------------------------------------- /conceptreview/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | group = 'org.openmrs.module.conceptreview' 3 | version = '1.0-SNAPSHOT' 4 | 5 | subprojects { 6 | dependencies { 7 | compile project(':common') 8 | } 9 | } 10 | 11 | task createOmod(type: Jar, dependsOn: subprojects.tasks['build']) { 12 | 13 | baseName = 'openmrs-module-' + project.name 14 | extension = 'omod' 15 | 16 | subprojects.each { 17 | subproject -> 18 | from subproject.configurations.archives.allArtifacts.files.collect { 19 | zipTree(it) 20 | } 21 | 22 | } 23 | 24 | into('web/module') { 25 | from fileTree(dir: 'omod/src/main/webapp') 26 | } 27 | 28 | metaInf { 29 | into('maven/org.openmrs.module/' + project.name + '-omod') 30 | def pomProperties = new File(getTemporaryDir(), 'pom.properties') 31 | pomProperties.write "version=${project.version}\n" 32 | pomProperties << "groupId=${project.group}\n" 33 | pomProperties << "artifactId=${project.name}\n" 34 | from pomProperties 35 | } 36 | } 37 | 38 | artifacts { 39 | archives createOmod 40 | } 41 | 42 | defaultTasks 'createOmod' 43 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jquery-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-ui", 3 | "title": "jQuery UI", 4 | "description": "Abstractions for low-level interaction and animation, advanced effects and high-level, themeable widgets, built on top of the jQuery JavaScript Library, that you can use to build highly interactive web applications.", 5 | "version": "1.8.23", 6 | "homepage": "https://github.com/jquery/jquery-ui", 7 | "author": { 8 | "name": "AUTHORS.txt" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git://github.com/jquery/jquery-ui.git" 13 | }, 14 | "bugs": { 15 | "url": "http://bugs.jqueryui.com/" 16 | }, 17 | "licenses": [ 18 | { 19 | "type": "MIT", 20 | "url": "http://www.opensource.org/licenses/MIT" 21 | }, 22 | { 23 | "type": "GPL", 24 | "url": "http://www.opensource.org/licenses/GPL-2.0" 25 | } 26 | ], 27 | "dependencies": {}, 28 | "devDependencies": { 29 | "grunt": "0.3.9", 30 | "grunt-css": "0.1.1", 31 | "grunt-compare-size": "0.1.1", 32 | "request": "2.9.153", 33 | "rimraf": "2.0.1" 34 | }, 35 | "keywords": [] 36 | } 37 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jquery-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-ui", 3 | "title": "jQuery UI", 4 | "description": "Abstractions for low-level interaction and animation, advanced effects and high-level, themeable widgets, built on top of the jQuery JavaScript Library, that you can use to build highly interactive web applications.", 5 | "version": "1.8.23", 6 | "homepage": "https://github.com/jquery/jquery-ui", 7 | "author": { 8 | "name": "AUTHORS.txt" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git://github.com/jquery/jquery-ui.git" 13 | }, 14 | "bugs": { 15 | "url": "http://bugs.jqueryui.com/" 16 | }, 17 | "licenses": [ 18 | { 19 | "type": "MIT", 20 | "url": "http://www.opensource.org/licenses/MIT" 21 | }, 22 | { 23 | "type": "GPL", 24 | "url": "http://www.opensource.org/licenses/GPL-2.0" 25 | } 26 | ], 27 | "dependencies": {}, 28 | "devDependencies": { 29 | "grunt": "0.3.9", 30 | "grunt-css": "0.1.1", 31 | "grunt-compare-size": "0.1.1", 32 | "request": "2.9.153", 33 | "rimraf": "2.0.1" 34 | }, 35 | "keywords": [] 36 | } 37 | -------------------------------------------------------------------------------- /conceptreview/omod/src/test/webapp/unit/controllers/ListIncomingProposalsCtrlSpec.js: -------------------------------------------------------------------------------- 1 | define(['angular-mocks', 'js/controllers/ListIncomingProposalsCtrl'], function() { 2 | 'use strict'; 3 | 4 | describe('ListIncomingProposals Controller Spec', function() { 5 | 6 | var scope; 7 | var httpBackend; 8 | var controller; 9 | var menuService; 10 | 11 | beforeEach(module('conceptreview.controllers')); 12 | 13 | beforeEach(inject(function($rootScope, $controller, $httpBackend, Menu) { 14 | scope = $rootScope.$new(); 15 | controller = $controller; 16 | httpBackend = $httpBackend; 17 | menuService = Menu; 18 | })); 19 | 20 | it('should get menu', function () { 21 | httpBackend.expectGET('/openmrs/ws/conceptreview/proposalReviews').respond({}); 22 | var menuResponse = 'something'; 23 | spyOn(menuService, 'getMenu').andCallFake(function (index) { 24 | expect(index).toBe(1); 25 | return menuResponse; 26 | }); 27 | 28 | controller('ListIncomingProposalsCtrl', {$scope: scope, $routeParams: {}}); 29 | 30 | expect(scope.menu).toBe(menuResponse); 31 | }); 32 | 33 | }); 34 | }); -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/ProposedConceptDto.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto; 2 | 3 | import java.util.List; 4 | import org.codehaus.jackson.annotate.JsonIgnoreProperties; 5 | import org.openmrs.module.conceptpropose.ProposalStatus; 6 | import org.openmrs.module.conceptpropose.web.dto.concept.ConceptDto; 7 | 8 | @JsonIgnoreProperties(ignoreUnknown = true) 9 | public class ProposedConceptDto extends ConceptDto { 10 | 11 | private String comment; 12 | 13 | private List comments; 14 | 15 | private ProposalStatus status; 16 | 17 | public String getComment() { 18 | return comment; 19 | } 20 | 21 | public void setComment(String comment) { 22 | this.comment = comment; 23 | } 24 | 25 | public List getComments() { 26 | return comments; 27 | } 28 | 29 | public void setComments(List comments) { 30 | this.comments = comments; 31 | } 32 | 33 | public ProposalStatus getStatus() { 34 | return status; 35 | } 36 | 37 | public void setStatus(ProposalStatus status) { 38 | this.status = status; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/MIT.LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2011 Pivotal Labs 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/MIT.LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2011 Pivotal Labs 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /conceptreview/omod/src/test/webapp/unit/controllers/ReviewProposalCtrlSpec.js: -------------------------------------------------------------------------------- 1 | define(['angular-mocks', 'js/controllers/ReviewProposalCtrl'], function() { 2 | 'use strict'; 3 | 4 | describe('ReviewProposalCtrl Controller Spec', function() { 5 | 6 | var scope; 7 | var httpBackend; 8 | var controller; 9 | var menuService; 10 | 11 | beforeEach(function () { 12 | module('conceptreview.controllers'); 13 | 14 | inject(function($rootScope, $controller, $httpBackend, Menu) { 15 | scope = $rootScope.$new(); 16 | controller = $controller; 17 | httpBackend = $httpBackend; 18 | menuService = Menu; 19 | }); 20 | httpBackend.whenGET('/openmrs/ws/conceptreview/proposalReviews').respond({}); 21 | }); 22 | 23 | it('should get menu', function () { 24 | var menuResponse = 'something'; 25 | spyOn(menuService, 'getMenu').andCallFake(function (index) { 26 | expect(index).not.toBeDefined(); 27 | return menuResponse; 28 | }); 29 | 30 | controller('ReviewProposalCtrl', {$scope: scope, $routeParams: {}}); 31 | 32 | expect(scope.menu).toBe(menuResponse); 33 | }); 34 | 35 | }); 36 | }); -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/factory/AnswerDtoFactory.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto.factory; 2 | 3 | import org.openmrs.Concept; 4 | import org.openmrs.ConceptAnswer; 5 | import org.openmrs.module.conceptpropose.web.dto.concept.AnswerDto; 6 | import org.springframework.stereotype.Component; 7 | 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | @Component 12 | public class AnswerDtoFactory { 13 | 14 | public List create(Concept concept) { 15 | List answerDtos = new ArrayList(); 16 | for (ConceptAnswer answer: concept.getAnswers()) { 17 | AnswerDto answerDto = new AnswerDto(); 18 | if (answer.getConcept() != null) { 19 | answerDto.setConceptUuid(answer.getConcept().getUuid()); 20 | } 21 | if (answer.getAnswerConcept() != null) { 22 | answerDto.setAnswerConceptUuid(answer.getAnswerConcept().getUuid()); 23 | } 24 | if (answer.getAnswerDrug() != null) { 25 | answerDto.setAnswerDrugUuid(answer.getAnswerDrug().getUuid()); 26 | } 27 | answerDto.setSortWeight(answer.getSortWeight()); 28 | answerDtos.add(answerDto); 29 | } 30 | return answerDtos; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/partials/ListCompletedProposals.html: -------------------------------------------------------------------------------- 1 | 2 |

Review Concept Proposals

3 | Completed Concept Proposals 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
FromAge (days)Description# concepts
Loading...
No proposals found
{{proposal.email}}{{proposal.age}}{{proposal.description}}{{proposal.concepts.length}}
18 |

View open proposals | View deleted proposals

-------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/partials/ListDeletedProposals.html: -------------------------------------------------------------------------------- 1 | 2 |

Review Concept Proposals

3 | Deleted Concept Proposals 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
FromAge (days)Description# concepts
Loading...
No proposals found
{{proposal.email}}{{proposal.age}}{{proposal.description}}{{proposal.concepts.length}}
18 |

View open proposals | View completed proposals

-------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/partials/ReviewProposal.html: -------------------------------------------------------------------------------- 1 | 2 |
Loading...
3 |

Concept Proposal from {{proposal.email}}

4 |

From: {{proposal.email}}

5 |

Description: {{proposal.description}}

6 | Concepts 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
NameClass + DatatypeCommentsStatus
No concepts added
{{concept.preferredName}}{{concept.conceptClass}}, {{concept.datatype}}{{concept.comment}}
23 |

24 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/partials/ListIncomingProposals.html: -------------------------------------------------------------------------------- 1 | 2 |

Review Concept Proposals

3 | Open Concept Proposals 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
FromAge (days)Description# remaining
Loading...
No proposals found
{{proposal.name}} ({{proposal.email}}){{proposal.age}}{{proposal.description}}{{proposal.remainingConcepts}}
18 |

View completed proposals | View deleted proposals

19 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/controllers/ListIncomingProposalsCtrl.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | 'js/services/proposalReviews', 5 | './index' 6 | ], 7 | function(angular, config) { 8 | 9 | 'use strict'; 10 | 11 | angular.module('conceptreview.controllers') 12 | .controller('ListIncomingProposalsCtrl', 13 | function($scope, $location, ProposalReviews, Menu) { 14 | 15 | document.title = 'Review Open Concept Proposals'; 16 | $scope.contextPath = config.contextPath; 17 | $scope.resourceLocation = config.resourceLocation; 18 | $scope.responseReceived = false; 19 | 20 | $scope.menu = Menu.getMenu(1); 21 | 22 | $scope.proposals = ProposalReviews.query(function() { 23 | _.each($scope.proposals, function(proposal){ 24 | proposal.remainingConcepts = _.filter(proposal.concepts, function(i){ return i.status === 'RECEIVED'; }).length; 25 | }); 26 | $scope.responseReceived = true; 27 | }); 28 | 29 | $scope.editProposal = function(proposalId) { 30 | $location.path('/edit/' + proposalId); 31 | }; 32 | } 33 | ); 34 | } 35 | ); 36 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/underscore/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative 2 | Reporters & Editors 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/underscore/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative 2 | Reporters & Editors 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/partials/ReviewDeletedProposal.html: -------------------------------------------------------------------------------- 1 | 2 |
Loading...
3 |

Deleted Concept Proposal from {{proposal.name}}

4 |

Email: {{proposal.email}}

5 |

Description: {{proposal.description}}

6 |

Status: {{proposal.status | proposalStatus}}

7 | Concepts 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameClass + DatatypeCommentsStatus
No concepts added
{{concept.preferredName}}{{concept.conceptClass}}, {{concept.datatype}}{{concept.comment}}
24 | -------------------------------------------------------------------------------- /conceptpropose/api/src/test/java/org/openmrs/module/conceptpropose/test/CpmBaseContextSensitive.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.test; 2 | 3 | import java.util.Properties; 4 | 5 | import org.apache.commons.logging.Log; 6 | import org.apache.commons.logging.LogFactory; 7 | import org.hibernate.cfg.Environment; 8 | import org.junit.Ignore; 9 | import org.openmrs.api.context.Context; 10 | import org.openmrs.test.BaseModuleContextSensitiveTest; 11 | 12 | /** 13 | * Sub-classing the core OpenMRS test class so that we have an opportunity to modify runtime properties and 14 | * configure H2 for tracking 15 | */ 16 | @Ignore("Base class for testing") 17 | public class CpmBaseContextSensitive extends BaseModuleContextSensitiveTest { 18 | 19 | private static Log log = LogFactory.getLog(CpmBaseContextSensitive.class); 20 | 21 | public CpmBaseContextSensitive() { 22 | super(); 23 | Properties props = getRuntimeProperties(); 24 | String oldUrlProperty = props.getProperty(Environment.URL); 25 | String newUrlProperty = oldUrlProperty + ";TRACE_LEVEL_FILE=4"; 26 | 27 | if (log.isInfoEnabled()) 28 | log.info("Changing URL property from: " + oldUrlProperty + " to " + newUrlProperty); 29 | 30 | props.setProperty(Environment.URL, newUrlProperty); 31 | Context.setRuntimeProperties(props); 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /functional-tests/src/test/resources/org/openmrs/module/conceptpropose/functionaltest/ViewManageProposals.feature: -------------------------------------------------------------------------------- 1 | Feature: Local Admin access to all proposals 2 | As a Local Admin 3 | I want to see all proposals in the Manage Proposals page 4 | So that I can navigate and view the proposals I worked with 5 | 6 | @Selenium 7 | Scenario: Local Admin opens the Manage Proposals page to find submitted proposals 8 | Given that I am logged in as a Local Admin 9 | And that at least one proposal has been submitted 10 | When I open the Manage Proposal page 11 | Then all proposals that have been submitted are displayed 12 | 13 | @Selenium 14 | Scenario: Local Admin opens the Manage Proposals page to find draft proposals 15 | Given that I am logged in as a Local Admin 16 | And that at least one proposal has been saved as a draft 17 | When I open the Manage Proposal page 18 | Then all proposals that have been saved as a draft are displayed 19 | 20 | @Selenium 21 | Scenario: Local Admin opens the Manage Proposals page with no proposals 22 | Given that I am logged in as a Local Admin 23 | And there are no saved drafts and no submitted proposals 24 | When I open the Manage Proposal page 25 | Then there are no proposals displayed 26 | And a message is displayed "No proposals have been created" 27 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/partials/ReviewProposal.html: -------------------------------------------------------------------------------- 1 | 2 |
Loading...
3 |

Concept Proposal from {{proposal.name}}

4 |

Email: {{proposal.email}}

5 |

Description: {{proposal.description}}

6 |

Status: {{proposal.status | proposalStatus}}

7 | Concepts 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameClass + DatatypeCommentsStatus
No concepts added
{{concept.preferredName}}{{concept.conceptClass}}, {{concept.datatype}}{{concept.comment}}
24 |

25 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/underscore/README.md: -------------------------------------------------------------------------------- 1 | __ 2 | /\ \ __ 3 | __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____ 4 | /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\ 5 | \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\ 6 | \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/ 7 | \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/ 8 | \ \____/ 9 | \/___/ 10 | 11 | Underscore.js is a utility-belt library for JavaScript that provides 12 | support for the usual functional suspects (each, map, reduce, filter...) 13 | without extending any core JavaScript objects. 14 | 15 | For Docs, License, Tests, and pre-packed downloads, see: 16 | http://underscorejs.org 17 | 18 | Underscore is an open-sourced component of DocumentCloud: 19 | https://github.com/documentcloud 20 | 21 | Many thanks to our contributors: 22 | https://github.com/jashkenas/underscore/contributors 23 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/underscore/README.md: -------------------------------------------------------------------------------- 1 | __ 2 | /\ \ __ 3 | __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____ 4 | /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\ 5 | \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\ 6 | \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/ 7 | \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/ 8 | \ \____/ 9 | \/___/ 10 | 11 | Underscore.js is a utility-belt library for JavaScript that provides 12 | support for the usual functional suspects (each, map, reduce, filter...) 13 | without extending any core JavaScript objects. 14 | 15 | For Docs, License, Tests, and pre-packed downloads, see: 16 | http://underscorejs.org 17 | 18 | Underscore is an open-sourced component of DocumentCloud: 19 | https://github.com/documentcloud 20 | 21 | Many thanks to our contributors: 22 | https://github.com/jashkenas/underscore/contributors 23 | -------------------------------------------------------------------------------- /conceptpropose/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | group = 'org.openmrs.module.conceptpropose' 3 | version = '1.0-SNAPSHOT' 4 | 5 | subprojects { 6 | dependencies { 7 | compile project(':common') 8 | } 9 | } 10 | 11 | dependencies { 12 | releaseJars(project(':common')) { 13 | transitive = false 14 | } 15 | } 16 | 17 | task createOmod(type: Jar, dependsOn: subprojects.tasks['build']) { 18 | 19 | baseName = 'openmrs-module-' + project.name 20 | extension = 'omod' 21 | 22 | subprojects.each { 23 | subproject -> 24 | from subproject.configurations.archives.allArtifacts.files.collect { 25 | zipTree(it) 26 | } 27 | 28 | } 29 | 30 | into('web/module') { 31 | from fileTree(dir: 'omod/src/main/webapp') 32 | } 33 | 34 | into('lib') { 35 | from configurations.releaseJars 36 | } 37 | 38 | metaInf { 39 | into('maven/org.openmrs.module/' + project.name + '-omod') 40 | def pomProperties = new File(getTemporaryDir(), 'pom.properties') 41 | pomProperties.write "version=${project.version}\n" 42 | pomProperties << "groupId=${project.group}\n" 43 | pomProperties << "artifactId=${project.name}\n" 44 | from pomProperties 45 | } 46 | } 47 | 48 | artifacts { 49 | archives createOmod 50 | } 51 | 52 | defaultTasks 'createOmod' 53 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/test/webapp/unit/directives/jqueryUiDialogSpec.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular-mocks', 3 | 'js/directives/jqueryUiDialog' 4 | ], 5 | function() { 6 | 7 | 'use strict'; 8 | 9 | describe('jqueryUiDialog directive spec', function() { 10 | 11 | var $scope, element, dialog; 12 | var title = 'test title'; 13 | beforeEach(module('conceptpropose.directives')); 14 | 15 | beforeEach(function() { 16 | inject(function($rootScope, $compile) { 17 | $scope = $rootScope.$new(); 18 | 19 | $scope.open = false; 20 | 21 | element = $compile('')($scope); 22 | 23 | $scope.$apply(); 24 | 25 | dialog = element.scope().$element; 26 | 27 | }); 28 | }); 29 | 30 | it('Title should be equal \'test title\'', function() { 31 | expect(dialog.dialog('option', 'title')).toBe(title); 32 | }); 33 | 34 | it('should open dialog', function() { 35 | expect(dialog.dialog('isOpen')).toBe(false); 36 | 37 | $scope.$apply($scope.open = true); 38 | expect(dialog.dialog('isOpen')).toBe(true); 39 | }); 40 | }); 41 | } 42 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/partials/ListProposals.html: -------------------------------------------------------------------------------- 1 |
Loading...
2 |
3 |
4 | {{alert.message}} 5 |
6 |
7 | 8 |

Manage Proposals

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
NameDescription# ConceptsStatus
Loading...
No proposals have been created
{{proposal.name}}{{proposal.description}}{{proposal.concepts.length}}{{proposal.status | proposalStatus}}
29 | -------------------------------------------------------------------------------- /conceptpropose/api/src/test/resources/TestingApplicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | 18 | 19 | classpath:hibernate.cfg.xml 20 | classpath:cpm-hibernate.cfg.xml 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/ShareableComment.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose; 2 | 3 | import org.apache.commons.logging.Log; 4 | import org.apache.commons.logging.LogFactory; 5 | import org.openmrs.BaseOpenmrsObject; 6 | 7 | /** 8 | * This is the base class underlying the exchange of comments concerning Concept Proposals and 9 | * Concept Proposal Packages by both Concept proposers, and Concept Proposal reviewers. The 10 | * attributes modelled in the abstract class are the ones that will be exchanged between the two 11 | * using transfer REST services 12 | */ 13 | public class ShareableComment extends BaseOpenmrsObject { 14 | 15 | private static final Log log = LogFactory.getLog(ShareableComment.class); 16 | 17 | private Integer conceptProposalCommentId; 18 | private String comment; 19 | private ProposalRole commenterRole; 20 | 21 | public Integer getId() { 22 | return this.conceptProposalCommentId; 23 | } 24 | 25 | public void setId(Integer id) { 26 | this.conceptProposalCommentId = id; 27 | } 28 | 29 | public String getComment() { 30 | return comment; 31 | } 32 | 33 | public void setComment(String comment) { 34 | this.comment = comment; 35 | } 36 | 37 | public ProposalRole getCommenterRole() { 38 | return commenterRole; 39 | } 40 | 41 | public void setCommenterRole(ProposalRole commenterRole) { 42 | this.commenterRole = commenterRole; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /conceptreview/api/src/test/resources/TestingApplicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | 18 | 19 | classpath:hibernate.cfg.xml 20 | classpath:conceptreview-test-hibernate.cfg.xml 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jquery-ui/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Paul Bakaus, http://jqueryui.com/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals (AUTHORS.txt, http://jqueryui.com/about) For exact 5 | contribution history, see the revision history and logs, available 6 | at http://jquery-ui.googlecode.com/svn/ 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | "Software"), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jquery-ui/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Paul Bakaus, http://jqueryui.com/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals (AUTHORS.txt, http://jqueryui.com/about) For exact 5 | contribution history, see the revision history and logs, available 6 | at http://jquery-ui.googlecode.com/svn/ 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | "Software"), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/README.markdown: -------------------------------------------------------------------------------- 1 | [Jasmine](http://pivotal.github.com/jasmine/) 2 | 3 | ======= 4 | **A JavaScript Testing Framework** 5 | 6 | Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, [Node.js](http://nodejs.org) projects, or anywhere that JavaScript can run. 7 | 8 | Documentation & guides live here: [http://pivotal.github.com/jasmine/](http://pivotal.github.com/jasmine/) 9 | 10 | 11 | ## Support 12 | 13 | * Search past discussions: [http://groups.google.com/group/jasmine-js](http://groups.google.com/group/jasmine-js) 14 | * Send an email to the list: [jasmine-js@googlegroups.com](jasmine-js@googlegroups.com) 15 | * View the project backlog at Pivotal Tracker: [http://www.pivotaltracker.com/projects/10606](http://www.pivotaltracker.com/projects/10606) 16 | * Follow us on Twitter: [@JasmineBDD](http://twitter.com/JasmineBDD) 17 | 18 | 19 | ## Maintainers 20 | 21 | * [Davis W. Frank](mailto:dwfrank@pivotallabs.com), Pivotal Labs 22 | * [Rajan Agaskar](mailto:rajan@pivotallabs.com), Pivotal Labs 23 | * [Christian Williams](mailto:antixian666@gmail.com), Square 24 | 25 | Copyright (c) 2008-2012 Pivotal Labs. This software is licensed under the MIT License. 26 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/README.markdown: -------------------------------------------------------------------------------- 1 | [Jasmine](http://pivotal.github.com/jasmine/) 2 | 3 | ======= 4 | **A JavaScript Testing Framework** 5 | 6 | Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, [Node.js](http://nodejs.org) projects, or anywhere that JavaScript can run. 7 | 8 | Documentation & guides live here: [http://pivotal.github.com/jasmine/](http://pivotal.github.com/jasmine/) 9 | 10 | 11 | ## Support 12 | 13 | * Search past discussions: [http://groups.google.com/group/jasmine-js](http://groups.google.com/group/jasmine-js) 14 | * Send an email to the list: [jasmine-js@googlegroups.com](jasmine-js@googlegroups.com) 15 | * View the project backlog at Pivotal Tracker: [http://www.pivotaltracker.com/projects/10606](http://www.pivotaltracker.com/projects/10606) 16 | * Follow us on Twitter: [@JasmineBDD](http://twitter.com/JasmineBDD) 17 | 18 | 19 | ## Maintainers 20 | 21 | * [Davis W. Frank](mailto:dwfrank@pivotallabs.com), Pivotal Labs 22 | * [Rajan Agaskar](mailto:rajan@pivotallabs.com), Pivotal Labs 23 | * [Christian Williams](mailto:antixian666@gmail.com), Square 24 | 25 | Copyright (c) 2008-2012 Pivotal Labs. This software is licensed under the MIT License. 26 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/test/webapp/unit/directives/cpmMenuSpec.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular-mocks', 3 | 'js/directives/cpmMenu', 4 | 'js/services/menu' 5 | ], 6 | 7 | function() { 8 | 9 | 'use strict'; 10 | 11 | describe('cpmMenu directive spec', function() { 12 | 13 | var $scope, $compile; 14 | 15 | beforeEach(module('conceptpropose.directives')); 16 | 17 | beforeEach(inject(function(_$rootScope_, _$compile_) { 18 | $scope = _$rootScope_; 19 | $compile = _$compile_; 20 | })); 21 | 22 | var compileMenu = function (markup, scope) { 23 | var el = $compile(markup)(scope); 24 | scope.$digest(); 25 | return el; 26 | }; 27 | 28 | it('should set the current page\'s menu class to \'active\'', function() { 29 | 30 | $scope.menu = [{ 31 | 'active': false, 32 | 'link': 'test.list#edit', 33 | 'text': 'Menu Item #1' 34 | }, 35 | { 36 | 'active': true, 37 | 'link': 'test.list', 38 | 'text': 'Menu Item #2' 39 | } 40 | ]; 41 | 42 | var menu = compileMenu('', $scope); 43 | 44 | var activeLink = menu.find('li.active a'); 45 | expect(activeLink.text()).toBe('Menu Item #2'); 46 | 47 | var inactiveLink = menu.find('li:not(.active) a'); 48 | expect(inactiveLink.text()).toBe('Menu Item #1'); 49 | }); 50 | }); 51 | } 52 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/requirejs/tasks.txt: -------------------------------------------------------------------------------- 1 | Release Notes 2 | ------------------- 3 | 4 | After merge/release: 5 | 6 | 7 | Implementation notes 8 | -------- 9 | * Cannot get rid of interactive stuff for IE because requirejs supports loading 10 | plain JS files that may not call define(). Since they do not call define, if 11 | they are loaded in between anon define call scripts, since onload on scripts 12 | do not fire immediately after script execution, the wrong names can be associated 13 | with scripts. 14 | 15 | 16 | - robust handling for anon modules loaded outside loader. 17 | - Just remove packages config altogether, suggest volojs for making adapter modules. 18 | -> Allow 'module': '' and 'module/': '' config instead of packages config. 19 | 20 | Tests to write: 21 | - mapConfig test for packages. 22 | 23 | Next release 24 | -------------- 25 | 26 | - ie 10, order plugin not working? 27 | 28 | https://github.com/jrburke/requirejs/issues/185 29 | 30 | - add pluginBuilder to the load api 31 | 32 | - require-cs circular ref: https://github.com/jrburke/require-cs/issues/13 33 | 34 | - make a decision matrix of when to use what. Mention lowercase names for file name convention. 35 | 36 | - paths entry for socket.io to remote domain/port, but then do a require.toUrl('socket.io') and it returns 37 | a local path instead of the remote path? 38 | 39 | 40 | - has() source trimming, needs brace matching? 41 | 42 | - Update the coffeescript plugin to use the writeFile API? 43 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/requirejs/tasks.txt: -------------------------------------------------------------------------------- 1 | Release Notes 2 | ------------------- 3 | 4 | After merge/release: 5 | 6 | 7 | Implementation notes 8 | -------- 9 | * Cannot get rid of interactive stuff for IE because requirejs supports loading 10 | plain JS files that may not call define(). Since they do not call define, if 11 | they are loaded in between anon define call scripts, since onload on scripts 12 | do not fire immediately after script execution, the wrong names can be associated 13 | with scripts. 14 | 15 | 16 | - robust handling for anon modules loaded outside loader. 17 | - Just remove packages config altogether, suggest volojs for making adapter modules. 18 | -> Allow 'module': '' and 'module/': '' config instead of packages config. 19 | 20 | Tests to write: 21 | - mapConfig test for packages. 22 | 23 | Next release 24 | -------------- 25 | 26 | - ie 10, order plugin not working? 27 | 28 | https://github.com/jrburke/requirejs/issues/185 29 | 30 | - add pluginBuilder to the load api 31 | 32 | - require-cs circular ref: https://github.com/jrburke/require-cs/issues/13 33 | 34 | - make a decision matrix of when to use what. Mention lowercase names for file name convention. 35 | 36 | - paths entry for socket.io to remote domain/port, but then do a require.toUrl('socket.io') and it returns 37 | a local path instead of the remote path? 38 | 39 | 40 | - has() source trimming, needs brace matching? 41 | 42 | - Update the coffeescript plugin to use the writeFile API? 43 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/components/jasmine/jasmine-core.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | $:.push File.expand_path("../lib", __FILE__) 3 | require "jasmine-core/version" 4 | 5 | Gem::Specification.new do |s| 6 | s.name = "jasmine-core" 7 | s.version = Jasmine::Core::VERSION 8 | s.platform = Gem::Platform::RUBY 9 | s.authors = ["Rajan Agaskar", "Davis W. Frank", "Christian Williams"] 10 | s.summary = %q{JavaScript BDD framework} 11 | s.description = %q{Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.} 12 | s.email = %q{jasmine-js@googlegroups.com} 13 | s.homepage = "http://pivotal.github.com/jasmine" 14 | s.rubyforge_project = "jasmine-core" 15 | s.license = "MIT" 16 | 17 | s.files = Dir.glob("./lib/**/*") + Dir.glob("./lib/jasmine-core/spec/**/*.js") 18 | s.require_paths = ["lib"] 19 | s.add_development_dependency "json_pure", ">= 1.4.3" 20 | s.add_development_dependency "tilt" 21 | s.add_development_dependency "sass" 22 | s.add_development_dependency "compass" 23 | s.add_development_dependency "ragaskar-jsdoc_helper" 24 | s.add_development_dependency "rspec" 25 | s.add_development_dependency "fuubar" 26 | s.add_development_dependency "awesome_print" 27 | s.add_development_dependency "thor" 28 | s.add_development_dependency "nokogiri" 29 | s.add_development_dependency "redcarpet", "1.7" 30 | s.add_development_dependency "rocco" 31 | s.add_development_dependency "rdiscount" 32 | end 33 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/components/jasmine/jasmine-core.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | $:.push File.expand_path("../lib", __FILE__) 3 | require "jasmine-core/version" 4 | 5 | Gem::Specification.new do |s| 6 | s.name = "jasmine-core" 7 | s.version = Jasmine::Core::VERSION 8 | s.platform = Gem::Platform::RUBY 9 | s.authors = ["Rajan Agaskar", "Davis W. Frank", "Christian Williams"] 10 | s.summary = %q{JavaScript BDD framework} 11 | s.description = %q{Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.} 12 | s.email = %q{jasmine-js@googlegroups.com} 13 | s.homepage = "http://pivotal.github.com/jasmine" 14 | s.rubyforge_project = "jasmine-core" 15 | s.license = "MIT" 16 | 17 | s.files = Dir.glob("./lib/**/*") + Dir.glob("./lib/jasmine-core/spec/**/*.js") 18 | s.require_paths = ["lib"] 19 | s.add_development_dependency "json_pure", ">= 1.4.3" 20 | s.add_development_dependency "tilt" 21 | s.add_development_dependency "sass" 22 | s.add_development_dependency "compass" 23 | s.add_development_dependency "ragaskar-jsdoc_helper" 24 | s.add_development_dependency "rspec" 25 | s.add_development_dependency "fuubar" 26 | s.add_development_dependency "awesome_print" 27 | s.add_development_dependency "thor" 28 | s.add_development_dependency "nokogiri" 29 | s.add_development_dependency "redcarpet", "1.7" 30 | s.add_development_dependency "rocco" 31 | s.add_development_dependency "rdiscount" 32 | end 33 | -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/ProposedConceptPackageDto.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto; 2 | 3 | import org.openmrs.module.conceptpropose.PackageStatus; 4 | 5 | import java.util.List; 6 | 7 | public class ProposedConceptPackageDto { 8 | 9 | private int id; 10 | 11 | private String name; 12 | 13 | private String email; 14 | 15 | private String description; 16 | 17 | private PackageStatus status; 18 | 19 | private List concepts; 20 | 21 | public int getId() { 22 | return id; 23 | } 24 | 25 | public void setId(final int id) { 26 | this.id = id; 27 | } 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public void setName(final String name) { 34 | this.name = name; 35 | } 36 | 37 | public String getEmail() { 38 | return email; 39 | } 40 | 41 | public void setEmail(final String email) { 42 | this.email = email; 43 | } 44 | 45 | public String getDescription() { 46 | return description; 47 | } 48 | 49 | public void setDescription(final String description) { 50 | this.description = description; 51 | } 52 | 53 | public PackageStatus getStatus() { 54 | return status; 55 | } 56 | 57 | public void setStatus(final PackageStatus packageStatus) { 58 | status = packageStatus; 59 | } 60 | 61 | public List getConcepts() { 62 | return concepts; 63 | } 64 | 65 | public void setConcepts(final List concepts) { 66 | this.concepts = concepts; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/java/org/openmrs/module/conceptpropose/web/service/ConceptProposeMapperService.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.service; 2 | 3 | import org.dozer.Mapper; 4 | import org.openmrs.module.conceptpropose.ProposedConceptPackage; 5 | import org.openmrs.module.conceptpropose.web.dto.ProposedConceptPackageDto; 6 | import org.openmrs.module.conceptpropose.web.dto.SubmissionDto; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.beans.factory.annotation.Qualifier; 9 | import org.springframework.stereotype.Service; 10 | 11 | @Service 12 | public class ConceptProposeMapperService { 13 | 14 | private Mapper dozerBeanMapper; 15 | 16 | @Autowired 17 | public ConceptProposeMapperService(@Qualifier("conceptproposemapper") Mapper dozerBeanMapper) { 18 | this.dozerBeanMapper = dozerBeanMapper; 19 | } 20 | 21 | public SubmissionDto convertProposedConceptPackageToSubmissionDto(ProposedConceptPackage proposedConceptPackage) { 22 | return dozerBeanMapper.map(proposedConceptPackage, SubmissionDto.class); 23 | } 24 | 25 | public ProposedConceptPackageDto convertProposedConceptPackageToProposedConceptDto(ProposedConceptPackage proposedConceptPackage){ 26 | return dozerBeanMapper.map(proposedConceptPackage, ProposedConceptPackageDto.class); 27 | } 28 | 29 | public ProposedConceptPackage convertProposedConceptDtoToProposedConceptPackage(ProposedConceptPackageDto dto) { 30 | return dozerBeanMapper.map(dto, ProposedConceptPackage.class); 31 | } 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /conceptreview/omod/src/test/webapp/unit/directives/conceptreviewMenuSpec.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular-mocks', 3 | 'js/directives/conceptreviewMenu', 4 | 'js/services/menu' 5 | ], 6 | 7 | function() { 8 | 9 | 'use strict'; 10 | 11 | describe('conceptreviewMenu directive spec', function() { 12 | 13 | var $scope, $compile; 14 | 15 | beforeEach(module('conceptreview.directives')); 16 | 17 | beforeEach(inject(function(_$rootScope_, _$compile_) { 18 | $scope = _$rootScope_; 19 | $compile = _$compile_; 20 | })); 21 | 22 | var compileMenu = function (markup, scope) { 23 | var el = $compile(markup)(scope); 24 | scope.$digest(); 25 | return el; 26 | }; 27 | 28 | it('should set the current page\'s menu class to \'active\'', function() { 29 | 30 | $scope.menu = [{ 31 | 'active': false, 32 | 'link': 'test.list#edit', 33 | 'text': 'Menu Item #1' 34 | }, 35 | { 36 | 'active': true, 37 | 'link': 'test.list', 38 | 'text': 'Menu Item #2' 39 | } 40 | ]; 41 | 42 | var menu = compileMenu('', $scope); 43 | 44 | var activeLink = menu.find('li.active a'); 45 | expect(activeLink.text()).toBe('Menu Item #2'); 46 | 47 | var inactiveLink = menu.find('li:not(.active) a'); 48 | expect(inactiveLink.text()).toBe('Menu Item #1'); 49 | }); 50 | }); 51 | } 52 | ); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/controllers/ReviewProposalCtrl.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | 'js/services/proposalReviews', 5 | 'js/filters/proposalStatus', 6 | './index' 7 | ], 8 | function(angular, config) { 9 | 10 | 'use strict'; 11 | 12 | angular.module('conceptreview.controllers').controller('ReviewProposalCtrl', 13 | function($scope, $routeParams, $location, $window, ProposalReviews, Menu) { 14 | 15 | /* We need to add a status tag in this */ 16 | 17 | var proposalId = $routeParams.proposalId; 18 | $scope.isLoading = true; 19 | $scope.contextPath = config.contextPath; 20 | $scope.resourceLocation = config.resourceLocation; 21 | $scope.isDeleted = false; 22 | 23 | $scope.menu = Menu.getMenu(); 24 | 25 | $scope.proposal = ProposalReviews.get({proposalId: proposalId}, function() { 26 | $scope.isLoading = false; 27 | $scope.isDeleted = ($scope.proposal.status === 'DELETED'); 28 | }); 29 | 30 | $scope.showConcept = function(conceptId) { 31 | $location.path('/edit/' + $scope.proposal.id + '/concept/' + conceptId); 32 | }; 33 | 34 | $scope.delete = function() { 35 | if ($window.confirm('Are you sure?')) { 36 | $scope.isLoading = true; 37 | $scope.proposal.$remove(function() { 38 | $scope.isLoading = false; 39 | $location.path('/'); 40 | }); 41 | } 42 | }; 43 | }); 44 | } 45 | ); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/css/cpm.css: -------------------------------------------------------------------------------- 1 | .results tr:nth-child(odd) { 2 | background-color: #F3F7FB; 3 | } 4 | .results tr:hover { 5 | background-color: #F0E68C; 6 | } 7 | 8 | .loading { 9 | color: #888; 10 | } 11 | 12 | label { 13 | cursor: pointer; 14 | } 15 | .conceptTable { 16 | border: 1px solid #1AAC9B; 17 | min-width: 600px; 18 | } 19 | .conceptTable thead, .results tr.commentHeader { 20 | background-color: #1AAC9B; 21 | color: white; 22 | font-weight: bold; 23 | } 24 | .required { 25 | color: firebrick; 26 | font-size: smaller; 27 | } 28 | .accesskey { 29 | text-decoration: underline; 30 | } 31 | input.ng-invalid.ng-dirty { 32 | border-color: firebrick; 33 | border-style: solid; 34 | } 35 | 36 | #cpm-edit-proposal-form label { 37 | display: block; 38 | } 39 | 40 | .name, .email { 41 | width: 600px; 42 | } 43 | 44 | .resultsContainer { 45 | border: 1px solid #DAE8F8; 46 | height: 400px; 47 | margin-top: 1em; 48 | margin-bottom: 1em; 49 | overflow: auto; 50 | } 51 | .searchConceptResults th { 52 | border-bottom: 1px solid lightgrey; 53 | text-align: left; 54 | } 55 | .conceptList tr { 56 | cursor: pointer; 57 | } 58 | .dialogFooter { 59 | text-align: right; 60 | } 61 | .dialogFooter button { 62 | width: 100px; 63 | } 64 | .loading { 65 | color: #888; 66 | margin-left: 1em; 67 | } 68 | 69 | div.loading { 70 | margin-left: -50px; 71 | position: absolute; 72 | left: 50%; 73 | width: 100px; 74 | } 75 | 76 | .loading img { 77 | vertical-align: middle; 78 | } 79 | 80 | #cpm-settings #url { width: 350px; } 81 | 82 | #menu li { padding-right: 5px; } -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/css/cpm.css: -------------------------------------------------------------------------------- 1 | .results tr:nth-child(odd) { 2 | background-color: #F3F7FB; 3 | } 4 | .results tr:hover { 5 | background-color: #F0E68C; 6 | } 7 | 8 | .loading { 9 | color: #888; 10 | } 11 | 12 | label { 13 | cursor: pointer; 14 | } 15 | .conceptTable { 16 | border: 1px solid #1AAC9B; 17 | min-width: 600px; 18 | } 19 | .conceptTable thead, .results tr.commentHeader { 20 | background-color: #1AAC9B; 21 | color: white; 22 | font-weight: bold; 23 | } 24 | .required { 25 | color: firebrick; 26 | font-size: smaller; 27 | } 28 | .accesskey { 29 | text-decoration: underline; 30 | } 31 | input.ng-invalid.ng-dirty { 32 | border-color: firebrick; 33 | border-style: solid; 34 | } 35 | 36 | #cpm-edit-proposal-form label { 37 | display: block; 38 | } 39 | 40 | .name, .email { 41 | width: 600px; 42 | } 43 | 44 | .resultsContainer { 45 | border: 1px solid #DAE8F8; 46 | height: 400px; 47 | margin-top: 1em; 48 | margin-bottom: 1em; 49 | overflow: auto; 50 | } 51 | .searchConceptResults th { 52 | border-bottom: 1px solid lightgrey; 53 | text-align: left; 54 | } 55 | .conceptList tr { 56 | cursor: pointer; 57 | } 58 | .dialogFooter { 59 | text-align: right; 60 | } 61 | .dialogFooter button { 62 | width: 100px; 63 | } 64 | .loading { 65 | color: #888; 66 | margin-left: 1em; 67 | } 68 | 69 | div.loading { 70 | margin-left: -50px; 71 | position: absolute; 72 | left: 50%; 73 | width: 100px; 74 | } 75 | 76 | .loading img { 77 | vertical-align: middle; 78 | } 79 | 80 | #cpm-settings #url { width: 350px; } 81 | 82 | #menu li { padding-right: 5px; } -------------------------------------------------------------------------------- /conceptreview/api/src/main/java/org/openmrs/module/conceptreview/ProposedConceptReviewDescription.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptreview; 2 | 3 | import org.hibernate.annotations.GenericGenerator; 4 | 5 | import javax.persistence.*; 6 | import java.io.Serializable; 7 | import java.util.Locale; 8 | 9 | @Entity 10 | @Table(name = "conceptreview_proposed_concept_review_description") 11 | public class ProposedConceptReviewDescription implements Serializable { 12 | 13 | @Id 14 | @GeneratedValue(generator = "nativeIfNotAssigned") 15 | @GenericGenerator(name = "nativeIfNotAssigned", strategy = "org.openmrs.api.db.hibernate.NativeIfNotAssignedIdentityGenerator") 16 | @Column(name = "conceptreview_proposed_concept_review_description_id") 17 | private Integer proposedConceptReviewDescriptionId; 18 | 19 | @ManyToOne 20 | @JoinColumn(name = "proposed_concept_review") 21 | private ProposedConceptReview proposedConceptReview; 22 | 23 | private String description; 24 | 25 | private Locale locale; 26 | 27 | public ProposedConceptReview getProposedConceptReview() { 28 | return proposedConceptReview; 29 | } 30 | 31 | public void setProposedConceptReview(ProposedConceptReview proposedConceptReview) { 32 | this.proposedConceptReview = proposedConceptReview; 33 | } 34 | 35 | public String getDescription() { 36 | return description; 37 | } 38 | 39 | public void setDescription(String description) { 40 | this.description = description; 41 | } 42 | 43 | public Locale getLocale() { 44 | return locale; 45 | } 46 | 47 | public void setLocale(Locale locale) { 48 | this.locale = locale; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/java/org/openmrs/module/conceptreview/web/service/ConceptReviewMapperService.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptreview.web.service; 2 | 3 | import org.dozer.Mapper; 4 | import org.openmrs.module.conceptpropose.web.dto.ProposedConceptReviewPackageDto; 5 | import org.openmrs.module.conceptpropose.web.dto.SubmissionDto; 6 | import org.openmrs.module.conceptreview.ProposedConceptReviewPackage; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.beans.factory.annotation.Qualifier; 9 | import org.springframework.stereotype.Service; 10 | 11 | @Service 12 | public class ConceptReviewMapperService { 13 | 14 | private Mapper dozerBeanMapper; 15 | 16 | @Autowired 17 | public ConceptReviewMapperService(@Qualifier("conceptreviewmapper") Mapper dozerBeanMapper) { 18 | this.dozerBeanMapper = dozerBeanMapper; 19 | } 20 | 21 | public ProposedConceptReviewPackage convertSubmissionDtoToProposedConceptReviewPackage(final SubmissionDto incomingProposal){ 22 | return dozerBeanMapper.map(incomingProposal, ProposedConceptReviewPackage.class); 23 | } 24 | 25 | public ProposedConceptReviewPackageDto convertProposedConceptReviewPackageToProposedConceptReviewDto(ProposedConceptReviewPackage proposedConceptPackage){ 26 | return dozerBeanMapper.map(proposedConceptPackage, ProposedConceptReviewPackageDto.class); 27 | } 28 | 29 | public ProposedConceptReviewPackage convertProposedConceptReviewDtoToProposedConceptReviewPackage(ProposedConceptReviewPackageDto dto) { 30 | return dozerBeanMapper.map(dto, ProposedConceptReviewPackage.class); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/SubmissionDto.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto; 2 | 3 | import java.util.List; 4 | 5 | public class SubmissionDto { 6 | 7 | private String name; 8 | 9 | private String email; 10 | 11 | private String description; 12 | 13 | private String proposedConceptPackageUuid; 14 | 15 | 16 | private List concepts; 17 | 18 | 19 | public String getProposedConceptPackageUuid() { 20 | return proposedConceptPackageUuid; 21 | } 22 | 23 | public void setProposedConceptPackageUuid(String proposedConceptPackageUuid) { 24 | this.proposedConceptPackageUuid = proposedConceptPackageUuid; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public void setName(final String name) { 32 | this.name = name; 33 | } 34 | 35 | public String getEmail() { 36 | return email; 37 | } 38 | 39 | public void setEmail(final String email) { 40 | this.email = email; 41 | } 42 | 43 | public String getDescription() { 44 | return description; 45 | } 46 | 47 | public void setDescription(final String description) { 48 | this.description = description; 49 | } 50 | 51 | public List getConcepts() { 52 | return concepts; 53 | } 54 | 55 | public void setConcepts(final List concepts) { 56 | this.concepts = concepts; 57 | } 58 | 59 | @Override 60 | public String toString() { 61 | return "SubmissionDto{" + 62 | "description='" + description + '\'' + 63 | ", email='" + email + '\'' + 64 | ", name='" + name + '\'' + 65 | '}'; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | *.orig 3 | # Package Files # 4 | *.jar 5 | *.war 6 | *.ear 7 | 8 | # Eclipse dirs 9 | .metadata 10 | .project 11 | .classpath 12 | *.settings 13 | 14 | # Maven build directories 15 | target 16 | 17 | #Gradle build directories 18 | .gradle 19 | build 20 | out 21 | 22 | # IntelliJ project files 23 | .idea 24 | *.iml 25 | 26 | # Mac OS X 27 | .DS_Store 28 | 29 | # Openmrs-standalone 30 | openmrs-standalone/* 31 | openmrs-standalone-* 32 | /dependencies.txt 33 | /deploy.bat 34 | 35 | # Netbeans 36 | nbproject 37 | 38 | node_modules 39 | 40 | # Bower components (partial list - all "components" should eventually 41 | # be excluded, pending better build tools) 42 | omod/src/main/webapp/resources/components/jasmine/lib/jasmine-core/example/* 43 | omod/src/main/webapp/resources/components/jasmine/jsdoc-template/* 44 | omod/src/main/webapp/resources/components/jasmine/spec/* 45 | omod/src/main/webapp/resources/components/jasmine/spec/**/* 46 | omod/src/main/webapp/resources/components/jasmine/src/* 47 | omod/src/main/webapp/resources/components/jasmine/tasks/* 48 | omod/src/main/webapp/resources/components/jquery-ui/i18n/* 49 | omod/src/main/webapp/resources/components/jquery-ui/themes/* 50 | omod/src/main/webapp/resources/components/jquery-ui/ui/* 51 | omod/src/main/webapp/resources/components/requirejs/dist/* 52 | omod/src/main/webapp/resources/components/requirejs/docs/* 53 | omod/src/main/webapp/resources/components/requirejs/tests/* 54 | omod/src/main/webapp/resources/components/underscore/docs/* 55 | omod/src/main/webapp/resources/components/underscore/index.html 56 | omod/src/main/webapp/resources/components/underscore/test/* -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/ProposedConceptReviewDto.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto; 2 | 3 | import java.util.List; 4 | 5 | public class ProposedConceptReviewDto extends ProposedConceptDto { 6 | 7 | private String reviewComment; 8 | 9 | private String newCommentName; 10 | private String newCommentEmail; 11 | private String newCommentText; 12 | 13 | private int conceptId; 14 | 15 | private String sourceUuid; 16 | 17 | public String getReviewComment() { 18 | return reviewComment; 19 | } 20 | 21 | public void setReviewComment(final String reviewComment) { 22 | this.reviewComment = reviewComment; 23 | } 24 | 25 | 26 | public int getConceptId() { 27 | return conceptId; 28 | } 29 | 30 | public void setConceptId(final int conceptId) { 31 | this.conceptId = conceptId; 32 | } 33 | 34 | public String getNewCommentName() { 35 | return newCommentName; 36 | } 37 | public void setNewCommentName(String newCommentName) { 38 | this.newCommentName = newCommentName; 39 | } 40 | 41 | public String getNewCommentEmail() { 42 | return newCommentEmail; 43 | } 44 | 45 | public void setNewCommentEmail(String newCommentEmail) { 46 | this.newCommentEmail = newCommentEmail; 47 | } 48 | 49 | public String getNewCommentText() { 50 | return newCommentText; 51 | } 52 | 53 | public void setNewCommentText(String newCommentText) { 54 | this.newCommentText = newCommentText; 55 | } 56 | 57 | public String getSourceUuid() { 58 | return sourceUuid; 59 | } 60 | 61 | public void setSourceUuid(String sourceUuid) { 62 | this.sourceUuid = sourceUuid; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/java/org/openmrs/module/conceptpropose/web/authentication/factory/AuthHttpHeaderFactory.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.authentication.factory; 2 | 3 | import com.google.common.base.Joiner; 4 | import org.apache.commons.codec.binary.Base64; 5 | import org.apache.http.Header; 6 | import org.apache.http.message.BasicHeader; 7 | import org.openmrs.module.conceptpropose.web.common.CpmConstants; 8 | import org.springframework.http.HttpHeaders; 9 | import org.springframework.stereotype.Component; 10 | 11 | import java.nio.charset.Charset; 12 | 13 | @Component 14 | public class AuthHttpHeaderFactory { 15 | 16 | public HttpHeaders create(final String username, final String password){ 17 | final HttpHeaders httpHeaders = new HttpHeaders(); 18 | httpHeaders.set("Authorization", createAuthValue(username, password)); 19 | return httpHeaders; 20 | } 21 | 22 | public Header createApacheHeader(final String username, final String password){ 23 | final Header httpHeader = new BasicHeader("Authorization", createAuthValue(username, password)); 24 | return httpHeader; 25 | } 26 | 27 | private String createAuthValue(final String username, final String password) { 28 | final String auth = Joiner.on(CpmConstants.AUTH_DATA_DELIMITER).skipNulls().join(username, password); 29 | byte[] encodedAuth = Base64.encodeBase64( 30 | auth.getBytes(Charset.forName(CpmConstants.AUTH_CHAR_SET))); 31 | final String authHeader = CpmConstants.AUTH_TYPE + " " + new String( encodedAuth ); 32 | return authHeader; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/directives/jqueryUiDialog.js: -------------------------------------------------------------------------------- 1 | define([ 2 | './index', 3 | 'jquery', 4 | 'jquery-ui' 5 | ], 6 | function (directives, $) { 7 | 8 | 'use strict'; 9 | 10 | directives.directive('jqueryUiDialog', function () { 11 | return { 12 | restrict: 'E', 13 | replace: true, 14 | transclude: true, 15 | template: '
', 16 | scope: { 17 | title: '@title', 18 | dialogOpen: '=dialogOpen' 19 | }, 20 | controller: function ($scope) { 21 | $scope.$watch('dialogOpen', function (isOpen) { 22 | var open = isOpen ? 'open' : 'close'; 23 | $scope.$element.dialog(open); 24 | }); 25 | 26 | this.closeDialog = function() { 27 | $scope.dialogOpen = false; 28 | }; 29 | }, 30 | link: function ($scope, element) { 31 | $scope.dialogOpen = false; 32 | $scope.$element = $(element); 33 | 34 | $scope.$watch('title', function(title) { 35 | if (!_.isUndefined(title)) { 36 | $scope.$element.dialog({ 37 | autoOpen: false, 38 | width: 800, 39 | title: title, 40 | close: function () { 41 | if ($scope.dialogOpen) { 42 | $scope.$apply(function () { 43 | $scope.dialogOpen = false; 44 | }); 45 | } 46 | } 47 | }); 48 | } 49 | }); 50 | } 51 | }; 52 | }); 53 | }); -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/directives/jqueryUiDialog.js: -------------------------------------------------------------------------------- 1 | define([ 2 | './index', 3 | 'jquery', 4 | 'jquery-ui' 5 | ], 6 | function (directives, $) { 7 | 8 | 'use strict'; 9 | 10 | directives.directive('jqueryUiDialog', function () { 11 | return { 12 | restrict: 'E', 13 | replace: true, 14 | transclude: true, 15 | template: '
', 16 | scope: { 17 | title: '@title', 18 | dialogOpen: '=dialogOpen' 19 | }, 20 | controller: function ($scope) { 21 | $scope.$watch('dialogOpen', function (isOpen) { 22 | var open = isOpen ? 'open' : 'close'; 23 | $scope.$element.dialog(open); 24 | }); 25 | 26 | this.closeDialog = function() { 27 | $scope.dialogOpen = false; 28 | }; 29 | }, 30 | link: function ($scope, element) { 31 | $scope.dialogOpen = false; 32 | $scope.$element = $(element); 33 | 34 | $scope.$watch('title', function(title) { 35 | if (!_.isUndefined(title)) { 36 | $scope.$element.dialog({ 37 | autoOpen: false, 38 | width: 800, 39 | title: title, 40 | close: function () { 41 | if ($scope.dialogOpen) { 42 | $scope.$apply(function () { 43 | $scope.dialogOpen = false; 44 | }); 45 | } 46 | } 47 | }); 48 | } 49 | }); 50 | } 51 | }; 52 | }); 53 | }); -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/routes.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'js/app', 3 | 'config' 4 | ], 5 | function (conceptreview, config) { 6 | 7 | 'use strict'; 8 | 9 | conceptreview.config(function($routeProvider) { 10 | $routeProvider. 11 | when('/', { 12 | controller: 'ListIncomingProposalsCtrl', 13 | templateUrl: config.resourceLocation + '/partials/ListIncomingProposals.html' 14 | }). 15 | when('/completed', { 16 | controller: 'ListCompletedProposalsCtrl', 17 | templateUrl: config.resourceLocation + '/partials/ListCompletedProposals.html' 18 | }). 19 | when('/deleted', { 20 | controller: 'ListDeletedProposalsCtrl', 21 | templateUrl: config.resourceLocation + '/partials/ListDeletedProposals.html' 22 | }). 23 | when('/edit/:proposalId', { 24 | controller: 'ReviewProposalCtrl', 25 | templateUrl: config.resourceLocation + '/partials/ReviewProposal.html' 26 | }). 27 | when('/edit/:proposalId/concept/:conceptId', { 28 | controller: 'ReviewConceptCtrl', 29 | templateUrl: config.resourceLocation + '/partials/ReviewConcept.html' 30 | }). 31 | when('/deleted/:proposalId', { 32 | controller: 'ReviewDeletedProposalCtrl', 33 | templateUrl: config.resourceLocation + '/partials/ReviewDeletedProposal.html' 34 | }). 35 | when('/deleted/:proposalId/concept/:conceptId', { 36 | controller: 'ReviewConceptOfDeletedProposalCtrl', 37 | templateUrl: config.resourceLocation + '/partials/ReviewConceptOfDeletedProposal.html' 38 | }); 39 | }); 40 | } 41 | ); -------------------------------------------------------------------------------- /functional-tests/src/test/java/org/openmrs/module/conceptreview/pagemodel/ReviewProposalPage.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptreview.pagemodel; 2 | 3 | import org.openmrs.module.conceptpropose.pagemodel.BaseCpmPage; 4 | import org.openqa.selenium.By; 5 | import org.openqa.selenium.WebDriver; 6 | import org.openqa.selenium.WebElement; 7 | 8 | import java.util.HashMap; 9 | 10 | public class ReviewProposalPage extends BaseCpmPage { 11 | 12 | public ReviewProposalPage(WebDriver driver) { 13 | super(driver); 14 | } 15 | 16 | public HashMap getConcepts() { 17 | HashMap concepts = new HashMap(); 18 | for (WebElement element : driver.findElements(By.cssSelector(".concept"))) { 19 | concepts.put("name", element.findElement(By.className("name")).getText()); 20 | concepts.put("class", element.findElement(By.className("class")).getText()); 21 | concepts.put("datatype", element.findElement(By.className("datatype")).getText()); 22 | concepts.put("comments", element.findElement(By.className("comments")).getText()); 23 | concepts.put("status", element.findElement(By.className("status")).getText()); 24 | } 25 | 26 | return concepts; 27 | } 28 | public ReviewConceptPage navigateTo(int conceptNumber) { 29 | driver.findElement(By.cssSelector("#conceptreview .results > tr:nth-of-type(" + String.valueOf(conceptNumber) + ")")).click(); 30 | return new ReviewConceptPage(driver); 31 | } 32 | 33 | public String getConceptStatus(int conceptNumber) 34 | { 35 | return driver.findElement(By.cssSelector("#conceptreview .results tr:nth-child(" + conceptNumber + ") td:nth-child(4)")).getText(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /conceptpropose/omod/src/main/webapp/resources/js/controllers/SettingsCtrl.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | 'js/services/settings', 5 | 'js/services/menu', 6 | './index' 7 | ], 8 | function(angular, config) { 9 | 10 | 'use strict'; 11 | 12 | angular.module('conceptpropose.controllers').controller('SettingsCtrl', 13 | function($scope, $http, Settings, Menu) { 14 | 15 | $scope.contextPath = config.contextPath; 16 | $scope.resourceLocation = config.resourceLocation; 17 | 18 | document.title = 'Manage Concept Proposal Settings'; 19 | $scope.isLoading = true; 20 | $scope.settingsValid = false; 21 | $scope.connectErrorMessage = ''; 22 | 23 | $scope.menu = Menu.getMenu(3); 24 | 25 | $scope.settings = Settings.get(function() { 26 | $scope.isLoading = false; 27 | }); 28 | 29 | $scope.testConnection = function () { 30 | 31 | var responseHandler = function (result) { 32 | $scope.settingsValid = (result === 'Success'); 33 | $scope.connectErrorMessage = typeof result === 'string' ? result : 'Unknown Error'; 34 | $scope.isLoading = false; 35 | }; 36 | 37 | $scope.isLoading = true; 38 | $http.post(config.contextPath + '/ws/conceptpropose/settings/connectionResult', $scope.settings) 39 | .success(responseHandler).error(responseHandler); 40 | }; 41 | 42 | $scope.save = function() { 43 | $scope.isLoading = true; 44 | $scope.settings.$save(function() { 45 | $scope.isLoading = false; 46 | }); 47 | }; 48 | } 49 | ); 50 | } 51 | ); -------------------------------------------------------------------------------- /common/src/main/java/org/openmrs/module/conceptpropose/web/dto/ProposedConceptReviewPackageDto.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptpropose.web.dto; 2 | 3 | import org.openmrs.module.conceptpropose.PackageStatus; 4 | 5 | import java.util.List; 6 | 7 | public class ProposedConceptReviewPackageDto { 8 | 9 | private int id; 10 | 11 | private String name; 12 | 13 | private String age; 14 | 15 | private String email; 16 | 17 | private String description; 18 | 19 | private PackageStatus status; 20 | 21 | private List concepts; 22 | 23 | public int getId() { 24 | return id; 25 | } 26 | 27 | public void setId(final int id) { 28 | this.id = id; 29 | } 30 | 31 | public String getName() { 32 | return name; 33 | } 34 | 35 | public void setName(final String name) { 36 | this.name = name; 37 | } 38 | 39 | public String getAge() { 40 | return age; 41 | } 42 | 43 | public void setAge(final String age) { 44 | this.age = age; 45 | } 46 | 47 | public String getEmail() { 48 | return email; 49 | } 50 | 51 | public void setEmail(final String email) { 52 | this.email = email; 53 | } 54 | 55 | public String getDescription() { 56 | return description; 57 | } 58 | 59 | public void setDescription(final String description) { 60 | this.description = description; 61 | } 62 | 63 | public List getConcepts() { 64 | return concepts; 65 | } 66 | 67 | public void setConcepts(final List concepts) { 68 | this.concepts = concepts; 69 | } 70 | 71 | public PackageStatus getStatus() { 72 | return status; 73 | } 74 | 75 | public void setStatus(PackageStatus status) { 76 | this.status = status; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/webapp/resources/js/controllers/ReviewConceptOfDeletedProposalCtrl.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'angular', 3 | 'config', 4 | 'js/services/deletedProposalReviewConcepts', 5 | 'js/services/menu', 6 | 'js/services/searchConcept', 7 | 'js/directives/searchConceptDialog', 8 | 'js/directives/jqueryUiDialog', 9 | './index' 10 | ], function(angular, config) { 11 | 12 | 'use strict'; 13 | angular.module('conceptreview.controllers').controller('ReviewConceptOfDeletedProposalCtrl', 14 | function($scope, $routeParams, $location, $window, DeletedProposalReviewConcepts, Menu, $http) { 15 | 16 | var proposalId = $routeParams.proposalId; 17 | var conceptId = $routeParams.conceptId; 18 | $scope.isLoading = true; 19 | $scope.contextPath = config.contextPath; 20 | $scope.resourceLocation = config.resourceLocation; 21 | $scope.decisionMade = false; 22 | $scope.menu = Menu.getMenu(); 23 | 24 | $scope.loadConcept = function() { 25 | $scope.concept = DeletedProposalReviewConcepts.get({ proposalId: proposalId, conceptId: conceptId }, function() { 26 | $http.get('/openmrs/ws/conceptreview/userDetails', {}) 27 | .success(function(data) { 28 | data = data || {}; 29 | $scope.concept.newCommentName = data.name; 30 | $scope.concept.newCommentEmail = data.email; 31 | }); 32 | $scope.decisionMade = ($scope.concept.status !== 'RECEIVED'); 33 | $scope.isLoading = false; 34 | }); 35 | }; 36 | $scope.loadConcept(); 37 | 38 | $scope.showProposal = function() { 39 | $location.path('/deleted/' + proposalId); 40 | }; 41 | }); 42 | }); 43 | -------------------------------------------------------------------------------- /conceptreview/api/src/main/java/org/openmrs/module/conceptreview/api/db/ProposedConceptPackageReviewDAO.java: -------------------------------------------------------------------------------- 1 | package org.openmrs.module.conceptreview.api.db; 2 | 3 | import org.openmrs.api.APIException; 4 | import org.openmrs.module.conceptreview.ProposedConceptReview; 5 | import org.openmrs.module.conceptreview.ProposedConceptReviewPackage; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Service interface for the ProposedConceptPackage service data access objects. This interface is used by Spring to inject 11 | * transaction interceptors around the ProposedConceptPackageReviewDAO implementations 12 | */ 13 | public interface ProposedConceptPackageReviewDAO { 14 | 15 | List getAllConceptProposalReviewPackages() throws APIException; 16 | 17 | List getCompletedConceptProposalReviewPackages() throws APIException; 18 | 19 | List getDeletedConceptProposalReviewPackages() throws APIException; 20 | 21 | List getOpenConceptProposalReviewPackages() throws APIException; 22 | 23 | ProposedConceptReviewPackage getConceptProposalReviewPackageById(Integer id) throws APIException; 24 | 25 | ProposedConceptReviewPackage getConceptProposalReviewPackageByProposalUuid(String uuid) throws APIException; 26 | 27 | ProposedConceptReviewPackage saveConceptProposalReviewPackage(ProposedConceptReviewPackage conceptPackage) throws APIException; 28 | 29 | void deleteConceptProposalReviewPackage(ProposedConceptReviewPackage conceptPackage) throws APIException; 30 | 31 | void deleteConceptProposalReviewPackageById(int proposalId); 32 | 33 | ProposedConceptReview getConceptProposalReviewBySourceProposalUuidAndSourceConceptUuid(String packageUuid, String conceptUuid) throws APIException; 34 | } 35 | -------------------------------------------------------------------------------- /conceptreview/omod/src/main/resources/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | conceptreview 6 | Concept Review Module 7 | 1.0-SNAPSHOT 8 | org.openmrs.module.conceptreview 9 | OpenMRS Australia 10 | 11 | Review concept submitted via the conceptpropose module 12 | 13 | https://modules.openmrs.org/modules/download/conceptreview/update.rdf 14 | 1.9.2 15 | 16 | 17 | org.openmrs.module.conceptpropose 18 | 19 | 20 | 21 | 22 | org.openmrs.module.conceptreview.ConceptReviewActivator 23 | 24 | 25 | org.openmrs.admin.list 26 | org.openmrs.module.conceptreview.extension.html.AdminList 27 | 28 | 29 | 30 | 31 | org.openmrs.module.conceptreview 32 | 33 | 34 | 35 | 36 | en 37 | messages.properties 38 | 39 | 40 | 41 | 42 | cpm-authorisation 43 | org.openmrs.module.conceptreview.web.filter.AuthorizationFilter 44 | 45 | 46 | 47 | cpm-authorisation 48 | /ws/conceptreview/dictionarymanager/* 49 | 50 | 51 | 52 | 53 | --------------------------------------------------------------------------------