001 package ca.uhn.hl7v2.conf.store;
002 import ca.uhn.hl7v2.conf.ProfileException;
003
004 /**
005 * Created on 27-Aug-2003
006 * @author Neal Acharya
007 * Interface used retreiving and validating codes from user defined and HL7 specific tables
008 * that correspond to a conformance profile.
009 */
010 public interface CodeStore {
011
012 /**
013 * @param codeSystem a table of codes (for example, HL70001 for administrative sex)
014 * valid tables are defined in the HL7 table 0396
015 * @return a list of valid codes
016 * @throws ProfileException
017 *
018 * Retreives all codes for a given conformance profile and codeSystem.
019 */
020 public String[] getValidCodes(String codeSystem) throws ProfileException;
021
022 /**
023 * @param codeSystem
024 * @return boolean
025 * boolean
026 *
027 * Validates the codeSystem against the input conformance profile. If valid then
028 * output is 'true' else 'false'.
029 */
030 public boolean knowsCodes(String codeSystem);
031
032 /**
033 * @param codeSystem
034 * @param code
035 * @return boolean
036 * boolean
037 *
038 * Validates the input code value against the input conformance profile and corresponding input
039 * codeSystem. Returns true if the code is valid and false if it isn't.
040 */
041 public boolean isValidCode(String codeSystem, String code);
042
043 }//end interface