Skip to content

Location

JonasBacker edited this page Nov 19, 2019 · 1 revision

Location

Query Location (Single)

query Location{
    
    Location(_id: "5dcbfe529f0ecb264c1790ef"){
        id
        name
    }
    
}

Query Location (List)

query LocationList {
  LocationList {
    entry {
      resource {
        ...on Location {
          id
          resourceType
          status
        }
      }
    }
  }
}

Mutation Create Location

mutation LocationCreate{
    LocationCreate(resource: {
  resourceType: Location,
    id: "1",
  text: {
    status: "generated",
    div: "<div xmlns=\"http://www.w3.org/1999/xhtml\">Burgers UMC, South Wing, second floor</div>"
  },
  identifier: [
    {
      value: "B1-S.F2"
    }
  ],
  status: "active",
  name: "South Wing, second floor",
  alias: [
    "BU MC, SW, F2",
    "Burgers University Medical Center, South Wing, second floor"
  ],
  description: "Second floor of the Old South Wing, formerly in use by Psychiatry",
  mode: "instance",
  telecom: [
    {
      system: "phone",
      value: "2328",
      use: "work"
    },
    {
      system: "fax",
      value: "2329",
      use: "work"
    },
    {
      system: "email",
      value: "second wing admissions"
    },
    {
      system: "url",
      value: "http://sampleorg.com/southwing",
      use: "work"
    }
  ],
  address: {
    use: "work",
    line: [
      "Galapagosweg 91, Building A"
    ],
    city: "Den Burg",
    postalCode: "9105 PZ",
    country: "NLD"
  },
  physicalType: {
    coding: [
      {
        system: "http://terminology.hl7.org/CodeSystem/location-physical-type",
        code: "wi",
        display: "Wing"
      }
    ]
  },
  position: {
    longitude: -83.6945691,
    latitude: 42.25475478,
    altitude: 0
  },

  }
)
  {
    id
  }
}

Mutation Update Location

mutation LocationUpdate{
    LocationUpdate( id: "5dcbfe529f0ecb264c1790ef", resource: {
  resourceType: Location,
  name: "South Wing, The top floor",
  }
)
  {
    id
  }
}

Mutation Delete Location

mutation LocationRemove{
    LocationRemove( id: "5dcbfe529f0ecb264c1790ef"){
        
    id       
    }
}
Clone this wiki locally