001package org.hl7.fhir.r4.model.codesystems;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
033
034import org.hl7.fhir.exceptions.FHIRException;
035
036public enum V3Confidentiality {
037
038  /**
039   * A specializable code and its leaf codes used in Confidentiality value sets to
040   * value the Act.Confidentiality and Role.Confidentiality attribute in
041   * accordance with the definition for concept domain "Confidentiality".
042   */
043  _CONFIDENTIALITY,
044  /**
045   * Definition: Privacy metadata indicating that the information has been
046   * de-identified, and there are mitigating circumstances that prevent
047   * re-identification, which minimize risk of harm from unauthorized disclosure.
048   * The information requires protection to maintain low sensitivity.
049   * 
050   * 
051   * Examples: Includes anonymized, pseudonymized, or non-personally identifiable
052   * information such as HIPAA limited data sets.
053   * 
054   * 
055   * Map: No clear map to ISO 13606-4 Sensitivity Level (1) Care Management:
056   * RECORD_COMPONENTs that might need to be accessed by a wide range of
057   * administrative staff to manage the subject of care's access to health
058   * services.
059   * 
060   * 
061   * Usage Note: This metadata indicates the receiver may have an obligation to
062   * comply with a data use agreement.
063   */
064  L,
065  /**
066   * Definition: Privacy metadata indicating moderately sensitive information,
067   * which presents moderate risk of harm if disclosed without authorization.
068   * 
069   * 
070   * Examples: Includes allergies of non-sensitive nature used inform food
071   * service; health information a patient authorizes to be used for marketing,
072   * released to a bank for a health credit card or savings account; or
073   * information in personal health record systems that are not governed under
074   * health privacy laws.
075   * 
076   * 
077   * Map: Partial Map to ISO 13606-4 Sensitivity Level (2) Clinical Management:
078   * Less sensitive RECORD_COMPONENTs that might need to be accessed by a wider
079   * range of personnel not all of whom are actively caring for the patient (e.g.
080   * radiology staff).
081   * 
082   * 
083   * Usage Note: This metadata indicates that the receiver may be obligated to
084   * comply with the receiver's terms of use or privacy policies.
085   */
086  M,
087  /**
088   * Definition: Privacy metadata indicating that the information is typical,
089   * non-stigmatizing health information, which presents typical risk of harm if
090   * disclosed without authorization.
091   * 
092   * 
093   * Examples: In the US, this includes what HIPAA identifies as the minimum
094   * necessary protected health information (PHI) given a covered purpose of use
095   * (treatment, payment, or operations). Includes typical, non-stigmatizing
096   * health information disclosed in an application for health, workers
097   * compensation, disability, or life insurance.
098   * 
099   * 
100   * Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care: Default
101   * for normal clinical care access (i.e. most clinical staff directly caring for
102   * the patient should be able to access nearly all of the EHR). Maps to normal
103   * confidentiality for treatment information but not to ancillary care, payment
104   * and operations.
105   * 
106   * 
107   * Usage Note: This metadata indicates that the receiver may be obligated to
108   * comply with applicable jurisdictional privacy law or disclosure
109   * authorization.
110   */
111  N,
112  /**
113   * Privacy metadata indicating highly sensitive, potentially stigmatizing
114   * information, which presents a high risk to the information subject if
115   * disclosed without authorization. May be pre-empted by jurisdictional law,
116   * e.g., for public health reporting or emergency treatment.
117   * 
118   * 
119   * Examples: Includes information that is additionally protected such as
120   * sensitive conditions mental health, HIV, substance abuse, domestic violence,
121   * child abuse, genetic disease, and reproductive health; or sensitive
122   * demographic information such as a patient's standing as an employee or a
123   * celebrity. May be used to indicate proprietary or classified information that
124   * is not related to an individual, e.g., secret ingredients in a therapeutic
125   * substance; or the name of a manufacturer.
126   * 
127   * 
128   * Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care: Default
129   * for normal clinical care access (i.e. most clinical staff directly caring for
130   * the patient should be able to access nearly all of the EHR). Maps to normal
131   * confidentiality for treatment information but not to ancillary care, payment
132   * and operations..
133   * 
134   * 
135   * Usage Note: This metadata indicates that the receiver may be obligated to
136   * comply with applicable, prevailing (default) jurisdictional privacy law or
137   * disclosure authorization..
138   */
139  R,
140  /**
141   * Definition: Privacy metadata indicating that the information is not
142   * classified as sensitive.
143   * 
144   * 
145   * Examples: Includes publicly available information, e.g., business name,
146   * phone, email or physical address.
147   * 
148   * 
149   * Usage Note: This metadata indicates that the receiver has no obligation to
150   * consider additional policies when making access control decisions. Note that
151   * in some jurisdictions, personally identifiable information must be protected
152   * as confidential, so it would not be appropriate to assign a confidentiality
153   * code of "unrestricted" to that information even if it is publicly available.
154   */
155  U,
156  /**
157   * . Privacy metadata indicating that the information is extremely sensitive and
158   * likely stigmatizing health information that presents a very high risk if
159   * disclosed without authorization. This information must be kept in the highest
160   * confidence.
161   * 
162   * 
163   * Examples: Includes information about a victim of abuse, patient requested
164   * information sensitivity, and taboo subjects relating to health status that
165   * must be discussed with the patient by an attending provider before sharing
166   * with the patient. May also include information held under â??legal lockâ?? or
167   * attorney-client privilege
168   * 
169   * 
170   * Map: This metadata indicates that the receiver may not disclose this
171   * information except as directed by the information custodian, who may be the
172   * information subject.
173   * 
174   * 
175   * Usage Note: This metadata indicates that the receiver may not disclose this
176   * information except as directed by the information custodian, who may be the
177   * information subject.
178   */
179  V,
180  /**
181   * Description: By accessing subject / role and relationship based rights (These
182   * concepts are mutually exclusive, one and only one is required for a valid
183   * confidentiality coding.)
184   * 
185   * 
186   * Deprecation Comment:Deprecated due to updated confidentiality codes under
187   * ActCode
188   */
189  _CONFIDENTIALITYBYACCESSKIND,
190  /**
191   * Description: Since the service class can represent knowledge structures that
192   * may be considered a trade or business secret, there is sometimes (though
193   * rarely) the need to flag those items as of business level confidentiality.
194   * However, no patient related information may ever be of this confidentiality
195   * level.
196   * 
197   * 
198   * Deprecation Comment: Replced by ActCode.B
199   */
200  B,
201  /**
202   * Description: Only clinicians may see this item, billing and administration
203   * persons can not access this item without special permission.
204   * 
205   * 
206   * Deprecation Comment:Deprecated due to updated confidentiality codes under
207   * ActCode
208   */
209  D,
210  /**
211   * Description: Access only to individual persons who are mentioned explicitly
212   * as actors of this service and whose actor type warrants that access (cf. to
213   * actor type code).
214   * 
215   * 
216   * Deprecation Comment:Deprecated due to updated confidentiality codes under
217   * ActCode
218   */
219  I,
220  /**
221   * Description: By information type, only for service catalog entries (multiples
222   * allowed). Not to be used with actual patient data!
223   * 
224   * 
225   * Deprecation Comment:Deprecated due to updated confidentiality codes under
226   * ActCode
227   */
228  _CONFIDENTIALITYBYINFOTYPE,
229  /**
230   * Description: Alcohol/drug-abuse related item
231   * 
232   * 
233   * Deprecation Comment:Replced by ActCode.ETH
234   */
235  ETH,
236  /**
237   * Description: HIV and AIDS related item
238   * 
239   * 
240   * Deprecation Comment:Replced by ActCode.HIV
241   */
242  HIV,
243  /**
244   * Description: Psychiatry related item
245   * 
246   * 
247   * Deprecation Comment:Replced by ActCode.PSY
248   */
249  PSY,
250  /**
251   * Description: Sexual assault / domestic violence related item
252   * 
253   * 
254   * Deprecation Comment:Replced by ActCode.SDV
255   */
256  SDV,
257  /**
258   * Description: Modifiers of role based access rights (multiple allowed)
259   * 
260   * 
261   * Deprecation Comment:Deprecated due to updated confidentiality codes under
262   * ActCode
263   */
264  _CONFIDENTIALITYMODIFIERS,
265  /**
266   * Description: Celebrities are people of public interest (VIP) including
267   * employees, whose information require special protection.
268   * 
269   * 
270   * Deprecation Comment:Replced by ActCode.CEL
271   */
272  C,
273  /**
274   * Description:
275   * 
276   * Information for which the patient seeks heightened confidentiality. Sensitive
277   * information is not to be shared with family members. Information reported by
278   * the patient about family members is sensitive by default. Flag can be set or
279   * cleared on patient's request. Deprecation Comment:Deprecated due to updated
280   * confidentiality codes under ActCode
281   */
282  S,
283  /**
284   * Description: Information not to be disclosed or discussed with patient except
285   * through physician assigned to patient in this case. This is usually a
286   * temporary constraint only, example use is a new fatal diagnosis or finding,
287   * such as malignancy or HIV.
288   * 
289   * 
290   * Deprecation Note:Replced by ActCode.TBOO
291   */
292  T,
293  /**
294   * added to help the parsers
295   */
296  NULL;
297
298  public static V3Confidentiality fromCode(String codeString) throws FHIRException {
299    if (codeString == null || "".equals(codeString))
300      return null;
301    if ("_Confidentiality".equals(codeString))
302      return _CONFIDENTIALITY;
303    if ("L".equals(codeString))
304      return L;
305    if ("M".equals(codeString))
306      return M;
307    if ("N".equals(codeString))
308      return N;
309    if ("R".equals(codeString))
310      return R;
311    if ("U".equals(codeString))
312      return U;
313    if ("V".equals(codeString))
314      return V;
315    if ("_ConfidentialityByAccessKind".equals(codeString))
316      return _CONFIDENTIALITYBYACCESSKIND;
317    if ("B".equals(codeString))
318      return B;
319    if ("D".equals(codeString))
320      return D;
321    if ("I".equals(codeString))
322      return I;
323    if ("_ConfidentialityByInfoType".equals(codeString))
324      return _CONFIDENTIALITYBYINFOTYPE;
325    if ("ETH".equals(codeString))
326      return ETH;
327    if ("HIV".equals(codeString))
328      return HIV;
329    if ("PSY".equals(codeString))
330      return PSY;
331    if ("SDV".equals(codeString))
332      return SDV;
333    if ("_ConfidentialityModifiers".equals(codeString))
334      return _CONFIDENTIALITYMODIFIERS;
335    if ("C".equals(codeString))
336      return C;
337    if ("S".equals(codeString))
338      return S;
339    if ("T".equals(codeString))
340      return T;
341    throw new FHIRException("Unknown V3Confidentiality code '" + codeString + "'");
342  }
343
344  public String toCode() {
345    switch (this) {
346    case _CONFIDENTIALITY:
347      return "_Confidentiality";
348    case L:
349      return "L";
350    case M:
351      return "M";
352    case N:
353      return "N";
354    case R:
355      return "R";
356    case U:
357      return "U";
358    case V:
359      return "V";
360    case _CONFIDENTIALITYBYACCESSKIND:
361      return "_ConfidentialityByAccessKind";
362    case B:
363      return "B";
364    case D:
365      return "D";
366    case I:
367      return "I";
368    case _CONFIDENTIALITYBYINFOTYPE:
369      return "_ConfidentialityByInfoType";
370    case ETH:
371      return "ETH";
372    case HIV:
373      return "HIV";
374    case PSY:
375      return "PSY";
376    case SDV:
377      return "SDV";
378    case _CONFIDENTIALITYMODIFIERS:
379      return "_ConfidentialityModifiers";
380    case C:
381      return "C";
382    case S:
383      return "S";
384    case T:
385      return "T";
386    case NULL:
387      return null;
388    default:
389      return "?";
390    }
391  }
392
393  public String getSystem() {
394    return "http://terminology.hl7.org/CodeSystem/v3-Confidentiality";
395  }
396
397  public String getDefinition() {
398    switch (this) {
399    case _CONFIDENTIALITY:
400      return "A specializable code and its leaf codes used in Confidentiality value sets to value the Act.Confidentiality and Role.Confidentiality attribute in accordance with the definition for concept domain \"Confidentiality\".";
401    case L:
402      return "Definition: Privacy metadata indicating that the information has been de-identified, and there are mitigating circumstances that prevent re-identification, which minimize risk of harm from unauthorized disclosure.  The information requires protection to maintain low sensitivity.\r\n\n                        \n                           Examples: Includes anonymized, pseudonymized, or non-personally identifiable information such as HIPAA limited data sets.\r\n\n                        \n                           Map: No clear map to ISO 13606-4 Sensitivity Level (1) Care Management:   RECORD_COMPONENTs that might need to be accessed by a wide range of administrative staff to manage the subject of care's access to health services.\r\n\n                        \n                           Usage Note: This metadata indicates the receiver may have an obligation to comply with a data use agreement.";
403    case M:
404      return "Definition: Privacy metadata indicating moderately sensitive information, which presents moderate risk of harm if disclosed without authorization.\r\n\n                        \n                           Examples: Includes allergies of non-sensitive nature used inform food service; health information a patient authorizes to be used for marketing, released to a bank for a health credit card or savings account; or information in personal health record systems that are not governed under health privacy laws.\r\n\n                        \n                           Map: Partial Map to ISO 13606-4 Sensitivity Level (2) Clinical Management:  Less sensitive RECORD_COMPONENTs that might need to be accessed by a wider range of personnel not all of whom are actively caring for the patient (e.g. radiology staff).\r\n\n                        \n                           Usage Note: This metadata indicates that the receiver may be obligated to comply with the receiver's terms of use or privacy policies.";
405    case N:
406      return "Definition: Privacy metadata indicating that the information is typical, non-stigmatizing health information, which presents typical risk of harm if disclosed without authorization.\r\n\n                        \n                           Examples: In the US, this includes what HIPAA identifies as the minimum necessary protected health information (PHI) given a covered purpose of use (treatment, payment, or operations).  Includes typical, non-stigmatizing health information disclosed in an application for health, workers compensation, disability, or life insurance.\r\n\n                        \n                           Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care:   Default for normal clinical care access (i.e. most clinical staff directly caring for the patient should be able to access nearly all of the EHR).   Maps to normal confidentiality for treatment information but not to ancillary care, payment and operations.\r\n\n                        \n                           Usage Note: This metadata indicates that the receiver may be obligated to comply with applicable jurisdictional privacy law or disclosure authorization.";
407    case R:
408      return "Privacy metadata indicating highly sensitive, potentially stigmatizing information, which presents a high risk to the information subject if disclosed without authorization. May be pre-empted by jurisdictional law, e.g., for public health reporting or emergency treatment.\r\n\n                        \n                           Examples: Includes information that is additionally protected such as sensitive conditions mental health, HIV, substance abuse, domestic violence, child abuse, genetic disease, and reproductive health; or sensitive demographic information such as a patient's standing as an employee or a celebrity. May be used to indicate proprietary or classified information that is not related to an individual, e.g., secret ingredients in a therapeutic substance; or the name of a manufacturer.\r\n\n                        \n                           Map: Partial Map to ISO 13606-4 Sensitivity Level (3) Clinical Care: Default for normal clinical care access (i.e. most clinical staff directly caring for the patient should be able to access nearly all of the EHR). Maps to normal confidentiality for treatment information but not to ancillary care, payment and operations..\r\n\n                        \n                           Usage Note: This metadata indicates that the receiver may be obligated to comply with applicable, prevailing (default) jurisdictional privacy law or disclosure authorization..";
409    case U:
410      return "Definition: Privacy metadata indicating that the information is not classified as sensitive.\r\n\n                        \n                           Examples: Includes publicly available information, e.g., business name, phone, email or physical address.\r\n\n                        \n                           Usage Note: This metadata indicates that the receiver has no obligation to consider additional policies when making access control decisions.   Note that in some jurisdictions, personally identifiable information must be protected as confidential, so it would not be appropriate to assign a confidentiality code of \"unrestricted\"  to that information even if it is publicly available.";
411    case V:
412      return ". Privacy metadata indicating that the information is extremely sensitive and likely stigmatizing health information that presents a very high risk if disclosed without authorization.  This information must be kept in the highest confidence.  \r\n\n                        \n                           Examples:  Includes information about a victim of abuse, patient requested information sensitivity, and taboo subjects relating to health status that must be discussed with the patient by an attending provider before sharing with the patient.  May also include information held under â??legal lockâ?? or attorney-client privilege\r\n\n                        \n                           Map:  This metadata indicates that the receiver may not disclose this information except as directed by the information custodian, who may be the information subject.\r\n\n                        \n                           Usage Note:  This metadata indicates that the receiver may not disclose this information except as directed by the information custodian, who may be the information subject.";
413    case _CONFIDENTIALITYBYACCESSKIND:
414      return "Description: By accessing subject / role and relationship based  rights  (These concepts are mutually exclusive, one and only one is required for a valid confidentiality coding.)\r\n\n                        \n                           Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode";
415    case B:
416      return "Description: Since the service class can represent knowledge structures that may be considered a trade or business secret, there is sometimes (though rarely) the need to flag those items as of business level confidentiality.  However, no patient related information may ever be of this confidentiality level.\r\n\n                        \n                           Deprecation Comment: Replced by ActCode.B";
417    case D:
418      return "Description: Only clinicians may see this item, billing and administration persons can not access this item without special permission.\r\n\n                        \n                           Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode";
419    case I:
420      return "Description: Access only to individual persons who are mentioned explicitly as actors of this service and whose actor type warrants that access (cf. to actor type code).\r\n\n                        \n                           Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode";
421    case _CONFIDENTIALITYBYINFOTYPE:
422      return "Description: By information type, only for service catalog entries (multiples allowed). Not to be used with actual patient data!\r\n\n                        \n                           Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode";
423    case ETH:
424      return "Description: Alcohol/drug-abuse related item\r\n\n                        \n                           Deprecation Comment:Replced by ActCode.ETH";
425    case HIV:
426      return "Description: HIV and AIDS related item\r\n\n                        \n                           Deprecation Comment:Replced by ActCode.HIV";
427    case PSY:
428      return "Description: Psychiatry related item\r\n\n                        \n                           Deprecation Comment:Replced by ActCode.PSY";
429    case SDV:
430      return "Description: Sexual assault / domestic violence related item\r\n\n                        \n                           Deprecation Comment:Replced by ActCode.SDV";
431    case _CONFIDENTIALITYMODIFIERS:
432      return "Description: Modifiers of role based access rights  (multiple allowed)\r\n\n                        \n                           Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode";
433    case C:
434      return "Description: Celebrities are people of public interest (VIP) including employees, whose information require special protection.\r\n\n                        \n                           Deprecation Comment:Replced by ActCode.CEL";
435    case S:
436      return "Description: \n                        \r\nInformation for which the patient seeks heightened confidentiality. Sensitive information is not to be shared with family members.  Information reported by the patient about family members is sensitive by default. Flag can be set or cleared on patient's request.\n                           Deprecation Comment:Deprecated due to updated confidentiality codes under ActCode";
437    case T:
438      return "Description: Information not to be disclosed or discussed with patient except through physician assigned to patient in this case.  This is usually a temporary constraint only, example use is a new fatal diagnosis or finding, such as malignancy or HIV.\r\n\n                        \n                           Deprecation Note:Replced by ActCode.TBOO";
439    case NULL:
440      return null;
441    default:
442      return "?";
443    }
444  }
445
446  public String getDisplay() {
447    switch (this) {
448    case _CONFIDENTIALITY:
449      return "Confidentiality";
450    case L:
451      return "low";
452    case M:
453      return "moderate";
454    case N:
455      return "normal";
456    case R:
457      return "restricted";
458    case U:
459      return "unrestricted";
460    case V:
461      return "very restricted";
462    case _CONFIDENTIALITYBYACCESSKIND:
463      return "ConfidentialityByAccessKind";
464    case B:
465      return "business";
466    case D:
467      return "clinician";
468    case I:
469      return "individual";
470    case _CONFIDENTIALITYBYINFOTYPE:
471      return "ConfidentialityByInfoType";
472    case ETH:
473      return "substance abuse related";
474    case HIV:
475      return "HIV related";
476    case PSY:
477      return "psychiatry relate";
478    case SDV:
479      return "sexual and domestic violence related";
480    case _CONFIDENTIALITYMODIFIERS:
481      return "ConfidentialityModifiers";
482    case C:
483      return "celebrity";
484    case S:
485      return "sensitive";
486    case T:
487      return "taboo";
488    case NULL:
489      return null;
490    default:
491      return "?";
492    }
493  }
494
495}