001
002package ca.uhn.fhir.model.dstu2.valueset;
003
004import ca.uhn.fhir.model.api.*;
005import java.util.HashMap;
006import java.util.Map;
007
008public enum SignatureTypeCodesEnum {
009
010        /**
011         * Display: <b>AuthorID</b><br>
012         * Code Value: <b>1.2.840.10065.1.12.1.1</b>
013         *
014         * the signature of the primary or sole author of a health information document. There can be only one primary author of a health information document.
015         */
016        AUTHORID("1.2.840.10065.1.12.1.1", "http://hl7.org/fhir/valueset-signature-type"),
017        
018        /**
019         * Display: <b>Co-AuthorID</b><br>
020         * Code Value: <b>1.2.840.10065.1.12.1.2</b>
021         *
022         * the signature of a health information document coauthor. There can be multiple coauthors of a health information document.
023         */
024        CO_AUTHORID("1.2.840.10065.1.12.1.2", "http://hl7.org/fhir/valueset-signature-type"),
025        
026        /**
027         * Display: <b>Co-Participated</b><br>
028         * Code Value: <b>1.2.840.10065.1.12.1.3</b>
029         *
030         * the signature of an individual who is a participant in the health information document but is not an author or coauthor. (Example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report.)
031         */
032        CO_PARTICIPATED("1.2.840.10065.1.12.1.3", "http://hl7.org/fhir/valueset-signature-type"),
033        
034        /**
035         * Display: <b>Transcriptionist</b><br>
036         * Code Value: <b>1.2.840.10065.1.12.1.4</b>
037         *
038         * the signature of an individual who has transcribed a dictated document or recorded written text into a digital machine readable format.
039         */
040        TRANSCRIPTIONIST("1.2.840.10065.1.12.1.4", "http://hl7.org/fhir/valueset-signature-type"),
041        
042        /**
043         * Display: <b>Verification</b><br>
044         * Code Value: <b>1.2.840.10065.1.12.1.5</b>
045         *
046         * a signature verifying the information contained in a document. (Example a physician is required to countersign a verbal order that has previously been recorded in the medical record by a registered nurse who has carried out the verbal order.)
047         */
048        VERIFICATION("1.2.840.10065.1.12.1.5", "http://hl7.org/fhir/valueset-signature-type"),
049        
050        /**
051         * Display: <b>Validation</b><br>
052         * Code Value: <b>1.2.840.10065.1.12.1.6</b>
053         *
054         * a signature validating a health information document for inclusion in the patient record. (Example a medical student or resident is credentialed to perform history or physical examinations and to write progress notes. The attending physician signs the history and physical examination to validate the entry for inclusion in the patient's medical record.)
055         */
056        VALIDATION("1.2.840.10065.1.12.1.6", "http://hl7.org/fhir/valueset-signature-type"),
057        
058        /**
059         * Display: <b>Consent</b><br>
060         * Code Value: <b>1.2.840.10065.1.12.1.7</b>
061         *
062         * the signature of an individual consenting to what is described in a health information document.
063         */
064        CONSENT("1.2.840.10065.1.12.1.7", "http://hl7.org/fhir/valueset-signature-type"),
065        
066        /**
067         * Display: <b>Witness</b><br>
068         * Code Value: <b>1.2.840.10065.1.12.1.8</b>
069         *
070         * the signature of a witness to any other signature.
071         */
072        WITNESS("1.2.840.10065.1.12.1.8", "http://hl7.org/fhir/valueset-signature-type"),
073        
074        /**
075         * Display: <b>Event-Witness</b><br>
076         * Code Value: <b>1.2.840.10065.1.12.1.9</b>
077         *
078         * the signature of a witness to an event. (Example the witness has observed a procedure and is attesting to this fact.)
079         */
080        EVENT_WITNESS("1.2.840.10065.1.12.1.9", "http://hl7.org/fhir/valueset-signature-type"),
081        
082        /**
083         * Display: <b>Identity-Witness</b><br>
084         * Code Value: <b>1.2.840.10065.1.12.1.10</b>
085         *
086         * the signature of an individual who has witnessed another individual who is known to them signing a document. (Example the identity witness is a notary public.)
087         */
088        IDENTITY_WITNESS("1.2.840.10065.1.12.1.10", "http://hl7.org/fhir/valueset-signature-type"),
089        
090        /**
091         * Display: <b>Consent-Witness</b><br>
092         * Code Value: <b>1.2.840.10065.1.12.1.11</b>
093         *
094         * the signature of an individual who has witnessed the health care provider counselling a patient.
095         */
096        CONSENT_WITNESS("1.2.840.10065.1.12.1.11", "http://hl7.org/fhir/valueset-signature-type"),
097        
098        /**
099         * Display: <b>Interpreter</b><br>
100         * Code Value: <b>1.2.840.10065.1.12.1.12</b>
101         *
102         * the signature of an individual who has translated health care information during an event or the obtaining of consent to a treatment.
103         */
104        INTERPRETER("1.2.840.10065.1.12.1.12", "http://hl7.org/fhir/valueset-signature-type"),
105        
106        /**
107         * Display: <b>Review</b><br>
108         * Code Value: <b>1.2.840.10065.1.12.1.13</b>
109         *
110         * the signature of a person, device, or algorithm that has reviewed or filtered data for inclusion into the patient record. ( Examples: (1) a medical records clerk who scans a document for inclusion in the medical record, enters header information, or catalogues and classifies the data, or a combination thereof; (2) a gateway that receives data from another computer system and interprets that data or changes its format, or both, before entering it into the patient record.)
111         */
112        REVIEW("1.2.840.10065.1.12.1.13", "http://hl7.org/fhir/valueset-signature-type"),
113        
114        /**
115         * Display: <b>Source</b><br>
116         * Code Value: <b>1.2.840.10065.1.12.1.14</b>
117         *
118         * the signature of an automated data source. (Examples: (1) the signature for an image that is generated by a device for inclusion in the patient record; (2) the signature for an ECG derived by an ECG system for inclusion in the patient record; (3) the data from a biomedical monitoring device or system that is for inclusion in the patient record.)
119         */
120        SOURCE("1.2.840.10065.1.12.1.14", "http://hl7.org/fhir/valueset-signature-type"),
121        
122        /**
123         * Display: <b>Addendum</b><br>
124         * Code Value: <b>1.2.840.10065.1.12.1.15</b>
125         *
126         * the signature on a new amended document of an individual who has corrected, edited, or amended an original health information document. An addendum signature can either be a signature type or a signature sub-type (see 8.1). Any document with an addendum signature shall have a companion document that is the original document with its original, unaltered content, and original signatures. The original document shall be referenced via an attribute in the new document, which contains, for example, the digest of the old document. Whether the original, unaltered, document is always displayed with the addended document is a local matter, but the original, unaltered, document must remain as part of the patient record and be retrievable on demand.
127         */
128        ADDENDUM("1.2.840.10065.1.12.1.15", "http://hl7.org/fhir/valueset-signature-type"),
129        
130        /**
131         * Display: <b>Administrative</b><br>
132         * Code Value: <b>1.2.840.10065.1.12.1.16</b>
133         *
134         * the signature on an original document of an individual who has generated a new amended document. This (original) document shall reference the new document via an additional signature purpose. This is the inverse of an addendum signature and provides a pointer from the original to the amended document.
135         */
136        ADMINISTRATIVE("1.2.840.10065.1.12.1.16", "http://hl7.org/fhir/valueset-signature-type"),
137        
138        /**
139         * Display: <b>Timestamp</b><br>
140         * Code Value: <b>1.2.840.10065.1.12.1.17</b>
141         *
142         * the signature of an individual who is certifying that the document is invalidated by an error(s), or is placed in the wrong chart. An administrative (error/edit) signature must include an addendum to the document and therefore shall have an addendum signature sub-type (see 8.1). This signature is reserved for the highest health information system administrative classification, since it is a statement that the entire document is invalidated by the error and that the document should no longer be used for patient care, although for legal reasons the document must remain part of the permanent patient record.
143         */
144        TIMESTAMP("1.2.840.10065.1.12.1.17", "http://hl7.org/fhir/valueset-signature-type"),
145        
146        ;
147        
148        /**
149         * Identifier for this Value Set:
150         * 
151         */
152        public static final String VALUESET_IDENTIFIER = "";
153
154        /**
155         * Name for this Value Set:
156         * Signature Type Codes
157         */
158        public static final String VALUESET_NAME = "Signature Type Codes";
159
160        private static Map<String, SignatureTypeCodesEnum> CODE_TO_ENUM = new HashMap<String, SignatureTypeCodesEnum>();
161        private static Map<String, Map<String, SignatureTypeCodesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, SignatureTypeCodesEnum>>();
162        
163        private final String myCode;
164        private final String mySystem;
165        
166        static {
167                for (SignatureTypeCodesEnum next : SignatureTypeCodesEnum.values()) {
168                        CODE_TO_ENUM.put(next.getCode(), next);
169                        
170                        if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) {
171                                SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap<String, SignatureTypeCodesEnum>());
172                        }
173                        SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);                 
174                }
175        }
176        
177        /**
178         * Returns the code associated with this enumerated value
179         */
180        public String getCode() {
181                return myCode;
182        }
183        
184        /**
185         * Returns the code system associated with this enumerated value
186         */
187        public String getSystem() {
188                return mySystem;
189        }
190        
191        /**
192         * Returns the enumerated value associated with this code
193         */
194        public static SignatureTypeCodesEnum forCode(String theCode) {
195                SignatureTypeCodesEnum retVal = CODE_TO_ENUM.get(theCode);
196                return retVal;
197        }
198
199        /**
200         * Converts codes to their respective enumerated values
201         */
202        public static final IValueSetEnumBinder<SignatureTypeCodesEnum> VALUESET_BINDER = new IValueSetEnumBinder<SignatureTypeCodesEnum>() {
203                @Override
204                public String toCodeString(SignatureTypeCodesEnum theEnum) {
205                        return theEnum.getCode();
206                }
207
208                @Override
209                public String toSystemString(SignatureTypeCodesEnum theEnum) {
210                        return theEnum.getSystem();
211                }
212                
213                @Override
214                public SignatureTypeCodesEnum fromCodeString(String theCodeString) {
215                        return CODE_TO_ENUM.get(theCodeString);
216                }
217                
218                @Override
219                public SignatureTypeCodesEnum fromCodeString(String theCodeString, String theSystemString) {
220                        Map<String, SignatureTypeCodesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
221                        if (map == null) {
222                                return null;
223                        }
224                        return map.get(theCodeString);
225                }
226                
227        };
228        
229        /** 
230         * Constructor
231         */
232        SignatureTypeCodesEnum(String theCode, String theSystem) {
233                myCode = theCode;
234                mySystem = theSystem;
235        }
236
237        
238}