├── bahmnicore-omod
├── scripts
│ └── run-compass.sh
└── src
│ ├── main
│ ├── resources
│ │ ├── dispositionConfig.json
│ │ ├── messages.properties
│ │ ├── V1_42__RemovingNotNullContraintOnOrderTypeId.sql
│ │ ├── V1_24__AddUniqueConstraintToPatientidentifier.sql
│ │ ├── V1_41__AddingIndexToCityVillage-JssSpecific.sql
│ │ ├── migrations
│ │ │ └── dependent-modules
│ │ │ │ └── V1_73__RemoveNotNullConstraintOnAddressEntryName.sql
│ │ ├── V1_68__EncounterTypeForAdmission.sql
│ │ ├── V1_70__EncounterTypeForDischarge.sql
│ │ ├── V1_78__EncounterTypeForTransfer.sql
│ │ ├── V1_10__SetupRegistrationEncounterType.sql
│ │ ├── V1_43__AddOPDConsultationEncounterType.sql
│ │ ├── V1_61__CreatingGlobalPropertyForPatientIdentifierType.sql
│ │ ├── V1_67__AddConceptSetForAdmission.sql
│ │ ├── V1_69__AddConceptSetForDischarge.sql
│ │ ├── V1_23__DeleteOpenMRSCorePersonAttributes.sql
│ │ ├── V1_10__CreatingPatientIdentifierForBahmni.sql
│ │ ├── V1_56__AddConceptDescriptionProc.sql
│ │ ├── V1_25__RegistrationConceptSetFix.sql
│ │ ├── V1_80__AddConceptNumericProc.sql
│ │ ├── V1_66__addConceptConsultationNote.sql
│ │ ├── V1_59__AddConceptSetMembersProc.sql
│ │ ├── V1_30__AddConceptAnswerProc.sql
│ │ ├── V1_39__CreateLaboratoryPanelConcept.sql
│ │ ├── V1_55__addLabAndRadiologyOrderTypes.sql
│ │ ├── V1_11__CreateConceptSetForRegistrationConcepts.sql
│ │ ├── V1_81__DeleteConcept.sql
│ │ └── V1_58__AddConceptReferenceMapProc.sql
│ ├── compass
│ │ ├── sass
│ │ │ └── bahmnicore.scss
│ │ └── config.rb
│ └── java
│ │ └── org
│ │ └── bahmni
│ │ └── module
│ │ └── bahmnicore
│ │ └── web
│ │ └── v1_0
│ │ ├── MvcConfiguration.java
│ │ ├── contract
│ │ ├── BahmniMailContent.java
│ │ └── BahmniConceptAnswer.java
│ │ ├── VisitClosedException.java
│ │ ├── mapper
│ │ └── CustomObjectMapper.java
│ │ └── LocaleResolver.java
│ └── test
│ ├── resources
│ ├── patientContextDataSet.xml
│ ├── search
│ │ └── bacteriologySpecimen
│ │ │ └── programEpisodeMapping.xml
│ ├── addressHierarchy.xml
│ ├── updatePatient.json
│ └── test-hibernate.cfg.xml
│ └── java
│ └── org
│ ├── bahmni
│ └── module
│ │ └── bahmnicore
│ │ └── web
│ │ └── v1_0
│ │ ├── BaseIntegrationTest.java
│ │ └── controller
│ │ └── WhoamiControllerIT.java
│ └── openmrs
│ └── module
│ └── bahmnicore
│ └── web
│ └── v1_0
│ └── resource
│ └── RestConstants.java
├── bahmnicore-api
└── src
│ ├── main
│ ├── resources
│ │ └── atomfeed.properties
│ └── java
│ │ └── org
│ │ └── bahmni
│ │ └── module
│ │ └── bahmnicore
│ │ ├── dao
│ │ ├── EntityDao.java
│ │ ├── PersonNameDao.java
│ │ ├── PersonAttributeDao.java
│ │ ├── BahmniOrderSetDao.java
│ │ ├── ApplicationDataDirectory.java
│ │ ├── BahmniAddressHierarchyDao.java
│ │ ├── VisitDao.java
│ │ ├── BahmniConceptDao.java
│ │ ├── NoteDao.java
│ │ └── impl
│ │ │ ├── ApplicationDataDirectoryImpl.java
│ │ │ ├── EntityDaoImpl.java
│ │ │ └── PersonNameDaoImpl.java
│ │ ├── encounterModifier
│ │ ├── exception
│ │ │ └── CannotModifyEncounterException.java
│ │ └── EncounterModifier.java
│ │ ├── security
│ │ └── PrivilegeConstants.java
│ │ ├── CIELDictionary.java
│ │ ├── service
│ │ ├── BahmniOrderSetService.java
│ │ ├── BahmniProgramServiceValidator.java
│ │ ├── SqlSearchParamStore.java
│ │ ├── ThumbnailGenerator.java
│ │ ├── BahmniAddressHierarchyService.java
│ │ ├── SqlSearchService.java
│ │ ├── BahmniVisitService.java
│ │ ├── TsConceptSearchService.java
│ │ ├── impl
│ │ │ ├── BahmniProgramServiceValidatorImpl.java
│ │ │ └── BahmniOrderSetServiceImpl.java
│ │ ├── DiseaseTemplateService.java
│ │ ├── BahmniEncounterModifierService.java
│ │ ├── BahmniProgramWorkflowService.java
│ │ ├── PatientDocumentService.java
│ │ ├── BahmniConceptService.java
│ │ ├── BahmniOrderService.java
│ │ ├── BahmniDiagnosisService.java
│ │ ├── OrderService.java
│ │ └── RowMapper.java
│ │ ├── model
│ │ ├── error
│ │ │ ├── ErrorMessage.java
│ │ │ └── ErrorCode.java
│ │ ├── ResultList.java
│ │ ├── VideoFormatsForThumbnailGeneration.java
│ │ ├── VideoFormats.java
│ │ ├── BahmniName.java
│ │ ├── searchParams
│ │ │ └── AdditionalSearchParam.java
│ │ ├── Provider.java
│ │ ├── NoteType.java
│ │ └── BahmniPersonAttribute.java
│ │ ├── bahmniexceptions
│ │ ├── FileTypeNotSupportedException.java
│ │ └── VideoFormatNotSupportedException.java
│ │ ├── BahmniCoreException.java
│ │ ├── contract
│ │ ├── visit
│ │ │ └── EncounterType.java
│ │ ├── encounter
│ │ │ └── data
│ │ │ │ ├── ConceptData.java
│ │ │ │ └── ObservationData.java
│ │ ├── entityMapping
│ │ │ └── Entity.java
│ │ ├── diseasetemplate
│ │ │ └── DiseaseTemplateConfig.java
│ │ ├── monitoring
│ │ │ └── response
│ │ │ │ └── TasksMonitoringResponse.java
│ │ └── drugorder
│ │ │ ├── OrderFrequencyData.java
│ │ │ └── ConceptData.java
│ │ ├── obs
│ │ └── ObservationsAdder.java
│ │ ├── BillingSystemException.java
│ │ ├── events
│ │ ├── BahmniEventType.java
│ │ ├── EncounterEvent.java
│ │ ├── PatientEvent.java
│ │ ├── BahmniEvent.java
│ │ └── eventPublisher
│ │ │ └── BahmniEventPublisher.java
│ │ ├── extensions
│ │ └── MonthCalculationExtension.java
│ │ ├── ApplicationError.java
│ │ ├── forms2
│ │ ├── service
│ │ │ └── BahmniFormDetailsService.java
│ │ └── contract
│ │ │ └── FormType.java
│ │ ├── util
│ │ └── WebUtils.java
│ │ └── Activator.java
│ └── test
│ ├── resources
│ ├── SampleVideo.mkv
│ ├── SampleVideo.mov
│ ├── visitAttributeDataSet.xml
│ ├── programAttributesDataSet.xml
│ ├── notesData.xml
│ └── test-hibernate.cfg.xml
│ └── java
│ └── org
│ └── bahmni
│ └── module
│ └── bahmnicore
│ ├── extensions
│ └── MonthCalculationExtensionTest.java
│ ├── BaseIntegrationTest.java
│ ├── service
│ └── impl
│ │ └── BahmniFeedDrugOrderServiceImplTest.java
│ ├── model
│ ├── SimpleObjectExtractorTest.java
│ ├── BahmniNameTest.java
│ └── BahmniPersonAttributeTest.java
│ ├── mapper
│ └── BirthDateMapperTest.java
│ └── util
│ ├── AddressMother.java
│ └── NameMother.java
├── vagrant-deploy
└── scripts
│ └── vagrant
│ ├── openmrs_start.sh
│ ├── openmrs_stop.sh
│ ├── setup_environment.sh
│ ├── deploy_omods.sh
│ └── vagrant_functions.sh
├── admin
└── src
│ ├── test
│ ├── resources
│ │ ├── reference-term-source.csv
│ │ ├── concept_import.csv
│ │ ├── concept_set_import.csv
│ │ ├── programSample.csv
│ │ ├── visitAttributeDataSet.xml
│ │ ├── baseMetaData.xml
│ │ ├── patientMatchingAlgorithm
│ │ │ ├── NoMatch.groovy
│ │ │ ├── MultipleMatchPatient.groovy
│ │ │ ├── GANIdentifier.groovy
│ │ │ └── IdAndNameMatch.groovy
│ │ ├── sample.csv
│ │ ├── relationshipDataSetup.xml
│ │ ├── test-hibernate.cfg.xml
│ │ ├── conceptReferenceTerm.xml
│ │ ├── trial.csv
│ │ └── TestingApplicationContext.xml
│ └── java
│ │ └── org
│ │ └── bahmni
│ │ └── module
│ │ └── admin
│ │ ├── BaseIntegrationTest.java
│ │ └── csv
│ │ └── models
│ │ └── MultipleEncounterRowTest.java
│ └── main
│ ├── java
│ └── org
│ │ └── bahmni
│ │ └── module
│ │ └── admin
│ │ ├── csv
│ │ ├── patientmatchingalgorithm
│ │ │ ├── BahmniPatientMatchingAlgorithm.java
│ │ │ └── PatientMatchingAlgorithm.java
│ │ └── models
│ │ │ ├── LabResultRow.java
│ │ │ └── PatientProgramRow.java
│ │ ├── config
│ │ ├── service
│ │ │ └── BahmniConfigService.java
│ │ ├── dao
│ │ │ └── BahmniConfigDao.java
│ │ └── BahmniCoreModuleConfig.java
│ │ ├── observation
│ │ └── handler
│ │ │ └── CSVObsHandler.java
│ │ ├── concepts
│ │ └── mapper
│ │ │ └── DrugMapper.java
│ │ └── retrospectiveEncounter
│ │ └── domain
│ │ └── BahmniVisit.java
│ └── resources
│ └── moduleApplicationContext.xml
├── openmrs-elis-atomfeed-client-omod
└── src
│ ├── main
│ ├── resources
│ │ ├── messages.properties
│ │ ├── V1_52__StartOpenElisAtomFeedSchedulerTaskToStartAutomatically.sql
│ │ ├── V1_50__UpdatingOpenElisAtomFeedSchedulerTaskToRunEvery15Seconds.sql
│ │ ├── V1_45__UpdatingOpenElisAtomFeedSchedulerTaskToNotStartUpAutomatically.sql
│ │ ├── V1_44__AddingSchedulerTaskToProcessOpenElisPatientFeed.sql
│ │ └── V1_64__AddLabResultFeedScheduler.sql
│ └── java
│ │ └── org
│ │ └── bahmni
│ │ └── module
│ │ └── elisatomfeedclient
│ │ ├── api
│ │ ├── client
│ │ │ ├── FeedClient.java
│ │ │ ├── OpenElisPatientFeedClient.java
│ │ │ ├── FailedEventsFeedClient.java
│ │ │ └── OpenElisPatientFailedEventsFeedClient.java
│ │ ├── elisFeedInterceptor
│ │ │ ├── ElisFeedEncounterInterceptor.java
│ │ │ └── ElisFeedAccessionInterceptor.java
│ │ ├── exception
│ │ │ └── OpenElisFeedException.java
│ │ ├── task
│ │ │ ├── OpenElisPatientFeedTask.java
│ │ │ └── OpenElisPatientFeedFailedEventsTask.java
│ │ ├── Constants.java
│ │ ├── domain
│ │ │ └── OpenElisPatientAttribute.java
│ │ └── worker
│ │ │ ├── IgnoreEventWorker.java
│ │ │ └── ProviderHelper.java
│ │ └── Activator.java
│ └── test
│ ├── resources
│ ├── test-bahmnicore.properties
│ ├── TestingApplicationContext.xml
│ └── visitAttributeDataSet.xml
│ └── java
│ └── org
│ └── bahmni
│ └── module
│ └── elisatomfeedclient
│ └── api
│ └── domain
│ └── OpenElisPatientTest.java
├── bahmni-emr-api
└── src
│ ├── test
│ ├── resources
│ │ ├── labOrderAssociatedWithTestOrderData.xml
│ │ ├── obscalculator
│ │ │ └── BahmniObsValueCalculator.groovy
│ │ ├── concepts.xml
│ │ └── test-hibernate.cfg.xml
│ └── java
│ │ └── org
│ │ └── openmrs
│ │ └── module
│ │ └── bahmniemrapi
│ │ ├── BaseIntegrationTest.java
│ │ ├── encountertransaction
│ │ └── impl
│ │ │ ├── DummyEncounterSessionMatcher.java
│ │ │ └── MockEncounterTransactionHandler.java
│ │ ├── drugogram
│ │ └── contract
│ │ │ └── RegimenRowTest.java
│ │ ├── builder
│ │ ├── LocationBuilder.java
│ │ ├── PersonBuilder.java
│ │ └── ETConceptBuilder.java
│ │ └── drugorder
│ │ └── mapper
│ │ └── BahmniProviderMapperTest.java
│ └── main
│ ├── java
│ └── org
│ │ └── openmrs
│ │ └── module
│ │ └── bahmniemrapi
│ │ ├── drugogram
│ │ └── contract
│ │ │ ├── TableExtension.java
│ │ │ └── BaseTableExtension.java
│ │ ├── obscalculator
│ │ └── ObsValueCalculator.java
│ │ ├── document
│ │ ├── service
│ │ │ └── VisitDocumentService.java
│ │ └── contract
│ │ │ └── VisitDocumentResponse.java
│ │ ├── BahmniEmrAPIException.java
│ │ ├── encountertransaction
│ │ ├── command
│ │ │ ├── EncounterDataPreSaveCommand.java
│ │ │ └── EncounterDataPostSaveCommand.java
│ │ ├── mapper
│ │ │ ├── BahmniComplexDataMapper.java
│ │ │ └── EncounterTransactionDiagnosisMapper.java
│ │ ├── service
│ │ │ ├── VisitMatcher.java
│ │ │ └── BahmniEncounterTransactionService.java
│ │ └── advisor
│ │ │ └── BahmniEncounterServiceAdvisor.java
│ │ ├── drugorder
│ │ └── mapper
│ │ │ └── BahmniProviderMapper.java
│ │ ├── disposition
│ │ └── service
│ │ │ └── BahmniDispositionService.java
│ │ ├── laborder
│ │ └── service
│ │ │ └── LabOrderResultsService.java
│ │ ├── visit
│ │ └── contract
│ │ │ └── VisitData.java
│ │ ├── pivottable
│ │ └── contract
│ │ │ ├── PivotRow.java
│ │ │ └── PivotTable.java
│ │ └── diagnosis
│ │ └── contract
│ │ └── BahmniDiagnosisRequest.java
│ └── resources
│ └── moduleApplicationContext.xml
├── bahmni-test-commons
└── src
│ └── test
│ ├── java
│ └── org
│ │ └── bahmni
│ │ └── test
│ │ ├── properties
│ │ ├── PropertiesReader.java
│ │ └── SystemPropertiesReader.java
│ │ └── builder
│ │ └── PersonBuilder.java
│ └── resources
│ └── TestingApplicationContext.xml
├── scripts
├── vagrant-deploy.sh
├── vagrant-database.sh
└── docker-link.sh
├── jss-old-data
└── src
│ ├── main
│ ├── java
│ │ └── org
│ │ │ └── bahmni
│ │ │ ├── datamigration
│ │ │ ├── LookupValueProvider.java
│ │ │ ├── DataScrub.java
│ │ │ └── request
│ │ │ │ ├── referencedata
│ │ │ │ ├── PersonAttributeRequest.java
│ │ │ │ └── PersonAttribute.java
│ │ │ │ └── patient
│ │ │ │ ├── CenterId.java
│ │ │ │ ├── Name.java
│ │ │ │ └── PatientAttribute.java
│ │ │ └── jss
│ │ │ └── registration
│ │ │ ├── RegistrationNumber.java
│ │ │ └── AllStates.java
│ └── resources
│ │ ├── jssApplicationContext.xml
│ │ └── log4j2.xml
│ └── test
│ └── resources
│ └── RegistrationMaster_Sample.csv
├── .gitignore
├── reference-data
├── api
│ └── src
│ │ └── main
│ │ └── java
│ │ ├── org
│ │ └── bahmni
│ │ │ └── module
│ │ │ └── referencedata
│ │ │ └── labconcepts
│ │ │ ├── service
│ │ │ ├── ReferenceDataDrugService.java
│ │ │ ├── DrugMetaDataService.java
│ │ │ ├── ConceptMetaDataService.java
│ │ │ ├── ReferenceDataConceptService.java
│ │ │ └── ReferenceDataConceptReferenceTermService.java
│ │ │ ├── contract
│ │ │ ├── RadiologyTest.java
│ │ │ ├── Concepts.java
│ │ │ ├── CodedTestAnswer.java
│ │ │ ├── ResourceReference.java
│ │ │ ├── AllTestsAndPanels.java
│ │ │ ├── AllSamples.java
│ │ │ ├── Department.java
│ │ │ ├── ConceptSet.java
│ │ │ ├── Panel.java
│ │ │ └── TestsAndPanels.java
│ │ │ ├── mapper
│ │ │ ├── ResourceReferenceMapper.java
│ │ │ ├── RadiologyTestMapper.java
│ │ │ ├── DrugMetaDataMapper.java
│ │ │ ├── AllTestsAndPanelsMapper.java
│ │ │ ├── PanelMapper.java
│ │ │ ├── LabTestMapper.java
│ │ │ ├── AttributableResourceMapper.java
│ │ │ └── DepartmentMapper.java
│ │ │ └── validator
│ │ │ └── Validator.java
│ │ └── feed
│ │ └── FeedActivator.java
└── omod
│ └── src
│ ├── test
│ ├── java
│ │ └── org
│ │ │ └── bahmni
│ │ │ └── module
│ │ │ └── referencedata
│ │ │ └── BaseIntegrationTest.java
│ └── resources
│ │ └── referenceTermSetup.xml
│ └── main
│ ├── java
│ └── org
│ │ └── bahmni
│ │ └── module
│ │ └── referencedata
│ │ └── labconcepts
│ │ └── model
│ │ └── event
│ │ ├── ConceptServiceOperationEvent.java
│ │ ├── PanelEvent.java
│ │ ├── DepartmentEvent.java
│ │ ├── SampleEvent.java
│ │ ├── RadiologyTestEvent.java
│ │ ├── AllLabSamplesEvent.java
│ │ └── AllTestsPanelsConceptSetEvent.java
│ └── resources
│ └── webModuleApplicationContext.xml
├── bahmnicore-ui
└── src
│ ├── main
│ ├── java
│ │ └── org
│ │ │ └── bahmni
│ │ │ └── module
│ │ │ └── bahmnicoreui
│ │ │ ├── contract
│ │ │ ├── Privilege.java
│ │ │ └── ConceptValue.java
│ │ │ ├── service
│ │ │ └── BahmniDiseaseSummaryService.java
│ │ │ └── constant
│ │ │ └── DiseaseSummaryConstants.java
│ └── resources
│ │ └── moduleApplicationContext.xml
│ └── test
│ └── resources
│ └── TestingApplicationContext.xml
├── NOTICE
├── .codeclimate.yml
├── bahmnicore.properties
├── obs-relation
└── src
│ ├── main
│ ├── java
│ │ └── org
│ │ │ └── bahmni
│ │ │ └── module
│ │ │ └── obsrelationship
│ │ │ ├── model
│ │ │ └── ObsRelationshipType.java
│ │ │ ├── dao
│ │ │ └── ObsRelationshipDao.java
│ │ │ └── api
│ │ │ └── ObsRelationService.java
│ └── resources
│ │ └── obsrelation-hibernate.cfg.xml
│ └── test
│ └── resources
│ └── test-hibernate.cfg.xml
├── bahmni-mapping
└── src
│ ├── main
│ ├── java
│ │ └── org
│ │ │ └── openmrs
│ │ │ └── module
│ │ │ └── bahmnimapping
│ │ │ ├── dao
│ │ │ ├── EntityMappingDao.java
│ │ │ └── LocationEncounterTypeMapDao.java
│ │ │ └── services
│ │ │ └── BahmniLocationService.java
│ └── resources
│ │ ├── moduleApplicationContext.xml
│ │ ├── EntityMappingType.hbm.xml
│ │ └── EntityMapping.hbm.xml
│ └── test
│ └── resources
│ ├── entityMappingData.xml
│ └── test-hibernate.cfg.xml
├── README.md
├── .github
└── workflows
│ └── validate_pr.yml
└── .mvn
└── wrapper
└── maven-wrapper.properties
/bahmnicore-omod/scripts/run-compass.sh:
--------------------------------------------------------------------------------
1 | compass compile $1
2 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/dispositionConfig.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/resources/atomfeed.properties:
--------------------------------------------------------------------------------
1 | atomdb.default_schema=
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/messages.properties:
--------------------------------------------------------------------------------
1 | @MODULE_ID@.title=Bahmni Core
--------------------------------------------------------------------------------
/vagrant-deploy/scripts/vagrant/openmrs_start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -x
2 | sudo service openmrs debug
3 |
--------------------------------------------------------------------------------
/admin/src/test/resources/reference-term-source.csv:
--------------------------------------------------------------------------------
1 | Reference-term-code,Reference-term-name,Reference-term-source
2 |
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/main/resources/messages.properties:
--------------------------------------------------------------------------------
1 | @MODULE_ID@.title=Open-Elis Atom Feed Client
--------------------------------------------------------------------------------
/vagrant-deploy/scripts/vagrant/openmrs_stop.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -x
2 | set +e
3 | sudo service openmrs stop
4 | set -e
5 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_42__RemovingNotNullContraintOnOrderTypeId.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE orders MODIFY COLUMN order_type_id int NULL;
--------------------------------------------------------------------------------
/bahmnicore-api/src/test/resources/SampleVideo.mkv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bahmni/bahmni-core/HEAD/bahmnicore-api/src/test/resources/SampleVideo.mkv
--------------------------------------------------------------------------------
/bahmnicore-api/src/test/resources/SampleVideo.mov:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bahmni/bahmni-core/HEAD/bahmnicore-api/src/test/resources/SampleVideo.mov
--------------------------------------------------------------------------------
/admin/src/test/resources/concept_import.csv:
--------------------------------------------------------------------------------
1 | name,shortname,Synonym.1,description,class,datatype,reference-term-source,reference-term-code,reference-term-relationship
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/compass/sass/bahmnicore.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | @import "variables";
3 | $fontPath: "../../uicommons/fonts";
4 | @import "reference";
5 |
--------------------------------------------------------------------------------
/admin/src/test/resources/concept_set_import.csv:
--------------------------------------------------------------------------------
1 | name,shortname,description,class,Reference-term-source,Reference-term-code,Reference-term-relationship,Child.1,Child.2
2 |
--------------------------------------------------------------------------------
/bahmni-emr-api/src/test/resources/labOrderAssociatedWithTestOrderData.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_24__AddUniqueConstraintToPatientidentifier.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE patient_identifier ADD CONSTRAINT unique_patient_identifier UNIQUE (identifier);
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_41__AddingIndexToCityVillage-JssSpecific.sql:
--------------------------------------------------------------------------------
1 | -- JSS specific
2 | CREATE INDEX person_address_city_village ON person_address (city_village);
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/migrations/dependent-modules/V1_73__RemoveNotNullConstraintOnAddressEntryName.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE address_hierarchy_entry MODIFY name varchar(160) NULL;
--------------------------------------------------------------------------------
/bahmni-test-commons/src/test/java/org/bahmni/test/properties/PropertiesReader.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.test.properties;
2 |
3 | public interface PropertiesReader {
4 | String getProperty(String key);
5 | }
6 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_68__EncounterTypeForAdmission.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO encounter_type (name, description, creator, date_created, uuid) VALUES ('ADMISSION', 'ADMISSION encounter', 1, curdate(), uuid());
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_70__EncounterTypeForDischarge.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO encounter_type (name, description, creator, date_created, uuid) VALUES ('DISCHARGE', 'DISCHARGE encounter', 1, curdate(), uuid());
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_78__EncounterTypeForTransfer.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO encounter_type (name, description, creator, date_created, uuid) VALUES ('TRANSFER', 'TRANSFER encounter', 1, curdate(), uuid());
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/main/resources/V1_52__StartOpenElisAtomFeedSchedulerTaskToStartAutomatically.sql:
--------------------------------------------------------------------------------
1 | UPDATE scheduler_task_config SET start_on_startup = 1 WHERE name = 'OpenElis Atom Feed Client';
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_10__SetupRegistrationEncounterType.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO encounter_type (name, description, creator, date_created, uuid) VALUES ('REG', 'Registration encounter', 1, curdate(), uuid());
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/main/resources/V1_50__UpdatingOpenElisAtomFeedSchedulerTaskToRunEvery15Seconds.sql:
--------------------------------------------------------------------------------
1 | UPDATE scheduler_task_config SET repeat_interval = 15 WHERE name = 'OpenElis Atom Feed Client';
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/main/resources/V1_45__UpdatingOpenElisAtomFeedSchedulerTaskToNotStartUpAutomatically.sql:
--------------------------------------------------------------------------------
1 | UPDATE scheduler_task_config SET start_on_startup = 0 WHERE name = 'OpenElis Atom Feed Client';
--------------------------------------------------------------------------------
/vagrant-deploy/scripts/vagrant/setup_environment.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -x
2 |
3 | TEMP_LOCATION=/tmp/deploy_bahmni_core
4 |
5 | if [[ ! -d $TEMP_LOCATION ]]; then
6 | mkdir $TEMP_LOCATION
7 | fi
8 |
9 | rm -rf $TEMP_LOCATION/*
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_43__AddOPDConsultationEncounterType.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO encounter_type (name, description, creator, date_created, uuid) VALUES ('OPD', 'OPD consultation encounter', 1, curdate(), uuid());
2 |
--------------------------------------------------------------------------------
/scripts/vagrant-deploy.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -x
2 |
3 | PATH_OF_CURRENT_SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 |
5 | cd $PATH_OF_CURRENT_SCRIPT/../
6 |
7 | mvn clean install -nsu -DskipTests -Pvagrant-deploy
8 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/dao/EntityDao.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.dao;
2 |
3 | public interface EntityDao {
4 |
5 | public T getByUuid(String uuid, Class className);
6 | }
7 |
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/main/java/org/bahmni/module/elisatomfeedclient/api/client/FeedClient.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.elisatomfeedclient.api.client;
2 |
3 | public interface FeedClient {
4 | void processFeed();
5 | }
6 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/test/resources/patientContextDataSet.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/main/java/org/bahmni/module/elisatomfeedclient/api/client/OpenElisPatientFeedClient.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.elisatomfeedclient.api.client;
2 |
3 | public interface OpenElisPatientFeedClient extends FeedClient{
4 | }
5 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/encounterModifier/exception/CannotModifyEncounterException.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.encounterModifier.exception;
2 |
3 | public class CannotModifyEncounterException extends Exception {
4 | }
5 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_61__CreatingGlobalPropertyForPatientIdentifierType.sql:
--------------------------------------------------------------------------------
1 | select uuid from patient_identifier_type where name = 'Bahmni Id' into @uuid;
2 | UPDATE global_property SET property_value = @uuid WHERE property='emr.primaryIdentifierType';
3 |
--------------------------------------------------------------------------------
/jss-old-data/src/main/java/org/bahmni/datamigration/LookupValueProvider.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.datamigration;
2 |
3 | public interface LookupValueProvider {
4 | String getLookUpValue(String key);
5 | String getLookUpValue(String key, int valueIndex);
6 | }
7 |
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/main/java/org/bahmni/module/elisatomfeedclient/api/client/FailedEventsFeedClient.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.elisatomfeedclient.api.client;
2 |
3 | public interface FailedEventsFeedClient {
4 | void processFailedEvents();
5 | }
6 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/security/PrivilegeConstants.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.security;
2 |
3 | public class PrivilegeConstants {
4 | public static final String DELETE_PATIENT_DOCUMENT_PRIVILEGE = "Delete Patient Document";
5 | }
6 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/dao/PersonNameDao.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.dao;
2 |
3 | import org.bahmni.module.bahmnicore.model.ResultList;
4 |
5 | public interface PersonNameDao {
6 |
7 | public ResultList getUnique(String key, String query);
8 | }
9 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_67__AddConceptSetForAdmission.sql:
--------------------------------------------------------------------------------
1 | set @concept_id = 0;
2 | set @concept_name_short_id = 0;
3 | set @concept_name_full_id = 0;
4 |
5 | call add_concept(@concept_id, @concept_name_short_id, @concept_name_full_id, 'Admission', 'Admission', 'N/A', 'Misc', true);
6 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_69__AddConceptSetForDischarge.sql:
--------------------------------------------------------------------------------
1 | set @concept_id = 0;
2 | set @concept_name_short_id = 0;
3 | set @concept_name_full_id = 0;
4 |
5 | call add_concept(@concept_id, @concept_name_short_id, @concept_name_full_id, 'DISCHARGE', 'DISCHARGE', 'N/A', 'Misc', true);
6 |
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/main/java/org/bahmni/module/elisatomfeedclient/api/client/OpenElisPatientFailedEventsFeedClient.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.elisatomfeedclient.api.client;
2 |
3 | public interface OpenElisPatientFailedEventsFeedClient extends FailedEventsFeedClient {
4 | }
5 |
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/test/resources/test-bahmnicore.properties:
--------------------------------------------------------------------------------
1 | openelis.uri=http://localhost:8080/
2 | patient.feed.uri=http://localhost:8080/openelis/ws/feed/patient/recent
3 | feed.maxFailedEvents=10000
4 | feed.connectionTimeoutInMilliseconds=10000
5 | feed.replyTimeoutInMilliseconds=20000
6 |
7 |
--------------------------------------------------------------------------------
/admin/src/test/resources/programSample.csv:
--------------------------------------------------------------------------------
1 | Sr. No.,Registration Number,Patient.Name,Patient.Husbands / Fathers name in full,Patient.AGE,Patient.Gender,Patient.Caste,Patient.Category,Patient.Occupation,Patient.Village,Program,EnrollmentDate
2 | 1,GAN200000,Dummy,Gayaram,50,M,Mehar,SC,,Achanakmar,"DIABETES PROGRAM",15-10-2012
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/dao/PersonAttributeDao.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.dao;
2 |
3 | import org.bahmni.module.bahmnicore.model.ResultList;
4 |
5 | public interface PersonAttributeDao {
6 |
7 | public ResultList getUnique(String personAttribute, String query);
8 | }
9 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/dao/BahmniOrderSetDao.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.dao;
2 |
3 |
4 | import org.openmrs.OrderSet;
5 |
6 | import java.util.List;
7 |
8 | public interface BahmniOrderSetDao {
9 | List getOrderSetByQuery(String searchTerm);
10 | }
11 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_23__DeleteOpenMRSCorePersonAttributes.sql:
--------------------------------------------------------------------------------
1 | -- In OpenMRS Core liquibase-core-data.xml the ids are hard coded ( 1 to 7)
2 | SET foreign_key_checks = 0;
3 | delete from person_attribute_type where person_attribute_type_id >= 1 and person_attribute_type_id <= 7;
4 | SET foreign_key_checks = 1;
5 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/CIELDictionary.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore;
2 |
3 | public class CIELDictionary {
4 | public final static String WEIGHT_UUID = "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAA";
5 | public final static String HEIGHT_UUID = "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAA";
6 | }
7 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/dao/ApplicationDataDirectory.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.dao;
2 |
3 | import java.io.File;
4 |
5 | public interface ApplicationDataDirectory {
6 | File getFile(String relativePath);
7 |
8 | File getFileFromConfig(String relativePath);
9 | }
10 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_10__CreatingPatientIdentifierForBahmni.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO patient_identifier_type (name, description, creator, date_created, required, uuid, location_behavior)
2 | VALUES ('JSS', 'New patient identifier type created for use by the Bahmni Registration System', 1, curdate(), 1, uuid(), 'NOT_USED');
3 |
--------------------------------------------------------------------------------
/jss-old-data/src/main/java/org/bahmni/datamigration/DataScrub.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.datamigration;
2 |
3 | public class DataScrub {
4 |
5 | public static String scrubData(String value) {
6 | if(value == null)
7 | return "";
8 | return value.replace("\\", "").trim();
9 | }
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/bahmni-test-commons/src/test/java/org/bahmni/test/properties/SystemPropertiesReader.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.test.properties;
2 |
3 | public class SystemPropertiesReader implements PropertiesReader {
4 | @Override
5 | public String getProperty(String key) {
6 | return System.getProperty(key);
7 | }
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/BahmniOrderSetService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service;
2 |
3 |
4 | import org.openmrs.OrderSet;
5 |
6 | import java.util.List;
7 |
8 | public interface BahmniOrderSetService {
9 | List getOrderSetByQuery(String searchTerm);
10 | }
11 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/test/java/org/bahmni/module/bahmnicore/extensions/MonthCalculationExtensionTest.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.extensions;
2 |
3 | import org.junit.Test;
4 |
5 | public class MonthCalculationExtensionTest {
6 |
7 | @Test
8 | public void testName() throws Exception {
9 |
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_56__AddConceptDescriptionProc.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE add_concept_description (concept_id INT,
2 | description VARCHAR(250))
3 | BEGIN
4 | INSERT INTO concept_description(uuid, concept_id, description, locale, creator, date_created) values(uuid(), concept_id, description, 'en', 1, now());
5 | END;
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 | .DS_Store
3 | .idea
4 | *.iml
5 | */logs/*
6 | logs/*
7 | classes/
8 | .sass-cache
9 | .rubygems-provided
10 | .rubygems
11 | sass-external
12 | bahmnicore-omod/src/main/webapp/resources/styles/bahmnicore.css
13 | .mvn/wrapper/*.jar
14 | .vscode
15 |
16 |
17 | # Eclipse project files
18 | .settings
19 | .classpath
20 | .project
21 |
--------------------------------------------------------------------------------
/bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/drugogram/contract/TableExtension.java:
--------------------------------------------------------------------------------
1 | package org.openmrs.module.bahmniemrapi.drugogram.contract;
2 |
3 | public interface TableExtension {
4 |
5 | void update(T table);
6 | void update(T table, String patientUuid);
7 | void update(T table, String patientUuid, String patientProgramUuid);
8 | }
9 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_25__RegistrationConceptSetFix.sql:
--------------------------------------------------------------------------------
1 | select concept.concept_id from concept, concept_name where concept_name.concept_id = concept.concept_id and concept_name.name = 'REGISTRATION_CONCEPTS' into @concept_id;
2 | update concept set is_set = 1 where concept_id = @concept_id;
3 | delete from concept_set where concept_id = concept_set;
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/BahmniProgramServiceValidator.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service;
2 |
3 | import org.openmrs.PatientProgram;
4 | import org.openmrs.api.APIException;
5 |
6 | public interface BahmniProgramServiceValidator {
7 | void validate(PatientProgram patientProgram) throws APIException;
8 | }
9 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/SqlSearchParamStore.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service;
2 |
3 | import java.util.Map;
4 |
5 | public interface SqlSearchParamStore {
6 | void initQueryParamStore();
7 |
8 | boolean isInitialized();
9 |
10 | Map getSearchableParameters();
11 | }
12 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_80__AddConceptNumericProc.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE add_concept_numeric (concept_id INT,
2 | low_normal DOUBLE,
3 | hi_normal DOUBLE,
4 | units VARCHAR(50))
5 | BEGIN
6 | INSERT INTO concept_numeric (concept_id, low_normal, hi_normal, units) values (concept_id, low_normal, hi_normal, units);
7 | END;
8 |
9 |
--------------------------------------------------------------------------------
/jss-old-data/src/main/java/org/bahmni/datamigration/request/referencedata/PersonAttributeRequest.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.datamigration.request.referencedata;
2 |
3 | public class PersonAttributeRequest {
4 | private String display;
5 | private String uuid;
6 | private String value;
7 | private String attributeType;
8 | private String voided;
9 | }
--------------------------------------------------------------------------------
/reference-data/api/src/main/java/org/bahmni/module/referencedata/labconcepts/service/ReferenceDataDrugService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.referencedata.labconcepts.service;
2 |
3 |
4 | import org.bahmni.module.referencedata.labconcepts.contract.Drug;
5 |
6 | public interface ReferenceDataDrugService {
7 | public org.openmrs.Drug saveDrug(Drug drug);
8 | }
9 |
--------------------------------------------------------------------------------
/bahmnicore-ui/src/main/java/org/bahmni/module/bahmnicoreui/contract/Privilege.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicoreui.contract;
2 |
3 | public class Privilege {
4 | private String name;
5 |
6 | public Privilege(String name) {
7 | this.name = name;
8 | }
9 |
10 | public String getName() {
11 | return name;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/model/error/ErrorMessage.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.model.error;
2 |
3 | public class ErrorMessage {
4 | public static String ExistingPatientMessagePart = "already in use by another patient";
5 | public static String ExistingCustomerMessagePart = "Customer with id, name already exists";
6 | }
7 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_66__addConceptConsultationNote.sql:
--------------------------------------------------------------------------------
1 | set @concept_id = 0;
2 | set @concept_name_short_id = 0;
3 | set @concept_name_full_id = 0;
4 |
5 | call add_concept(@concept_id, @concept_name_short_id, @concept_name_full_id, 'Consultation Note', 'consultation note', 'Text', 'Misc', false);
6 | call add_concept_description(@concept_id, 'Consultation Note');
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/v1_0/MvcConfiguration.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.web.v1_0;
2 |
3 | import org.springframework.web.bind.annotation.ControllerAdvice;
4 | import org.springframework.web.servlet.config.annotation.EnableWebMvc;
5 |
6 | @EnableWebMvc
7 | @ControllerAdvice
8 | public class MvcConfiguration {
9 | }
10 |
--------------------------------------------------------------------------------
/bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/obscalculator/ObsValueCalculator.java:
--------------------------------------------------------------------------------
1 | package org.openmrs.module.bahmniemrapi.obscalculator;
2 |
3 | import org.openmrs.module.bahmniemrapi.encountertransaction.contract.BahmniEncounterTransaction;
4 |
5 | public interface ObsValueCalculator {
6 | void run(BahmniEncounterTransaction bahmniEncounterTransaction);
7 | }
8 |
--------------------------------------------------------------------------------
/admin/src/test/resources/visitAttributeDataSet.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2018 OpenMRS, Inc
2 |
3 | This product includes software developed under the stewardship of the Bahmni Coalition, under fiscal sponsorship of OpenMRS, Inc. (http://www.openmrs.org/)
4 |
5 | This product includes software developed at ThoughtWorks, Inc (http://www.thoughtworks.com/)
6 |
7 | This software contains code derived from the RAXA-Core (https://github.com/Raxa/raxacore)
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/bahmniexceptions/FileTypeNotSupportedException.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.bahmniexceptions;
2 |
3 | import org.openmrs.api.APIException;
4 |
5 | public class FileTypeNotSupportedException extends APIException {
6 | public FileTypeNotSupportedException(String message) {
7 | super(message);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/test/resources/visitAttributeDataSet.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/test/resources/search/bacteriologySpecimen/programEpisodeMapping.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/main/java/org/bahmni/module/elisatomfeedclient/api/elisFeedInterceptor/ElisFeedEncounterInterceptor.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.elisatomfeedclient.api.elisFeedInterceptor;
2 |
3 | import org.openmrs.Encounter;
4 |
5 | import java.util.Set;
6 |
7 | public interface ElisFeedEncounterInterceptor {
8 | void run(Set encounters);
9 | }
10 |
--------------------------------------------------------------------------------
/bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/document/service/VisitDocumentService.java:
--------------------------------------------------------------------------------
1 | package org.openmrs.module.bahmniemrapi.document.service;
2 |
3 | import org.openmrs.Encounter;
4 | import org.openmrs.module.bahmniemrapi.document.contract.VisitDocumentRequest;
5 |
6 | public interface VisitDocumentService {
7 | Encounter upload(VisitDocumentRequest visitDocumentRequest);
8 | }
9 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_59__AddConceptSetMembersProc.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE add_concept_set_members (set_concept_id INT,
2 | member_concept_id INT,weight INT)
3 | BEGIN
4 | INSERT INTO concept_set (concept_id, concept_set,sort_weight,creator,date_created,uuid)
5 | values (member_concept_id, set_concept_id,weight,1, now(),uuid());
6 | END;
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/admin/src/test/resources/baseMetaData.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/bahmniexceptions/VideoFormatNotSupportedException.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.bahmniexceptions;
2 |
3 | import org.openmrs.api.APIException;
4 |
5 | public class VideoFormatNotSupportedException extends APIException{
6 | public VideoFormatNotSupportedException(String message) {
7 | super(message);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/dao/BahmniAddressHierarchyDao.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.dao;
2 |
3 | import org.bahmni.module.bahmnicore.model.BahmniAddressHierarchyEntry;
4 |
5 | import java.util.List;
6 |
7 | public interface BahmniAddressHierarchyDao {
8 | List getAddressHierarchyEntriesByUuid(List uuids);
9 | }
10 |
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/main/java/org/bahmni/module/elisatomfeedclient/api/elisFeedInterceptor/ElisFeedAccessionInterceptor.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.elisatomfeedclient.api.elisFeedInterceptor;
2 |
3 | import org.bahmni.module.elisatomfeedclient.api.domain.OpenElisAccession;
4 |
5 | public interface ElisFeedAccessionInterceptor {
6 | void run(OpenElisAccession openElisAccession);
7 | }
8 |
--------------------------------------------------------------------------------
/reference-data/api/src/main/java/org/bahmni/module/referencedata/labconcepts/service/DrugMetaDataService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.referencedata.labconcepts.service;
2 |
3 | import org.bahmni.module.referencedata.labconcepts.model.DrugMetaData;
4 |
5 | public interface DrugMetaDataService {
6 | public DrugMetaData getDrugMetaData(org.bahmni.module.referencedata.labconcepts.contract.Drug drug);
7 | }
8 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/BahmniCoreException.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore;
2 |
3 |
4 | public class BahmniCoreException extends ApplicationError {
5 | public BahmniCoreException(String message, Throwable cause) {
6 | super(message, cause);
7 | }
8 |
9 | public BahmniCoreException(String message) {
10 | super(message);
11 | }
12 | }
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/ThumbnailGenerator.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service;
2 |
3 | import java.awt.image.BufferedImage;
4 | import java.io.File;
5 | import java.io.IOException;
6 |
7 | public interface ThumbnailGenerator {
8 | boolean isFormatSupported(String format);
9 | BufferedImage generateThumbnail(File video) throws IOException;
10 | }
11 |
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/test/resources/TestingApplicationContext.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/test/resources/visitAttributeDataSet.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/reference-data/omod/src/test/java/org/bahmni/module/referencedata/BaseIntegrationTest.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.referencedata;
2 |
3 | import org.bahmni.test.web.controller.BaseWebControllerTest;
4 |
5 | @org.springframework.test.context.ContextConfiguration(locations = {"classpath:TestingApplicationContext.xml"}, inheritLocations = true)
6 | public class BaseIntegrationTest extends BaseWebControllerTest {
7 | }
8 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/BahmniAddressHierarchyService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service;
2 |
3 | import org.bahmni.module.bahmnicore.model.BahmniAddressHierarchyEntry;
4 |
5 | import java.util.List;
6 |
7 | public interface BahmniAddressHierarchyService {
8 | List getAddressHierarchyEntriesByUuid(List uuids);
9 | }
10 |
--------------------------------------------------------------------------------
/bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/BahmniEmrAPIException.java:
--------------------------------------------------------------------------------
1 | package org.openmrs.module.bahmniemrapi;
2 |
3 |
4 | public class BahmniEmrAPIException extends RuntimeException {
5 | public BahmniEmrAPIException(String message, Throwable cause) {
6 | super(message, cause);
7 | }
8 |
9 | public BahmniEmrAPIException(String message) {
10 | super(message);
11 | }
12 | }
--------------------------------------------------------------------------------
/bahmnicore-omod/src/test/java/org/bahmni/module/bahmnicore/web/v1_0/BaseIntegrationTest.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.web.v1_0;
2 |
3 | import org.bahmni.test.web.controller.BaseWebControllerTest;
4 |
5 | @org.springframework.test.context.ContextConfiguration(locations = {"classpath:TestingApplicationContext.xml"}, inheritLocations = true)
6 | public class BaseIntegrationTest extends BaseWebControllerTest {
7 | }
8 |
--------------------------------------------------------------------------------
/vagrant-deploy/scripts/vagrant/deploy_omods.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -x
2 |
3 | TEMP_LOCATION=/tmp/deploy_bahmni_core
4 | USER=bahmni_support
5 | #USER=jss
6 | OMOD_LOCATION=/opt/openmrs/modules
7 |
8 | sudo rm -f $OMOD_LOCATION/bahmnicore*.omod
9 | sudo rm -f $OMOD_LOCATION/openelis-atomfeed-client*.omod
10 | sudo rm -f $OMOD_LOCATION/reference-data*.omod
11 |
12 | sudo su - $USER -c "sudo cp -f $TEMP_LOCATION/* $OMOD_LOCATION"
13 |
--------------------------------------------------------------------------------
/admin/src/test/java/org/bahmni/module/admin/BaseIntegrationTest.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.admin;
2 |
3 | import org.openmrs.web.test.BaseModuleWebContextSensitiveTest;
4 | import org.springframework.test.context.ContextConfiguration;
5 |
6 | @ContextConfiguration(locations = {"classpath:TestingApplicationContext.xml"}, inheritLocations = true)
7 | public class BaseIntegrationTest extends BaseModuleWebContextSensitiveTest {
8 | }
9 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_30__AddConceptAnswerProc.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE add_concept_answer (concept_id INT,
2 | answer_concept_id INT,
3 | sort_weight DOUBLE)
4 | BEGIN
5 | INSERT INTO concept_answer (concept_id, answer_concept, answer_drug, date_created, creator, uuid, sort_weight) values (concept_id, answer_concept_id, null, now(), 1, uuid(), sort_weight);
6 | END;
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/v1_0/contract/BahmniMailContent.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.web.v1_0.contract;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 | import lombok.Setter;
6 | import org.bahmni.module.communication.model.MailContent;
7 |
8 | @Getter
9 | @Setter
10 | @AllArgsConstructor
11 | public class BahmniMailContent extends MailContent {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/main/resources/V1_44__AddingSchedulerTaskToProcessOpenElisPatientFeed.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO scheduler_task_config(name, schedulable_class, start_time, start_time_pattern, repeat_interval, start_on_startup, started, created_by, date_created, uuid)
2 | VALUES ('OpenElis Atom Feed Client', 'org.bahmni.module.elisatomfeedclient.api.task.OpenElisAtomFeedTask', now(), 'MM/dd/yyyy HH:mm:ss', 60, 1, 1, 1, curdate(), uuid());
--------------------------------------------------------------------------------
/.codeclimate.yml:
--------------------------------------------------------------------------------
1 | ---
2 | engines:
3 | duplication:
4 | enabled: true
5 | config:
6 | languages:
7 | - ruby
8 | - javascript
9 | - python
10 | - php
11 | fixme:
12 | enabled: true
13 | rubocop:
14 | enabled: true
15 | ratings:
16 | paths:
17 | - "**.inc"
18 | - "**.js"
19 | - "**.jsx"
20 | - "**.module"
21 | - "**.php"
22 | - "**.py"
23 | - "**.rb"
24 | exclude_paths: []
25 |
--------------------------------------------------------------------------------
/bahmni-emr-api/src/test/java/org/openmrs/module/bahmniemrapi/BaseIntegrationTest.java:
--------------------------------------------------------------------------------
1 | package org.openmrs.module.bahmniemrapi;
2 |
3 | import org.openmrs.test.BaseModuleContextSensitiveTest;
4 | import org.springframework.test.context.ContextConfiguration;
5 |
6 | @ContextConfiguration(locations = {"classpath:TestingApplicationContext.xml"}, inheritLocations = true)
7 | public class BaseIntegrationTest extends BaseModuleContextSensitiveTest {
8 | }
9 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/test/java/org/bahmni/module/bahmnicore/BaseIntegrationTest.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore;
2 |
3 | import org.springframework.test.context.ContextConfiguration;
4 | import org.openmrs.web.test.BaseModuleWebContextSensitiveTest;
5 |
6 | @ContextConfiguration(locations = {"classpath:TestingApplicationContext.xml"}, inheritLocations = true)
7 | public class BaseIntegrationTest extends BaseModuleWebContextSensitiveTest {
8 | }
9 |
--------------------------------------------------------------------------------
/bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/command/EncounterDataPreSaveCommand.java:
--------------------------------------------------------------------------------
1 | package org.openmrs.module.bahmniemrapi.encountertransaction.command;
2 |
3 | import org.openmrs.module.bahmniemrapi.encountertransaction.contract.BahmniEncounterTransaction;
4 |
5 | public interface EncounterDataPreSaveCommand {
6 |
7 | BahmniEncounterTransaction update(BahmniEncounterTransaction bahmniEncounterTransaction);
8 | }
9 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/contract/visit/EncounterType.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.contract.visit;
2 |
3 | public enum EncounterType {
4 | ADMISSION ("ADMISSION"),
5 | DISHCARGE ("DISCHARGE");
6 |
7 | private final String name;
8 |
9 | EncounterType(String name) {
10 | this.name = name;
11 | }
12 |
13 | public String getName() {
14 | return name;
15 | }
16 | }
--------------------------------------------------------------------------------
/admin/src/test/resources/patientMatchingAlgorithm/NoMatch.groovy:
--------------------------------------------------------------------------------
1 | package patientMatchingAlgorithm;
2 |
3 | import org.bahmni.module.admin.csv.patientmatchingalgorithm.PatientMatchingAlgorithm
4 | import org.openmrs.Patient;
5 |
6 |
7 | public class NoMatch extends PatientMatchingAlgorithm{
8 |
9 |
10 | @Override
11 | Patient run(List patientList, List patientAttributes) {
12 | return null
13 | }
14 | }
--------------------------------------------------------------------------------
/bahmnicore-api/src/test/resources/programAttributesDataSet.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/reference-data/api/src/main/java/org/bahmni/module/referencedata/labconcepts/service/ConceptMetaDataService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.referencedata.labconcepts.service;
2 |
3 | import org.bahmni.module.referencedata.labconcepts.contract.ConceptCommon;
4 | import org.bahmni.module.referencedata.labconcepts.model.ConceptMetaData;
5 |
6 | public interface ConceptMetaDataService {
7 | public ConceptMetaData getConceptMetaData(ConceptCommon conceptCommon);
8 | }
9 |
--------------------------------------------------------------------------------
/bahmnicore-ui/src/main/java/org/bahmni/module/bahmnicoreui/service/BahmniDiseaseSummaryService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicoreui.service;
2 |
3 | import org.bahmni.module.bahmnicoreui.contract.DiseaseDataParams;
4 | import org.bahmni.module.bahmnicoreui.contract.DiseaseSummaryData;
5 |
6 | public interface BahmniDiseaseSummaryService {
7 |
8 | DiseaseSummaryData getDiseaseSummary(String patientUuid, DiseaseDataParams queryParams);
9 | }
10 |
11 |
12 |
--------------------------------------------------------------------------------
/openmrs-elis-atomfeed-client-omod/src/main/java/org/bahmni/module/elisatomfeedclient/api/exception/OpenElisFeedException.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.elisatomfeedclient.api.exception;
2 |
3 | public class OpenElisFeedException extends RuntimeException {
4 | public OpenElisFeedException(String message, Exception e) {
5 | super(message, e);
6 | }
7 |
8 | public OpenElisFeedException(String message) {
9 | super(message);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/SqlSearchService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service;
2 |
3 | import org.openmrs.annotation.Authorized;
4 | import org.openmrs.module.webservices.rest.SimpleObject;
5 |
6 | import java.util.List;
7 | import java.util.Map;
8 |
9 | public interface SqlSearchService {
10 |
11 | @Authorized
12 | public List search(String sqlQuery, Map params);
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/test/java/org/bahmni/module/bahmnicore/service/impl/BahmniFeedDrugOrderServiceImplTest.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service.impl;
2 |
3 | import org.junit.Rule;
4 | import org.junit.rules.ExpectedException;
5 |
6 | public class BahmniFeedDrugOrderServiceImplTest {
7 | public static final String TEST_VISIT_TYPE = "TEST VISIT TYPE";
8 |
9 | @Rule
10 | public ExpectedException expectedException = ExpectedException.none();
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/bahmnicore-ui/src/test/resources/TestingApplicationContext.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/jss-old-data/src/main/java/org/bahmni/datamigration/request/patient/CenterId.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.datamigration.request.patient;
2 |
3 | public class CenterId {
4 | private String name;
5 |
6 | public CenterId(String name) {
7 | this.name = name;
8 | }
9 |
10 | public String getName() {
11 | return name == null ? null : name.toUpperCase();
12 | }
13 |
14 | public void setName(String name) {
15 | this.name = name;
16 | }
17 | }
--------------------------------------------------------------------------------
/bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/mapper/BahmniComplexDataMapper.java:
--------------------------------------------------------------------------------
1 | package org.openmrs.module.bahmniemrapi.encountertransaction.mapper;
2 |
3 | import org.openmrs.Concept;
4 | import org.openmrs.obs.ComplexData;
5 |
6 | import java.io.Serializable;
7 |
8 | public interface BahmniComplexDataMapper {
9 | Serializable map(ComplexData complexData);
10 | boolean canHandle(final Concept concept, ComplexData complexData);
11 | }
12 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/test/resources/notesData.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/BahmniVisitService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service;
2 |
3 | import org.openmrs.Encounter;
4 | import org.openmrs.Visit;
5 |
6 | import java.util.List;
7 |
8 | public interface BahmniVisitService {
9 | public Visit getLatestVisit(String patientUuid, String conceptName);
10 |
11 | Visit getVisitSummary(String visitUuid);
12 |
13 | List getAdmitAndDischargeEncounters(Integer visitId);
14 | }
15 |
--------------------------------------------------------------------------------
/jss-old-data/src/main/resources/jssApplicationContext.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/obs/ObservationsAdder.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.obs;
2 |
3 | import org.openmrs.module.bahmniemrapi.encountertransaction.contract.BahmniObservation;
4 |
5 | import java.text.ParseException;
6 | import java.util.Collection;
7 | import java.util.List;
8 |
9 | public interface ObservationsAdder {
10 |
11 | void addObservations(Collection observations, List conceptNames) throws ParseException;
12 | }
13 |
--------------------------------------------------------------------------------
/reference-data/api/src/main/java/org/bahmni/module/referencedata/labconcepts/contract/RadiologyTest.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.referencedata.labconcepts.contract;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 | public class RadiologyTest extends Resource {
7 | public static final List RADIOLOGY_TEST_CONCEPT_CLASSES = Arrays.asList("Radiology", "Radiology/Imaging Procedure");
8 | public static final String RADIOLOGY_TEST_PARENT_CONCEPT_NAME = "Radiology";
9 | }
10 |
--------------------------------------------------------------------------------
/reference-data/omod/src/main/java/org/bahmni/module/referencedata/labconcepts/model/event/ConceptServiceOperationEvent.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.referencedata.labconcepts.model.event;
2 |
3 | import org.ict4h.atomfeed.server.service.Event;
4 |
5 | import java.net.URISyntaxException;
6 |
7 | public interface ConceptServiceOperationEvent {
8 | public Event asAtomFeedEvent(Object[] arguments) throws URISyntaxException;
9 | public Boolean isApplicable(String operation, Object[] arguments);
10 | }
11 |
--------------------------------------------------------------------------------
/bahmnicore.properties:
--------------------------------------------------------------------------------
1 | openerp.port=8069
2 | openerp.host=localhost
3 | openerp.database=openerp
4 | openerp.user=admin
5 | openerp.password=password
6 | openerp.connectionTimeoutInMilliseconds=10000
7 | openerp.replyTimeoutInMilliseconds=20000
8 |
9 | bahmnicore.datamigration.mode=false
10 |
11 | #Make sure this directory exists
12 | bahmnicore.images.directory=/tmp/patient_images
13 | bahmnicore.urls.patientimages=http://localhost:8080/patient_images
14 |
15 | bahmnicore.documents.baseDirectory=/home/jss/document_images
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/encounterModifier/EncounterModifier.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.encounterModifier;
2 |
3 | import org.bahmni.module.bahmnicore.contract.encounter.data.EncounterModifierData;
4 | import org.bahmni.module.bahmnicore.encounterModifier.exception.CannotModifyEncounterException;
5 |
6 | public abstract class EncounterModifier {
7 | public abstract EncounterModifierData run(EncounterModifierData encounterModifierData) throws CannotModifyEncounterException;
8 | }
9 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/model/error/ErrorCode.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.model.error;
2 |
3 | public class ErrorCode {
4 | public static int DuplicatePatient = 1;
5 | public static int DuplicateCustomer = 2;
6 | public static int OpenERPError = 3;
7 | public static int OpenMRSError = 4;
8 |
9 | public static boolean duplicationError(int errorCode) {
10 | return errorCode == DuplicateCustomer || errorCode == DuplicatePatient;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/obs-relation/src/main/java/org/bahmni/module/obsrelationship/model/ObsRelationshipType.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.obsrelationship.model;
2 |
3 | import org.openmrs.BaseOpenmrsMetadata;
4 |
5 |
6 | public class ObsRelationshipType extends BaseOpenmrsMetadata implements java.io.Serializable{
7 | private int id;
8 |
9 | @Override
10 | public Integer getId() {
11 | return this.id;
12 | }
13 |
14 | @Override
15 | public void setId(Integer id) {
16 | this.id = id;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/admin/src/test/resources/sample.csv:
--------------------------------------------------------------------------------
1 | Sr. No.,Registration Number,encounterType,visitType,Patient.Name,Patient.Husbands / Fathers name in full,Patient.AGE,Patient.Gender,Patient.Caste,Patient.Category,Patient.Occupation,Patient.Village,Patient.Cluster,Patient.Block,Repeat.1.EncounterDate,Repeat.1.Diagnosis.diagnosis1,Repeat.1.Obs.Weight,Repeat.1.Obs.Height,Repeat.2.EncounterDate,Repeat.2.Obs.Weight,Repeat.2.Obs.Height
1,6424,Consultation,OPD,Ganesh ram Mehar,Gayaram,50,M,Mehar,SC,,Achanakmar,4,,26-10-2012,"Diabetes, Type 1",51.75,,19-6-2013,48.7,
--------------------------------------------------------------------------------
/jss-old-data/src/main/java/org/bahmni/jss/registration/RegistrationNumber.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.jss.registration;
2 |
3 | public class RegistrationNumber {
4 | private String centerCode;
5 | private String id;
6 |
7 | public RegistrationNumber(String centerCode, String id) {
8 | this.centerCode = centerCode;
9 | this.id = id;
10 | }
11 |
12 | public String getCenterCode() {
13 | return centerCode;
14 | }
15 |
16 | public String getId() {
17 | return id;
18 | }
19 | }
--------------------------------------------------------------------------------
/bahmni-test-commons/src/test/java/org/bahmni/test/builder/PersonBuilder.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.test.builder;
2 |
3 | import org.openmrs.Person;
4 |
5 | public class PersonBuilder {
6 |
7 | private final Person person;
8 |
9 | public PersonBuilder() {
10 | person = new Person();
11 | }
12 |
13 | public PersonBuilder withUUID(String patientUuid) {
14 | person.setUuid(patientUuid);
15 | return this;
16 | }
17 |
18 | public Person build() {
19 | return person;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/BillingSystemException.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore;
2 |
3 | import org.openmrs.Patient;
4 |
5 | public class BillingSystemException extends ApplicationError {
6 | private Patient patient;
7 |
8 | public BillingSystemException(String message, Throwable throwable, Patient patient) {
9 | super(message, throwable);
10 | this.patient = patient;
11 | }
12 |
13 | public Patient getPatient() {
14 | return patient;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/TsConceptSearchService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service;
2 |
3 | import org.openmrs.annotation.Authorized;
4 | import org.openmrs.api.OpenmrsService;
5 | import org.openmrs.module.webservices.rest.SimpleObject;
6 |
7 | import java.util.List;
8 |
9 | public interface TsConceptSearchService extends OpenmrsService {
10 | @Authorized(value = {"Get Concepts"})
11 | List getConcepts(String query, Integer limit, String locale);
12 | }
13 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/model/ResultList.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.model;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | public class ResultList {
7 |
8 | private List results;
9 |
10 | public ResultList(List results) {
11 | this.results = results == null ? new ArrayList() : results;
12 | }
13 |
14 | public List getResults() {
15 | return results;
16 | }
17 |
18 | public int size() {
19 | return results.size();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_39__CreateLaboratoryPanelConcept.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO concept (datatype_id,class_id,is_set,creator,date_created,changed_by,date_changed,uuid) VALUES (4,8,true,1,{ts '2013-07-23 11:26:35'},1,{ts '2013-07-23 11:26:35'},uuid());
2 |
3 | select max(concept_id) from concept into @laboratory_concept_id;
4 |
5 | insert into concept_name(concept_id, name, locale, locale_preferred,creator, date_created, concept_name_type, uuid) values (@laboratory_concept_id, 'Laboratory', 'en', true, 1, {ts '2013-07-23 11:26:35'}, 'FULLY_SPECIFIED', uuid());
--------------------------------------------------------------------------------
/admin/src/main/java/org/bahmni/module/admin/csv/patientmatchingalgorithm/BahmniPatientMatchingAlgorithm.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.admin.csv.patientmatchingalgorithm;
2 |
3 | import org.bahmni.csv.KeyValue;
4 | import org.openmrs.Patient;
5 |
6 | import java.util.List;
7 |
8 | public class BahmniPatientMatchingAlgorithm extends PatientMatchingAlgorithm {
9 | @Override
10 | public Patient run(List patientList, List patientAttributes) {
11 | return patientList.size() > 0 ? patientList.get(0) : null;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/admin/src/test/resources/patientMatchingAlgorithm/MultipleMatchPatient.groovy:
--------------------------------------------------------------------------------
1 | import org.bahmni.module.admin.csv.patientmatchingalgorithm.PatientMatchingAlgorithm
2 | import org.bahmni.module.admin.csv.patientmatchingalgorithm.exception.CannotMatchPatientException
3 | import org.openmrs.Patient
4 |
5 | public class MultipleMatchPatient extends PatientMatchingAlgorithm {
6 | @Override
7 | Patient run(List patientList, List patientAttributes) {
8 | throw new CannotMatchPatientException(patientList);
9 | }
10 | }
--------------------------------------------------------------------------------
/bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/drugogram/contract/BaseTableExtension.java:
--------------------------------------------------------------------------------
1 | package org.openmrs.module.bahmniemrapi.drugogram.contract;
2 |
3 | public class BaseTableExtension implements TableExtension {
4 |
5 | @Override
6 | public void update(T table) {
7 | //Do nothing
8 | }
9 |
10 | @Override
11 | public void update(T table, String patientUuid) {
12 | //Do nothing
13 | }
14 |
15 | @Override
16 | public void update(T table, String patientUuid, String patientProgramUuid) {
17 | //Do nothing
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/admin/src/main/java/org/bahmni/module/admin/config/service/BahmniConfigService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.admin.config.service;
2 |
3 | import org.bahmni.module.admin.config.model.BahmniConfig;
4 |
5 | import java.util.List;
6 |
7 | public interface BahmniConfigService {
8 | BahmniConfig get(String appName, String configName);
9 |
10 | List getAllFor(String appName);
11 |
12 | BahmniConfig save(BahmniConfig bahmniConfig);
13 |
14 | BahmniConfig update(BahmniConfig bahmniConfig);
15 |
16 | List getAll();
17 | }
18 |
--------------------------------------------------------------------------------
/reference-data/api/src/main/java/org/bahmni/module/referencedata/labconcepts/mapper/ResourceReferenceMapper.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.referencedata.labconcepts.mapper;
2 |
3 | import org.bahmni.module.referencedata.labconcepts.contract.ResourceReference;
4 | import org.openmrs.Concept;
5 | import org.openmrs.api.context.Context;
6 |
7 | public class ResourceReferenceMapper {
8 | public ResourceReference map(Concept concept) {
9 | return new ResourceReference(concept.getUuid(), concept.getName(Context.getLocale()).getName());
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/events/BahmniEventType.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.events;
2 |
3 | public enum BahmniEventType {
4 | BAHMNI_PATIENT_CREATED("bahmni-patient"),
5 | BAHMNI_PATIENT_UPDATED("bahmni-patient"),
6 | BAHMNI_ENCOUNTER_CREATED("bahmni-encounter"),
7 | BAHMNI_ENCOUNTER_UPDATED("bahmni-encounter");
8 |
9 | private final String topic;
10 | BahmniEventType(String topic) {
11 | this.topic = topic;
12 | }
13 | public String topic() {
14 | return topic;
15 | }
16 | }
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/impl/BahmniProgramServiceValidatorImpl.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service.impl;
2 |
3 | import org.bahmni.module.bahmnicore.service.BahmniProgramServiceValidator;
4 | import org.openmrs.PatientProgram;
5 | import org.openmrs.api.APIException;
6 | import org.springframework.stereotype.Component;
7 |
8 | @Component
9 | public class BahmniProgramServiceValidatorImpl implements BahmniProgramServiceValidator {
10 | public void validate(PatientProgram patientProgram) throws APIException {}
11 | }
12 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/extensions/MonthCalculationExtension.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.extensions;
2 |
3 | import org.openmrs.module.bahmniemrapi.drugogram.contract.BaseTableExtension;
4 | import org.openmrs.module.bahmniemrapi.drugogram.contract.TreatmentRegimen;
5 |
6 | public class MonthCalculationExtension extends BaseTableExtension {
7 |
8 | @Override
9 | public void update(TreatmentRegimen treatmentRegimen, String patientUuid, String patientProgramUuid) {
10 | // Do nothing
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/reference-data/api/src/main/java/org/bahmni/module/referencedata/labconcepts/validator/Validator.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.referencedata.labconcepts.validator;
2 |
3 | import org.apache.commons.lang3.StringUtils;
4 | import org.openmrs.api.APIException;
5 |
6 | import java.util.List;
7 |
8 | public class Validator {
9 | public void throwExceptionIfExists(List errors) {
10 | String message = StringUtils.join(errors, "\n");
11 | if (!StringUtils.isBlank(message)) {
12 | throw new APIException(message);
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/bahmni-mapping/src/main/java/org/openmrs/module/bahmnimapping/dao/EntityMappingDao.java:
--------------------------------------------------------------------------------
1 | package org.openmrs.module.bahmnimapping.dao;
2 |
3 | import org.openmrs.module.bahmnimapping.model.EntityMapping;
4 | import org.openmrs.module.bahmnimapping.model.EntityMappingType;
5 |
6 | import java.util.List;
7 |
8 | public interface EntityMappingDao {
9 | List getMappingsOfEntity(String entity1Uuid, String mappingTypeName);
10 | List getAllEntityMappings(String mappingTypeName);
11 | EntityMappingType getEntityMappingTypeByName(String name);
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_55__addLabAndRadiologyOrderTypes.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO order_type (`name`,`description`,`creator`,`date_created`,`retired`,`retired_by`,`date_retired`,`retire_reason`,`uuid`,`java_class_name`)
2 | VALUES ('Lab Order','An order for laboratory tests',1,NOW(),0,NULL,NULL,NULL,UUID(),'org.openmrs.Order');
3 |
4 | INSERT INTO order_type (`name`,`description`,`creator`,`date_created`,`retired`,`retired_by`,`date_retired`,`retire_reason`,`uuid`,`java_class_name`)
5 | VALUES ('Radiology Order','An order for radiology tests',1,NOW(),0,NULL,NULL,NULL,UUID(),'org.openmrs.Order');
6 |
--------------------------------------------------------------------------------
/admin/src/main/java/org/bahmni/module/admin/config/dao/BahmniConfigDao.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.admin.config.dao;
2 |
3 | import org.bahmni.module.admin.config.model.BahmniConfig;
4 |
5 | import java.util.List;
6 |
7 | public interface BahmniConfigDao {
8 | BahmniConfig get(String appName, String configName);
9 |
10 | BahmniConfig get(String uuid);
11 |
12 | List getAllFor(String appName);
13 |
14 | BahmniConfig save(BahmniConfig bahmniConfig);
15 |
16 | BahmniConfig update(BahmniConfig existingConfig);
17 |
18 | List getAll();
19 | }
20 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/events/EncounterEvent.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.events;
2 |
3 | import org.openmrs.Encounter;
4 |
5 | public class EncounterEvent extends BahmniEvent {
6 |
7 | private Encounter encounter;
8 |
9 | public EncounterEvent(BahmniEventType bahmniEventType, Encounter encounter) {
10 | super(bahmniEventType);
11 | this.encounter = encounter;
12 | this.payloadId=encounter.getUuid();
13 | }
14 |
15 | public Encounter getEncounter() {
16 | return encounter;
17 | }
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_11__CreateConceptSetForRegistrationConcepts.sql:
--------------------------------------------------------------------------------
1 | -- This is a concept for concept-set
2 | insert into concept (datatype_id, class_id, is_set, creator, date_created, changed_by, date_changed, uuid)
3 | values (1, 10, 0, 1, now(), 1, now(), uuid());
4 | select max(concept_id) from concept into @registration_concepts_concept_id;
5 | insert into concept_name (concept_id, name, locale, locale_preferred, creator, date_created, concept_name_type, uuid)
6 | values (@registration_concepts_concept_id, 'REGISTRATION_CONCEPTS', 'en', 1, 1, now(), 'FULLY_SPECIFIED', uuid());
7 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/resources/V1_81__DeleteConcept.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE delete_concept (name_concept VARCHAR(255))
2 | BEGIN
3 | DECLARE conceptId INT default 0;
4 |
5 | select concept_id INTO conceptId from concept_name where name = name_concept and locale_preferred = 1;
6 | delete from concept_set where concept_set = conceptId;
7 | delete from concept_name where concept_id = conceptId;
8 | delete from concept_numeric where concept_id = conceptId;
9 | delete from concept_answer where concept_id = conceptId;
10 | delete from concept where concept_id = conceptId;
11 | END;
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/DiseaseTemplateService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service;
2 |
3 | import org.bahmni.module.bahmnicore.contract.diseasetemplate.DiseaseTemplate;
4 | import org.bahmni.module.bahmnicore.contract.diseasetemplate.DiseaseTemplatesConfig;
5 |
6 | import java.util.List;
7 |
8 | public interface DiseaseTemplateService {
9 |
10 | List allDiseaseTemplatesFor(DiseaseTemplatesConfig diseaseTemplatesConfig);
11 |
12 | DiseaseTemplate diseaseTemplateFor(DiseaseTemplatesConfig diseaseTemplatesConfig);
13 | }
14 |
--------------------------------------------------------------------------------
/bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/v1_0/VisitClosedException.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.web.v1_0;
2 |
3 | import org.openmrs.api.APIException;
4 | import org.springframework.http.HttpStatus;
5 | import org.springframework.web.bind.annotation.ResponseStatus;
6 |
7 | @ResponseStatus(value = HttpStatus.FORBIDDEN, reason = "Visit for this patient is closed. You cannot do an 'Undo Discharge' for the patient.")
8 | public class VisitClosedException extends APIException {
9 | public VisitClosedException(String message){
10 | super(message);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/drugorder/mapper/BahmniProviderMapper.java:
--------------------------------------------------------------------------------
1 | package org.openmrs.module.bahmniemrapi.drugorder.mapper;
2 |
3 | import org.openmrs.Provider;
4 | import org.openmrs.module.emrapi.encounter.domain.EncounterTransaction;
5 |
6 | public class BahmniProviderMapper {
7 | public EncounterTransaction.Provider map(Provider provider) {
8 | EncounterTransaction.Provider result = new EncounterTransaction.Provider();
9 | result.setUuid(provider.getUuid());
10 | result.setName(provider.getName());
11 | return result;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/bahmnicore-ui/src/main/java/org/bahmni/module/bahmnicoreui/contract/ConceptValue.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicoreui.contract;
2 |
3 | public class ConceptValue {
4 | private String value;
5 |
6 | private Boolean abnormal;
7 |
8 | public Boolean getAbnormal() {
9 | return abnormal;
10 | }
11 |
12 | public void setAbnormal(Boolean abnormal) {
13 | this.abnormal = abnormal;
14 | }
15 |
16 | public String getValue() {
17 | return value;
18 | }
19 |
20 | public void setValue(String value) {
21 | this.value = value;
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/bahmni-emr-api/src/test/resources/obscalculator/BahmniObsValueCalculator.groovy:
--------------------------------------------------------------------------------
1 | package obscalculator
2 |
3 | import org.openmrs.module.bahmniemrapi.encountertransaction.contract.BahmniEncounterTransaction
4 | import org.openmrs.module.bahmniemrapi.obscalculator.ObsValueCalculator
5 |
6 | public class TestObsValueCalculator implements ObsValueCalculator {
7 |
8 | public static String DEFAULT_ENCOUNTER_UUID = "defaultEncounterUuid"
9 |
10 | @Override
11 | void run(BahmniEncounterTransaction bahmniEncounterTransaction) {
12 | bahmniEncounterTransaction.setEncounterUuid(DEFAULT_ENCOUNTER_UUID)
13 |
14 | }
15 | }
--------------------------------------------------------------------------------
/bahmni-test-commons/src/test/resources/TestingApplicationContext.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/ApplicationError.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore;
2 |
3 | public class ApplicationError extends RuntimeException {
4 | private int errorCode;
5 |
6 | public ApplicationError(String message, Throwable throwable) {
7 | super(message, throwable);
8 | }
9 |
10 | public ApplicationError(String message) {
11 | super(message);
12 | }
13 |
14 | public int getErrorCode() {
15 | return errorCode;
16 | }
17 |
18 | public void setErrorCode(int errorCode) {
19 | this.errorCode = errorCode;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/forms2/service/BahmniFormDetailsService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.forms2.service;
2 |
3 | import org.bahmni.module.bahmnicore.forms2.contract.FormDetails;
4 | import org.bahmni.module.bahmnicore.forms2.contract.FormType;
5 |
6 | import java.util.Collection;
7 |
8 | public interface BahmniFormDetailsService {
9 | Collection getFormDetails(String patientUuid, FormType formType, int numberOfVisits);
10 |
11 | Collection getFormDetails(String patientUuid, FormType formType, String visitUuid, String patientProgramUuid);
12 | }
13 |
--------------------------------------------------------------------------------
/bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/command/EncounterDataPostSaveCommand.java:
--------------------------------------------------------------------------------
1 | package org.openmrs.module.bahmniemrapi.encountertransaction.command;
2 |
3 | import org.openmrs.Encounter;
4 | import org.openmrs.module.bahmniemrapi.encountertransaction.contract.BahmniEncounterTransaction;
5 | import org.openmrs.module.emrapi.encounter.domain.EncounterTransaction;
6 |
7 | public interface EncounterDataPostSaveCommand {
8 |
9 | EncounterTransaction save(BahmniEncounterTransaction bahmniEncounterTransaction, Encounter currentEncounter, EncounterTransaction updatedEncounterTransaction);
10 | }
11 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/BahmniEncounterModifierService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service;
2 |
3 | import org.bahmni.module.bahmnicore.contract.encounter.data.EncounterModifierData;
4 | import org.bahmni.module.bahmnicore.encounterModifier.exception.CannotModifyEncounterException;
5 |
6 | import java.io.IOException;
7 |
8 | public interface BahmniEncounterModifierService {
9 | public EncounterModifierData getModifiedEncounter(EncounterModifierData encounterModifierData) throws IllegalAccessException, IOException, InstantiationException, CannotModifyEncounterException;
10 | }
11 |
--------------------------------------------------------------------------------
/reference-data/api/src/main/java/org/bahmni/module/referencedata/labconcepts/mapper/RadiologyTestMapper.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.referencedata.labconcepts.mapper;
2 |
3 | import org.bahmni.module.referencedata.labconcepts.contract.RadiologyTest;
4 | import org.openmrs.Concept;
5 |
6 | public class RadiologyTestMapper extends ResourceMapper {
7 | public RadiologyTestMapper() {
8 | super(RadiologyTest.RADIOLOGY_TEST_PARENT_CONCEPT_NAME);
9 | }
10 |
11 | @Override
12 | public RadiologyTest map(Concept testConcept) {
13 | return mapResource(new RadiologyTest(), testConcept);
14 | }
15 |
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/jss-old-data/src/test/resources/RegistrationMaster_Sample.csv:
--------------------------------------------------------------------------------
1 | REG_NO,REG_DATE,FNAME,LNAME,FHNAME,P_SEX,P_DOB,P_AGE,P_HEIGHT,P_WEIGHT,VILLAGE,CITY,P_POST,EDUCATION,OCCUPATION,P_MEMBER,P_TB,BALANCE_AMT,Remark,FNameID,CasteID,FHNameID,EducationID,OccupationID,VillageID,TahsilID,DistrictID,TahsilID2,VillageID2,Neighborhood,GramPanchID,LNameID,ClassID,memberVillageID,GramPanch,Tahsil
52174/GAN,29/07/2005 00:00:00,UMASHANKAR,,VISHAL,M,05/08/79 0:00,26,,34.6,DEVARI,,BHARANI,,,,0,0,,20937,1,21393,0,0,3084,1,0,0,0,,0,2,0,0,,
8370/GAN,27/06/2003 00:00:00,Binda Bai Goswami,,Kunj Bharati,F,,y/70,,52,Patharra,,Peepertarai,,,,0,0,,2931,1,28226,0,0,8846,1,0,0,0,,0,2,0,0,,
--------------------------------------------------------------------------------
/reference-data/api/src/main/java/org/bahmni/module/referencedata/labconcepts/service/ReferenceDataConceptService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.referencedata.labconcepts.service;
2 |
3 | import org.bahmni.module.referencedata.labconcepts.contract.Concept;
4 | import org.bahmni.module.referencedata.labconcepts.contract.ConceptSet;
5 |
6 | public interface ReferenceDataConceptService {
7 | public org.openmrs.Concept saveConcept(Concept concept);
8 |
9 | public org.openmrs.Concept saveConcept(ConceptSet conceptSet);
10 |
11 | public org.bahmni.module.referencedata.labconcepts.contract.Concepts getConcept(String conceptName);
12 | }
13 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/test/java/org/bahmni/module/bahmnicore/model/SimpleObjectExtractorTest.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.model;
2 |
3 | import org.junit.Test;
4 | import org.openmrs.module.webservices.rest.SimpleObject;
5 |
6 | import static org.junit.Assert.assertEquals;
7 |
8 | public class SimpleObjectExtractorTest {
9 | @Test
10 | public void shouldReturnDefaultValueWhenKeyDoesNotExist() {
11 | SimpleObjectExtractor simpleObjectExtractor = new SimpleObjectExtractor(new SimpleObject().add("foo", 4));
12 |
13 | assertEquals(0, (int)simpleObjectExtractor.getValueOrDefault("bar", int.class));
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/reference-data/api/src/main/java/feed/FeedActivator.java:
--------------------------------------------------------------------------------
1 | package feed;
2 |
3 | import org.openmrs.module.ModuleActivator;
4 |
5 | public class FeedActivator implements ModuleActivator {
6 | @Override
7 | public void willRefreshContext() {
8 |
9 | }
10 |
11 | @Override
12 | public void contextRefreshed() {
13 |
14 | }
15 |
16 | @Override
17 | public void willStart() {
18 |
19 | }
20 |
21 | @Override
22 | public void started() {
23 |
24 | }
25 |
26 | @Override
27 | public void willStop() {
28 |
29 | }
30 |
31 | @Override
32 | public void stopped() {
33 |
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/admin/src/test/resources/patientMatchingAlgorithm/GANIdentifier.groovy:
--------------------------------------------------------------------------------
1 | package patientMatchingAlgorithm;
2 |
3 | import org.bahmni.module.admin.csv.patientmatchingalgorithm.PatientMatchingAlgorithm
4 | import org.openmrs.Patient;
5 |
6 |
7 | public class GANIdentifier extends PatientMatchingAlgorithm {
8 | @Override
9 | Patient run(List patientList, List patientAttributes) {
10 | for (Patient patient : patientList) {
11 | if (patient.getPatientIdentifier().getIdentifier().contains("GAN")) {
12 | return patient;
13 | }
14 | }
15 | return null;
16 | }
17 | }
--------------------------------------------------------------------------------
/scripts/vagrant-database.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -x
2 | PATH_OF_CURRENT_SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3 | source $PATH_OF_CURRENT_SCRIPT/../vagrant-deploy/scripts/vagrant/vagrant_functions.sh
4 |
5 | set -e
6 | $PATH_OF_CURRENT_SCRIPT/vagrant-deploy.sh
7 |
8 | #invoke migration of openmrs core
9 | run_in_vagrant -c "sudo su - bahmni -c 'cd /bahmni_temp/ && ./run-liquibase-openmrs.sh'"
10 | #invoke migrations of bahmni core omods
11 | run_in_vagrant -c "sudo su - bahmni -c 'cd /bahmni_temp/ && ./run-core-bahmni-modules-liquibase.sh'"
12 | run_in_vagrant -c "sudo su - bahmni -c 'cd /bahmni_temp/ && ./run-openelis-atomfeed-client-liquibase.sh'"
13 |
--------------------------------------------------------------------------------
/bahmni-mapping/src/main/resources/moduleApplicationContext.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/BahmniProgramWorkflowService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service;
2 |
3 | import org.openmrs.Encounter;
4 | import org.openmrs.annotation.Authorized;
5 | import org.openmrs.api.ProgramWorkflowService;
6 | import org.springframework.transaction.annotation.Transactional;
7 |
8 | import java.util.Collection;
9 |
10 | public interface BahmniProgramWorkflowService extends ProgramWorkflowService {
11 |
12 | @Transactional(readOnly = true)
13 | @Authorized({"View Patient Programs"})
14 | Collection getEncountersByPatientProgramUuid(String patientProgramUuid);
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/service/PatientDocumentService.java:
--------------------------------------------------------------------------------
1 | package org.bahmni.module.bahmnicore.service;
2 |
3 | import org.springframework.http.ResponseEntity;
4 |
5 | public interface PatientDocumentService {
6 | public void saveImage(String patientIdentifier, String image);
7 | public String saveDocument(Integer patientId, String encounterTypeName, String content, String format, String fileType, String fileName);
8 | public ResponseEntity