<ValueSet xmlns="http://hl7.org/fhir">
  <id value="UKCore-LegalStatusClassification" />
  <url value="https://fhir.hl7.org.uk/ValueSet/UKCore-LegalStatusClassification" />
  <version value="1.0.0" />
  <name value="UKCoreLegalStatusClassification" />
  <title value="UK Core Legal Status Classification" />
  <status value="active" />
  <date value="2022-01-07" />
  <publisher value="HL7 UK" />
  <contact>
    <name value="HL7 UK" />
    <telecom>
      <system value="email" />
      <value value="ukcore@hl7.org.uk" />
      <use value="work" />
      <rank value="1" />
    </telecom>
  </contact>
  <description value="A set of codes that define the classification of a patient's legal status which is either informal or as designated in the Mental Health Act 1983 or other acts." />
  <copyright value="Copyright © 2021+ HL7 UK Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at  https://www.hl7.org/fhir/license.html." />
  <compose>
    <include>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
    </include>
    <include>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
    </include>
  </compose>
  <expansion>
    <identifier value="988e3125-a232-41e2-b97e-f66c6eb65658" />
    <timestamp value="2022-01-07T13:31:04+00:00" />
    <total value="52" />
    <offset value="0" />
    <parameter>
      <name value="version" />
      <valueUri value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales|1.0.0" />
    </parameter>
    <parameter>
      <name value="version" />
      <valueUri value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland|1.0.0" />
    </parameter>
    <parameter>
      <name value="count" />
      <valueInteger value="2147483647" />
    </parameter>
    <parameter>
      <name value="offset" />
      <valueInteger value="0" />
    </parameter>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="35" />
      <display value="Community treatment order (Mental Health Act Section 17a) This is legally valid from 3rd November 2008" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="31" />
      <display value="Formally detained under Criminal Procedure (Insanity) Act 1964 as amended by the Criminal Procedures (Insanity and Unfitness to Plead) Act 1991" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="31" />
      <display value="Formally detained under Criminal Procedure(Insanity) Act 1964 as amended by the Criminal Procedures (Insanity and Unfitness to Plead) Act 1991" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="19" />
      <display value="Formally detained under Mental Health Act Section 135" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="19" />
      <display value="Formally detained under Mental Health Act Section 135 (Warrant to search for and remove to a place of safety)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="20" />
      <display value="Formally detained under Mental Health Act Section 136" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="20" />
      <display value="Formally detained under Mental Health Act Section 136 (Mentally disordered person found in a public place)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="02" />
      <display value="Formally detained under Mental Health Act Section 2" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="02" />
      <display value="Formally detained under Mental Health Act Section 2 (Admission for assessment)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="03" />
      <display value="Formally detained under Mental Health Act Section 3" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="03" />
      <display value="Formally detained under Mental Health Act Section 3 (Admission for treatment of non-offender to hospital for assessment, for medical treatment)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="07" />
      <display value="Formally detained under Mental Health Act Section 35" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="07" />
      <display value="Formally detained under Mental Health Act Section 35 (Remand to hospital for report on accused's mental condition)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="08" />
      <display value="Formally detained under Mental Health Act Section 36" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="08" />
      <display value="Formally detained under Mental Health Act Section 36 (Remand of accused person to hospital for treatment)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="10" />
      <display value="Formally detained under Mental Health Act Section 37" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="10" />
      <display value="Formally detained under Mental Health Act Section 37 (Hospital Order)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="09" />
      <display value="Formally detained under Mental Health Act Section 37 with section 41 restrictions" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="12" />
      <display value="Formally detained under Mental Health Act Section 38" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="12" />
      <display value="Formally detained under Mental Health Act Section 38 (Interim hospital order)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="04" />
      <display value="Formally detained under Mental Health Act Section 4" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="04" />
      <display value="Formally detained under Mental Health Act Section 4 (Admission for assessment in cases of emergency)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="13" />
      <display value="Formally detained under Mental Health Act Section 44" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="13" />
      <display value="Formally detained under Mental Health Act Section 44 (Patient committed to hospital by Magistrates Court pending Crown Court disposal)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="34" />
      <display value="Formally detained under Mental Health Act Section 45A (Hospital and Limitation Direction)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="38" />
      <display value="Formally detained under Mental Health Act Section 45A (Limitation direction ended)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="37" />
      <display value="Formally detained under Mental Health Act Section 45A (Limited direction in force)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="14" />
      <display value="Formally detained under Mental Health Act Section 46" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="14" />
      <display value="Formally detained under Mental Health Act Section 46 (Detained during Her Majesty's pleasure) REPEALED BY ARMED FORCES ACT 1996" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="16" />
      <display value="Formally detained under Mental Health Act Section 47" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="16" />
      <display value="Formally detained under Mental Health Act Section 47 (Removal to hospital of person serving a sentence of imprisonment)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="15" />
      <display value="Formally detained under Mental Health Act Section 47 with section 49 restrictions" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="18" />
      <display value="Formally detained under Mental Health Act Section 48" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="18" />
      <display value="Formally detained under Mental Health Act Section 48 (Removal to hospital of other person not serving a sentence of imprisonment)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="17" />
      <display value="Formally detained under Mental Health Act Section 48 with section 49 restrictions" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="05" />
      <display value="Formally detained under Mental Health Act Section 5 (2) (Power to hold informal patient already in hospital, by doctor or approved clinician)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="06" />
      <display value="Formally detained under Mental Health Act Section 5 (4) (Power to hold informal patient already in hospital, by nurse)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="05" />
      <display value="Formally detained under Mental Health Act Section 5(2)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="06" />
      <display value="Formally detained under Mental Health Act Section 5(4)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="09" />
      <display value="Formally detained under Mental Health Act Sections 37 and 41 (Hospital Order with restrictions)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="15" />
      <display value="Formally detained under Mental Health Act Sections 47 and 49 (Removal to hospital of person serving a sentence of imprisonment with restrictions)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="17" />
      <display value="Formally detained under Mental Health Act Sections 48 and 49 (Removal to hospital of other person with restrictions, not serving a sentence of imprisonment)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="32" />
      <display value="Formally detained under other acts" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="32" />
      <display value="Formally detained under other acts: Section 47 of the National Assistance Act 1948 Section 1,2 or 12 of the Children's and Young Persons Act 1969 Section 3 of the Powers of Criminal Courts Act 1973" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="30" />
      <display value="Formally detained under previous legislation (fifth schedule); this relates only to patients who, prior to the implementation of the Mental Health Act 1983, were detained under the Sixth Schedule of the Mental Health Act 1959" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="01" />
      <display value="Informal" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="01" />
      <display value="Informal (including voluntary patients under Section 131)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationWales" />
      <version value="1.0.0" />
      <code value="98" />
      <display value="Non applicable (only used for NON psychiatric consultant specialties)" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="98" />
      <display value="Not Applicable" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="99" />
      <display value="Not Known" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="36" />
      <display value="Subject to guardianship under Mental Health Act Section 37" />
    </contains>
    <contains>
      <system value="https://fhir.hl7.org.uk/CodeSystem/UKCore-LegalStatusClassificationEngland" />
      <version value="1.0.0" />
      <code value="35" />
      <display value="Subject to guardianship under Mental Health Act Section 7" />
    </contains>
  </expansion>
</ValueSet>