{
  "resourceType" : "Bundle",
  "id" : "dtx-prescription-bundle-example",
  "type" : "transaction",
  "entry" : [{
    "resource" : {
      "resourceType" : "ServiceRequest",
      "id" : "dtx-servicerequest-example",
      "meta" : {
        "profile" : ["http://connectdtx.kr/fhir/StructureDefinition/janusync-servicerequest"]
      },
      "identifier" : [{
        "system" : "urn:oid:1.2.410.100110.10.11100123",
        "value" : "order12345"
      }],
      "status" : "active",
      "intent" : "order",
      "code" : {
        "coding" : [{
          "system" : "urn:oid:1.2.410.100110.10.11100123",
          "code" : "D0101",
          "display" : "Hypnus"
        }]
      },
      "subject" : {
        "reference" : "Patient/janusync-patient-example"
      },
      "encounter" : {
        "reference" : "Encounter/janusync-encounter-amb-example"
      },
      "authoredOn" : "2000-01-01T14:05:00+09:00",
      "requester" : {
        "reference" : "PractitionerRole/janusync-medicaldoctor-practitionerrole-example"
      }
    },
    "request" : {
      "method" : "POST",
      "url" : "ServiceRequest"
    }
  },
  {
    "resource" : {
      "resourceType" : "Patient",
      "id" : "janusync-patient-example",
      "meta" : {
        "profile" : ["http://connectdtx.kr/fhir/StructureDefinition/janusync-patient"]
      },
      "identifier" : [{
        "type" : {
          "coding" : [{
            "system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
            "code" : "MR"
          }]
        },
        "system" : "urn:oid:1.2.410.100110.10.11100123",
        "value" : "P123"
      }],
      "name" : [{
        "text" : "김환자"
      }],
      "telecom" : [{
        "system" : "phone",
        "value" : "010-1234-5678"
      }],
      "gender" : "male",
      "birthDate" : "1990-01-01"
    },
    "request" : {
      "method" : "POST",
      "url" : "Patient"
    }
  },
  {
    "resource" : {
      "resourceType" : "PractitionerRole",
      "id" : "janusync-medicaldoctor-practitionerrole-example",
      "meta" : {
        "profile" : ["http://connectdtx.kr/fhir/StructureDefinition/janusync-medicaldoctor-practitionerrole"]
      },
      "identifier" : [{
        "system" : "urn:oid:1.2.410.100110.10.11100123",
        "value" : "ba10699d84a3164ac40ce0b83e566be50aa437e28df5110993ec81f87ee3c969"
      }],
      "organization" : {
        "reference" : "Organization/janusync-organization-example"
      },
      "code" : [{
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/practitioner-role",
          "code" : "doctor",
          "display" : "DOCTOR"
        }]
      }],
      "specialty" : [{
        "coding" : [{
          "system" : "http://www.hl7korea.or.kr/CodeSystem/hira-medical-department",
          "code" : "03",
          "display" : "정신건강의학과"
        }],
        "text" : "수면건강센터"
      }]
    },
    "request" : {
      "method" : "POST",
      "url" : "PractitionerRole"
    }
  },
  {
    "resource" : {
      "resourceType" : "Encounter",
      "id" : "janusync-encounter-amb-example",
      "meta" : {
        "profile" : ["http://connectdtx.kr/fhir/StructureDefinition/janusync-encounter"]
      },
      "extension" : [{
        "url" : "http://connectdtx.kr/fhir/StructureDefinition/JanuSyncEncounterVisitTypes",
        "valueCodeableConcept" : {
          "coding" : [{
            "system" : "http://connectdtx.kr/fhir/CodeSystem/janusync-encounter-visit-type",
            "code" : "20",
            "display" : "재진"
          }]
        }
      }],
      "status" : "finished",
      "class" : {
        "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
        "code" : "AMB"
      },
      "subject" : {
        "reference" : "Patient/janusync-patient-example"
      },
      "participant" : [{
        "individual" : {
          "reference" : "PractitionerRole/janusync-medicaldoctor-practitionerrole-example"
        }
      }],
      "period" : {
        "start" : "2000-01-01T14:00:00+09:00"
      },
      "serviceProvider" : {
        "reference" : "Organization/janusync-organization-example"
      }
    },
    "request" : {
      "method" : "POST",
      "url" : "Encounter"
    }
  },
  {
    "resource" : {
      "resourceType" : "Condition",
      "id" : "janusync-condition-example",
      "meta" : {
        "profile" : ["http://connectdtx.kr/fhir/StructureDefinition/janusync-condition"]
      },
      "clinicalStatus" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/condition-clinical",
          "code" : "active"
        }]
      },
      "category" : [{
        "coding" : [{
          "system" : "http://www.hl7korea.or.kr/fhir/krcore/CodeSystem/krcore-condition-category-types",
          "code" : "진단"
        }]
      }],
      "code" : {
        "coding" : [{
          "system" : "http://www.hl7korea.or.kr/CodeSystem/kostat-kcd-8",
          "code" : "G47.0",
          "display" : "Disorders of initiating and maintaining sleep [insomnias]"
        }]
      },
      "subject" : {
        "reference" : "Patient/janusync-patient-example"
      },
      "encounter" : {
        "reference" : "Encounter/janusync-encounter-amb-example"
      },
      "recordedDate" : "2000-01-01T14:05:00+09:00"
    },
    "request" : {
      "method" : "POST",
      "url" : "Condition"
    }
  },
  {
    "resource" : {
      "resourceType" : "MedicationRequest",
      "id" : "janusync-medicationrequest-order-example",
      "meta" : {
        "profile" : ["http://connectdtx.kr/fhir/StructureDefinition/janusync-medicationrequest"]
      },
      "extension" : [{
        "url" : "http://connectdtx.kr/fhir/StructureDefinition/JanuSyncMedicationIngredient",
        "valueCodeableConcept" : {
          "coding" : [{
            "system" : "http://www.whocc.no/atc",
            "code" : "R06AX26",
            "display" : "fexofenadine"
          }]
        }
      }],
      "status" : "active",
      "intent" : "order",
      "medicationCodeableConcept" : {
        "coding" : [{
          "system" : "http://www.hl7korea.or.kr/CodeSystem/hira-edi-medication",
          "code" : "8806521009605",
          "display" : "알레그라정120밀리그람(펙소페나딘염산염)"
        }]
      },
      "subject" : {
        "reference" : "Patient/janusync-patient-example"
      },
      "authoredOn" : "2000-01-01T14:05:00+09:00",
      "dosageInstruction" : [{
        "text" : "하루 3정 복용",
        "timing" : {
          "repeat" : {
            "frequency" : 3,
            "period" : 1,
            "periodUnit" : "d"
          }
        },
        "doseAndRate" : [{
          "doseQuantity" : {
            "value" : 1,
            "unit" : "정",
            "system" : "http://unitsofmeasure.org",
            "code" : "{tbl}"
          }
        }]
      }],
      "dispenseRequest" : {
        "quantity" : {
          "value" : 21,
          "unit" : "정",
          "system" : "http://unitsofmeasure.org",
          "code" : "{tbl}"
        },
        "expectedSupplyDuration" : {
          "value" : 7,
          "unit" : "일",
          "system" : "http://unitsofmeasure.org",
          "code" : "d"
        }
      }
    },
    "request" : {
      "method" : "POST",
      "url" : "MedicationRequest"
    }
  },
  {
    "resource" : {
      "resourceType" : "Observation",
      "id" : "janusync-observation-hosp-edi-example",
      "meta" : {
        "profile" : ["http://connectdtx.kr/fhir/StructureDefinition/janusync-dtx-observation"]
      },
      "status" : "final",
      "category" : [{
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/observation-category",
          "code" : "activity",
          "display" : "Activity"
        }]
      }],
      "code" : {
        "coding" : [{
          "system" : "http://www.hl7korea.or.kr/CodeSystem/hira-edi-procedure",
          "code" : "FZ700",
          "display" : "수면리듬양상검사"
        }]
      },
      "subject" : {
        "reference" : "Patient/janusync-patient-example"
      },
      "effectiveDateTime" : "2000-01-01T14:05:00+09:00",
      "valueQuantity" : {
        "value" : 95,
        "system" : "http://unitsofmeasure.org",
        "code" : "%"
      }
    },
    "request" : {
      "method" : "POST",
      "url" : "Observation"
    }
  },
  {
    "resource" : {
      "resourceType" : "Observation",
      "id" : "janusync-observation-hosp-wo-examcode-example",
      "meta" : {
        "profile" : ["http://connectdtx.kr/fhir/StructureDefinition/janusync-dtx-observation"]
      },
      "status" : "final",
      "category" : [{
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/observation-category",
          "code" : "activity",
          "display" : "Activity"
        }]
      }],
      "code" : {
        "text" : "ISI (Insomnia Severity Index) score"
      },
      "subject" : {
        "reference" : "Patient/janusync-patient-example"
      },
      "effectiveDateTime" : "2000-01-01T14:05:00+09:00",
      "valueRatio" : {
        "numerator" : {
          "value" : 14
        },
        "denominator" : {
          "value" : 28
        }
      }
    },
    "request" : {
      "method" : "POST",
      "url" : "Observation"
    }
  },
  {
    "resource" : {
      "resourceType" : "Observation",
      "id" : "janusync-vitalsigns-observation-example",
      "meta" : {
        "profile" : ["http://connectdtx.kr/fhir/StructureDefinition/janusync-vitalsigns-observation"]
      },
      "status" : "final",
      "category" : [{
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/observation-category",
          "code" : "vital-signs",
          "display" : "Vital Signs"
        }]
      }],
      "code" : {
        "coding" : [{
          "system" : "http://loinc.org",
          "code" : "85353-1",
          "display" : "Vital signs, weight, height, head circumference, oxygen saturation and BMI panel"
        }]
      },
      "subject" : {
        "reference" : "Patient/janusync-patient-example"
      },
      "effectiveDateTime" : "2000-01-01T11:00:00+09:00",
      "component" : [{
        "code" : {
          "coding" : [{
            "system" : "http://loinc.org",
            "code" : "8302-2",
            "display" : "Body height"
          }]
        },
        "valueQuantity" : {
          "value" : 173,
          "system" : "http://unitsofmeasure.org",
          "code" : "cm"
        }
      },
      {
        "code" : {
          "coding" : [{
            "system" : "http://loinc.org",
            "code" : "29463-7",
            "display" : "Body weight"
          }]
        },
        "valueQuantity" : {
          "value" : 68,
          "system" : "http://unitsofmeasure.org",
          "code" : "kg"
        }
      },
      {
        "code" : {
          "coding" : [{
            "system" : "http://loinc.org",
            "code" : "8480-6",
            "display" : "Systolic blood pressure"
          }]
        },
        "valueQuantity" : {
          "value" : 118,
          "system" : "http://unitsofmeasure.org",
          "code" : "mm[Hg]"
        }
      },
      {
        "code" : {
          "coding" : [{
            "system" : "http://loinc.org",
            "code" : "8462-4",
            "display" : "Diastolic blood pressure"
          }]
        },
        "valueQuantity" : {
          "value" : 62,
          "system" : "http://unitsofmeasure.org",
          "code" : "mm[Hg]"
        }
      },
      {
        "code" : {
          "coding" : [{
            "system" : "http://loinc.org",
            "code" : "8867-4",
            "display" : "Heart rate"
          }]
        },
        "valueQuantity" : {
          "value" : 72,
          "system" : "http://unitsofmeasure.org",
          "code" : "/min"
        }
      },
      {
        "code" : {
          "coding" : [{
            "system" : "http://loinc.org",
            "code" : "39156-5",
            "display" : "Body mass index (BMI) [Ratio]"
          }]
        },
        "valueQuantity" : {
          "value" : 22.72,
          "system" : "http://unitsofmeasure.org",
          "code" : "kg/m2"
        }
      }]
    },
    "request" : {
      "method" : "POST",
      "url" : "Observation"
    }
  }]
}