@Test public void shouldFetchAllMotechConfiguration() { MotechService motechService = Context.getService(MotechService.class); MotechConfiguration motechConfiguration = motechService.getConfigurationFor("valid.child.registration.date"); assertNotNull(motechConfiguration); assertNotNull(motechConfiguration.asDate()); }
public MotechConfiguration getConfigurationFor(String name) { return motechDAO.getConfiguration(name); }
MotechServiceImpl extends BaseOpenmrsService implements MotechService { public MotechConfiguration getConfigurationFor(String name) { return motechDAO.getConfiguration(name); } }
MotechServiceImpl extends BaseOpenmrsService implements MotechService { public MotechConfiguration getConfigurationFor(String name) { return motechDAO.getConfiguration(name); }  }
MotechServiceImpl extends BaseOpenmrsService implements MotechService { public MotechConfiguration getConfigurationFor(String name) { return motechDAO.getConfiguration(name); }  MotechDAO getMotechDAO(); void setMotechDAO(MotechDAO motechDAO); RegistrarBean getRegistrarBean(); void setRegistrarBean(RegistrarBean registrarBean); OpenmrsBean getOpenmrsBean(); StaffMessageService getStaffMessageService(); void setStaffMessageService(StaffMessageService staffMessageService); void setOpenmrsBean(OpenmrsBean openmrsBean); ScheduleMaintService getScheduleService(); void setScheduleService(ScheduleMaintService scheduleService); void setScheduleMaintService(ScheduleMaintService scheduleService); ScheduleMaintService getScheduleMaintService(); MessageProgramEnrollment saveMessageProgramEnrollment(
			MessageProgramEnrollment enrollment); List<MessageProgramEnrollment> getActiveMessageProgramEnrollments(
            Integer personId, String program, Integer obsId,
            Long minExclusiveId, Integer maxResults); List<ScheduledMessage> getAllScheduledMessages(); List<ScheduledMessage> getScheduledMessages(Date startDate,
			Date endDate); List<Message> getAllMessages(); List<Message> getMessages(ScheduledMessage scheduledMessage); List<Message> getMessages(Date startDate, Date endDate,
			MessageStatus status); List<ScheduledMessage> getScheduledMessages(Integer recipientId,
			MessageDefinition definition, MessageProgramEnrollment enrollment,
			Date messageDate); List<Message> getMessages(MessageProgramEnrollment enrollment,
			MessageStatus status); List<Message> getMessages(Integer recipientId,
			MessageProgramEnrollment enrollment, MessageDefinition definition,
			Date messageDate, MessageStatus status); List<Message> getMessages(Integer recipientId,
			MessageProgramEnrollment enrollment,
			MessageDefDate[] messageDefDates, MessageStatus status); Message getMessage(String publicId); List<MessageDefinition> getAllMessageDefinitions(); MessageDefinition getMessageDefinition(String messageKey); List<MessageAttribute> getAllMessageAttributes(); ScheduledMessage saveScheduledMessage(
			ScheduledMessage scheduledMessage); Message saveMessage(Message message); MessageDefinition saveMessageDefinition(
			MessageDefinition messageDefinition); MessageAttribute saveMessageAttribute(
			MessageAttribute messageAttribute); List<Integer> getUserIdsByPersonAttribute(
			PersonAttributeType personAttributeType, String value); Blackout getBlackoutSettings(); void setBlackoutSettings(Blackout blackout); TroubledPhone getTroubledPhone(String phoneNumber); void saveTroubledPhone(TroubledPhone troubledPhone); void addTroubledPhone(String phoneNumber); void removeTroubledPhone(String phoneNumber); GeneralOutpatientEncounter saveGeneralOutpatientEncounter(
			GeneralOutpatientEncounter encounter); List<String> getAllCountries(); List<String> getAllRegions(); List<String> getRegions(String country); List<String> getAllDistricts(); List<String> getDistricts(String country, String region); List<Obs> getActivePregnancies(Integer patientId,
			Concept pregnancyConcept, Concept pregnancyStatusConcept); List<Obs> getActivePregnanciesDueDateObs(Facility facility,
			Date fromDueDate, Date toDueDate, Concept pregnancyDueDateConcept,
			Concept pregnancyConcept, Concept pregnancyStatusConcept,
			Integer maxResults); List<Encounter> getEncounters(Facility facility,
			EncounterType encounterType, Date fromDate, Date toDate,
			Integer maxResults); ExpectedObs saveExpectedObs(ExpectedObs expectedObs); List<ExpectedObs> getExpectedObs(Patient patient, Facility facility,
			String[] groups, Date minDueDate, Date maxDueDate,
			Date maxLateDate, Date minMaxDate, Integer maxResults); ExpectedEncounter saveExpectedEncounter(
			ExpectedEncounter expectedEncounter); List<ExpectedEncounter> getExpectedEncounter(Patient patient,
			Facility facility, String[] groups, Date minDueDate,
			Date maxDueDate, Date maxLateDate, Date minMaxDate,
			Integer maxResults); Facility saveFacility(Facility facility); List<Patient> getPatients(String firstName, String lastName,
			String preferredName, Date birthDate, Integer facilityId,
			String phoneNumber, PersonAttributeType phoneNumberAttrType,
			String nhisNumber, PersonAttributeType nhisAttrType,
            Integer communityId,
			String patientId, PatientIdentifierType patientIdType,
			Integer maxResults); List<Patient> getDuplicatePatients(String firstName,
			String lastName, String preferredName, Date birthDate,
			Integer facilityId, String phoneNumber,
			PersonAttributeType phoneNumberAttrType, String nhisNumber,
			PersonAttributeType nhisAttrType, String patientId,
			PatientIdentifierType patientIdType, Integer maxResults); Facility getFacilityById(Integer facilityId); List<Facility> getAllFacilities(); Community getCommunityById(Integer communityId); List<Community> getAllCommunities(boolean includeRetired); List<Community> getCommunities(String country, String region,
			String district, boolean includeRetired); Community getCommunityByPatient(Patient patient); Community saveCommunity(Community community); Community getCommunityByFacilityIdAndName(Integer facilityId, String name); List<Patient> getAllDuplicatePatients(); Location getLocationByName(String name); void deletePatientIdentifier(Integer patientId); void stopEnrollmentFor(Integer patientId); Facility facilityFor(Patient patient); List<MessageLanguage> getAllLanguages(); MotechConfiguration getConfigurationFor(String name); Facility unknownFacility(); DefaultedExpectedEncounterAlert getDefaultedEncounterAlertFor(ExpectedEncounter expectedEncounter); DefaultedExpectedObsAlert getDefaultedObsAlertFor(ExpectedObs expectedObs); CareConfiguration getCareConfigurationFor(String careName); void saveOrUpdateDefaultedEncounterAlert(DefaultedExpectedEncounterAlert encounterAlert); void saveOrUpdateDefaultedObsAlert(DefaultedExpectedObsAlert obsAlert); List<GeneralOutpatientEncounter> getOutPatientVisitEntryBy(Integer facilityId, String serialNumber, Gender sex, Date dob, Boolean newCase, Integer diagnosis); RCTService getRctService(); void setRctService(RCTService rctService); }
MotechServiceImpl extends BaseOpenmrsService implements MotechService { public MotechConfiguration getConfigurationFor(String name) { return motechDAO.getConfiguration(name); }  MotechDAO getMotechDAO(); void setMotechDAO(MotechDAO motechDAO); RegistrarBean getRegistrarBean(); void setRegistrarBean(RegistrarBean registrarBean); OpenmrsBean getOpenmrsBean(); StaffMessageService getStaffMessageService(); void setStaffMessageService(StaffMessageService staffMessageService); void setOpenmrsBean(OpenmrsBean openmrsBean); ScheduleMaintService getScheduleService(); void setScheduleService(ScheduleMaintService scheduleService); void setScheduleMaintService(ScheduleMaintService scheduleService); ScheduleMaintService getScheduleMaintService(); MessageProgramEnrollment saveMessageProgramEnrollment(
			MessageProgramEnrollment enrollment); List<MessageProgramEnrollment> getActiveMessageProgramEnrollments(
            Integer personId, String program, Integer obsId,
            Long minExclusiveId, Integer maxResults); List<ScheduledMessage> getAllScheduledMessages(); List<ScheduledMessage> getScheduledMessages(Date startDate,
			Date endDate); List<Message> getAllMessages(); List<Message> getMessages(ScheduledMessage scheduledMessage); List<Message> getMessages(Date startDate, Date endDate,
			MessageStatus status); List<ScheduledMessage> getScheduledMessages(Integer recipientId,
			MessageDefinition definition, MessageProgramEnrollment enrollment,
			Date messageDate); List<Message> getMessages(MessageProgramEnrollment enrollment,
			MessageStatus status); List<Message> getMessages(Integer recipientId,
			MessageProgramEnrollment enrollment, MessageDefinition definition,
			Date messageDate, MessageStatus status); List<Message> getMessages(Integer recipientId,
			MessageProgramEnrollment enrollment,
			MessageDefDate[] messageDefDates, MessageStatus status); Message getMessage(String publicId); List<MessageDefinition> getAllMessageDefinitions(); MessageDefinition getMessageDefinition(String messageKey); List<MessageAttribute> getAllMessageAttributes(); ScheduledMessage saveScheduledMessage(
			ScheduledMessage scheduledMessage); Message saveMessage(Message message); MessageDefinition saveMessageDefinition(
			MessageDefinition messageDefinition); MessageAttribute saveMessageAttribute(
			MessageAttribute messageAttribute); List<Integer> getUserIdsByPersonAttribute(
			PersonAttributeType personAttributeType, String value); Blackout getBlackoutSettings(); void setBlackoutSettings(Blackout blackout); TroubledPhone getTroubledPhone(String phoneNumber); void saveTroubledPhone(TroubledPhone troubledPhone); void addTroubledPhone(String phoneNumber); void removeTroubledPhone(String phoneNumber); GeneralOutpatientEncounter saveGeneralOutpatientEncounter(
			GeneralOutpatientEncounter encounter); List<String> getAllCountries(); List<String> getAllRegions(); List<String> getRegions(String country); List<String> getAllDistricts(); List<String> getDistricts(String country, String region); List<Obs> getActivePregnancies(Integer patientId,
			Concept pregnancyConcept, Concept pregnancyStatusConcept); List<Obs> getActivePregnanciesDueDateObs(Facility facility,
			Date fromDueDate, Date toDueDate, Concept pregnancyDueDateConcept,
			Concept pregnancyConcept, Concept pregnancyStatusConcept,
			Integer maxResults); List<Encounter> getEncounters(Facility facility,
			EncounterType encounterType, Date fromDate, Date toDate,
			Integer maxResults); ExpectedObs saveExpectedObs(ExpectedObs expectedObs); List<ExpectedObs> getExpectedObs(Patient patient, Facility facility,
			String[] groups, Date minDueDate, Date maxDueDate,
			Date maxLateDate, Date minMaxDate, Integer maxResults); ExpectedEncounter saveExpectedEncounter(
			ExpectedEncounter expectedEncounter); List<ExpectedEncounter> getExpectedEncounter(Patient patient,
			Facility facility, String[] groups, Date minDueDate,
			Date maxDueDate, Date maxLateDate, Date minMaxDate,
			Integer maxResults); Facility saveFacility(Facility facility); List<Patient> getPatients(String firstName, String lastName,
			String preferredName, Date birthDate, Integer facilityId,
			String phoneNumber, PersonAttributeType phoneNumberAttrType,
			String nhisNumber, PersonAttributeType nhisAttrType,
            Integer communityId,
			String patientId, PatientIdentifierType patientIdType,
			Integer maxResults); List<Patient> getDuplicatePatients(String firstName,
			String lastName, String preferredName, Date birthDate,
			Integer facilityId, String phoneNumber,
			PersonAttributeType phoneNumberAttrType, String nhisNumber,
			PersonAttributeType nhisAttrType, String patientId,
			PatientIdentifierType patientIdType, Integer maxResults); Facility getFacilityById(Integer facilityId); List<Facility> getAllFacilities(); Community getCommunityById(Integer communityId); List<Community> getAllCommunities(boolean includeRetired); List<Community> getCommunities(String country, String region,
			String district, boolean includeRetired); Community getCommunityByPatient(Patient patient); Community saveCommunity(Community community); Community getCommunityByFacilityIdAndName(Integer facilityId, String name); List<Patient> getAllDuplicatePatients(); Location getLocationByName(String name); void deletePatientIdentifier(Integer patientId); void stopEnrollmentFor(Integer patientId); Facility facilityFor(Patient patient); List<MessageLanguage> getAllLanguages(); MotechConfiguration getConfigurationFor(String name); Facility unknownFacility(); DefaultedExpectedEncounterAlert getDefaultedEncounterAlertFor(ExpectedEncounter expectedEncounter); DefaultedExpectedObsAlert getDefaultedObsAlertFor(ExpectedObs expectedObs); CareConfiguration getCareConfigurationFor(String careName); void saveOrUpdateDefaultedEncounterAlert(DefaultedExpectedEncounterAlert encounterAlert); void saveOrUpdateDefaultedObsAlert(DefaultedExpectedObsAlert obsAlert); List<GeneralOutpatientEncounter> getOutPatientVisitEntryBy(Integer facilityId, String serialNumber, Gender sex, Date dob, Boolean newCase, Integer diagnosis); RCTService getRctService(); void setRctService(RCTService rctService);  }