Skip to content

Encounter

JonasBacker edited this page Nov 19, 2019 · 1 revision

Encounter

Query Encounter (Single)

query Encounter{
    
    Encounter(_id: "5dcd0b739f814f507c1cb86e"){
        id
        status
    }
}

Query Encounter (List)

query EncounterList {
  EncounterList {
    entry {
      resource {
        ...on Encounter {
          id
          resourceType
          status
        }
      }
    }
  }
}

Mutation Create Encounter

mutation EncounterCreate{
    EncounterCreate(resource: {
  resourceType: Encounter,
  id: "2",
  text: {
    status: "generated",
    div: "<div xmlns=\"http://www.w3.org/1999/xhtml\">Encounter with patient @example</div>",
  },
  status: "triaged",
  class: {
    system: "http://terminology.hl7.org/CodeSystem/v3-ActCode",
    code: "IMP",
    display: "inpatient encounter",
  },
 },
)
    
    {
    id
 }
}

Mutation Update Encounter

mutation EncounterUpdate{
    EncounterUpdate( id: "5dcd0b739f814f507c1cb86e", resource: {
  resourceType: Encounter,
  status: "arrived",
  class: {
    system: "http://terminology.hl7.org/CodeSystem/v3-ActCode",
    code: "IMP",
    display: "inpatient encounter",
  },
  }
)
  {
    id
    status
  }
}

Mutation Delete Encounter

mutation EncounterRemove{
    EncounterRemove( id: "5dcd0ccaa442951b54c07b36"){
        
    id       
    }
}
Clone this wiki locally