﻿{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://hl7.org/fhir/json-schema/PaymentNotice",
  "$ref": "#/definitions/PaymentNotice",
  "description": "see http://hl7.org/fhir/json.html#schema for information about the FHIR Json Schemas",
  "definitions": {
    "PaymentNotice": {
      "allOf": [
        {
          "$ref": "DomainResource.schema.json/definitions/DomainResource"
        },
        {
          "description": "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.",
          "properties": {
            "resourceType": {
              "description": "This is a PaymentNotice resource",
              "type": "string",
              "enum": [
                "PaymentNotice"
              ]
            },
            "identifier": {
              "description": "The notice business identifier.",
              "type": "array",
              "items": {
                "$ref": "Identifier.schema.json/definitions/Identifier"
              }
            },
            "status": {
              "description": "The status of the resource instance.",
              "type": "string",
              "pattern": "[^\\s]+([\\s]?[^\\s]+)*"
            },
            "status_": {
              "description": "Extensions for status",
              "$ref": "Element.schema.json/definitions/Element"
            },
            "ruleset": {
              "description": "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.",
              "$ref": "Coding.schema.json/definitions/Coding"
            },
            "originalRuleset": {
              "description": "The style (standard) and version of the original material which was converted into this resource.",
              "$ref": "Coding.schema.json/definitions/Coding"
            },
            "created": {
              "description": "The date when this resource was created.",
              "type": "string",
              "pattern": "-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?"
            },
            "created_": {
              "description": "Extensions for created",
              "$ref": "Element.schema.json/definitions/Element"
            },
            "targetIdentifier": {
              "description": "The Insurer who is target  of the request.",
              "$ref": "Identifier.schema.json/definitions/Identifier"
            },
            "targetReference": {
              "description": "The Insurer who is target  of the request.",
              "$ref": "Reference.schema.json/definitions/Reference"
            },
            "providerIdentifier": {
              "description": "The practitioner who is responsible for the services rendered to the patient.",
              "$ref": "Identifier.schema.json/definitions/Identifier"
            },
            "providerReference": {
              "description": "The practitioner who is responsible for the services rendered to the patient.",
              "$ref": "Reference.schema.json/definitions/Reference"
            },
            "organizationIdentifier": {
              "description": "The organization which is responsible for the services rendered to the patient.",
              "$ref": "Identifier.schema.json/definitions/Identifier"
            },
            "organizationReference": {
              "description": "The organization which is responsible for the services rendered to the patient.",
              "$ref": "Reference.schema.json/definitions/Reference"
            },
            "requestIdentifier": {
              "description": "Reference of resource for which payment is being made.",
              "$ref": "Identifier.schema.json/definitions/Identifier"
            },
            "requestReference": {
              "description": "Reference of resource for which payment is being made.",
              "$ref": "Reference.schema.json/definitions/Reference"
            },
            "responseIdentifier": {
              "description": "Reference of response to resource for which payment is being made.",
              "$ref": "Identifier.schema.json/definitions/Identifier"
            },
            "responseReference": {
              "description": "Reference of response to resource for which payment is being made.",
              "$ref": "Reference.schema.json/definitions/Reference"
            },
            "paymentStatus": {
              "description": "The payment status, typically paid: payment sent, cleared: payment received.",
              "$ref": "Coding.schema.json/definitions/Coding"
            },
            "statusDate": {
              "description": "The date when the above payment action occurrred.",
              "type": "string",
              "pattern": "-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?"
            },
            "statusDate_": {
              "description": "Extensions for statusDate",
              "$ref": "Element.schema.json/definitions/Element"
            }
          },
          "required": [
            "paymentStatus",
            "resourceType"
          ]
        }
      ]
    }
  }
}